diff --git a/machines/factorio/configuration.nix b/machines/factorio/configuration.nix index 7916f84..4ce6a9e 100644 --- a/machines/factorio/configuration.nix +++ b/machines/factorio/configuration.nix @@ -47,8 +47,27 @@ firewall.trustedInterfaces = [ "tailscale0" ]; }; + services = { + factorio = { + enable = true; + game-name = "Blocks"; + description = "It's cityblocks"; + lan = true; + openFirewall = true; + saveName = "Blocks"; + admins = [ "eboskma" ]; + allowedPlayers = [ "eboskma" ]; + extraSettingsFile = config.sops.secrets.factorio-config.path; + }; + }; + systemd = { - services.logrotate-checkconf.enable = false; + services = { + factorio.serviceConfig = { + User = "factorio"; + }; + logrotate-checkconf.enable = false; + }; network = { enable = true; @@ -81,23 +100,12 @@ sudo.enable = false; }; - services = { - factorio = { - enable = true; - game-name = "Blocks"; - description = "It's cityblocks"; - lan = true; - openFirewall = true; - saveName = "Blocks"; - admins = [ "eboskma" ]; - allowedPlayers = [ "eboskma" ]; - extraSettingsFile = config.sops.secrets.factorio-config.path; - }; - }; - sops.defaultSopsFile = ./secrets.yaml; sops.secrets = { - factorio-config = { }; + factorio-config = { + owner = "factorio"; + group = "factorio"; + }; }; system.stateVersion = "24.11";