mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-30 22:57:55 +00:00
flake-parts/setups: import the default modules
This commit is contained in:
parent
670f52ce30
commit
c6bc18035a
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user