Skip to content

Commit

Permalink
home-manager/dev: do not enable by default
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Sep 29, 2023
1 parent c5500b9 commit ddf9b96
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 17 deletions.
7 changes: 1 addition & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
}];
})
Expand Down
4 changes: 3 additions & 1 deletion home-manager/dev/clojure.nix
Original file line number Diff line number Diff line change
@@ -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; [
Expand Down
4 changes: 3 additions & 1 deletion home-manager/dev/go.nix
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down
4 changes: 3 additions & 1 deletion home-manager/dev/node.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
4 changes: 3 additions & 1 deletion home-manager/dev/python.nix
Original file line number Diff line number Diff line change
@@ -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; [
Expand Down
9 changes: 2 additions & 7 deletions home-manager/nixos.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ osConfig, lib, ... }:
{ osConfig, ... }:

{
imports = [
Expand All @@ -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;
};
}

0 comments on commit ddf9b96

Please sign in to comment.