Formatting
This commit is contained in:
parent
e8006179f8
commit
323b0291df
1 changed files with 22 additions and 30 deletions
52
flake.nix
52
flake.nix
|
@ -158,24 +158,19 @@
|
|||
overlays.default = import ./overlays;
|
||||
|
||||
nixosModules = builtins.listToAttrs (
|
||||
map
|
||||
(x: {
|
||||
name = x;
|
||||
value = import (./modules + "/${x}");
|
||||
})
|
||||
(builtins.attrNames (builtins.readDir ./modules))
|
||||
map (x: {
|
||||
name = x;
|
||||
value = import (./modules + "/${x}");
|
||||
}) (builtins.attrNames (builtins.readDir ./modules))
|
||||
);
|
||||
|
||||
nixosConfigurations = builtins.listToAttrs (
|
||||
map
|
||||
(machine: {
|
||||
name = machine;
|
||||
value =
|
||||
self.lib.defSystem (machines.${machine}.system or "x86_64-linux")
|
||||
{ imports = [ machines.${machine}.config ]; }
|
||||
(machines.${machine}.deploy or null);
|
||||
})
|
||||
(builtins.attrNames machines)
|
||||
map (machine: {
|
||||
name = machine;
|
||||
value = self.lib.defSystem (machines.${machine}.system or "x86_64-linux") {
|
||||
imports = [ machines.${machine}.config ];
|
||||
} (machines.${machine}.deploy or null);
|
||||
}) (builtins.attrNames machines)
|
||||
);
|
||||
|
||||
colmena =
|
||||
|
@ -189,22 +184,19 @@
|
|||
};
|
||||
}
|
||||
// builtins.listToAttrs (
|
||||
map
|
||||
(machine: {
|
||||
name = machine;
|
||||
value = {
|
||||
deployment = {
|
||||
targetHost = machines.${machine}.deploy.host;
|
||||
targetUser = "root"; # machines.${machine}.deploy.sshUser;
|
||||
# targetUser = machines.${machine}.deploy.sshUser;
|
||||
tags = machines.${machine}.deploy.tags or [ ];
|
||||
};
|
||||
imports =
|
||||
self.lib.systemModules (machines.${machine}.system or "x86_64-linux")
|
||||
machines.${machine}.config;
|
||||
map (machine: {
|
||||
name = machine;
|
||||
value = {
|
||||
deployment = {
|
||||
targetHost = machines.${machine}.deploy.host;
|
||||
targetUser = "root"; # machines.${machine}.deploy.sshUser;
|
||||
# targetUser = machines.${machine}.deploy.sshUser;
|
||||
tags = machines.${machine}.deploy.tags or [ ];
|
||||
};
|
||||
})
|
||||
(builtins.filter (machine: machines.${machine} ? deploy) (builtins.attrNames machines))
|
||||
imports = self.lib.systemModules (machines.${machine}.system or "x86_64-linux"
|
||||
) machines.${machine}.config;
|
||||
};
|
||||
}) (builtins.filter (machine: machines.${machine} ? deploy) (builtins.attrNames machines))
|
||||
);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue