-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
90 lines (75 loc) · 2.9 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{
# TODO: Figure out how to override this locally.
inputs.nixpkgs.url = "git+file:///home/delroth/work/nixpkgs";
inputs.lix.url = "git+https://[email protected]/lix-project/nixos-module";
inputs.lix.inputs.nixpkgs.follows = "nixpkgs";
inputs.poetry2nix.url = "github:nix-community/poetry2nix";
inputs.poetry2nix.inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.url = "github:nix-community/home-manager";
inputs.home-manager.inputs.nixpkgs.follows = "nixpkgs";
inputs.delroth-net.url = "git+https://github.com/delroth/delroth.net?submodules=1";
inputs.delroth-net.inputs.nixpkgs.follows = "nixpkgs";
inputs.glome-nixos.url = "github:delroth/glome-nixos";
inputs.glome-nixos.inputs.nixpkgs.follows = "nixpkgs";
inputs.nixfmt.url = "github:NixOS/nixfmt";
inputs.protonvpn-pmp-transmission.url = "github:delroth/protonvpn-pmp-transmission";
inputs.protonvpn-pmp-transmission.inputs.nixpkgs.follows = "nixpkgs";
inputs.protonvpn-pmp-transmission.inputs.poetry2nix.follows = "poetry2nix";
inputs.publibike-locator.url = "github:delroth/publibike-locator";
inputs.publibike-locator.inputs.nixpkgs.follows = "nixpkgs";
inputs.label-approved.url = "git+file:///home/delroth/work/label-approved";
inputs.label-approved.inputs.nixpkgs.follows = "nixpkgs";
inputs.label-approved.inputs.poetry2nix.follows = "poetry2nix";
outputs =
{
self,
lix,
delroth-net,
glome-nixos,
nixpkgs,
home-manager,
label-approved,
nixfmt,
protonvpn-pmp-transmission,
...
}@attrs:
{
formatter.x86_64-linux = nixfmt.packages.x86_64-linux.default;
colmena =
let
pkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [
delroth-net.overlay
glome-nixos.overlay
protonvpn-pmp-transmission.overlay
];
config.allowInsecurePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) [ "olm" ];
config.allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) [ "elasticsearch" ];
};
machines = import ./machines;
mkNormalDeployment = name: machineMod: {
name = "${name}.delroth.net";
value =
{ config, ... }:
{
_module.args.machineName = name;
deployment.targetHost = config.my.networking.fqdn;
imports = [
glome-nixos.nixosModules.glome
home-manager.nixosModules.home-manager
label-approved.nixosModules.default
lix.nixosModules.default
machineMod
];
};
};
in
{
meta.name = "*.delroth.net prod infra";
meta.nixpkgs = pkgs;
meta.specialArgs = attrs;
}
// (pkgs.lib.mapAttrs' mkNormalDeployment machines);
};
}