Formatting
This commit is contained in:
parent
e8006179f8
commit
323b0291df
1 changed files with 22 additions and 30 deletions
30
flake.nix
30
flake.nix
|
@ -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 =
|
value = self.lib.defSystem (machines.${machine}.system or "x86_64-linux") {
|
||||||
self.lib.defSystem (machines.${machine}.system or "x86_64-linux")
|
imports = [ machines.${machine}.config ];
|
||||||
{ imports = [ machines.${machine}.config ]; }
|
} (machines.${machine}.deploy or null);
|
||||||
(machines.${machine}.deploy or null);
|
}) (builtins.attrNames machines)
|
||||||
})
|
|
||||||
(builtins.attrNames machines)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
colmena =
|
colmena =
|
||||||
|
@ -189,8 +184,7 @@
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// builtins.listToAttrs (
|
// builtins.listToAttrs (
|
||||||
map
|
map (machine: {
|
||||||
(machine: {
|
|
||||||
name = machine;
|
name = machine;
|
||||||
value = {
|
value = {
|
||||||
deployment = {
|
deployment = {
|
||||||
|
@ -199,12 +193,10 @@
|
||||||
# targetUser = machines.${machine}.deploy.sshUser;
|
# targetUser = machines.${machine}.deploy.sshUser;
|
||||||
tags = machines.${machine}.deploy.tags or [ ];
|
tags = machines.${machine}.deploy.tags or [ ];
|
||||||
};
|
};
|
||||||
imports =
|
imports = self.lib.systemModules (machines.${machine}.system or "x86_64-linux"
|
||||||
self.lib.systemModules (machines.${machine}.system or "x86_64-linux")
|
) machines.${machine}.config;
|
||||||
machines.${machine}.config;
|
|
||||||
};
|
};
|
||||||
})
|
}) (builtins.filter (machine: machines.${machine} ? deploy) (builtins.attrNames machines))
|
||||||
(builtins.filter (machine: machines.${machine} ? deploy) (builtins.attrNames machines))
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue