Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Feb 14, 2024
1 parent a5bc0ff commit c91bade
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions nixos/github-runner.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ let
in
{
options = {
# TODO: Make this general enough to support organizations and other users.
services.personal-github-runners = lib.mkOption {
default = { };
type = types.submodule {
Expand Down Expand Up @@ -49,6 +50,9 @@ in
type = types.str;
default = "gh-selfhosted-tokens";
readOnly = true;
description = ''
sops-nix parent key path containing the tokens
'';
};
nixosConfig = lib.mkOption {
type = types.deferredModule;
Expand Down Expand Up @@ -96,6 +100,11 @@ in
userModule // {
sops.secrets."${cfg.sopsPrefix}/${cfg.owner}".mode = "0440";

nix.settings = {
trusted-users = [ user ];
allowed-users = [ user ];
};

containers =
lib.listToAttrs (builtins.map
(name:
Expand Down Expand Up @@ -126,9 +135,5 @@ in
})
cfg.repositories);

nix.settings = {
trusted-users = [ user ];
allowed-users = [ user ];
};
};
}

0 comments on commit c91bade

Please sign in to comment.