about summary refs log tree commit diff
path: root/nixos/modules/services
diff options
context:
space:
mode:
authorVincent Haupert <vincent@yaxi.tech>2024-02-09 15:25:17 +0100
committerVincent Haupert <vincent@yaxi.tech>2024-02-09 16:19:23 +0100
commit35df23c07d60baad028f3270d20204c09c9a44e5 (patch)
tree2fdbe4208e53288da99336eb871d616999ab3a38 /nixos/modules/services
parent3f13f8d85e29373e90b4c6e904891680702c2b6f (diff)
downloadnixlib-35df23c07d60baad028f3270d20204c09c9a44e5.tar
nixlib-35df23c07d60baad028f3270d20204c09c9a44e5.tar.gz
nixlib-35df23c07d60baad028f3270d20204c09c9a44e5.tar.bz2
nixlib-35df23c07d60baad028f3270d20204c09c9a44e5.tar.lz
nixlib-35df23c07d60baad028f3270d20204c09c9a44e5.tar.xz
nixlib-35df23c07d60baad028f3270d20204c09c9a44e5.tar.zst
nixlib-35df23c07d60baad028f3270d20204c09c9a44e5.zip
nixos/github-runners: set `DynamicUser=false` if `user` not `null`
Diffstat (limited to 'nixos/modules/services')
-rw-r--r--nixos/modules/services/continuous-integration/github-runner/service.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/nixos/modules/services/continuous-integration/github-runner/service.nix b/nixos/modules/services/continuous-integration/github-runner/service.nix
index cdf86ca8bfce..cbbf51d30b0b 100644
--- a/nixos/modules/services/continuous-integration/github-runner/service.nix
+++ b/nixos/modules/services/continuous-integration/github-runner/service.nix
@@ -278,11 +278,12 @@ with lib;
           # compiled code
           LockPersonality = mkDefault false;
 
-          # Note that this has some interactions with the User setting; so you may
-          # want to consult the systemd docs if using both.
           DynamicUser = mkDefault true;
         }
-        (mkIf (cfg.user != null) { User = cfg.user; })
+        (mkIf (cfg.user != null) {
+          DynamicUser = false;
+          User = cfg.user;
+        })
         cfg.serviceOverrides
       ];
     }