fix: pass hostName as extraSpecialArgs to home-manager

home.nix used config.networking.hostName but home-manager modules
don't have access to NixOS config. Fix by passing via extraSpecialArgs.
This commit is contained in:
2026-06-16 19:08:15 -04:00
parent b9e89ce537
commit 088a82d730
2 changed files with 5 additions and 2 deletions

View File

@@ -1,5 +1,8 @@
{ pkgs, inputs, config, keys, ... }: {
home-manager.users.gortium = import ./home.nix;
home-manager.extraSpecialArgs = {
hostName = config.networking.hostName;
};
users.users.gortium = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" "video" "render"];

View File

@@ -1,8 +1,8 @@
{ pkgs, lib, config, inputs, ... }:
{ pkgs, lib, config, inputs, hostName, ... }:
let
dotfiles = ./assets/dotfiles;
isUconsole = config.networking.hostName == "uConsole";
isUconsole = hostName == "uConsole";
in {
home.username = "gortium";
home.homeDirectory = "/home/gortium";