aboutsummaryrefslogtreecommitdiff
path: root/profiles/users
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2025-12-30 19:02:53 -0800
committerFranck Cuny <franck@fcuny.net>2025-12-30 19:02:53 -0800
commitdacf64ca7fd6d6d2cf927c709a74cb7adc8e6236 (patch)
treeb57889c0d611f11bdecba29c7a777c6100ba92df /profiles/users
parentinclude relevant programs in work profile (diff)
downloadinfra-dacf64ca7fd6d6d2cf927c709a74cb7adc8e6236.tar.gz
add back some abstractions related to user management
Diffstat (limited to '')
-rw-r--r--profiles/users/admin-user.nix (renamed from profiles/users/fcuny.nix)22
-rw-r--r--profiles/users/home-manager.nix7
2 files changed, 17 insertions, 12 deletions
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;
+ };
+}