mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
modules: manually import the modules
This allows for an easier separation of the private modules compared to the old `importModules` function. It is also easier to use.
This commit is contained in:
parent
246586c25c
commit
d524444ae0
@ -222,7 +222,10 @@
|
||||
home-manager.useUserPackages = lib.mkDefault true;
|
||||
home-manager.useGlobalPkgs = lib.mkDefault true;
|
||||
home-manager.sharedModules =
|
||||
lib.modulesToList (lib.filesToAttr ./modules/home-manager)
|
||||
(import ./modules/home-manager {
|
||||
inherit lib;
|
||||
isInternal = true;
|
||||
})
|
||||
++ [ userSharedConfig ];
|
||||
home-manager.extraSpecialArgs = extraArgs;
|
||||
|
||||
|
@ -14,7 +14,7 @@ in
|
||||
specialArgs = extraArgs;
|
||||
modules =
|
||||
# Append with our custom NixOS modules from the modules folder.
|
||||
(lib.modulesToList (lib.filesToAttr ../modules/nixos))
|
||||
(import ../modules/nixos { inherit lib; isInternal = true; })
|
||||
|
||||
# Our own modules.
|
||||
++ extraModules;
|
||||
@ -28,7 +28,7 @@ in
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
modules =
|
||||
# Importing our custom home-manager modules.
|
||||
(lib.modulesToList (lib.filesToAttr ../modules/home-manager))
|
||||
(import ../modules/home-manager { inherit lib; isInternal = true; })
|
||||
|
||||
# Plus our own.
|
||||
++ extraModules;
|
||||
@ -41,7 +41,7 @@ in
|
||||
specialArgs = extraArgs;
|
||||
modules =
|
||||
# Import all of the NixOS modules.
|
||||
(lib.modulesToList (lib.filesToAttr ../modules/nixos))
|
||||
(import ../modules/nixos { inherit lib; isInternal = true; })
|
||||
|
||||
# Our own modules.
|
||||
++ extraModules;
|
||||
|
26
modules/home-manager/default.nix
Normal file
26
modules/home-manager/default.nix
Normal file
@ -0,0 +1,26 @@
|
||||
{ lib
|
||||
|
||||
# Import the private modules
|
||||
, isInternal ? false
|
||||
}:
|
||||
|
||||
let
|
||||
modules = [
|
||||
./files/mutable-files.nix
|
||||
./programs/pop-launcher.nix
|
||||
./services/archivebox.nix
|
||||
./services/bleachbit.nix
|
||||
./services/gallery-dl.nix
|
||||
./services/plover.nix
|
||||
./services/yt-dlp.nix
|
||||
];
|
||||
privateModules = [
|
||||
./profiles/desktop.nix
|
||||
./profiles/dev.nix
|
||||
./profiles/editors.nix
|
||||
./profiles/i18n.nix
|
||||
./profiles/research.nix
|
||||
];
|
||||
in
|
||||
modules
|
||||
++ (lib.optionals isInternal privateModules)
|
32
modules/nixos/default.nix
Normal file
32
modules/nixos/default.nix
Normal file
@ -0,0 +1,32 @@
|
||||
{ lib
|
||||
|
||||
# Include the private modules.
|
||||
, isInternal ? false
|
||||
}:
|
||||
|
||||
let
|
||||
modules = [
|
||||
./programs/cardboard-wm.nix
|
||||
./programs/kiwmi.nix
|
||||
./programs/pop-launcher.nix
|
||||
./programs/wezterm.nix
|
||||
./services/archivebox.nix
|
||||
./services/gallery-dl.nix
|
||||
./services/yt-dlp.nix
|
||||
./workflows
|
||||
];
|
||||
privateModules = [
|
||||
./profiles/archiving.nix
|
||||
./profiles/desktop.nix
|
||||
./profiles/dev.nix
|
||||
./profiles/filesystem.nix
|
||||
./profiles/gaming.nix
|
||||
./profiles/i18n.nix
|
||||
./profiles/server.nix
|
||||
./profiles/vpn.nix
|
||||
./tasks/backup-archive
|
||||
./tasks/multimedia-archive
|
||||
];
|
||||
in
|
||||
modules
|
||||
++ (lib.optionals isInternal privateModules)
|
Loading…
Reference in New Issue
Block a user