refactor: don't include the whole modules
Instead only import the nixos/hm/nixvim module. This _should_ reduce rebuilds.
This commit is contained in:
parent
5359f13621
commit
c1309a5d43
6 changed files with 78 additions and 87 deletions
|
@ -4,9 +4,6 @@
|
|||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
modules = ../modules;
|
||||
in
|
||||
{
|
||||
flake.nixosModules =
|
||||
let
|
||||
|
@ -14,7 +11,7 @@ in
|
|||
imports = [
|
||||
inputs.stylix.nixosModules.stylix
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
(modules + "/nixos")
|
||||
../modules/nixos
|
||||
] ++ lib.optional (inputs.lix-module != null) inputs.lix-module.nixosModules.default;
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
|
@ -24,20 +21,9 @@ in
|
|||
# Pin nixpkgs
|
||||
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
||||
};
|
||||
|
||||
machines = [ "vm" ];
|
||||
mkMachine = hostname: {
|
||||
imports = [
|
||||
nixosModule
|
||||
(import (../machines + "/${hostname}"))
|
||||
];
|
||||
home-manager.sharedModules = [ { jhome.hostName = hostname; } ];
|
||||
};
|
||||
machineModules = lib.genAttrs machines mkMachine;
|
||||
in
|
||||
{
|
||||
default = nixosModule;
|
||||
inherit nixosModule;
|
||||
}
|
||||
// machineModules;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue