blob: 87a063402664bbe7bcf9794ecc527a1ce8d0e37c (
plain)
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
|
# modules/default.nix
#
# Helper functions for declaring system configurations and deployment nodes in
# the root `flake.nix'.
{ inputs }:
let
mkModules = modules: builtins.map (module: "${inputs.self}/modules/${module}") modules;
in
{
mkSystem = hostname: system: nixpkgsVersion: modules: rec {
deploy.nodes.${hostname} = {
inherit hostname;
profiles.system = {
user = "root";
sshUser = "tdback";
path = inputs.deploy-rs.lib.${system}.activate.nixos nixosConfigurations.${hostname};
};
};
nixosConfigurations.${hostname} = nixpkgsVersion.lib.nixosSystem {
inherit system;
modules = (mkModules modules) ++ [
"${inputs.self}/hosts/${hostname}"
"${inputs.self}/modules/users"
inputs.home-manager.nixosModules.home-manager
inputs.agenix.nixosModules.default
];
specialArgs = { inherit inputs; };
};
};
mergeSets = inputs.nixpkgs.lib.lists.foldl' (
x: y: inputs.nixpkgs.lib.attrsets.recursiveUpdate x y
) { };
}
|