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,30 +1,24 @@
{ config, lib, ... }:
{
config = lib.mkMerge [
{
networking = {
enableIPv6 = false;
useDHCP = lib.mkDefault true;
hostName = config.system.hostname;
networkmanager.enable = true;
};
config = {
networking = {
enableIPv6 = false;
useDHCP = lib.mkDefault true;
hostName = config.system.hostname;
networkmanager.enable = true;
};
services.openssh = {
enable = true;
settings = {
PrintMotd = true;
};
services.openssh = {
enable = true;
settings = {
PrintMotd = true;
};
};
services.tailscale = {
enable = true;
authKeyFile = config.sops.secrets."keys/tailscale".path;
};
environment.persistence."/persist".directories = [ "/var/lib/tailscale" ];
}
(lib.mkIf config.desktop.enableSpotifyd {
networking.firewall.allowedTCPPorts = [ 5353 ];
networking.firewall.allowedUDPPorts = [ 5353 ];
})
];
services.tailscale = {
enable = true;
authKeyFile = config.sops.secrets."keys/tailscale".path;
};
environment.persistence."/persist".directories = [ "/var/lib/tailscale" ];
};
}