28 lines
821 B
Nix
28 lines
821 B
Nix
|
{ 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;
|
||
|
};
|
||
|
}
|