home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 2fe5575cfa1ef228d57549cd3ff81ffb2bd6ef93
parent 9d4f3e4240ea512d82a47d8f8bec832d3753da52
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Fri, 15 Nov 2019 14:53:36 +0100

Use mkEnableOption wherever it is possible to 👼

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Mmodules/profiles/containers.nix | 12++----------
Mmodules/profiles/desktop.nix | 6+-----
Mmodules/profiles/dev.go.nix | 6+-----
Mmodules/profiles/dev.haskell.nix | 6+-----
Mmodules/profiles/dev.java.nix | 12++----------
Mmodules/profiles/dev.js.nix | 6+-----
Mmodules/profiles/dev.nix | 6+-----
Mmodules/profiles/dev.python.nix | 6+-----
Mmodules/profiles/dev.rust.nix | 6+-----
Mmodules/profiles/docker.nix | 6+-----
Mmodules/profiles/emacs.nix | 18+++---------------
Mmodules/profiles/finances.nix | 6+-----
Mmodules/profiles/gaming.nix | 8++------
Mmodules/profiles/gcloud.nix | 6+-----
Mmodules/profiles/git.nix | 6+-----
Mmodules/profiles/i3.nix | 6+-----
Mmodules/profiles/kubernetes.nix | 12++----------
Mmodules/profiles/laptop.nix | 6+-----
Mmodules/profiles/media.nix | 5+----
Mmodules/profiles/openshift.nix | 12++----------
Mmodules/profiles/vscode.nix | 6+-----
21 files changed, 28 insertions(+), 135 deletions(-)

