From 20bb620ba13e9dd2617782fd8b48f02abed9d2ad Mon Sep 17 00:00:00 2001 From: brustybee Date: Sat, 7 Mar 2026 05:10:56 +0530 Subject: Fix modules to properly guard HM-only config from NixOS evaluatio --- common/modules/beevim/default.nix | 2 +- common/modules/matugen/default.nix | 6 +++--- common/modules/terminal/default.nix | 5 +---- 3 files changed, 5 insertions(+), 8 deletions(-) (limited to 'common/modules') diff --git a/common/modules/beevim/default.nix b/common/modules/beevim/default.nix index 477ffb4..d7c3a97 100644 --- a/common/modules/beevim/default.nix +++ b/common/modules/beevim/default.nix @@ -22,7 +22,7 @@ in enable = lib.mkEnableOption "Enable neovim config"; }; - config = lib.mkIf cfg.enable { + config = lib.mkIf (cfg.enable && homeManager) { beevim = { enable = true; packageDefinitions.replace = builtins.mapAttrs ( diff --git a/common/modules/matugen/default.nix b/common/modules/matugen/default.nix index 5f5d6cf..fb84b92 100644 --- a/common/modules/matugen/default.nix +++ b/common/modules/matugen/default.nix @@ -27,13 +27,13 @@ let ''; in { - imports = [ ./templates ]; + imports = lib.optionals homeManager [ ./templates ]; options.${moduleNameSpace}.matugen = { enable = lib.mkEnableOption "Enable Dynamic colors"; }; - config = lib.mkIf cfg.enable { + config = lib.mkIf cfg.enable (if homeManager then { programs.wallust = { enable = true; settings = { @@ -182,5 +182,5 @@ in ''; }; }; - }; + } else { }); } diff --git a/common/modules/terminal/default.nix b/common/modules/terminal/default.nix index b8f97c2..fea6bc7 100644 --- a/common/modules/terminal/default.nix +++ b/common/modules/terminal/default.nix @@ -11,11 +11,8 @@ ... }: with lib; -let - cfg = config.${moduleNameSpace}.terminal; -in { - imports = [ + imports = lib.optionals homeManager [ (import ./foot.nix { inherit lib config; }) (import ./ghostty.nix { inherit lib config; }) (import ./alacritty.nix { inherit lib config; }) -- cgit v1.3.1