feat: minize the deploy.nodes code.
This commit is contained in:
parent
0d71737039
commit
426abb144a
2 changed files with 14 additions and 10 deletions
20
flake.nix
20
flake.nix
|
|
@ -156,6 +156,8 @@
|
|||
chaotic,
|
||||
...
|
||||
} @ inputs: let
|
||||
hostsData = import ./hosts.nix;
|
||||
serversOnly = nixpkgs.lib.filterAttrs (n: v: v.type == "server") hostsData;
|
||||
mkDeployNode = hostname: arch: {
|
||||
inherit hostname;
|
||||
profiles.system = {
|
||||
|
|
@ -165,14 +167,16 @@
|
|||
};
|
||||
};
|
||||
in {
|
||||
deploy.nodes = nixpkgs.lib.mapAttrs' (
|
||||
hostname: meta: let
|
||||
arch = meta.arch;
|
||||
in {
|
||||
name = hostname;
|
||||
value = mkDeployNode hostname arch;
|
||||
}
|
||||
) (import ./hosts.nix);
|
||||
deploy.nodes =
|
||||
nixpkgs.lib.mapAttrs' (
|
||||
hostname: meta: let
|
||||
arch = meta.arch;
|
||||
in {
|
||||
name = hostname;
|
||||
value = mkDeployNode hostname arch;
|
||||
}
|
||||
)
|
||||
serversOnly;
|
||||
|
||||
nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
|
||||
modules = [inputs.stylix.nixOnDroidModules.stylix ./hosts/andronix/configuration.nix];
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@
|
|||
arch = "aarch64-linux";
|
||||
};
|
||||
tyr = {
|
||||
type = "client";
|
||||
type = "server";
|
||||
arch = "x86_64-linux";
|
||||
extraModules = [./modules/servers/tyr];
|
||||
# extraModules = [./modules/servers/tyr];
|
||||
};
|
||||
ymir = {
|
||||
type = "client";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue