feat(mksystem): inject home-manager sharedModules OmniXY home needs

home.nix depends on nix-colors (colorScheme), lazyvim, and walker HM
modules; previously every host wired them by hand via `modules`, which
external consumers couldn't know to do. Inject them in mkSystem so any
host built through it gets them; re-importing from a host is a no-op.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-06-28 10:39:39 +02:00
commit fa467a346a
2 changed files with 11 additions and 9 deletions

View file

@ -245,20 +245,13 @@
# that won't match real hardware, so don't `switch` to it. Adopters # that won't match real hardware, so don't `switch` to it. Adopters
# copy hosts/example → hosts/<name> and rename this block. See # copy hosts/example → hosts/<name> and rename this block. See
# hosts/example/default.nix and docs/getting-started.md. # hosts/example/default.nix and docs/getting-started.md.
# nix-colors/lazyvim/walker home-manager modules are injected by
# mkSystem now, so hosts no longer wire them by hand.
example = mkSystem "example" { example = mkSystem "example" {
inherit system; inherit system;
user = settings.user; user = settings.user;
extraSpecialArgs = { inherit settings; }; extraSpecialArgs = { inherit settings; };
extraHmArgs = { inherit settings; }; extraHmArgs = { inherit settings; };
modules = [
{
home-manager.sharedModules = [
inputs.nix-colors.homeManagerModules.default
inputs.lazyvim.homeManagerModules.default
inputs.walker.homeManagerModules.default
];
}
];
}; };
# ISO image for live USB/DVD. This is a variant rather than a # ISO image for live USB/DVD. This is a variant rather than a

View file

@ -155,6 +155,15 @@ nixpkgs.lib.nixosSystem {
currentSystemUser = user; currentSystemUser = user;
} }
// extraHmArgs; // extraHmArgs;
# Omnixient's home.nix depends on these home-manager modules
# (colorScheme via nix-colors, programs.lazyvim, programs.walker).
# Inject them for every host so consumers don't wire them by hand;
# re-importing the same module from a host's `modules` is a no-op.
home-manager.sharedModules = [
inputs.nix-colors.homeManagerModules.default
inputs.lazyvim.homeManagerModules.default
inputs.walker.homeManagerModules.default
];
} }
# Pre-create the home-manager activation script's expected # Pre-create the home-manager activation script's expected
# directory tree. See modules/home-manager-bootstrap.nix for # directory tree. See modules/home-manager-bootstrap.nix for