From 263525d72429211251c55153b621b03235042aed Mon Sep 17 00:00:00 2001 From: nixbitcoin Date: Tue, 8 Sep 2020 12:25:33 +0000 Subject: [PATCH] nix-bitcoin-services: add nb-services.privileged helper --- modules/nix-bitcoin-services.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/nix-bitcoin-services.nix b/modules/nix-bitcoin-services.nix index e8e2f9a..24d0099 100644 --- a/modules/nix-bitcoin-services.nix +++ b/modules/nix-bitcoin-services.nix @@ -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