treewide: use `mkEnableOption` in nixos modules

+2 -3
nixos/modules/hardware/brillo.nix
···
options = {
hardware.brillo = {
enable = mkEnableOption (lib.mdDoc ''
-
Enable brillo in userspace.
-
This will allow brightness control from users in the video group.
'');
};
};
-
config = mkIf cfg.enable {
services.udev.packages = [ pkgs.brillo ];
···
options = {
hardware.brillo = {
enable = mkEnableOption (lib.mdDoc ''
+
brillo in userspace.
+
This will allow brightness control from users in the video group
'');
};
};
config = mkIf cfg.enable {
services.udev.packages = [ pkgs.brillo ];
+1 -1
nixos/modules/hardware/ubertooth.nix
···
};
in {
options.hardware.ubertooth = {
-
enable = mkEnableOption (lib.mdDoc "Enable the Ubertooth software and its udev rules.");
group = mkOption {
type = types.str;
···
};
in {
options.hardware.ubertooth = {
+
enable = mkEnableOption (lib.mdDoc "Ubertooth software and its udev rules");
group = mkOption {
type = types.str;
+1 -1
nixos/modules/hardware/wooting.nix
···
with lib;
{
options.hardware.wooting.enable =
-
mkEnableOption (lib.mdDoc "Enable support for Wooting keyboards");
config = mkIf config.hardware.wooting.enable {
environment.systemPackages = [ pkgs.wootility ];
···
with lib;
{
options.hardware.wooting.enable =
+
mkEnableOption (lib.mdDoc "support for Wooting keyboards");
config = mkIf config.hardware.wooting.enable {
environment.systemPackages = [ pkgs.wootility ];
+1 -1
nixos/modules/programs/kclock.nix
···
cfg = config.programs.kclock;
kclockPkg = pkgs.libsForQt5.kclock;
in {
-
options.programs.kclock = { enable = mkEnableOption (lib.mdDoc "Enable KClock"); };
config = mkIf cfg.enable {
services.dbus.packages = [ kclockPkg ];
···
cfg = config.programs.kclock;
kclockPkg = pkgs.libsForQt5.kclock;
in {
+
options.programs.kclock = { enable = mkEnableOption (lib.mdDoc "KClock"); };
config = mkIf cfg.enable {
services.dbus.packages = [ kclockPkg ];
+1 -1
nixos/modules/services/cluster/kubernetes/flannel.nix
···
{
###### interface
options.services.kubernetes.flannel = {
-
enable = mkEnableOption (lib.mdDoc "enable flannel networking");
};
###### implementation
···
{
###### interface
options.services.kubernetes.flannel = {
+
enable = mkEnableOption (lib.mdDoc "flannel networking");
};
###### implementation
+1 -1
nixos/modules/services/computing/foldingathome/client.nix
···
'')
];
options.services.foldingathome = {
-
enable = mkEnableOption (lib.mdDoc "Enable the Folding@home client");
package = mkOption {
type = types.package;
···
'')
];
options.services.foldingathome = {
+
enable = mkEnableOption (lib.mdDoc "Folding@home client");
package = mkOption {
type = types.package;
+1 -7
nixos/modules/services/databases/couchdb.nix
···
services.couchdb = {
-
enable = mkOption {
-
type = types.bool;
-
default = false;
-
description = lib.mdDoc ''
-
Whether to run CouchDB Server.
-
'';
-
};
package = mkOption {
type = types.package;
···
services.couchdb = {
+
enable = mkEnableOption (lib.mdDoc "CouchDB Server");
package = mkOption {
type = types.package;
+1 -7
nixos/modules/services/databases/opentsdb.nix
···
services.opentsdb = {
-
enable = mkOption {
-
type = types.bool;
-
default = false;
-
description = lib.mdDoc ''
-
Whether to run OpenTSDB.
-
'';
-
};
package = mkOption {
type = types.package;
···
services.opentsdb = {
+
enable = mkEnableOption (lib.mdDoc "OpenTSDB");
package = mkOption {
type = types.package;
+1 -1
nixos/modules/services/home-automation/zigbee2mqtt.nix
···
];
options.services.zigbee2mqtt = {
-
enable = mkEnableOption (lib.mdDoc "enable zigbee2mqtt service");
package = mkOption {
description = lib.mdDoc "Zigbee2mqtt package to use";
···
];
options.services.zigbee2mqtt = {
+
enable = mkEnableOption (lib.mdDoc "zigbee2mqtt service");
package = mkOption {
description = lib.mdDoc "Zigbee2mqtt package to use";
+1 -5
nixos/modules/services/logging/fluentd.nix
···
options = {
services.fluentd = {
-
enable = mkOption {
-
type = types.bool;
-
default = false;
-
description = lib.mdDoc "Whether to enable fluentd.";
-
};
config = mkOption {
type = types.lines;
···
options = {
services.fluentd = {
+
enable = mkEnableOption (lib.mdDoc "fluentd");
config = mkOption {
type = types.lines;
+1 -7
nixos/modules/services/logging/logcheck.nix
···
{
options = {
services.logcheck = {
-
enable = mkOption {
-
default = false;
-
type = types.bool;
-
description = lib.mdDoc ''
-
Enable the logcheck cron job.
-
'';
-
};
user = mkOption {
default = "logcheck";
···
{
options = {
services.logcheck = {
+
enable = mkEnableOption (lib.mdDoc "logcheck cron job");
user = mkOption {
default = "logcheck";
+2 -7
nixos/modules/services/misc/exhibitor.nix
···
{
options = {
services.exhibitor = {
-
enable = mkOption {
-
type = types.bool;
-
default = false;
-
description = lib.mdDoc ''
-
Whether to enable the exhibitor server.
-
'';
-
};
# See https://github.com/soabase/exhibitor/wiki/Running-Exhibitor for what these mean
# General options for any type of config
port = mkOption {
···
{
options = {
services.exhibitor = {
+
enable = mkEnableOption (lib.mdDoc "exhibitor server");
+
# See https://github.com/soabase/exhibitor/wiki/Running-Exhibitor for what these mean
# General options for any type of config
port = mkOption {
+1 -5
nixos/modules/services/misc/gollum.nix
···
{
options.services.gollum = {
-
enable = mkOption {
-
type = types.bool;
-
default = false;
-
description = lib.mdDoc "Enable the Gollum service.";
-
};
address = mkOption {
type = types.str;
···
{
options.services.gollum = {
+
enable = mkEnableOption (lib.mdDoc "Gollum service");
address = mkOption {
type = types.str;
+1 -5
nixos/modules/services/misc/zookeeper.nix
···
in {
options.services.zookeeper = {
-
enable = mkOption {
-
description = lib.mdDoc "Whether to enable Zookeeper.";
-
default = false;
-
type = types.bool;
-
};
port = mkOption {
description = lib.mdDoc "Zookeeper Client port.";
···
in {
options.services.zookeeper = {
+
enable = mkEnableOption (lib.mdDoc "Zookeeper");
port = mkOption {
description = lib.mdDoc "Zookeeper Client port.";
+1 -7
nixos/modules/services/monitoring/arbtt.nix
···
in {
options = {
services.arbtt = {
-
enable = mkOption {
-
type = types.bool;
-
default = false;
-
description = lib.mdDoc ''
-
Enable the arbtt statistics capture service.
-
'';
-
};
package = mkOption {
type = types.package;
···
in {
options = {
services.arbtt = {
+
enable = mkEnableOption (lib.mdDoc "Arbtt statistics capture service");
package = mkOption {
type = types.package;
+1 -7
nixos/modules/services/monitoring/bosun.nix
···
services.bosun = {
-
enable = mkOption {
-
type = types.bool;
-
default = false;
-
description = lib.mdDoc ''
-
Whether to run bosun.
-
'';
-
};
package = mkOption {
type = types.package;
···
services.bosun = {
+
enable = mkEnableOption (lib.mdDoc "bosun");
package = mkOption {
type = types.package;
+1 -5
nixos/modules/services/monitoring/cadvisor.nix
···
in {
options = {
services.cadvisor = {
-
enable = mkOption {
-
default = false;
-
type = types.bool;
-
description = lib.mdDoc "Whether to enable cadvisor service.";
-
};
listenAddress = mkOption {
default = "127.0.0.1";
···
in {
options = {
services.cadvisor = {
+
enable = mkEnableOption (lib.mdDoc "Cadvisor service");
listenAddress = mkOption {
default = "127.0.0.1";
+1 -7
nixos/modules/services/monitoring/datadog-agent.nix
···
};
in {
options.services.datadog-agent = {
-
enable = mkOption {
-
description = lib.mdDoc ''
-
Whether to enable the datadog-agent v7 monitoring service
-
'';
-
default = false;
-
type = types.bool;
-
};
package = mkOption {
default = pkgs.datadog-agent;
···
};
in {
options.services.datadog-agent = {
+
enable = mkEnableOption (lib.mdDoc "Datadog-agent v7 monitoring service");
package = mkOption {
default = pkgs.datadog-agent;
+1 -5
nixos/modules/services/monitoring/heapster.nix
···
cfg = config.services.heapster;
in {
options.services.heapster = {
-
enable = mkOption {
-
description = lib.mdDoc "Whether to enable heapster monitoring";
-
default = false;
-
type = types.bool;
-
};
source = mkOption {
description = lib.mdDoc "Heapster metric source";
···
cfg = config.services.heapster;
in {
options.services.heapster = {
+
enable = mkEnableOption (lib.mdDoc "Heapster monitoring");
source = mkOption {
description = lib.mdDoc "Heapster metric source";
+1 -7
nixos/modules/services/monitoring/prometheus/default.nix
···
options.services.prometheus = {
-
enable = mkOption {
-
type = types.bool;
-
default = false;
-
description = lib.mdDoc ''
-
Enable the Prometheus monitoring daemon.
-
'';
-
};
package = mkOption {
type = types.package;
···
options.services.prometheus = {
+
enable = mkEnableOption (lib.mdDoc "Prometheus monitoring daemon");
package = mkOption {
type = types.package;
+2 -7
nixos/modules/services/monitoring/riemann.nix
···
options = {
services.riemann = {
-
enable = mkOption {
-
type = types.bool;
-
default = false;
-
description = lib.mdDoc ''
-
Enable the Riemann network monitoring daemon.
-
'';
-
};
config = mkOption {
type = types.lines;
description = lib.mdDoc ''
···
options = {
services.riemann = {
+
enable = mkEnableOption (lib.mdDoc "Riemann network monitoring daemon");
+
config = mkOption {
type = types.lines;
description = lib.mdDoc ''
+1 -1
nixos/modules/services/network-filesystems/samba-wsdd.nix
···
options = {
services.samba-wsdd = {
enable = mkEnableOption (lib.mdDoc ''
-
Enable Web Services Dynamic Discovery host daemon. This enables (Samba) hosts, like your local NAS device,
to be found by Web Service Discovery Clients like Windows.
::: {.note}
···
options = {
services.samba-wsdd = {
enable = mkEnableOption (lib.mdDoc ''
+
Web Services Dynamic Discovery host daemon. This enables (Samba) hosts, like your local NAS device,
to be found by Web Service Discovery Clients like Windows.
::: {.note}
+1 -1
nixos/modules/services/networking/magic-wormhole-mailbox-server.nix
···
in
{
options.services.magic-wormhole-mailbox-server = {
-
enable = mkEnableOption (lib.mdDoc "Enable Magic Wormhole Mailbox Server");
};
config = mkIf cfg.enable {
···
in
{
options.services.magic-wormhole-mailbox-server = {
+
enable = mkEnableOption (lib.mdDoc "Magic Wormhole Mailbox Server");
};
config = mkIf cfg.enable {
+2 -7
nixos/modules/services/networking/mozillavpn.nix
···
{ config, lib, pkgs, ... }:
{
-
options.services.mozillavpn.enable = lib.mkOption {
-
type = lib.types.bool;
-
default = false;
-
description = lib.mdDoc ''
-
Enable the Mozilla VPN daemon.
-
'';
-
};
config = lib.mkIf config.services.mozillavpn.enable {
environment.systemPackages = [ pkgs.mozillavpn ];
···
{ config, lib, pkgs, ... }:
{
+
options.services.mozillavpn.enable =
+
lib.mkEnableOption (lib.mdDoc "Mozilla VPN daemon");
config = lib.mkIf config.services.mozillavpn.enable {
environment.systemPackages = [ pkgs.mozillavpn ];
+1 -1
nixos/modules/services/networking/networkmanager.nix
···
If you enable this option the
`networkmanager_strongswan` plugin will be added to
the {option}`networking.networkmanager.plugins` option
-
so you don't need to to that yourself.
'';
};
···
If you enable this option the
`networkmanager_strongswan` plugin will be added to
the {option}`networking.networkmanager.plugins` option
+
so you don't need to do that yourself.
'';
};
+1 -5
nixos/modules/services/networking/onedrive.nix
···
### Interface
options.services.onedrive = {
-
enable = lib.mkOption {
-
type = lib.types.bool;
-
default = false;
-
description = lib.mdDoc "Enable OneDrive service";
-
};
package = lib.mkOption {
type = lib.types.package;
···
### Interface
options.services.onedrive = {
+
enable = lib.mkEnableOption (lib.mdDoc "OneDrive service");
package = lib.mkOption {
type = lib.types.package;
+1 -1
nixos/modules/services/networking/owamp.nix
···
###### interface
options = {
-
services.owamp.enable = mkEnableOption (lib.mdDoc "Enable OWAMP server");
};
···
###### interface
options = {
+
services.owamp.enable = mkEnableOption (lib.mdDoc "OWAMP server");
};
+1 -5
nixos/modules/services/networking/polipo.nix
···
services.polipo = {
-
enable = mkOption {
-
type = types.bool;
-
default = false;
-
description = lib.mdDoc "Whether to run the polipo caching web proxy.";
-
};
proxyAddress = mkOption {
type = types.str;
···
services.polipo = {
+
enable = mkEnableOption (lib.mdDoc "polipo caching web proxy");
proxyAddress = mkOption {
type = types.str;
+2 -5
nixos/modules/services/networking/smokeping.nix
···
{
options = {
services.smokeping = {
-
enable = mkOption {
-
type = types.bool;
-
default = false;
-
description = lib.mdDoc "Enable the smokeping service";
-
};
alertConfig = mkOption {
type = types.lines;
default = ''
···
{
options = {
services.smokeping = {
+
enable = mkEnableOption (lib.mdDoc "smokeping service");
+
alertConfig = mkOption {
type = types.lines;
default = ''
+1 -1
nixos/modules/services/web-apps/peertube.nix
···
in {
options.services.peertube = {
-
enable = lib.mkEnableOption (lib.mdDoc "Enable Peertube’s service");
user = lib.mkOption {
type = lib.types.str;
···
in {
options.services.peertube = {
+
enable = lib.mkEnableOption (lib.mdDoc "Peertube");
user = lib.mkOption {
type = lib.types.str;
+1 -7
nixos/modules/services/x11/clight.nix
···
cfg.settings));
in {
options.services.clight = {
-
enable = mkOption {
-
type = types.bool;
-
default = false;
-
description = lib.mdDoc ''
-
Whether to enable clight or not.
-
'';
-
};
temperature = {
day = mkOption {
···
cfg.settings));
in {
options.services.clight = {
+
enable = mkEnableOption (lib.mdDoc "clight");
temperature = {
day = mkOption {