diff --git a/flake.nix b/flake.nix index 93d2ef2..c99a506 100644 --- a/flake.nix +++ b/flake.nix @@ -245,20 +245,13 @@ # that won't match real hardware, so don't `switch` to it. Adopters # copy hosts/example → hosts/ and rename this block. See # 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" { inherit system; user = settings.user; extraSpecialArgs = { 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 diff --git a/lib/mksystem.nix b/lib/mksystem.nix index 477d4c4..068d5ec 100644 --- a/lib/mksystem.nix +++ b/lib/mksystem.nix @@ -155,6 +155,15 @@ nixpkgs.lib.nixosSystem { currentSystemUser = user; } // 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 # directory tree. See modules/home-manager-bootstrap.nix for