From 0602a0a4bcc3f085b3357aea002d950670bc7c1a Mon Sep 17 00:00:00 2001 From: MFlossmann Date: Thu, 15 Aug 2024 16:54:00 +0200 Subject: [PATCH] enable homemanager features --- hosts/remus/home.nix | 1 + modules/home/default.nix | 22 +++++++++++----------- modules/home/features/element.nix | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/hosts/remus/home.nix b/hosts/remus/home.nix index 5ad01c9..c207c56 100644 --- a/hosts/remus/home.nix +++ b/hosts/remus/home.nix @@ -47,6 +47,7 @@ maker.enable = true; graphicDesign.enable = true; }; + element.enable = true; }; programs.zsh.enable = true; diff --git a/modules/home/default.nix b/modules/home/default.nix index b3f7837..a3e8fe3 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -10,16 +10,16 @@ }: let cfg = config.myHomeManager; # # Taking all modules in ./features and adding enables to them - # features = - # helperLib.extendModules - # (name: { - # extraOptions = { - # myHomeManager.${name}.enable = lib.mkEnableOption "enable my ${name} configuration"; - # }; - # - # configExtension = config: (lib.mkIf cfg.${name}.enable config); - # }) - # (helperLib.filesIn ./features); + features = + helperLib.extendModules + (name: { + extraOptions = { + myHomeManager.${name}.enable = lib.mkEnableOption "enable my ${name} configuration"; + }; + + configExtension = config: (lib.mkIf cfg.${name}.enable config); + }) + (helperLib.filesIn ./features); # Taking all module bundles in ./bundles and adding bundle.enables to them bundles = @@ -36,7 +36,7 @@ in { imports = [ ] - # ++ features + ++ features ++ bundles; config = { diff --git a/modules/home/features/element.nix b/modules/home/features/element.nix index ef90595..e3d93d3 100644 --- a/modules/home/features/element.nix +++ b/modules/home/features/element.nix @@ -1,3 +1,3 @@ {pkgs, ...}:{ - home.packages = [ pkgs.element-desktop ] + home.packages = [ pkgs.element-desktop ]; }