nix-config/system/services/sunshine.nix

21 lines
456 B
Nix
Raw Normal View History

2025-05-04 02:47:36 +02:00
{
config,
lib,
...
}:
with lib; let
2025-07-05 00:02:39 +02:00
cfg = config.system.services.sunshine;
2025-05-04 02:47:36 +02:00
in {
2025-07-05 00:02:39 +02:00
options.system.services.sunshine = {
enable = mkEnableOption "Enables Sunshine";
2025-05-04 02:47:36 +02:00
autostart = mkEnableOption "Enables autostart";
};
config.services.sunshine = mkIf cfg.enable {
2025-07-05 00:02:39 +02:00
inherit (cfg) enable;
2025-05-04 02:47:36 +02:00
autoStart = cfg.autostart;
capSysAdmin = true;
openFirewall = true;
2025-07-05 00:02:39 +02:00
settings.sunshine_name = config.system.networking.hostname;
2025-05-04 02:47:36 +02:00
};
}