Commit 2fe5575cfa1e

Vincent Demeester <vincent@sbr.pm>
2019-11-15 14:53:36
Use mkEnableOption wherever it is possible to 👼
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 9d4f3e4
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 {
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";
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 [
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 {
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 [
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 [
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 [
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 {
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 [
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 [
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";
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 {
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
     ];
   };
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 {
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 [
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 {
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";
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 {
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 [
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";
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 {