diff --git a/configs/flake-parts/home-manager.nix b/configs/flake-parts/home-manager.nix index 3a1fa209..1e7bbb2a 100644 --- a/configs/flake-parts/home-manager.nix +++ b/configs/flake-parts/home-manager.nix @@ -42,8 +42,7 @@ # This is to be used by the NixOS `home-manager.sharedModules` anyways. sharedModules = [ - # Import our own custom modules from here.. - ../../modules/home-manager + # Import our private modules... ../../modules/home-manager/_private # ...plus a bunch of third-party modules. diff --git a/configs/flake-parts/nixos.nix b/configs/flake-parts/nixos.nix index 23387106..342164b9 100644 --- a/configs/flake-parts/nixos.nix +++ b/configs/flake-parts/nixos.nix @@ -85,8 +85,7 @@ # requirements of a host. On second thought, only on flakes with # optional NixOS modules. sharedModules = [ - # Import our custom modules. - ../../modules/nixos + # Import our private modules. ../../modules/nixos/_private inputs.nix-index-database.nixosModules.nix-index diff --git a/modules/flake-parts/setups/home-manager.nix b/modules/flake-parts/setups/home-manager.nix index acfda7df..578dfdca 100644 --- a/modules/flake-parts/setups/home-manager.nix +++ b/modules/flake-parts/setups/home-manager.nix @@ -3,6 +3,7 @@ let cfg = config.setups.home-manager; + homeManagerModules = ../../home-manager; # A thin wrapper around the home-manager configuration function. mkHome = { system, nixpkgsBranch ? "nixpkgs", homeManagerBranch ? "home-manager", extraModules ? [ ] }: @@ -11,7 +12,7 @@ let in inputs.${homeManagerBranch}.lib.homeManagerConfiguration { extraSpecialArgs = { - foodogsquaredModulesPath = builtins.toString ../../home-manager; + foodogsquaredModulesPath = builtins.toString homeManagerModules; }; inherit pkgs; @@ -236,6 +237,9 @@ in }; config = lib.mkIf (cfg.configs != { }) { + # Import our own home-manager modules. + setups.home-manager.sharedModules = [ homeManagerModules ]; + flake = let # A quick data structure we can pass through multiple build pipelines. diff --git a/modules/flake-parts/setups/nixos.nix b/modules/flake-parts/setups/nixos.nix index 85826275..8e24476e 100644 --- a/modules/flake-parts/setups/nixos.nix +++ b/modules/flake-parts/setups/nixos.nix @@ -7,6 +7,7 @@ let cfg = config.setups.nixos; + nixosModules = ../../nixos; # This is used on a lot of the Nix modules below. partsConfig = config; @@ -27,7 +28,7 @@ let in (lib'.makeOverridable nixosSystem) { specialArgs = { - foodogsquaredModulesPath = builtins.toString ../../nixos; + foodogsquaredModulesPath = builtins.toString nixosModules; }; lib = lib'; modules = extraModules ++ [{ @@ -494,6 +495,10 @@ in config = lib.mkIf (cfg.configs != { }) { setups.nixos.sharedModules = [ + # Import our own public NixOS modules. + nixosModules + + # Set the home-manager-related settings. ({ lib, ... }: { home-manager.sharedModules = partsConfig.setups.home-manager.sharedModules; diff --git a/modules/flake-parts/setups/nixvim.nix b/modules/flake-parts/setups/nixvim.nix index 68d80c58..51a97746 100644 --- a/modules/flake-parts/setups/nixvim.nix +++ b/modules/flake-parts/setups/nixvim.nix @@ -9,6 +9,7 @@ let cfg = config.setups.nixvim; partsConfig = config; + nixvimModules = ../../nixvim; mkNixvimConfig = { system, nixpkgsBranch, modules ? [] }: let @@ -22,6 +23,9 @@ let module = { imports = modules; }; + extraSpecialArgs = { + foodogsquaredModulesPath = builtins.toString nixvimModules; + }; }; modulesOption = lib.mkOption { @@ -97,6 +101,8 @@ in }; config = lib.mkIf (cfg.configs != {}) { + setups.nixvim.sharedModules = [ nixvimModules ]; + perSystem = { system, config, lib, ... }: ( let