aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatasha Moongrave <natasha@256phi.eu>2026-04-04 23:01:28 +0200
committerNatasha Moongrave <natasha@256phi.eu>2026-04-04 23:01:28 +0200
commit34b430244dd21d6fb21bf0463190535574d1a1fc (patch)
treea01f9e3fd1db886721b0cea73485e307d1d7b732
parent710216723ef47b0d1ee5dcbee1b312fe5484a9b5 (diff)
Pass hostname to home-manager via extraSpecialArgs
- Modified mkSystem to create per-host home-manager configuration - Hostname is now explicitly passed via extraSpecialArgs - Home config receives hostname parameter for rice selection
-rw-r--r--flake.nix11
-rw-r--r--home/mun/default.nix3
2 files changed, 8 insertions, 6 deletions
diff --git a/flake.nix b/flake.nix
index 4765224..96b354b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -60,12 +60,15 @@
fenix.overlays.default
];
- # Shared home-manager configuration
- homeManagerModule = {
+ # Per-host home-manager configuration
+ mkHomeManagerModule = hostname: {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
- extraSpecialArgs = {inherit inputs;};
+ extraSpecialArgs = {
+ inherit inputs;
+ inherit hostname;
+ };
users.mun = import ./home/mun;
sharedModules = [
nixowos.homeModules.default
@@ -91,7 +94,7 @@
home-manager.nixosModules.home-manager
nixowos.nixosModules.default
stylix.nixosModules.stylix
- homeManagerModule
+ (mkHomeManagerModule hostname)
];
};
in {
diff --git a/home/mun/default.nix b/home/mun/default.nix
index e070fb1..1d0f449 100644
--- a/home/mun/default.nix
+++ b/home/mun/default.nix
@@ -1,10 +1,9 @@
{
- config,
pkgs,
+ hostname,
...
}: let
# Hostname-aware rice selection
- hostname = config.networking.hostName or "kronos";
riceMap = {
herra = ../rices/cassette-futurism;
kronos = ../rices/nord-blue;