Skip to content

Commit

Permalink
Make the builder dynamic user a trusted user
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbaur committed Aug 13, 2023
1 parent 28fc2bd commit cce2f4c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nixos-modules/builder.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ let
};
serviceConfig = {
DynamicUser = true;
User = "builder";
CacheDirectory = "builder";
StateDirectory = "builder";
};
Expand All @@ -61,6 +62,8 @@ in
};

config = lib.mkIf (cfg.build != { }) {
users.groups.builder = { };
nix.settings.trusted-users = [ "builder" ];
systemd.timers = lib.mapAttrs (_: { timer, ... }: timer) systemdConfigs;
systemd.services = lib.mapAttrs (_: { service, ... }: service) systemdConfigs;
};
Expand Down

0 comments on commit cce2f4c

Please sign in to comment.