feat(desktop): move desktop services config to nixos modules

This commit is contained in:
Mohammad Rafiq 2025-06-14 17:53:42 +08:00
parent 3040105f9c
commit 527a166a86
No known key found for this signature in database
6 changed files with 98 additions and 114 deletions

View file

@ -1,36 +0,0 @@
{
config,
lib,
osConfig,
pkgs,
...
}:
let
cfg = config.desktop;
upstreamCfg = osConfig.desktop;
inherit (lib) mkMerge mkIf mkEnableOption;
in
{
config = mkIf upstreamCfg.enable (mkMerge [
(lib.mkIf (osConfig.hardware.gpu == "nvidia") {
})
(lib.mkIf osConfig.desktop.enableSpotifyd {
services.spotifyd.enable = true;
services.spotifyd.settings.global = {
device_name = "${osConfig.system.hostname}";
device_type = "computer";
zeroconf_port = 5353;
};
})
(lib.mkIf osConfig.desktop.enableSteam {
home.persistence."/persist/home/${config.snowfallorg.user.name}".directories = [
".local/share/Steam"
];
})
(lib.mkIf osConfig.desktop.enableSunshine {
home.persistence."/persist/home/${config.snowfallorg.user.name}".directories = [
".config/sunshine"
];
})
]);
}