diff --git a/modules/profiles/containers.nix b/modules/profiles/containers.nix @@ -7,21 +7,13 @@ in { options = { profiles.containers = { - enable = mkOption { - default = false; - description = "Enable containers profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable containers profile"; podman = mkOption { default = true; description = "Enable podman tools"; type = types.bool; }; - docker = mkOption { - default = false; - description = "Enable docker tools"; - type = types.bool; - }; + docker = mkEnableOption "Enable docker tools"; }; }; config = mkIf cfg.enable { diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix @@ -17,11 +17,7 @@ in { options = { profiles.desktop = { - enable = mkOption { - default = false; - description = "Enable desktop profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable desktop profile"; lockCmd = mkOption { default = "${pkgs.slim}/bin/slimlock"; description = "Lock command to use"; diff --git a/modules/profiles/dev.go.nix b/modules/profiles/dev.go.nix @@ -7,11 +7,7 @@ in { options = { profiles.dev.go = { - enable = mkOption { - default = false; - description = "Enable go development profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable go development profile"; }; }; config = mkIf cfg.enable (mkMerge [ diff --git a/modules/profiles/dev.haskell.nix b/modules/profiles/dev.haskell.nix @@ -7,11 +7,7 @@ in { options = { profiles.dev.haskell = { - enable = mkOption { - default = false; - description = "Enable haskell development profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable haskell development profile"; }; }; config = mkIf cfg.enable { diff --git a/modules/profiles/dev.java.nix b/modules/profiles/dev.java.nix @@ -7,21 +7,13 @@ in { options = { profiles.dev.java = { - enable = mkOption { - default = false; - description = "Enable java development profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable java development profile"; javaPackage = mkOption { default = pkgs.jdk; description = "Java package to use"; type = types.package; }; - idea = mkOption { - default = false; - description = "Install intellij idea"; - type = types.bool; - }; + idea = mkEnableOption "Install intellij idea"; }; }; config = mkIf cfg.enable (mkMerge [ diff --git a/modules/profiles/dev.js.nix b/modules/profiles/dev.js.nix @@ -7,11 +7,7 @@ in { options = { profiles.dev.js = { - enable = mkOption { - default = false; - description = "Enable js development profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable js development profile"; }; }; config = mkIf cfg.enable (mkMerge [ diff --git a/modules/profiles/dev.nix b/modules/profiles/dev.nix @@ -7,11 +7,7 @@ in { options = { profiles.dev = { - enable = mkOption { - default = false; - description = "Enable development profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable development profile"; }; }; config = mkIf cfg.enable (mkMerge [ diff --git a/modules/profiles/dev.python.nix b/modules/profiles/dev.python.nix @@ -7,11 +7,7 @@ in { options = { profiles.dev.python = { - enable = mkOption { - default = false; - description = "Enable python development profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable python development profile"; }; }; config = mkIf cfg.enable { diff --git a/modules/profiles/dev.rust.nix b/modules/profiles/dev.rust.nix @@ -7,11 +7,7 @@ in { options = { profiles.dev.rust = { - enable = mkOption { - default = false; - description = "Enable rust development profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable rust development profile"; }; }; config = mkIf cfg.enable (mkMerge [ diff --git a/modules/profiles/docker.nix b/modules/profiles/docker.nix @@ -7,11 +7,7 @@ in { options = { profiles.docker = { - enable = mkOption { - default = false; - description = "Enable docker profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable docker profile"; }; }; config = mkIf cfg.enable (mkMerge [ diff --git a/modules/profiles/emacs.nix b/modules/profiles/emacs.nix @@ -12,26 +12,14 @@ in { options = { profiles.emacs = { - enable = mkOption { - default = false; - description = "Enable emacs profile"; - type = types.bool; - }; - capture = mkOption { - default = false; - description = "Enable capture script(s)"; - type = types.bool; - }; + enable = mkEnableOption "Enable emacs profile"; + capture = mkEnableOption "Enable capture script(s)"; daemonService = mkOption { default = true; description = "Enable emacs daemon service"; type = types.bool; }; - withXwidgets = mkOption { - default = false; - description = "Enable Xwidgets in emacs build"; - type = types.bool; - }; + withXwidgets = mkEnableOption "Enable Xwidgets in emacs build"; texlive = mkOption { default = true; description = "Enable Texlive"; diff --git a/modules/profiles/finances.nix b/modules/profiles/finances.nix @@ -7,11 +7,7 @@ in { options = { profiles.finances = { - enable = mkOption { - default = false; - description = "Enable fincances profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable fincances profile"; }; }; config = mkIf cfg.enable { diff --git a/modules/profiles/gaming.nix b/modules/profiles/gaming.nix @@ -7,16 +7,12 @@ in { options = { profiles.gaming = { - enable = mkOption { - default = false; - description = "Enable gaming profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable gaming profile"; }; }; config = mkIf cfg.enable { home.packages = with pkgs; [ - # steam + steam discord ]; }; diff --git a/modules/profiles/gcloud.nix b/modules/profiles/gcloud.nix @@ -7,11 +7,7 @@ in { options = { profiles.cloud.google = { - enable = mkOption { - default = false; - description = "Enable google cloud profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable google cloud profile"; }; }; config = mkIf cfg.enable { diff --git a/modules/profiles/git.nix b/modules/profiles/git.nix @@ -8,11 +8,7 @@ in { options = { profiles.git = { - enable = mkOption { - default = false; - description = "Enable git profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable git profile"; }; }; config = mkIf cfg.enable (mkMerge [ diff --git a/modules/profiles/i3.nix b/modules/profiles/i3.nix @@ -19,11 +19,7 @@ in { options = { profiles.i3 = { - enable = mkOption { - default = false; - description = "Enable i3 profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable i3 profile"; }; }; config = mkIf cfg.enable { diff --git a/modules/profiles/kubernetes.nix b/modules/profiles/kubernetes.nix @@ -7,11 +7,7 @@ in { options = { profiles.containers.kubernetes = { - enable = mkOption { - default = false; - description = "Enable kubernetes profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable kubernetes profile"; containers= mkOption { default = true; description = "Enable containers profile alongside"; @@ -21,11 +17,7 @@ in enable = mkEnableOption "Enable krew"; }; minikube = { - enable = mkOption { - default = false; - description = "Enable minikube"; - type = types.bool; - }; + enable = mkEnableOption "Enable minikube"; package = mkOption { default = pkgs.minikube; description = "Minikube package"; diff --git a/modules/profiles/laptop.nix b/modules/profiles/laptop.nix @@ -7,11 +7,7 @@ in { options = { profiles.laptop = { - enable = mkOption { - default = false; - description = "Enable laptop profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable laptop profile"; }; }; config = mkIf cfg.enable { diff --git a/modules/profiles/media.nix b/modules/profiles/media.nix @@ -7,10 +7,7 @@ in { options = { profiles.media = { - enable = mkOption { - default = false; - description = "Enable media configuration"; - }; + enable = mkEnableOption "Enable media configuration"; }; }; config = mkIf cfg.enable (mkMerge [ diff --git a/modules/profiles/openshift.nix b/modules/profiles/openshift.nix @@ -7,22 +7,14 @@ in { options = { profiles.containers.openshift = { - enable = mkOption { - default = false; - description = "Enable openshift profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable openshift profile"; package = mkOption { default = pkgs.openshift; description = "Openshift package"; type = types.package; }; minishift = { - enable = mkOption { - default = false; - description = "Enable minishift"; - type = types.bool; - }; + enable = mkEnableOption "Enable minishift"; package = mkOption { default = pkgs.minishift; description = "Minishift package"; diff --git a/modules/profiles/vscode.nix b/modules/profiles/vscode.nix @@ -7,11 +7,7 @@ in { options = { profiles.dev.vscode = { - enable = mkOption { - default = false; - description = "Enable VS Code profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable VS Code profile"; }; }; config = mkIf cfg.enable {