grimm-nixos-laptop/modules/factorio.nix

28 lines
821 B
Nix
Raw Normal View History

2024-07-02 20:04:55 +02:00
{ pkgs, config, lib, ...}: {
networking.firewall.allowedTCPPorts = [
34197
];
networking.firewall.allowedUDPPorts = [
34197
];
systemd.services.clusterio-trangar = {
description = "clusterio pulling its config from trang.ar";
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
serviceConfig.Type = "simple";
# serviceConfig.PassEnvironment = "NIX_PATH";
#serviceConfig.User = "grimmauld";
#serviceConfig.Group = "users";
serviceConfig.WorkingDirectory = "/home/grimmauld/clusterio";
script = ''
${lib.getExe' config.nix.package "nix-shell"} -I nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos /home/grimmauld/clusterio/shell.nix
'';
wantedBy = ["multi-user.target"]; # starts after login
enable = true;
};
}