From 79da51b99cdd18322fcf44555589156e02180d98 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sun, 6 Jul 2025 21:16:14 +0200 Subject: modules/users: Apply new formatting --- modules/by-name/us/users/module.nix | 60 ++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 31 deletions(-) (limited to 'modules/by-name/us/users/module.nix') diff --git a/modules/by-name/us/users/module.nix b/modules/by-name/us/users/module.nix index 4be3f41..6011204 100644 --- a/modules/by-name/us/users/module.nix +++ b/modules/by-name/us/users/module.nix @@ -3,32 +3,29 @@ lib, pkgs, ... -}: -let +}: let cfg = config.vhack.users; - mkUser = - { - name, - password, - uid, - sshKey, - }: - { - inherit name; - value = { - inherit name uid; - isNormalUser = true; - home = "/home/${name}"; - hashedPassword = password; - extraGroups = [ - "wheel" - ]; - openssh.authorizedKeys.keys = [ - sshKey - ]; - }; + mkUser = { + name, + password, + uid, + sshKey, + }: { + inherit name; + value = { + inherit name uid; + isNormalUser = true; + home = "/home/${name}"; + hashedPassword = password; + extraGroups = [ + "wheel" + ]; + openssh.authorizedKeys.keys = [ + sshKey + ]; }; + }; extraUsers = lib.listToAttrs ( builtins.map mkUser [ @@ -46,8 +43,7 @@ let } ] ); -in -{ +in { options.vhack.users = { enable = lib.mkEnableOption "user setup"; }; @@ -57,12 +53,14 @@ in mutableUsers = false; defaultUserShell = pkgs.bashInteractive; - users = { - root = { - hashedPassword = lib.mkForce null; # to lock root - openssh.authorizedKeys.keys = lib.mkForce [ ]; - }; - } // extraUsers; + users = + { + root = { + hashedPassword = lib.mkForce null; # to lock root + openssh.authorizedKeys.keys = lib.mkForce []; + }; + } + // extraUsers; # TODO(@bpeetz): Is this still relevant? # If it is, it should be moved to a separate module. <2024-12-24> -- cgit 1.4.1