modules.packages.desktop: disable for server

This commit is contained in:
2025-08-23 19:53:45 +08:00
parent 668b18d525
commit cdad2d0381
3 changed files with 8 additions and 3 deletions

View File

@@ -27,8 +27,12 @@ inputs:
xrdp = { enable = true; hostname = [ "srv1.chn.moe" ]; };
samba = { hostsAllowed = ""; shares = { home.path = "/home"; root.path = "/"; }; };
};
packages.packages._prebuildPackages =
[ inputs.topInputs.self.nixosConfigurations.srv1-node1.pkgs.localPackages.vasp.intel ];
packages =
{
desktop = {};
packages._prebuildPackages =
[ inputs.topInputs.self.nixosConfigurations.srv1-node1.pkgs.localPackages.vasp.intel ];
};
};
};
}

View File

@@ -29,6 +29,7 @@ inputs:
sshd = { groupBanner = true; motd = true; };
speedtest = {};
};
packages.desktp = {};
};
};
}

View File

@@ -3,7 +3,7 @@ inputs:
options.nixos.packages.desktop = let inherit (inputs.lib) mkOption types; in mkOption
{
type = types.nullOr (types.submodule {});
default = if builtins.elem inputs.config.nixos.model.type [ "desktop" "server" ] then {} else null;
default = if inputs.config.nixos.model.type == "desktop" then {} else null;
};
config = let inherit (inputs.config.nixos.packages) desktop; in inputs.lib.mkIf (desktop != null)
{