about summary refs log tree commit diff
path: root/users/tazjin/nixos/modules/home-config.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-05-09T14·50+0200
committertazjin <tazjin@tvl.su>2022-05-10T13·41+0000
commitc4a3500d7024df199572c102420a4c8398344c1a (patch)
tree2b0494ac5c824c39cd79b48287b1c1c96bf99d92 /users/tazjin/nixos/modules/home-config.nix
parentd54b1f5b30e71c4ddbed476f5588b622f1cc9469 (diff)
refactor(tazjin/nixos): Automatically include home config r/4046
Adds a small module that automatically picks the right home
configuration for each machine.

For some reason, importing home-manager itself in this module causes
infinite recursion. I've not looked into why, and left the import in
the tverskoy config instead.

Change-Id: Ie27109a3c4478b198ab646b2e179999cf053980e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5552
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Diffstat (limited to 'users/tazjin/nixos/modules/home-config.nix')
-rw-r--r--users/tazjin/nixos/modules/home-config.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/users/tazjin/nixos/modules/home-config.nix b/users/tazjin/nixos/modules/home-config.nix
new file mode 100644
index 000000000000..2445afbb52c2
--- /dev/null
+++ b/users/tazjin/nixos/modules/home-config.nix
@@ -0,0 +1,21 @@
+# Inject the right home-manager config for the machine.
+
+{ config, depot, pkgs, ... }:
+
+{
+  users.users.tazjin = {
+    isNormalUser = true;
+    createHome = true;
+    extraGroups = [ "wheel" "networkmanager" "video" "adbusers" ];
+    uid = 1000;
+    shell = pkgs.fish;
+    initialHashedPassword = "$6$d3FywUNCuZnJ4l.$ZW2ul59MLYon1v1xhC3lTJZfZ91lWW6Tpi13MpME0cJcYZNrsx7ABdgQRn.K05awruG2Y9ARAzURnmiJ31WTS1h";
+  };
+
+  nix = {
+    trustedUsers = [ "tazjin" ];
+  };
+
+  home-manager.useGlobalPkgs = true;
+  home-manager.users.tazjin = depot.users.tazjin.home."${config.networking.hostName}";
+}