diff --git a/flake.nix b/flake.nix index bd1029b3..fa638ab8 100644 --- a/flake.nix +++ b/flake.nix @@ -143,12 +143,7 @@ extraModules = [{ home-manager = { desktop.enable = true; - dev = { - clojure.enable = true; - go.enable = true; - node.enable = true; - python.enable = true; - }; + dev.enable = true; }; }]; }) diff --git a/home-manager/dev/clojure.nix b/home-manager/dev/clojure.nix index 1588e53b..3219d0dc 100644 --- a/home-manager/dev/clojure.nix +++ b/home-manager/dev/clojure.nix @@ -1,7 +1,9 @@ { config, pkgs, lib, ... }: { - options.home-manager.dev.clojure.enable = lib.mkEnableOption "Clojure config"; + options.home-manager.dev.clojure.enable = lib.mkEnableOption "Clojure config" // { + default = config.home-manager.dev.enable; + }; config = lib.mkIf config.home-manager.dev.clojure.enable { home.packages = with pkgs; [ diff --git a/home-manager/dev/go.nix b/home-manager/dev/go.nix index e34e8fc7..5c49f505 100644 --- a/home-manager/dev/go.nix +++ b/home-manager/dev/go.nix @@ -1,7 +1,9 @@ { config, lib, ... }: { - options.home-manager.dev.go.enable = lib.mkEnableOption "Go config"; + options.home-manager.dev.go.enable = lib.mkEnableOption "Go config" // { + default = config.home-manager.dev.enable; + }; config = lib.mkIf config.home-manager.dev.go.enable { programs.go = { diff --git a/home-manager/dev/node.nix b/home-manager/dev/node.nix index 550b98ed..01a31004 100644 --- a/home-manager/dev/node.nix +++ b/home-manager/dev/node.nix @@ -4,7 +4,9 @@ let inherit (config.home) homeDirectory; in { - options.home-manager.dev.node.enable = lib.mkEnableOption "NodeJS config"; + options.home-manager.dev.node.enable = lib.mkEnableOption "NodeJS config" // { + default = config.home-manager.dev.enable; + }; config = lib.mkIf config.home-manager.dev.node.enable { home = { diff --git a/home-manager/dev/python.nix b/home-manager/dev/python.nix index fb70f9f8..9ba615d0 100644 --- a/home-manager/dev/python.nix +++ b/home-manager/dev/python.nix @@ -1,7 +1,9 @@ { config, pkgs, lib, ... }: { - options.home-manager.dev.python.enable = lib.mkEnableOption "Python config"; + options.home-manager.dev.python.enable = lib.mkEnableOption "Python config" // { + default = config.home-manager.dev.enable; + }; config = lib.mkIf config.home-manager.dev.python.enable { home.packages = with pkgs; [ diff --git a/home-manager/nixos.nix b/home-manager/nixos.nix index 4167b01b..5e8d5a9f 100644 --- a/home-manager/nixos.nix +++ b/home-manager/nixos.nix @@ -1,4 +1,4 @@ -{ osConfig, lib, ... }: +{ osConfig, ... }: { imports = [ @@ -7,11 +7,6 @@ home-manager = { desktop.enable = osConfig.nixos.desktop.enable; - dev = lib.mkIf osConfig.nixos.dev.enable { - clojure.enable = lib.mkDefault true; - go.enable = lib.mkDefault true; - node.enable = lib.mkDefault true; - python.enable = lib.mkDefault true; - }; + dev.enable = osConfig.nixos.dev.enable; }; }