Move service hardening flags into separate file

This commit is contained in:
Jonas Nick
2019-04-28 13:15:12 +00:00
parent 66095871c6
commit a089d65d25
11 changed files with 33 additions and 54 deletions
+2 -5
View File
@@ -8,6 +8,7 @@
with lib;
let
nix-bitcoin-services = import ./nix-bitcoin-services.nix;
cfg = config.services.onion-chef;
dataDir = "/var/lib/onion-chef/";
onion-chef-script = pkgs.writeScript "onion-chef.sh" ''
@@ -77,11 +78,7 @@ in {
ExecStart = "${pkgs.bash}/bin/bash ${onion-chef-script}";
User = "root";
Type = "oneshot";
PrivateTmp = "true";
ProtectSystem = "full";
NoNewPrivileges = "true";
PrivateDevices = "true";
};
} // nix-bitcoin-services.defaultHardening;
};
};
}