about summary refs log tree commit diff
path: root/modules/common/users.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2024-04-21 02:15:42 +0300
committerAzat Bahawi <azat@bahawi.net>2024-04-21 02:15:42 +0300
commite6ed60548397627bf10f561f9438201dbba0a36e (patch)
treef9a84c5957d2cc4fcd148065ee9365a0c851ae1c /modules/common/users.nix
parent2024-04-18 (diff)
2024-04-21
Diffstat (limited to '')
-rw-r--r--modules/common/users.nix (renamed from modules/nixos/common/users.nix)18
1 files changed, 11 insertions, 7 deletions
diff --git a/modules/nixos/common/users.nix b/modules/common/users.nix
index a92a38e..ba1a89b 100644
--- a/modules/nixos/common/users.nix
+++ b/modules/common/users.nix
@@ -1,13 +1,17 @@
-{
-  lib,
-  localUsername ? lib.my.username,
-  ...
-}:
+{ lib, ... }:
 with lib;
 let
-  home = "/home/${localUsername}";
+  home = "/home/${my.username}";
 in
 {
+  imports = [
+    (mkAliasOptionModule [ "my" ] [
+      "users"
+      "users"
+      my.username
+    ])
+  ];
+
   ark.directories = [ home ];
 
   users = {
@@ -16,7 +20,7 @@ in
     users = {
       root.hashedPassword = "@HASHED_PASSWORD@";
 
-      ${localUsername} = {
+      ${my.username} = {
         isNormalUser = true;
         uid = 1000;
         description = my.fullname;

Consider giving Nix/NixOS a try! <3