aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorschererleander <leander@schererleander.de>2025-07-29 13:06:29 +0200
committerschererleander <leander@schererleander.de>2025-07-29 13:06:29 +0200
commite85ce531149d41a382921505bb0a0ca53816acfa (patch)
treeb7bc07bacdb6d9c575dc458db818d68517efc937 /lib
parent963efd12899bb9da46c64faa76f4415d465fc59f (diff)
feat: include home-manager only when home.nix exists
Diffstat (limited to 'lib')
-rw-r--r--lib/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/default.nix b/lib/default.nix
index 16177fe..51329bf 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -30,6 +30,8 @@ rec {
hostDir = ../hosts/${host};
hostCfg = hostDir + /configuration.nix;
hostHome = hostDir + /home.nix;
+
+ hmEnabled = builtins.pathExists hostHome;
modules =
[ hostCfg ]
++ lib.optionals darwinHost [ inputs.mac-app-util.darwinModules.default ]
@@ -41,7 +43,8 @@ rec {
];
nixpkgs.overlays = overlays;
}
-
+ ]
+ ++ lib.optionals hmEnabled [
hmModule
{
home-manager.useGlobalPkgs = true;