Formatting

This commit is contained in:
Erwin Boskma 2024-03-11 17:47:04 +01:00
parent e8006179f8
commit 323b0291df
Signed by: erwin
SSH key fingerprint: SHA256:/Wk1WZdLg+vQHs3in9qq7PsIp8SMzwGSk/RLZ5zPuZk

View file

@ -158,24 +158,19 @@
overlays.default = import ./overlays; overlays.default = import ./overlays;
nixosModules = builtins.listToAttrs ( nixosModules = builtins.listToAttrs (
map map (x: {
(x: { name = x;
name = x; value = import (./modules + "/${x}");
value = import (./modules + "/${x}"); }) (builtins.attrNames (builtins.readDir ./modules))
})
(builtins.attrNames (builtins.readDir ./modules))
); );
nixosConfigurations = builtins.listToAttrs ( nixosConfigurations = builtins.listToAttrs (
map map (machine: {
(machine: { name = machine;
name = machine; value = self.lib.defSystem (machines.${machine}.system or "x86_64-linux") {
value = imports = [ machines.${machine}.config ];
self.lib.defSystem (machines.${machine}.system or "x86_64-linux") } (machines.${machine}.deploy or null);
{ imports = [ machines.${machine}.config ]; } }) (builtins.attrNames machines)
(machines.${machine}.deploy or null);
})
(builtins.attrNames machines)
); );
colmena = colmena =
@ -189,22 +184,19 @@
}; };
} }
// builtins.listToAttrs ( // builtins.listToAttrs (
map map (machine: {
(machine: { name = machine;
name = machine; value = {
value = { deployment = {
deployment = { targetHost = machines.${machine}.deploy.host;
targetHost = machines.${machine}.deploy.host; targetUser = "root"; # machines.${machine}.deploy.sshUser;
targetUser = "root"; # machines.${machine}.deploy.sshUser; # targetUser = machines.${machine}.deploy.sshUser;
# targetUser = machines.${machine}.deploy.sshUser; tags = machines.${machine}.deploy.tags or [ ];
tags = machines.${machine}.deploy.tags or [ ];
};
imports =
self.lib.systemModules (machines.${machine}.system or "x86_64-linux")
machines.${machine}.config;
}; };
}) imports = self.lib.systemModules (machines.${machine}.system or "x86_64-linux"
(builtins.filter (machine: machines.${machine} ? deploy) (builtins.attrNames machines)) ) machines.${machine}.config;
};
}) (builtins.filter (machine: machines.${machine} ? deploy) (builtins.attrNames machines))
); );
}; };