From 8cae5b89d45809552813668d0b51ee0a98b53ad7 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Thu, 13 May 2021 19:06:45 +0200 Subject: Add git group --- machines/srv1/configuration.nix | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'machines') diff --git a/machines/srv1/configuration.nix b/machines/srv1/configuration.nix index d13b054..c679956 100644 --- a/machines/srv1/configuration.nix +++ b/machines/srv1/configuration.nix @@ -291,14 +291,30 @@ in ]; }; - users.users.git = { - isSystemUser = true; - description = "git user"; - home = "/srv/git"; - shell = "${pkgs.git}/bin/git-shell"; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIqlCe4ovKa/Gwl5xmgu9nvVPmFXMgwdeLRYW7Gg7RWx pniedzwiedzinski19@gmail.com" - ]; + users = { + groups = { + git = {}; + }; + users = { + pn = { + isNormalUser = true; + extraGroups = [ "wheel" "git" ]; # Enable ‘sudo’ for the user. + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIqlCe4ovKa/Gwl5xmgu9nvVPmFXMgwdeLRYW7Gg7RWx pniedzwiedzinski19@gmail.com" + ]; + }; + + git = { + isSystemUser = true; + extraGroups = [ "git" ]; + description = "git user"; + home = "/srv/git"; + shell = "${pkgs.git}/bin/git-shell"; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIqlCe4ovKa/Gwl5xmgu9nvVPmFXMgwdeLRYW7Gg7RWx pniedzwiedzinski19@gmail.com" + ]; + }; + }; }; # This value determines the NixOS release from which the default -- cgit 1.4.1