diff options
Diffstat (limited to 'profiles')
| -rw-r--r-- | profiles/darwin.nix | 11 | ||||
| -rw-r--r-- | profiles/home-manager.nix | 2 | ||||
| -rw-r--r-- | profiles/makemkv.nix | 4 | ||||
| -rw-r--r-- | profiles/users/admin-user.nix (renamed from profiles/users/fcuny.nix) | 22 | ||||
| -rw-r--r-- | profiles/users/home-manager.nix | 7 |
5 files changed, 29 insertions, 17 deletions
diff --git a/profiles/darwin.nix b/profiles/darwin.nix index dadc7b9..d1e13a5 100644 --- a/profiles/darwin.nix +++ b/profiles/darwin.nix @@ -1,4 +1,9 @@ -{ lib, pkgs, ... }: +{ + adminUser, + lib, + pkgs, + ... +}: { fonts.packages = with pkgs; [ dejavu_fonts @@ -41,7 +46,7 @@ # Touch ID for sudo auth security.pam.services.sudo_local.touchIdAuth = true; - system.primaryUser = "fcuny"; + system.primaryUser = adminUser.name; environment.shells = [ pkgs.fish ]; @@ -80,7 +85,7 @@ ]; trusted-users = [ "@admin" - "fcuny" + adminUser.name ]; experimental-features = lib.mkDefault [ "nix-command" diff --git a/profiles/home-manager.nix b/profiles/home-manager.nix index 47919a9..eb7c94d 100644 --- a/profiles/home-manager.nix +++ b/profiles/home-manager.nix @@ -1,5 +1,6 @@ { self, + adminUser, hostName, inputs, config, @@ -10,6 +11,7 @@ inherit self hostName + adminUser inputs ; } diff --git a/profiles/makemkv.nix b/profiles/makemkv.nix index 8daa4fd..6bbc243 100644 --- a/profiles/makemkv.nix +++ b/profiles/makemkv.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ adminUser, pkgs, ... }: { environment.systemPackages = with pkgs; [ ffmpeg @@ -8,5 +8,5 @@ boot.kernelModules = [ "sg" ]; - users.users.fcuny.extraGroups = [ "cdrom" ]; + users.users.${adminUser.name}.extraGroups = [ "cdrom" ]; } diff --git a/profiles/users/fcuny.nix b/profiles/users/admin-user.nix index 9d4e1e2..1471ef7 100644 --- a/profiles/users/fcuny.nix +++ b/profiles/users/admin-user.nix @@ -1,8 +1,13 @@ -{ pkgs, ... }: { - nix.settings.trusted-users = [ "fcuny" ]; - users.users.fcuny = { - uid = 1000; + adminUser, + pkgs, + ... +}: +{ + nix.settings.trusted-users = [ adminUser.name ]; + + users.users.${adminUser.name} = { + inherit (adminUser) uid; shell = pkgs.fish; isNormalUser = true; hashedPassword = "$y$j9T$U3mXpCzXC1VUp8wV5snJz/$32vTk0KwVXvP/jLO13nMlGPHy0nCe4ZtebdvqU4hwmD"; @@ -11,14 +16,7 @@ ]; extraGroups = [ "wheel" + "docker" ]; }; - - home-manager.users.fcuny = { - home.username = "fcuny"; - userinfo = { - email = "franck@fcuny.net"; - fullName = "Franck Cuny"; - }; - }; } diff --git a/profiles/users/home-manager.nix b/profiles/users/home-manager.nix new file mode 100644 index 0000000..f84f359 --- /dev/null +++ b/profiles/users/home-manager.nix @@ -0,0 +1,7 @@ +{ adminUser, ... }: +{ + home-manager.users.${adminUser.name} = { + home.username = "${adminUser.name}"; + inherit (adminUser) userinfo; + }; +} |
