refactor(tazjin/nixos): Automatically include home config
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>
This commit is contained in:
parent
d54b1f5b30
commit
c4a3500d70
2 changed files with 23 additions and 17 deletions
21
users/tazjin/nixos/modules/home-config.nix
Normal file
21
users/tazjin/nixos/modules/home-config.nix
Normal file
|
@ -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}";
|
||||||
|
}
|
|
@ -15,10 +15,11 @@ lib.fix (self: {
|
||||||
imports = [
|
imports = [
|
||||||
(mod "open_eid.nix")
|
(mod "open_eid.nix")
|
||||||
(usermod "fonts.nix")
|
(usermod "fonts.nix")
|
||||||
|
(usermod "home-config.nix")
|
||||||
(usermod "persistence.nix")
|
(usermod "persistence.nix")
|
||||||
(usermod "physical.nix")
|
(usermod "physical.nix")
|
||||||
(usermod "zerotier.nix")
|
(usermod "zerotier.nix")
|
||||||
"${pkgs.home-manager.src}/nixos"
|
(pkgs.home-manager.src + "/nixos")
|
||||||
] ++ lib.optional (builtins.pathExists ./local-config.nix) ./local-config.nix;
|
] ++ lib.optional (builtins.pathExists ./local-config.nix) ./local-config.nix;
|
||||||
|
|
||||||
tvl.cache.enable = true;
|
tvl.cache.enable = true;
|
||||||
|
@ -192,19 +193,6 @@ lib.fix (self: {
|
||||||
|
|
||||||
time.timeZone = "Africa/Cairo";
|
time.timeZone = "Africa/Cairo";
|
||||||
|
|
||||||
nix = {
|
|
||||||
trustedUsers = [ "tazjin" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.tazjin = {
|
|
||||||
isNormalUser = true;
|
|
||||||
createHome = true;
|
|
||||||
extraGroups = [ "wheel" "networkmanager" "video" "adbusers" ];
|
|
||||||
uid = 1000;
|
|
||||||
shell = pkgs.fish;
|
|
||||||
initialHashedPassword = "$6$d3FywUNCuZnJ4l.$ZW2ul59MLYon1v1xhC3lTJZfZ91lWW6Tpi13MpME0cJcYZNrsx7ABdgQRn.K05awruG2Y9ARAzURnmiJ31WTS1";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
adb.enable = true;
|
adb.enable = true;
|
||||||
fish.enable = true;
|
fish.enable = true;
|
||||||
|
@ -235,9 +223,6 @@ lib.fix (self: {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.users.tazjin = depot.users.tazjin.home.tverskoy;
|
|
||||||
|
|
||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
|
|
||||||
system.stateVersion = "20.09";
|
system.stateVersion = "20.09";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue