summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmily <vcs@emily.moe>2020-03-23 17:58:36 +0000
committerEmily <vcs@emily.moe>2020-04-18 05:15:47 +0100
commit695fd78ac45763b02ae4c68abda28974bb72c96b (patch)
treecfcc35adf4be1ababcc06e1506fd0407227ad701
parentd0f04c1623ae74f256ff5ced77ac78c7fe3b6abc (diff)
downloadnixpkgs-695fd78ac45763b02ae4c68abda28974bb72c96b.tar
nixpkgs-695fd78ac45763b02ae4c68abda28974bb72c96b.tar.gz
nixpkgs-695fd78ac45763b02ae4c68abda28974bb72c96b.tar.bz2
nixpkgs-695fd78ac45763b02ae4c68abda28974bb72c96b.tar.lz
nixpkgs-695fd78ac45763b02ae4c68abda28974bb72c96b.tar.xz
nixpkgs-695fd78ac45763b02ae4c68abda28974bb72c96b.tar.zst
nixpkgs-695fd78ac45763b02ae4c68abda28974bb72c96b.zip
nixos/tests/acme: use CAP_NET_BIND_SERVICE
-rw-r--r--nixos/tests/acme.nix3
-rw-r--r--nixos/tests/common/acme/server/default.nix3
2 files changed, 2 insertions, 4 deletions
diff --git a/nixos/tests/acme.nix b/nixos/tests/acme.nix
index 032432287bd..693f02962f4 100644
--- a/nixos/tests/acme.nix
+++ b/nixos/tests/acme.nix
@@ -33,8 +33,7 @@ in import ./make-test-python.nix {
         serviceConfig = {
           ExecStart = "${pkgs.pebble}/bin/pebble-challtestsrv -dns01 ':53' -defaultIPv6 '' -defaultIPv4 '${nodes.webserver.config.networking.primaryIPAddress}'";
           # Required to bind on privileged ports.
-          User = "root";
-          Group = "root";
+          AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ];
         };
       };
     };
diff --git a/nixos/tests/common/acme/server/default.nix b/nixos/tests/common/acme/server/default.nix
index fdc053a2d82..1d6c2cc9d30 100644
--- a/nixos/tests/common/acme/server/default.nix
+++ b/nixos/tests/common/acme/server/default.nix
@@ -126,8 +126,7 @@ in {
         '';
         serviceConfig = {
           # Required to bind on privileged ports.
-          User = "root";
-          Group = "root";
+          AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ];
         };
       };
     };