# System services { config, lib, pkgs, nomarchyConfig, ... }: { # Printing service services.printing = lib.mkIf (nomarchyConfig.enablePrinting or true) { enable = true; browsed.enable = true; drivers = with pkgs; [brlaser gutenprint]; }; # Avahi for mDNS discovery (network printers) services.avahi = lib.mkIf (nomarchyConfig.enablePrinting or true) { enable = true; nssmdns4 = true; openFirewall = true; }; # Mullvad VPN services.mullvad-vpn.enable = nomarchyConfig.enableMullvad or false; # Syncthing - parameterized user services.syncthing = lib.mkIf (nomarchyConfig.enableSyncthing or true) { enable = true; user = nomarchyConfig.username; dataDir = "/home/${nomarchyConfig.username}/.config/syncthing"; configDir = "/home/${nomarchyConfig.username}/.config/syncthing"; openDefaultPorts = true; guiAddress = "127.0.0.1:8384"; }; # Auto-cpufreq for automatic CPU power management services.auto-cpufreq = { enable = true; settings = { battery = { governor = "powersave"; turbo = "never"; scaling_min_freq = 800000; scaling_max_freq = 2000000; }; charger = { governor = "performance"; turbo = "auto"; scaling_min_freq = 800000; scaling_max_freq = 4500000; }; }; }; # Disable power-profiles-daemon (conflicts with auto-cpufreq) services.power-profiles-daemon.enable = false; }