From 34ddff29a498b8167e4e684ca87a4f4801cd0a63 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Sun, 4 Dec 2022 14:00:17 +0100 Subject: libreddit: Add package option --- nixos/modules/services/misc/libreddit.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'nixos/modules/services/misc') diff --git a/nixos/modules/services/misc/libreddit.nix b/nixos/modules/services/misc/libreddit.nix index c961d13da473..fd58928d2821 100644 --- a/nixos/modules/services/misc/libreddit.nix +++ b/nixos/modules/services/misc/libreddit.nix @@ -15,6 +15,13 @@ in services.libreddit = { enable = mkEnableOption (lib.mdDoc "Private front-end for Reddit"); + package = mkOption { + type = types.package; + default = pkgs.libreddit; + defaultText = literalExpression "pkgs.libreddit"; + description = lib.mdDoc "Libreddit package to use."; + }; + address = mkOption { default = "0.0.0.0"; example = "127.0.0.1"; @@ -45,7 +52,7 @@ in after = [ "network.target" ]; serviceConfig = { DynamicUser = true; - ExecStart = "${pkgs.libreddit}/bin/libreddit ${args}"; + ExecStart = "${cfg.package}/bin/libreddit ${args}"; AmbientCapabilities = lib.mkIf (cfg.port < 1024) [ "CAP_NET_BIND_SERVICE" ]; Restart = "on-failure"; RestartSec = "2s"; -- cgit 1.4.1 From ad866e565db95c40ce13bf456a60108f94a5295e Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Wed, 30 Nov 2022 17:15:00 +0100 Subject: treewide: switch to port type for nixos modules --- nixos/modules/services/audio/icecast.nix | 2 +- nixos/modules/services/audio/mpd.nix | 2 +- nixos/modules/services/cluster/kubernetes/kubelet.nix | 4 ++-- nixos/modules/services/cluster/kubernetes/scheduler.nix | 2 +- nixos/modules/services/continuous-integration/buildbot/master.nix | 2 +- nixos/modules/services/development/jupyter/default.nix | 2 +- nixos/modules/services/misc/gitlab.nix | 4 ++-- nixos/modules/services/misc/ripple-data-api.nix | 6 +++--- nixos/modules/services/monitoring/graphite.nix | 2 +- nixos/modules/services/monitoring/kapacitor.nix | 2 +- nixos/modules/services/monitoring/prometheus/alertmanager.nix | 2 +- nixos/modules/services/monitoring/zabbix-proxy.nix | 2 +- nixos/modules/services/network-filesystems/tahoe.nix | 6 +++--- nixos/modules/services/networking/morty.nix | 2 +- nixos/modules/services/networking/nsd.nix | 4 ++-- nixos/modules/services/networking/nylon.nix | 2 +- nixos/modules/services/networking/pdns-recursor.nix | 4 ++-- nixos/modules/services/networking/redsocks.nix | 2 +- nixos/modules/services/networking/znc/options.nix | 4 ++-- nixos/modules/services/search/elasticsearch-curator.nix | 2 +- nixos/modules/services/search/elasticsearch.nix | 2 +- nixos/modules/services/web-apps/hedgedoc.nix | 2 +- nixos/modules/services/web-apps/limesurvey.nix | 2 +- nixos/modules/services/web-apps/moodle.nix | 2 +- nixos/modules/services/web-apps/zabbix.nix | 4 ++-- nixos/modules/services/web-servers/nginx/vhost-options.nix | 2 +- 26 files changed, 36 insertions(+), 36 deletions(-) (limited to 'nixos/modules/services/misc') diff --git a/nixos/modules/services/audio/icecast.nix b/nixos/modules/services/audio/icecast.nix index 759f1ab0db9b..f71a13b9626d 100644 --- a/nixos/modules/services/audio/icecast.nix +++ b/nixos/modules/services/audio/icecast.nix @@ -74,7 +74,7 @@ in { listen = { port = mkOption { - type = types.int; + type = types.port; description = lib.mdDoc "TCP port that will be used to accept client connections."; default = 8000; }; diff --git a/nixos/modules/services/audio/mpd.nix b/nixos/modules/services/audio/mpd.nix index bbfccec98c4a..ba1e4716c9b9 100644 --- a/nixos/modules/services/audio/mpd.nix +++ b/nixos/modules/services/audio/mpd.nix @@ -142,7 +142,7 @@ in { }; port = mkOption { - type = types.int; + type = types.port; default = 6600; description = lib.mdDoc '' This setting is the TCP port that is desired for the daemon to get assigned diff --git a/nixos/modules/services/cluster/kubernetes/kubelet.nix b/nixos/modules/services/cluster/kubernetes/kubelet.nix index 0898fee9bdb7..3ede1cb80e85 100644 --- a/nixos/modules/services/cluster/kubernetes/kubelet.nix +++ b/nixos/modules/services/cluster/kubernetes/kubelet.nix @@ -171,7 +171,7 @@ in port = mkOption { description = lib.mdDoc "Kubernetes kubelet healthz port."; default = 10248; - type = int; + type = port; }; }; @@ -204,7 +204,7 @@ in port = mkOption { description = lib.mdDoc "Kubernetes kubelet info server listening port."; default = 10250; - type = int; + type = port; }; seedDockerImages = mkOption { diff --git a/nixos/modules/services/cluster/kubernetes/scheduler.nix b/nixos/modules/services/cluster/kubernetes/scheduler.nix index 2eada43eb4ec..f31a92f36840 100644 --- a/nixos/modules/services/cluster/kubernetes/scheduler.nix +++ b/nixos/modules/services/cluster/kubernetes/scheduler.nix @@ -43,7 +43,7 @@ in port = mkOption { description = lib.mdDoc "Kubernetes scheduler listening port."; default = 10251; - type = int; + type = port; }; verbosity = mkOption { diff --git a/nixos/modules/services/continuous-integration/buildbot/master.nix b/nixos/modules/services/continuous-integration/buildbot/master.nix index d00e0ba39565..680b21dbf21b 100644 --- a/nixos/modules/services/continuous-integration/buildbot/master.nix +++ b/nixos/modules/services/continuous-integration/buildbot/master.nix @@ -206,7 +206,7 @@ in { port = mkOption { default = 8010; - type = types.int; + type = types.port; description = lib.mdDoc "Specifies port number on which the buildbot HTTP interface listens."; }; diff --git a/nixos/modules/services/development/jupyter/default.nix b/nixos/modules/services/development/jupyter/default.nix index c3ef040ebe65..9f7910844468 100644 --- a/nixos/modules/services/development/jupyter/default.nix +++ b/nixos/modules/services/development/jupyter/default.nix @@ -57,7 +57,7 @@ in { }; port = mkOption { - type = types.int; + type = types.port; default = 8888; description = lib.mdDoc '' Port number Jupyter will be listening on. diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix index e206d5bb7c6d..e7c707228f1b 100644 --- a/nixos/modules/services/misc/gitlab.nix +++ b/nixos/modules/services/misc/gitlab.nix @@ -560,7 +560,7 @@ in { description = lib.mdDoc "GitLab container registry host name."; }; port = mkOption { - type = types.int; + type = types.port; default = 4567; description = lib.mdDoc "GitLab container registry port."; }; @@ -613,7 +613,7 @@ in { }; port = mkOption { - type = types.int; + type = types.port; default = 25; description = lib.mdDoc "Port of the SMTP server for GitLab."; }; diff --git a/nixos/modules/services/misc/ripple-data-api.nix b/nixos/modules/services/misc/ripple-data-api.nix index 2663d734980f..30623a321338 100644 --- a/nixos/modules/services/misc/ripple-data-api.nix +++ b/nixos/modules/services/misc/ripple-data-api.nix @@ -40,7 +40,7 @@ in { port = mkOption { description = lib.mdDoc "Ripple data api port"; default = 5993; - type = types.int; + type = types.port; }; importMode = mkOption { @@ -77,7 +77,7 @@ in { port = mkOption { description = lib.mdDoc "Ripple data api redis port."; default = 5984; - type = types.int; + type = types.port; }; }; @@ -91,7 +91,7 @@ in { port = mkOption { description = lib.mdDoc "Ripple data api couchdb port."; default = 5984; - type = types.int; + type = types.port; }; db = mkOption { diff --git a/nixos/modules/services/monitoring/graphite.nix b/nixos/modules/services/monitoring/graphite.nix index 017e8a1ba47c..8d92e60d3bad 100644 --- a/nixos/modules/services/monitoring/graphite.nix +++ b/nixos/modules/services/monitoring/graphite.nix @@ -225,7 +225,7 @@ in { port = mkOption { description = lib.mdDoc "Seyren listening port."; default = 8081; - type = types.int; + type = types.port; }; seyrenUrl = mkOption { diff --git a/nixos/modules/services/monitoring/kapacitor.nix b/nixos/modules/services/monitoring/kapacitor.nix index 61529c2e4526..727b694047b4 100644 --- a/nixos/modules/services/monitoring/kapacitor.nix +++ b/nixos/modules/services/monitoring/kapacitor.nix @@ -66,7 +66,7 @@ in }; port = mkOption { - type = types.int; + type = types.port; default = 9092; description = lib.mdDoc "Port of Kapacitor"; }; diff --git a/nixos/modules/services/monitoring/prometheus/alertmanager.nix b/nixos/modules/services/monitoring/prometheus/alertmanager.nix index ee2533ef1213..8706a18a184d 100644 --- a/nixos/modules/services/monitoring/prometheus/alertmanager.nix +++ b/nixos/modules/services/monitoring/prometheus/alertmanager.nix @@ -107,7 +107,7 @@ in { }; port = mkOption { - type = types.int; + type = types.port; default = 9093; description = lib.mdDoc '' Port to listen on for the web interface and API. diff --git a/nixos/modules/services/monitoring/zabbix-proxy.nix b/nixos/modules/services/monitoring/zabbix-proxy.nix index e7e353f36604..85da416ba6c3 100644 --- a/nixos/modules/services/monitoring/zabbix-proxy.nix +++ b/nixos/modules/services/monitoring/zabbix-proxy.nix @@ -102,7 +102,7 @@ in }; port = mkOption { - type = types.int; + type = types.port; default = if cfg.database.type == "mysql" then mysql.port else pgsql.port; defaultText = literalExpression '' if config.${opt.database.type} == "mysql" diff --git a/nixos/modules/services/network-filesystems/tahoe.nix b/nixos/modules/services/network-filesystems/tahoe.nix index 4213f437f4b2..14c0a3d4725f 100644 --- a/nixos/modules/services/network-filesystems/tahoe.nix +++ b/nixos/modules/services/network-filesystems/tahoe.nix @@ -18,7 +18,7 @@ in }; tub.port = mkOption { default = 3458; - type = types.int; + type = types.port; description = lib.mdDoc '' The port on which the introducer will listen. ''; @@ -58,7 +58,7 @@ in }; tub.port = mkOption { default = 3457; - type = types.int; + type = types.port; description = lib.mdDoc '' The port on which the tub will listen. @@ -80,7 +80,7 @@ in }; web.port = mkOption { default = 3456; - type = types.int; + type = types.port; description = lib.mdDoc '' The port on which the Web server will listen. diff --git a/nixos/modules/services/networking/morty.nix b/nixos/modules/services/networking/morty.nix index 4b20c34cfc9b..72514764a7c6 100644 --- a/nixos/modules/services/networking/morty.nix +++ b/nixos/modules/services/networking/morty.nix @@ -50,7 +50,7 @@ in }; port = mkOption { - type = types.int; + type = types.port; default = 3000; description = lib.mdDoc "Listing port"; }; diff --git a/nixos/modules/services/networking/nsd.nix b/nixos/modules/services/networking/nsd.nix index 57da208bd7af..0ded92652093 100644 --- a/nixos/modules/services/networking/nsd.nix +++ b/nixos/modules/services/networking/nsd.nix @@ -588,7 +588,7 @@ in }; port = mkOption { - type = types.int; + type = types.port; default = 53; description = lib.mdDoc '' Port the service should bind do. @@ -825,7 +825,7 @@ in }; port = mkOption { - type = types.int; + type = types.port; default = 8952; description = lib.mdDoc '' Port number for remote control operations (uses TLS over TCP). diff --git a/nixos/modules/services/networking/nylon.nix b/nixos/modules/services/networking/nylon.nix index 6ed832b6fa1b..401dbe97c52d 100644 --- a/nixos/modules/services/networking/nylon.nix +++ b/nixos/modules/services/networking/nylon.nix @@ -81,7 +81,7 @@ let }; port = mkOption { - type = types.int; + type = types.port; default = 1080; description = lib.mdDoc '' What port to listen for client requests, default is 1080. diff --git a/nixos/modules/services/networking/pdns-recursor.nix b/nixos/modules/services/networking/pdns-recursor.nix index 473c2a1f1fba..2f07cefc736e 100644 --- a/nixos/modules/services/networking/pdns-recursor.nix +++ b/nixos/modules/services/networking/pdns-recursor.nix @@ -38,7 +38,7 @@ in { }; dns.port = mkOption { - type = types.int; + type = types.port; default = 53; description = lib.mdDoc '' Port number Recursor DNS server will bind to. @@ -67,7 +67,7 @@ in { }; api.port = mkOption { - type = types.int; + type = types.port; default = 8082; description = lib.mdDoc '' Port number Recursor REST API server will bind to. diff --git a/nixos/modules/services/networking/redsocks.nix b/nixos/modules/services/networking/redsocks.nix index 85ae3125ded8..45feb1313c92 100644 --- a/nixos/modules/services/networking/redsocks.nix +++ b/nixos/modules/services/networking/redsocks.nix @@ -81,7 +81,7 @@ in }; port = mkOption { - type = types.int; + type = types.port; default = 12345; description = lib.mdDoc "Port on which redsocks should listen."; }; diff --git a/nixos/modules/services/networking/znc/options.nix b/nixos/modules/services/networking/znc/options.nix index ce8e7a89a4df..bd67ec86d513 100644 --- a/nixos/modules/services/networking/znc/options.nix +++ b/nixos/modules/services/networking/znc/options.nix @@ -18,7 +18,7 @@ let }; port = mkOption { - type = types.ints.u16; + type = types.port; default = 6697; description = lib.mdDoc '' IRC server port. @@ -188,7 +188,7 @@ in port = mkOption { default = 5000; - type = types.int; + type = types.port; description = lib.mdDoc '' Specifies the port on which to listen. ''; diff --git a/nixos/modules/services/search/elasticsearch-curator.nix b/nixos/modules/services/search/elasticsearch-curator.nix index f073ec7cf2bd..0a21d705ef87 100644 --- a/nixos/modules/services/search/elasticsearch-curator.nix +++ b/nixos/modules/services/search/elasticsearch-curator.nix @@ -50,7 +50,7 @@ in { }; port = mkOption { description = lib.mdDoc "the port that elasticsearch is listening on"; - type = types.int; + type = types.port; default = 9200; }; actionYAML = mkOption { diff --git a/nixos/modules/services/search/elasticsearch.nix b/nixos/modules/services/search/elasticsearch.nix index 4a9dd50310e2..fa1627566ebe 100644 --- a/nixos/modules/services/search/elasticsearch.nix +++ b/nixos/modules/services/search/elasticsearch.nix @@ -66,7 +66,7 @@ in port = mkOption { description = lib.mdDoc "Elasticsearch port to listen for HTTP traffic."; default = 9200; - type = types.int; + type = types.port; }; tcp_port = mkOption { diff --git a/nixos/modules/services/web-apps/hedgedoc.nix b/nixos/modules/services/web-apps/hedgedoc.nix index ea27eb7ba390..a623e45691df 100644 --- a/nixos/modules/services/web-apps/hedgedoc.nix +++ b/nixos/modules/services/web-apps/hedgedoc.nix @@ -449,7 +449,7 @@ in ''; }; port = mkOption { - type = types.int; + type = types.port; default = 9000; description = lib.mdDoc '' Minio listen port. diff --git a/nixos/modules/services/web-apps/limesurvey.nix b/nixos/modules/services/web-apps/limesurvey.nix index f6a1b5595243..7093d1de0dac 100644 --- a/nixos/modules/services/web-apps/limesurvey.nix +++ b/nixos/modules/services/web-apps/limesurvey.nix @@ -49,7 +49,7 @@ in }; port = mkOption { - type = types.int; + type = types.port; default = if cfg.database.type == "pgsql" then 5442 else 3306; defaultText = literalExpression "3306"; description = lib.mdDoc "Database host port."; diff --git a/nixos/modules/services/web-apps/moodle.nix b/nixos/modules/services/web-apps/moodle.nix index dc434d0fc803..5f8d9c5b15f4 100644 --- a/nixos/modules/services/web-apps/moodle.nix +++ b/nixos/modules/services/web-apps/moodle.nix @@ -96,7 +96,7 @@ in }; port = mkOption { - type = types.int; + type = types.port; description = lib.mdDoc "Database host port."; default = { mysql = 3306; diff --git a/nixos/modules/services/web-apps/zabbix.nix b/nixos/modules/services/web-apps/zabbix.nix index 0e43922f35de..2cea7e7cea72 100644 --- a/nixos/modules/services/web-apps/zabbix.nix +++ b/nixos/modules/services/web-apps/zabbix.nix @@ -51,7 +51,7 @@ in server = { port = mkOption { - type = types.int; + type = types.port; description = lib.mdDoc "The port of the Zabbix server to connect to."; default = 10051; }; @@ -78,7 +78,7 @@ in }; port = mkOption { - type = types.int; + type = types.port; default = if cfg.database.type == "mysql" then config.services.mysql.port else if cfg.database.type == "pgsql" then config.services.postgresql.port diff --git a/nixos/modules/services/web-servers/nginx/vhost-options.nix b/nixos/modules/services/web-servers/nginx/vhost-options.nix index e3d4afc074cf..2bdc046c0d8f 100644 --- a/nixos/modules/services/web-servers/nginx/vhost-options.nix +++ b/nixos/modules/services/web-servers/nginx/vhost-options.nix @@ -29,7 +29,7 @@ with lib; listen = mkOption { type = with types; listOf (submodule { options = { addr = mkOption { type = str; description = lib.mdDoc "IP address."; }; - port = mkOption { type = int; description = lib.mdDoc "Port number."; default = 80; }; + port = mkOption { type = port; description = lib.mdDoc "Port number."; default = 80; }; ssl = mkOption { type = bool; description = lib.mdDoc "Enable SSL."; default = false; }; extraParameters = mkOption { type = listOf str; description = lib.mdDoc "Extra parameters of this listen directive."; default = []; example = [ "backlog=1024" "deferred" ]; }; }; }); -- cgit 1.4.1 From 0ff3b35356b5a57f93b4a7c27ed9ca4c71d388ac Mon Sep 17 00:00:00 2001 From: Naïm Favier Date: Thu, 3 Nov 2022 15:52:19 +0100 Subject: nixos/doc: fix some options --- nixos/modules/programs/htop.nix | 2 +- nixos/modules/programs/weylus.nix | 2 +- nixos/modules/services/audio/liquidsoap.nix | 12 +++++----- nixos/modules/services/databases/clickhouse.nix | 2 +- nixos/modules/services/databases/mysql.nix | 10 +++++---- nixos/modules/services/databases/openldap.nix | 2 +- nixos/modules/services/games/asf.nix | 8 ++++--- nixos/modules/services/games/terraria.nix | 2 +- nixos/modules/services/hardware/argonone.nix | 2 +- nixos/modules/services/hardware/joycond.nix | 2 +- nixos/modules/services/matrix/conduit.nix | 3 +-- nixos/modules/services/matrix/synapse.nix | 1 + nixos/modules/services/misc/autorandr.nix | 4 ++-- nixos/modules/services/misc/heisenbridge.nix | 3 +-- nixos/modules/services/misc/portunus.nix | 4 ++-- nixos/modules/services/misc/sourcehut/default.nix | 2 +- .../modules/services/monitoring/grafana-agent.nix | 26 ++++++++++++---------- nixos/modules/services/monitoring/uptime-kuma.nix | 3 +-- nixos/modules/services/networking/ddclient.nix | 2 +- nixos/modules/services/networking/ergochat.nix | 4 ++-- nixos/modules/services/networking/multipath.nix | 2 +- nixos/modules/services/networking/nomad.nix | 2 +- nixos/modules/services/networking/sabnzbd.nix | 2 +- nixos/modules/services/search/meilisearch.nix | 2 +- nixos/modules/services/security/opensnitch.nix | 2 +- nixos/modules/services/web-apps/code-server.nix | 2 +- nixos/modules/services/web-apps/invidious.nix | 2 +- nixos/modules/services/web-apps/mattermost.nix | 4 ++-- nixos/modules/services/web-apps/onlyoffice.nix | 2 +- .../services/web-servers/lighttpd/default.nix | 2 +- nixos/modules/virtualisation/qemu-vm.nix | 9 ++++---- 31 files changed, 67 insertions(+), 60 deletions(-) (limited to 'nixos/modules/services/misc') diff --git a/nixos/modules/programs/htop.nix b/nixos/modules/programs/htop.nix index 521287f9352d..2682ced490ca 100644 --- a/nixos/modules/programs/htop.nix +++ b/nixos/modules/programs/htop.nix @@ -20,7 +20,7 @@ in package = mkOption { type = types.package; default = pkgs.htop; - defaultText = "pkgs.htop"; + defaultText = lib.literalExpression "pkgs.htop"; description = lib.mdDoc '' The htop package that should be used. ''; diff --git a/nixos/modules/programs/weylus.nix b/nixos/modules/programs/weylus.nix index eab8afdf2cc8..a5775f3b981c 100644 --- a/nixos/modules/programs/weylus.nix +++ b/nixos/modules/programs/weylus.nix @@ -29,7 +29,7 @@ in package = mkOption { type = package; default = pkgs.weylus; - defaultText = "pkgs.weylus"; + defaultText = lib.literalExpression "pkgs.weylus"; description = lib.mdDoc "Weylus package to install."; }; }; diff --git a/nixos/modules/services/audio/liquidsoap.nix b/nixos/modules/services/audio/liquidsoap.nix index c313104c4609..5c10d13af5fd 100644 --- a/nixos/modules/services/audio/liquidsoap.nix +++ b/nixos/modules/services/audio/liquidsoap.nix @@ -38,11 +38,13 @@ in default = {}; - example = { - myStream1 = "/etc/liquidsoap/myStream1.liq"; - myStream2 = literalExpression "./myStream2.liq"; - myStream3 = "out(playlist(\"/srv/music/\"))"; - }; + example = literalExpression '' + { + myStream1 = "/etc/liquidsoap/myStream1.liq"; + myStream2 = ./myStream2.liq; + myStream3 = "out(playlist(\"/srv/music/\"))"; + } + ''; type = types.attrsOf (types.either types.path types.str); }; diff --git a/nixos/modules/services/databases/clickhouse.nix b/nixos/modules/services/databases/clickhouse.nix index 96607d9a783c..04dd20b5f14d 100644 --- a/nixos/modules/services/databases/clickhouse.nix +++ b/nixos/modules/services/databases/clickhouse.nix @@ -16,7 +16,7 @@ with lib; package = mkOption { type = types.package; default = pkgs.clickhouse; - defaultText = "pkgs.clickhouse"; + defaultText = lib.literalExpression "pkgs.clickhouse"; description = lib.mdDoc '' ClickHouse package to use. ''; diff --git a/nixos/modules/services/databases/mysql.nix b/nixos/modules/services/databases/mysql.nix index ec4524e9061d..128bb0862175 100644 --- a/nixos/modules/services/databases/mysql.nix +++ b/nixos/modules/services/databases/mysql.nix @@ -160,10 +160,12 @@ in List of database names and their initial schemas that should be used to create databases on the first startup of MySQL. The schema attribute is optional: If not specified, an empty database is created. ''; - example = [ - { name = "foodatabase"; schema = literalExpression "./foodatabase.sql"; } - { name = "bardatabase"; } - ]; + example = literalExpression '' + [ + { name = "foodatabase"; schema = ./foodatabase.sql; } + { name = "bardatabase"; } + ] + ''; }; initialScript = mkOption { diff --git a/nixos/modules/services/databases/openldap.nix b/nixos/modules/services/databases/openldap.nix index 7a59de372f24..cba3442023cb 100644 --- a/nixos/modules/services/databases/openldap.nix +++ b/nixos/modules/services/databases/openldap.nix @@ -16,7 +16,7 @@ let # systemd/systemd#19604 description = '' LDAP value - either a string, or an attrset containing - path or base64 for included + `path` or `base64` for included values or base-64 encoded values respectively. ''; check = x: lib.isString x || (lib.isAttrs x && (x ? path || x ? base64)); diff --git a/nixos/modules/services/games/asf.nix b/nixos/modules/services/games/asf.nix index 10847e8f11f3..d3f7883421ce 100644 --- a/nixos/modules/services/games/asf.nix +++ b/nixos/modules/services/games/asf.nix @@ -43,12 +43,14 @@ in web-ui = mkOption { type = types.submodule { options = { - enable = mkEnableOption - (lib.mdDoc "Wheter to start the web-ui. This is the preferred way of configuring things such as the steam guard token"); + enable = mkEnableOption "" // { + description = lib.mdDoc "Whether to start the web-ui. This is the preferred way of configuring things such as the steam guard token."; + }; package = mkOption { type = types.package; default = pkgs.ArchiSteamFarm.ui; + defaultText = lib.literalExpression "pkgs.ArchiSteamFarm.ui"; description = lib.mdDoc "Web-UI package to use. Contents must be in lib/dist."; }; @@ -56,7 +58,6 @@ in }; default = { enable = true; - package = pkgs.ArchiSteamFarm.ui; }; example = { enable = false; @@ -67,6 +68,7 @@ in package = mkOption { type = types.package; default = pkgs.ArchiSteamFarm; + defaultText = lib.literalExpression "pkgs.ArchiSteamFarm"; description = lib.mdDoc "Package to use. Should always be the latest version, for security reasons, since this module uses very new features and to not get out of sync with the Steam API."; }; diff --git a/nixos/modules/services/games/terraria.nix b/nixos/modules/services/games/terraria.nix index 571bcde2c5b2..ccdd779165b8 100644 --- a/nixos/modules/services/games/terraria.nix +++ b/nixos/modules/services/games/terraria.nix @@ -116,7 +116,7 @@ in openFirewall = mkOption { type = types.bool; default = false; - description = lib.mdDoc "Wheter to open ports in the firewall"; + description = lib.mdDoc "Whether to open ports in the firewall"; }; dataDir = mkOption { diff --git a/nixos/modules/services/hardware/argonone.nix b/nixos/modules/services/hardware/argonone.nix index dc90e09e985b..e67c2625062e 100644 --- a/nixos/modules/services/hardware/argonone.nix +++ b/nixos/modules/services/hardware/argonone.nix @@ -9,7 +9,7 @@ in package = lib.mkOption { type = lib.types.package; default = pkgs.argononed; - defaultText = "pkgs.argononed"; + defaultText = lib.literalExpression "pkgs.argononed"; description = lib.mdDoc '' The package implementing the Argon One driver ''; diff --git a/nixos/modules/services/hardware/joycond.nix b/nixos/modules/services/hardware/joycond.nix index f4da00762a43..1af18b3b63d3 100644 --- a/nixos/modules/services/hardware/joycond.nix +++ b/nixos/modules/services/hardware/joycond.nix @@ -14,7 +14,7 @@ with lib; package = mkOption { type = types.package; default = pkgs.joycond; - defaultText = "pkgs.joycond"; + defaultText = lib.literalExpression "pkgs.joycond"; description = lib.mdDoc '' The joycond package to use. ''; diff --git a/nixos/modules/services/matrix/conduit.nix b/nixos/modules/services/matrix/conduit.nix index 812d463e9e86..c8d89ed33f51 100644 --- a/nixos/modules/services/matrix/conduit.nix +++ b/nixos/modules/services/matrix/conduit.nix @@ -23,8 +23,7 @@ in package = mkOption { type = types.package; default = pkgs.matrix-conduit; - defaultText = "pkgs.matrix-conduit"; - example = "pkgs.matrix-conduit"; + defaultText = lib.literalExpression "pkgs.matrix-conduit"; description = lib.mdDoc '' Package of the conduit matrix server to use. ''; diff --git a/nixos/modules/services/matrix/synapse.nix b/nixos/modules/services/matrix/synapse.nix index 86662055222a..a80d4cabfec0 100644 --- a/nixos/modules/services/matrix/synapse.nix +++ b/nixos/modules/services/matrix/synapse.nix @@ -286,6 +286,7 @@ in { log_config = mkOption { type = types.path; default = ./synapse-log_config.yaml; + defaultText = lib.literalExpression "nixos/modules/services/matrix/synapse-log_config.yaml"; description = lib.mdDoc '' The file that holds the logging configuration. ''; diff --git a/nixos/modules/services/misc/autorandr.nix b/nixos/modules/services/misc/autorandr.nix index 365fdd5fcc39..072064143dbd 100644 --- a/nixos/modules/services/misc/autorandr.nix +++ b/nixos/modules/services/misc/autorandr.nix @@ -258,7 +258,7 @@ in { type = hooksModule; description = lib.mdDoc "Global hook scripts"; default = { }; - example = '' + example = literalExpression '' { postswitch = { "notify-i3" = "''${pkgs.i3}/bin/i3-msg restart"; @@ -279,7 +279,7 @@ in { exit 1 esac echo "Xft.dpi: $DPI" | ''${pkgs.xorg.xrdb}/bin/xrdb -merge - ''' + '''; }; } ''; diff --git a/nixos/modules/services/misc/heisenbridge.nix b/nixos/modules/services/misc/heisenbridge.nix index 13ba362b33db..d07e0e420462 100644 --- a/nixos/modules/services/misc/heisenbridge.nix +++ b/nixos/modules/services/misc/heisenbridge.nix @@ -28,8 +28,7 @@ in package = mkOption { type = types.package; default = pkgs.heisenbridge; - defaultText = "pkgs.heisenbridge"; - example = "pkgs.heisenbridge.override { … = …; }"; + defaultText = lib.literalExpression "pkgs.heisenbridge"; description = lib.mdDoc '' Package of the application to run, exposed for overriding purposes. ''; diff --git a/nixos/modules/services/misc/portunus.nix b/nixos/modules/services/misc/portunus.nix index 0b283ea27d82..1dae605e46f2 100644 --- a/nixos/modules/services/misc/portunus.nix +++ b/nixos/modules/services/misc/portunus.nix @@ -29,7 +29,7 @@ in package = mkOption { type = types.package; default = pkgs.portunus; - defaultText = "pkgs.portunus"; + defaultText = lib.literalExpression "pkgs.portunus"; description = lib.mdDoc "The Portunus package to use."; }; @@ -108,7 +108,7 @@ in package = mkOption { type = types.package; default = pkgs.openldap; - defaultText = "pkgs.openldap"; + defaultText = lib.literalExpression "pkgs.openldap"; description = lib.mdDoc "The OpenLDAP package to use."; }; diff --git a/nixos/modules/services/misc/sourcehut/default.nix b/nixos/modules/services/misc/sourcehut/default.nix index aaa7bb057546..7dd254e34920 100644 --- a/nixos/modules/services/misc/sourcehut/default.nix +++ b/nixos/modules/services/misc/sourcehut/default.nix @@ -505,7 +505,7 @@ in description = lib.mdDoc "Origin URL for API, 100 more than web."; type = types.str; default = "http://${cfg.listenAddress}:${toString (cfg.meta.port + 100)}"; - defaultText = ''http://:''${toString ( + 100)}''; + defaultText = lib.literalMD ''`"http://''${`[](#opt-services.sourcehut.listenAddress)`}:''${toString (`[](#opt-services.sourcehut.meta.port)` + 100)}"`''; }; webhooks = mkOption { description = lib.mdDoc "The Redis connection used for the webhooks worker."; diff --git a/nixos/modules/services/monitoring/grafana-agent.nix b/nixos/modules/services/monitoring/grafana-agent.nix index ecb39a924f58..270d888afb78 100644 --- a/nixos/modules/services/monitoring/grafana-agent.nix +++ b/nixos/modules/services/monitoring/grafana-agent.nix @@ -16,7 +16,7 @@ in package = mkOption { type = types.package; default = pkgs.grafana-agent; - defaultText = "pkgs.grafana-agent"; + defaultText = lib.literalExpression "pkgs.grafana-agent"; description = lib.mdDoc "The grafana-agent package to use."; }; @@ -49,17 +49,19 @@ in }; default = { }; - defaultText = '' - metrics = { - wal_directory = "\''${STATE_DIRECTORY}"; - global.scrape_interval = "5s"; - }; - integrations = { - agent.enabled = true; - agent.scrape_integration = true; - node_exporter.enabled = true; - replace_instance_label = true; - }; + defaultText = lib.literalExpression '' + { + metrics = { + wal_directory = "\''${STATE_DIRECTORY}"; + global.scrape_interval = "5s"; + }; + integrations = { + agent.enabled = true; + agent.scrape_integration = true; + node_exporter.enabled = true; + replace_instance_label = true; + }; + } ''; example = { metrics.global.remote_write = [{ diff --git a/nixos/modules/services/monitoring/uptime-kuma.nix b/nixos/modules/services/monitoring/uptime-kuma.nix index 3a6091de679d..b6dc993e6a05 100644 --- a/nixos/modules/services/monitoring/uptime-kuma.nix +++ b/nixos/modules/services/monitoring/uptime-kuma.nix @@ -13,9 +13,8 @@ in package = mkOption { type = types.package; - example = literalExpression "pkgs.uptime-kuma"; default = pkgs.uptime-kuma; - defaultText = "pkgs.uptime-kuma"; + defaultText = literalExpression "pkgs.uptime-kuma"; description = lib.mdDoc "Uptime Kuma package to use."; }; diff --git a/nixos/modules/services/networking/ddclient.nix b/nixos/modules/services/networking/ddclient.nix index 5c32817979af..4d843641f58a 100644 --- a/nixos/modules/services/networking/ddclient.nix +++ b/nixos/modules/services/networking/ddclient.nix @@ -71,7 +71,7 @@ with lib; package = mkOption { type = package; default = pkgs.ddclient; - defaultText = "pkgs.ddclient"; + defaultText = lib.literalExpression "pkgs.ddclient"; description = lib.mdDoc '' The ddclient executable package run by the service. ''; diff --git a/nixos/modules/services/networking/ergochat.nix b/nixos/modules/services/networking/ergochat.nix index 1a70b1f8613e..a003512677eb 100644 --- a/nixos/modules/services/networking/ergochat.nix +++ b/nixos/modules/services/networking/ergochat.nix @@ -17,10 +17,10 @@ in { configFile = lib.mkOption { type = lib.types.path; default = (pkgs.formats.yaml {}).generate "ergo.conf" cfg.settings; - defaultText = "generated config file from .settings"; + defaultText = lib.literalMD "generated config file from `settings`"; description = lib.mdDoc '' Path to configuration file. - Setting this will skip any configuration done via `.settings` + Setting this will skip any configuration done via `settings` ''; }; diff --git a/nixos/modules/services/networking/multipath.nix b/nixos/modules/services/networking/multipath.nix index cb6b6db272c2..54ee2a015687 100644 --- a/nixos/modules/services/networking/multipath.nix +++ b/nixos/modules/services/networking/multipath.nix @@ -28,7 +28,7 @@ in { type = package; description = lib.mdDoc "multipath-tools package to use"; default = pkgs.multipath-tools; - defaultText = "pkgs.multipath-tools"; + defaultText = lib.literalExpression "pkgs.multipath-tools"; }; devices = mkOption { diff --git a/nixos/modules/services/networking/nomad.nix b/nixos/modules/services/networking/nomad.nix index 5e5d9469efc7..890ee0b7d8d1 100644 --- a/nixos/modules/services/networking/nomad.nix +++ b/nixos/modules/services/networking/nomad.nix @@ -67,7 +67,7 @@ in Additional plugins dir used to configure nomad. ''; example = literalExpression '' - [ "" "pkgs."] + [ "" pkgs. ] ''; }; diff --git a/nixos/modules/services/networking/sabnzbd.nix b/nixos/modules/services/networking/sabnzbd.nix index 8486be1bc66c..8f3545df8995 100644 --- a/nixos/modules/services/networking/sabnzbd.nix +++ b/nixos/modules/services/networking/sabnzbd.nix @@ -20,7 +20,7 @@ in package = mkOption { type = types.package; default = pkgs.sabnzbd; - defaultText = "pkgs.sabnzbd"; + defaultText = lib.literalExpression "pkgs.sabnzbd"; description = lib.mdDoc "The sabnzbd executable package run by the service."; }; diff --git a/nixos/modules/services/search/meilisearch.nix b/nixos/modules/services/search/meilisearch.nix index 9262b927cba4..3983b1b2c92c 100644 --- a/nixos/modules/services/search/meilisearch.nix +++ b/nixos/modules/services/search/meilisearch.nix @@ -21,7 +21,7 @@ in package = mkOption { description = lib.mdDoc "The package to use for meilisearch. Use this if you require specific features to be enabled. The default package has no features."; default = pkgs.meilisearch; - defaultText = "pkgs.meilisearch"; + defaultText = lib.literalExpression "pkgs.meilisearch"; type = types.package; }; diff --git a/nixos/modules/services/security/opensnitch.nix b/nixos/modules/services/security/opensnitch.nix index 8f1407b555fb..98695b1ef060 100644 --- a/nixos/modules/services/security/opensnitch.nix +++ b/nixos/modules/services/security/opensnitch.nix @@ -91,7 +91,7 @@ in { InterceptUnknown = mkOption { type = types.bool; description = mdDoc '' - Wheter to intercept spare connections. + Whether to intercept spare connections. ''; }; diff --git a/nixos/modules/services/web-apps/code-server.nix b/nixos/modules/services/web-apps/code-server.nix index 0d6b6c529b6d..24e34e0c5833 100644 --- a/nixos/modules/services/web-apps/code-server.nix +++ b/nixos/modules/services/web-apps/code-server.nix @@ -15,7 +15,7 @@ in { package = mkOption { default = pkgs.code-server; - defaultText = "pkgs.code-server"; + defaultText = lib.literalExpression "pkgs.code-server"; description = lib.mdDoc "Which code-server derivation to use."; type = types.package; }; diff --git a/nixos/modules/services/web-apps/invidious.nix b/nixos/modules/services/web-apps/invidious.nix index e106478628f5..a153aa3fb0c3 100644 --- a/nixos/modules/services/web-apps/invidious.nix +++ b/nixos/modules/services/web-apps/invidious.nix @@ -151,7 +151,7 @@ in package = lib.mkOption { type = types.package; default = pkgs.invidious; - defaultText = "pkgs.invidious"; + defaultText = lib.literalExpression "pkgs.invidious"; description = lib.mdDoc "The Invidious package to use."; }; diff --git a/nixos/modules/services/web-apps/mattermost.nix b/nixos/modules/services/web-apps/mattermost.nix index 71292c47d63a..99042821f5eb 100644 --- a/nixos/modules/services/web-apps/mattermost.nix +++ b/nixos/modules/services/web-apps/mattermost.nix @@ -106,7 +106,7 @@ in package = mkOption { type = types.package; default = pkgs.mattermost; - defaultText = "pkgs.mattermost"; + defaultText = lib.literalExpression "pkgs.mattermost"; description = lib.mdDoc "Mattermost derivation to use."; }; @@ -238,7 +238,7 @@ in package = mkOption { type = types.package; default = pkgs.matterircd; - defaultText = "pkgs.matterircd"; + defaultText = lib.literalExpression "pkgs.matterircd"; description = lib.mdDoc "matterircd derivation to use."; }; parameters = mkOption { diff --git a/nixos/modules/services/web-apps/onlyoffice.nix b/nixos/modules/services/web-apps/onlyoffice.nix index db4a9582794e..1478e8da87a1 100644 --- a/nixos/modules/services/web-apps/onlyoffice.nix +++ b/nixos/modules/services/web-apps/onlyoffice.nix @@ -29,7 +29,7 @@ in package = mkOption { type = types.package; default = pkgs.onlyoffice-documentserver; - defaultText = "pkgs.onlyoffice-documentserver"; + defaultText = lib.literalExpression "pkgs.onlyoffice-documentserver"; description = lib.mdDoc "Which package to use for the OnlyOffice instance."; }; diff --git a/nixos/modules/services/web-servers/lighttpd/default.nix b/nixos/modules/services/web-servers/lighttpd/default.nix index ec847495d741..811afe8e0af6 100644 --- a/nixos/modules/services/web-servers/lighttpd/default.nix +++ b/nixos/modules/services/web-servers/lighttpd/default.nix @@ -137,7 +137,7 @@ in package = mkOption { default = pkgs.lighttpd; - defaultText = "pkgs.lighttpd"; + defaultText = lib.literalExpression "pkgs.lighttpd"; type = types.package; description = lib.mdDoc '' lighttpd package to use. diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix index eae898a08a69..1b3c0e23f97d 100644 --- a/nixos/modules/virtualisation/qemu-vm.nix +++ b/nixos/modules/virtualisation/qemu-vm.nix @@ -580,7 +580,7 @@ in virtualisation.host.pkgs = mkOption { type = options.nixpkgs.pkgs.type; default = pkgs; - defaultText = "pkgs"; + defaultText = literalExpression "pkgs"; example = literalExpression '' import pkgs.path { system = "x86_64-darwin"; } ''; @@ -595,7 +595,8 @@ in mkOption { type = types.package; default = cfg.host.pkgs.qemu_kvm; - example = "pkgs.qemu_test"; + defaultText = literalExpression "config.virtualisation.host.pkgs.qemu_kvm"; + example = literalExpression "pkgs.qemu_test"; description = lib.mdDoc "QEMU package to use."; }; @@ -721,7 +722,7 @@ in firmware = mkOption { type = types.path; default = pkgs.OVMF.firmware; - defaultText = "pkgs.OVMF.firmware"; + defaultText = literalExpression "pkgs.OVMF.firmware"; description = lib.mdDoc '' Firmware binary for EFI implementation, defaults to OVMF. @@ -731,7 +732,7 @@ in variables = mkOption { type = types.path; default = pkgs.OVMF.variables; - defaultText = "pkgs.OVMF.variables"; + defaultText = literalExpression "pkgs.OVMF.variables"; description = lib.mdDoc '' Platform-specific flash binary for EFI variables, implementation-dependent to the EFI firmware. -- cgit 1.4.1