nix-bitcoin-services: add nb-services.privileged helper

This commit is contained in:
nixbitcoin 2020-09-08 12:25:33 +00:00
parent f00d1d24c5
commit 263525d724
No known key found for this signature in database
GPG Key ID: DD11F9AD5308B3BA

View File

@ -4,7 +4,7 @@
lib: pkgs:
with lib;
{
let self = {
# These settings roughly follow systemd's "strict" security profile
defaultHardening = {
PrivateTmp = "true";
@ -56,10 +56,13 @@ with lib;
${src}
'';
# Used for ExecStart*
privileged = src: "+${self.script src}";
cliExec = mkOption {
# Used by netns-isolation to execute the cli in the service's private netns
internal = true;
type = types.str;
default = "exec";
};
}
}; in self