home

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

commit b4ee6c21a45597f032c5d8582ad6c651a262d0aa
parent 7a1c57051641854ff8f47e47e9341e65aab0c1a4
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Tue, 25 Aug 2020 15:21:54 +0100

systems: use mkEnableOption…

… instead of mkOption boolean type with a default to false.

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

Diffstat:
Msystems/modules/profiles/avahi.nix | 6+-----
Msystems/modules/profiles/buildkit.nix | 6+-----
Msystems/modules/profiles/containerd.nix | 6+-----
Msystems/modules/profiles/desktop.nix | 6+-----
Msystems/modules/profiles/dev.nix | 6+-----
Msystems/modules/profiles/docker.nix | 6+-----
Msystems/modules/profiles/gaming.nix | 6+-----
Msystems/modules/profiles/git.nix | 6+-----
Msystems/modules/profiles/ipfs.nix | 6+-----
Msystems/modules/profiles/laptop.nix | 6+-----
Msystems/modules/profiles/printing.nix | 6+-----
Msystems/modules/profiles/pulseaudio.nix | 6+-----
Msystems/modules/profiles/scanning.nix | 6+-----
Msystems/modules/profiles/ssh.nix | 6+-----
Msystems/modules/profiles/syncthing.nix | 6+-----
Msystems/modules/profiles/virtualization.nix | 2+-
Msystems/modules/profiles/wireguard.server.nix | 6+-----
Msystems/modules/profiles/yubikey.nix | 6+-----
Msystems/modules/programs/crc.nix | 2+-
Msystems/modules/programs/podman.nix | 8+-------
Msystems/modules/services/nix-binary-cache.nix | 6+-----
Msystems/modules/services/wireguard.client.nix | 8+-------
22 files changed, 22 insertions(+), 106 deletions(-)

