feat: minize the deploy.nodes code.

This commit is contained in:
CronyAkatsuki 2026-01-18 01:07:19 +01:00
parent 0d71737039
commit 426abb144a
2 changed files with 14 additions and 10 deletions

View file

@ -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];

View file

@ -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";