diff options
author | tv <tv@krebsco.de> | 2016-02-21 07:39:24 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2016-02-21 07:39:24 +0100 |
commit | 67e5fddc0bfe624c6b53b673582e92a28cf530f9 (patch) | |
tree | 70ce446289432179ad4eff7558ca7d949671f9d8 /krebs/3modules | |
parent | e3ddf995e92985ee14dab5735ac55045c166aaaf (diff) |
krebs.users.krebs: init
Diffstat (limited to 'krebs/3modules')
-rw-r--r-- | krebs/3modules/default.nix | 15 | ||||
-rw-r--r-- | krebs/3modules/git.nix | 6 | ||||
-rw-r--r-- | krebs/3modules/lib.nix | 2 |
3 files changed, 15 insertions, 8 deletions
diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix index 7a343d333..aeeabfe53 100644 --- a/krebs/3modules/default.nix +++ b/krebs/3modules/default.nix @@ -104,11 +104,16 @@ let retiolum = "hosts"; }; - krebs.users.root = { - home = "/root"; - name = "root"; - pubkey = config.krebs.build.host.ssh.pubkey; - uid = 0; + krebs.users = { + krebs = { + home = "/krebs"; + mail = "spam@krebsco.de"; + }; + root = { + home = "/root"; + pubkey = config.krebs.build.host.ssh.pubkey; + uid = 0; + }; }; networking.extraHosts = concatStringsSep "\n" (flatten ( diff --git a/krebs/3modules/git.nix b/krebs/3modules/git.nix index a9542718d..0cc2f11c9 100644 --- a/krebs/3modules/git.nix +++ b/krebs/3modules/git.nix @@ -232,13 +232,15 @@ let ]) (filter (rule: rule.perm.allow-receive-ref != null) cfg.rules)); }; - users.extraUsers = singleton rec { + # TODO cfg.user + users.users.git = rec { description = "Git repository hosting user"; name = "git"; shell = "/bin/sh"; openssh.authorizedKeys.keys = mapAttrsToList (_: makeAuthorizedKey git-ssh-command) - config.krebs.users; + (filterAttrs (_: user: isString user.pubkey) + config.krebs.users); uid = genid name; }; }; diff --git a/krebs/3modules/lib.nix b/krebs/3modules/lib.nix index b19f275b5..ccd6a6afa 100644 --- a/krebs/3modules/lib.nix +++ b/krebs/3modules/lib.nix @@ -10,6 +10,6 @@ let type = types.attrs; }; imp = { - krebs.lib = lib // import ../4lib { inherit lib; } // builtins; + krebs.lib = lib // import ../4lib { inherit config lib; } // builtins; }; in out |