diff --git a/systems/modules/profiles/avahi.nix b/systems/modules/profiles/avahi.nix @@ -7,11 +7,7 @@ in { options = { profiles.avahi = { - enable = mkOption { - default = false; - description = "Enable avahi profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable avahi profile"; }; }; config = mkIf cfg.enable { diff --git a/systems/modules/profiles/buildkit.nix b/systems/modules/profiles/buildkit.nix @@ -7,11 +7,7 @@ in { options = { profiles.buildkit = { - enable = mkOption { - default = false; - description = "Enable buildkit profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable buildkit profile"; package = mkOption { default = pkgs.my.buildkit; description = "buildkit package to be used"; diff --git a/systems/modules/profiles/containerd.nix b/systems/modules/profiles/containerd.nix @@ -7,11 +7,7 @@ in { options = { profiles.containerd = { - enable = mkOption { - default = false; - description = "Enable containerd profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable containerd profile"; package = mkOption { default = pkgs.my.containerd; description = "containerd package to be used"; diff --git a/systems/modules/profiles/desktop.nix b/systems/modules/profiles/desktop.nix @@ -7,11 +7,7 @@ in { options = { profiles.desktop = { - enable = mkOption { - default = false; - description = "Enable desktop profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable desktop profile"; avahi = mkOption { default = true; description = "Enable avahi with the desktop profile"; diff --git a/systems/modules/profiles/dev.nix b/systems/modules/profiles/dev.nix @@ -7,11 +7,7 @@ in { options = { profiles.dev = { - enable = mkOption { - default = false; - description = "Enable dev profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable dev profile"; }; }; config = mkIf cfg.enable { diff --git a/systems/modules/profiles/docker.nix b/systems/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"; package = mkOption { default = pkgs.docker-edge; description = "docker package to be used"; diff --git a/systems/modules/profiles/gaming.nix b/systems/modules/profiles/gaming.nix @@ -7,11 +7,7 @@ in { options = { profiles.gaming = { - enable = mkOption { - default = false; - description = "Enable gaming profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable gaming profile"; }; }; config = mkIf cfg.enable { diff --git a/systems/modules/profiles/git.nix b/systems/modules/profiles/git.nix @@ -7,11 +7,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 { diff --git a/systems/modules/profiles/ipfs.nix b/systems/modules/profiles/ipfs.nix @@ -7,11 +7,7 @@ in { options = { profiles.ipfs = { - enable = mkOption { - default = false; - description = "Enable ipfs profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable ipfs profile"; autoMount = mkOption { default = true; description = "Automount /ipfs and /ipns"; diff --git a/systems/modules/profiles/laptop.nix b/systems/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/systems/modules/profiles/printing.nix b/systems/modules/profiles/printing.nix @@ -7,11 +7,7 @@ in { options = { profiles.printing = { - enable = mkOption { - default = false; - description = "Enable printing profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable printing profile"; }; }; config = mkIf cfg.enable { diff --git a/systems/modules/profiles/pulseaudio.nix b/systems/modules/profiles/pulseaudio.nix @@ -7,11 +7,7 @@ in { options = { profiles.pulseaudio = { - enable = mkOption { - default = false; - description = "Enable pulseaudio profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable pulseaudio profile"; tcp = mkOption { default = false; description = "Enable pulseaudio tcp"; diff --git a/systems/modules/profiles/scanning.nix b/systems/modules/profiles/scanning.nix @@ -7,11 +7,7 @@ in { options = { profiles.scanning = { - enable = mkOption { - default = false; - description = "Enable scanning profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable scanning profile"; }; }; config = mkIf cfg.enable { diff --git a/systems/modules/profiles/ssh.nix b/systems/modules/profiles/ssh.nix @@ -7,11 +7,7 @@ in { options = { profiles.ssh = { - enable = mkOption { - default = false; - description = "Enable ssh profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable ssh profile"; forwardX11 = mkOption { type = types.bool; default = false; diff --git a/systems/modules/profiles/syncthing.nix b/systems/modules/profiles/syncthing.nix @@ -7,11 +7,7 @@ in { options = { profiles.syncthing = { - enable = mkOption { - default = false; - description = "Enable syncthing profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable syncthing profile"; }; }; config = mkIf cfg.enable { diff --git a/systems/modules/profiles/virtualization.nix b/systems/modules/profiles/virtualization.nix @@ -7,7 +7,7 @@ in { options = { profiles.virtualization = { - enable = mkOption { default = false; description = "Enable virtualization profile"; type = types.bool; }; + enable = mkEnableOption "Enable virtualization profile"; nested = mkOption { default = false; description = "Enable nested virtualization"; diff --git a/systems/modules/profiles/wireguard.server.nix b/systems/modules/profiles/wireguard.server.nix @@ -13,11 +13,7 @@ in { options = { profiles.wireguard.server = { - enable = mkOption { - default = false; - description = "Enable wireguard.server profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable wireguard.server profile"; }; }; config = mkIf cfg.enable { diff --git a/systems/modules/profiles/yubikey.nix b/systems/modules/profiles/yubikey.nix @@ -7,11 +7,7 @@ in { options = { profiles.yubikey = { - enable = mkOption { - default = false; - description = "Enable yubikey profile"; - type = types.bool; - }; + enable = mkEnableOption "Enable yubikey profile"; }; }; config = mkIf cfg.enable { diff --git a/systems/modules/programs/crc.nix b/systems/modules/programs/crc.nix @@ -7,7 +7,7 @@ in { options = { programs.crc = { - enable = mkOption { default = false; description = "wether to enable crc"; type = types.bool; }; + enable = mkEnableOption "wether to enable crc"; package = mkOption { default = pkgs.my.crc; # FIXME use pkgs.crc at some point description = "crc package to be used"; diff --git a/systems/modules/programs/podman.nix b/systems/modules/programs/podman.nix @@ -7,13 +7,7 @@ in { options = { programs.podman = { - enable = mkOption { - default = false; - description = '' - Whether to configure podman - ''; - type = types.bool; - }; + enable = mkEnableOption "Wether to configure podman"; package = mkOption { default = pkgs.podman; description = "podman package to be used"; diff --git a/systems/modules/services/nix-binary-cache.nix b/systems/modules/services/nix-binary-cache.nix @@ -7,11 +7,7 @@ in { options = { services.nix-binary-cache = { - enable = mkOption { - default = false; - description = "Enable nix-binary-cache"; - type = types.bool; - }; + enable = mkEnableOption "Enable nix-binary-cache"; domain = mkOption { description = "domain to serve"; type = types.str; diff --git a/systems/modules/services/wireguard.client.nix b/systems/modules/services/wireguard.client.nix @@ -7,13 +7,7 @@ in { options = { services.wireguard = { - enable = mkOption { - type = types.bool; - default = false; - description = '' - Whether to enable a reverse SSH proxy. - ''; - }; + enable = mkEnableOption "Whether to enable a reverse SSH proxy."; ips = mkOption { type = with types; listOf str; description = ''