home-manager: enable for darman on every host, not just terra

terra was the only host with real ~/.zshrc/.zshenv (via home-manager),
so it never hit the plain-zsh zsh-newuser-install wizard that shows up
on first login everywhere else. Wire home-manager.nixosModules.home-manager
into jupiter/neptun/mars/mercury (+ mercury-vm/jupiter-vbox test targets)
and give darman terra's shared zsh baseline via home/common.nix, imported
from common.nix. terra's own home.nix now only carries its
desktop/dev-specific profile (Hyprland, alacritty, git identity, direnv,
dev packages) layered on top via home-manager.users.darman.imports.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Du1WQRk1F8DenrPhf8TofF
This commit is contained in:
2026-08-22 05:03:43 +02:00
co-authored by Claude Sonnet 5
parent a1cd6ae6f1
commit 60bef752cb
4 changed files with 30 additions and 9 deletions
+13
View File
@@ -53,6 +53,19 @@
environment.systemPackages = with pkgs; [ git btop tmux curl wget zsh-powerlevel10k lsd ]; environment.systemPackages = with pkgs; [ git btop tmux curl wget zsh-powerlevel10k lsd ];
# ---- home-manager (user-level config for darman, all hosts) ----
# Requires home-manager.nixosModules.home-manager in the host's own
# `modules` list (flake.nix) — this only sets values for options that
# module declares, it doesn't import it, so every nixosSystem using
# common.nix needs that line too (mirrors terra's original setup).
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
# Protects activation if a plain (non-symlink) ~/.zshrc etc. already
# exists from before home-manager managed it — e.g. a host where the
# zsh-newuser-install wizard's option (0) was used to silence itself.
home-manager.backupFileExtension = "hm-bak";
home-manager.users.darman.imports = [ ./home/common.nix ];
# ---- zsh / oh-my-zsh / powerlevel10k ---- # ---- zsh / oh-my-zsh / powerlevel10k ----
programs.zsh = { programs.zsh = {
enable = true; enable = true;
+9 -1
View File
@@ -80,6 +80,7 @@
modules = [ modules = [
disko.nixosModules.disko disko.nixosModules.disko
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager
./hosts/jupiter/configuration.nix ./hosts/jupiter/configuration.nix
]; ];
}; };
@@ -91,6 +92,7 @@
modules = [ modules = [
disko.nixosModules.disko disko.nixosModules.disko
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager
./hosts/neptun/configuration.nix ./hosts/neptun/configuration.nix
]; ];
}; };
@@ -117,6 +119,7 @@
modules = [ modules = [
disko.nixosModules.disko disko.nixosModules.disko
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager
./hosts/mars/configuration.nix ./hosts/mars/configuration.nix
]; ];
}; };
@@ -131,6 +134,7 @@
modules = [ modules = [
(nixpkgs + "/nixos/modules/installer/sd-card/sd-image-aarch64.nix") (nixpkgs + "/nixos/modules/installer/sd-card/sd-image-aarch64.nix")
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager
./hosts/mercury/configuration.nix ./hosts/mercury/configuration.nix
]; ];
}; };
@@ -143,6 +147,7 @@
inherit system; # x86_64-linux, fast to build/boot with KVM inherit system; # x86_64-linux, fast to build/boot with KVM
modules = [ modules = [
(nixpkgs + "/nixos/modules/virtualisation/qemu-vm.nix") (nixpkgs + "/nixos/modules/virtualisation/qemu-vm.nix")
home-manager.nixosModules.home-manager
./common.nix ./common.nix
./services/network/unbound.nix ./services/network/unbound.nix
./services/network/pihole.nix ./services/network/pihole.nix
@@ -169,7 +174,10 @@
jupiter-vbox = nixpkgs.lib.nixosSystem { jupiter-vbox = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ ./hosts/jupiter/vm.nix ]; modules = [
home-manager.nixosModules.home-manager
./hosts/jupiter/vm.nix
];
}; };
# Custom kexec installer with our SSH key baked in, for headless install # Custom kexec installer with our SSH key baked in, for headless install
+5 -4
View File
@@ -43,11 +43,12 @@ in
programs.nix-ld.enable = true; programs.nix-ld.enable = true;
# ---- home-manager (user-level config for darman) ---- # ---- home-manager (user-level config for darman) ----
home-manager.useGlobalPkgs = true; # Base settings (useGlobalPkgs/useUserPackages/backupFileExtension) and the
home-manager.useUserPackages = true; # shared zsh baseline now live in common.nix + home/common.nix, applied to
home-manager.backupFileExtension = "hm-bak"; # every host. This just layers terra's desktop/dev-specific profile on top
# — home-manager.users.darman.imports merges additively across modules.
home-manager.extraSpecialArgs = { inherit unstable inputs; }; home-manager.extraSpecialArgs = { inherit unstable inputs; };
home-manager.users.darman = import ./home.nix; home-manager.users.darman.imports = [ ./home.nix ];
# ---- Boot (UEFI) ---- # ---- Boot (UEFI) ----
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
+3 -4
View File
@@ -3,9 +3,11 @@ let
tome = pkgs.callPackage ../../pkgs/tome.nix { src = inputs.tome; }; tome = pkgs.callPackage ../../pkgs/tome.nix { src = inputs.tome; };
in in
{ {
# home.stateVersion, programs.home-manager.enable, programs.zsh.enable all
# come from home/common.nix (shared across every host) via
# configuration.nix's home-manager.users.darman.imports.
imports = [ ./home/hyprland.nix ./home/theme.nix ]; imports = [ ./home/hyprland.nix ./home/theme.nix ];
home.stateVersion = "26.05";
home.keyboard.layout = "de"; home.keyboard.layout = "de";
programs.git = { programs.git = {
@@ -15,9 +17,6 @@ in
user.email = "mail@erik-s.dev"; user.email = "mail@erik-s.dev";
}; };
}; };
programs.home-manager.enable = true;
programs.zsh.enable = true;
# direnv + nix-direnv: lets per-repo devShells (e.g. ~/Data/Dev/repos/Tome's # direnv + nix-direnv: lets per-repo devShells (e.g. ~/Data/Dev/repos/Tome's
# flake.nix) auto-load in the shell AND in Rider via its "direnv # flake.nix) auto-load in the shell AND in Rider via its "direnv