Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions nixos/modules/config/fonts/fontdir.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ in
decompressFonts = mkOption {
type = types.bool;
default = config.programs.xwayland.enable;
defaultText = literalExpression "config.programs.xwayland.enable";
description = ''
Whether to decompress fonts in
<filename>/run/current-system/sw/share/X11/fonts</filename>.
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/config/gtk/gtk-icon-cache.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ with lib;
gtk.iconCache.enable = mkOption {
type = types.bool;
default = config.services.xserver.enable;
defaultText = literalExpression "config.services.xserver.enable";
description = ''
Whether to build icon theme caches for GTK applications.
'';
Expand Down
6 changes: 6 additions & 0 deletions nixos/modules/config/i18n.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ with lib;
allLocales = any (x: x == "all") config.i18n.supportedLocales;
locales = config.i18n.supportedLocales;
};
defaultText = literalExpression ''
pkgs.buildPackages.glibcLocales.override {
allLocales = any (x: x == "all") config.i18n.supportedLocales;
locales = config.i18n.supportedLocales;
}
'';
example = literalExpression "pkgs.glibcLocales";
description = ''
Customized pkg.glibcLocales package.
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/misc/meta.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ in
type = listOfMaintainers;
internal = true;
default = [];
example = [ lib.maintainers.all ];
example = literalExpression ''[ lib.maintainers.all ]'';
description = ''
List of maintainers of each module. This option should be defined at
most once per module.
Expand Down
8 changes: 8 additions & 0 deletions nixos/modules/security/pam.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ let

p11Auth = mkOption {
default = config.security.pam.p11.enable;
defaultText = literalExpression "config.security.pam.p11.enable";
type = types.bool;
description = ''
If set, keys listed in
Expand All @@ -49,6 +50,7 @@ let

u2fAuth = mkOption {
default = config.security.pam.u2f.enable;
defaultText = literalExpression "config.security.pam.u2f.enable";
type = types.bool;
description = ''
If set, users listed in
Expand All @@ -61,6 +63,7 @@ let

yubicoAuth = mkOption {
default = config.security.pam.yubico.enable;
defaultText = literalExpression "config.security.pam.yubico.enable";
type = types.bool;
description = ''
If set, users listed in
Expand All @@ -83,6 +86,7 @@ let

usbAuth = mkOption {
default = config.security.pam.usb.enable;
defaultText = literalExpression "config.security.pam.usb.enable";
type = types.bool;
description = ''
If set, users listed in
Expand All @@ -93,6 +97,7 @@ let

otpwAuth = mkOption {
default = config.security.pam.enableOTPW;
defaultText = literalExpression "config.security.pam.enableOTPW";
type = types.bool;
description = ''
If set, the OTPW system will be used (if
Expand Down Expand Up @@ -126,6 +131,7 @@ let

fprintAuth = mkOption {
default = config.services.fprintd.enable;
defaultText = literalExpression "config.services.fprintd.enable";
type = types.bool;
description = ''
If set, fingerprint reader will be used (if exists and
Expand All @@ -135,6 +141,7 @@ let

oathAuth = mkOption {
default = config.security.pam.oath.enable;
defaultText = literalExpression "config.security.pam.oath.enable";
type = types.bool;
description = ''
If set, the OATH Toolkit will be used.
Expand Down Expand Up @@ -249,6 +256,7 @@ let

pamMount = mkOption {
default = config.security.pam.mount.enable;
defaultText = literalExpression "config.security.pam.mount.enable";
type = types.bool;
description = ''
Enable PAM mount (pam_mount) system to mount fileystems on user login.
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/audio/icecast.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ in {
type = types.nullOr types.str;
description = "DNS name or IP address that will be used for the stream directory lookups or possibily the playlist generation if a Host header is not provided.";
default = config.networking.domain;
defaultText = literalExpression "config.networking.domain";
};

admin = {
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/audio/navidrome.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ in {
options = {
services.navidrome = {

enable = mkEnableOption pkgs.navidrome.meta.description;
enable = mkEnableOption "Navidrome music server";

settings = mkOption rec {
type = settingsFormat.type;
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/audio/ympd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ in {
port = mkOption {
type = types.int;
default = config.services.mpd.network.port;
defaultText = literalExpression "config.services.mpd.network.port";
description = "The port where MPD is listening.";
example = 6600;
};
Expand Down
3 changes: 3 additions & 0 deletions nixos/modules/services/backup/bacula.nix
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ in {

name = mkOption {
default = "${config.networking.hostName}-fd";
defaultText = literalExpression ''"''${config.networking.hostName}-fd"'';
type = types.str;
description = ''
The client name that must be used by the Director when connecting.
Expand Down Expand Up @@ -364,6 +365,7 @@ in {

name = mkOption {
default = "${config.networking.hostName}-sd";
defaultText = literalExpression ''"''${config.networking.hostName}-sd"'';
type = types.str;
description = ''
Specifies the Name of the Storage daemon.
Expand Down Expand Up @@ -439,6 +441,7 @@ in {

name = mkOption {
default = "${config.networking.hostName}-dir";
defaultText = literalExpression ''"''${config.networking.hostName}-dir"'';
type = types.str;
description = ''
The director name used by the system administrator. This directive is
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/cluster/kubernetes/kubelet.nix
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ in
hostname = mkOption {
description = "Kubernetes kubelet hostname override.";
default = config.networking.hostName;
defaultText = literalExpression "config.networking.hostName";
type = str;
};

Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/cluster/kubernetes/pki.nix
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ in
the public and private keys respectively.
'';
default = "${config.services.cfssl.dataDir}/ca";
defaultText = literalExpression ''"''${config.services.cfssl.dataDir}/ca"'';
type = str;
};

Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/cluster/kubernetes/proxy.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ in
hostname = mkOption {
description = "Kubernetes proxy hostname override.";
default = config.networking.hostName;
defaultText = literalExpression "config.networking.hostName";
type = str;
};

Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/computing/slurm/slurm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ in
dbdHost = mkOption {
type = types.str;
default = config.networking.hostName;
defaultText = literalExpression "config.networking.hostName";
description = ''
Hostname of the machine where <literal>slurmdbd</literal>
is running (i.e. name returned by <literal>hostname -s</literal>).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ in
'';
example = "nixos";
default = config.networking.hostName;
defaultText = literalExpression "config.networking.hostName";
};

runnerGroup = mkOption {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ in
buildMachinesFiles = mkOption {
type = types.listOf types.path;
default = optional (config.nix.buildMachines != []) "/etc/nix/machines";
defaultText = literalExpression ''optional (config.nix.buildMachines != []) "/etc/nix/machines"'';
example = [ "/etc/nix/machines" "/var/lib/hydra/provisioner/machines" ];
description = "List of files containing build machines.";
};
Expand Down
4 changes: 2 additions & 2 deletions nixos/modules/services/games/factorio.nix
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ in
description = ''
The name of the savegame that will be used by the server.

When not present in ${stateDir}/saves, a new map with default
settings will be generated before starting the service.
When not present in /var/lib/''${config.services.factorio.stateDirName}/saves,
a new map with default settings will be generated before starting the service.
'';
};
# TODO Add more individual settings as nixos-options?
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/logging/journalwatch.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ in {
mailFrom = mkOption {
type = types.str;
default = "journalwatch@${config.networking.hostName}";
defaultText = literalExpression ''"journalwatch@''${config.networking.hostName}"'';
description = ''
Mail address to send journalwatch reports from.
'';
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/logging/klogd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ with lib;
services.klogd.enable = mkOption {
type = types.bool;
default = versionOlder (getVersion config.boot.kernelPackages.kernel) "3.5";
defaultText = literalExpression ''versionOlder (getVersion config.boot.kernelPackages.kernel) "3.5"'';
description = ''
Whether to enable klogd, the kernel log message processing
daemon. Since systemd handles logging of kernel messages on
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/mail/opendkim.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ in {
domains = mkOption {
type = types.str;
default = "csl:${config.networking.hostName}";
defaultText = literalExpression ''"csl:''${config.networking.hostName}"'';
example = "csl:example.com,mydomain.net";
description = ''
Local domains set (see <literal>opendkim(8)</literal> for more information on datasets).
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/misc/etcd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ in {
name = mkOption {
description = "Etcd unique node name.";
default = config.networking.hostName;
defaultText = literalExpression "config.networking.hostName";
type = types.str;
};

Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/misc/gitea.nix
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ in
ENABLED = true;
MAILER_TYPE = "sendmail";
FROM = "do-not-reply@example.org";
SENDMAIL_PATH = "${pkgs.system-sendmail}/bin/sendmail";
SENDMAIL_PATH = "''${pkgs.system-sendmail}/bin/sendmail";
};
other = {
SHOW_FOOTER_VERSION = false;
Expand Down
2 changes: 2 additions & 0 deletions nixos/modules/services/misc/gitlab.nix
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ in {
host = mkOption {
type = types.str;
default = config.networking.hostName;
defaultText = literalExpression "config.networking.hostName";
description = "GitLab host name. Used e.g. for copy-paste URLs.";
};

Expand Down Expand Up @@ -534,6 +535,7 @@ in {
host = mkOption {
type = types.str;
default = config.services.gitlab.host;
defaultText = literalExpression "config.services.gitlab.host";
description = "GitLab container registry host name.";
};
port = mkOption {
Expand Down
3 changes: 3 additions & 0 deletions nixos/modules/services/misc/matrix-appservice-discord.nix
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ in {
serviceDependencies = mkOption {
type = with types; listOf str;
default = optional config.services.matrix-synapse.enable "matrix-synapse.service";
defaultText = literalExpression ''
optional config.services.matrix-synapse.enable "matrix-synapse.service"
'';
description = ''
List of Systemd services to require and wait for when starting the application service,
such as the Matrix homeserver if it's running on the same host.
Expand Down
6 changes: 6 additions & 0 deletions nixos/modules/services/misc/matrix-synapse.nix
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ in {
type = types.str;
example = "example.com";
default = config.networking.hostName;
defaultText = literalExpression "config.networking.hostName";
description = ''
The domain name of the server, with optional explicit port.
This is used by remote servers to look up the server address.
Expand Down Expand Up @@ -379,6 +380,11 @@ in {
default = if versionAtLeast config.system.stateVersion "18.03"
then "psycopg2"
else "sqlite3";
defaultText = literalExpression ''
if versionAtLeast config.system.stateVersion "18.03"
then "psycopg2"
else "sqlite3"
'';
description = ''
The database engine name. Can be sqlite or psycopg2.
'';
Expand Down
3 changes: 3 additions & 0 deletions nixos/modules/services/misc/mautrix-telegram.nix
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ in {
serviceDependencies = mkOption {
type = with types; listOf str;
default = optional config.services.matrix-synapse.enable "matrix-synapse.service";
defaultText = literalExpression ''
optional config.services.matrix-synapse.enable "matrix-synapse.service"
'';
description = ''
List of Systemd services to require and wait for when starting the application service.
'';
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/misc/moonraker.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ in {
klipperSocket = mkOption {
type = types.path;
default = config.services.klipper.apiSocket;
defaultText = literalExpression "config.services.klipper.apiSocket";
description = "Path to Klipper's API socket.";
};

Expand Down
3 changes: 3 additions & 0 deletions nixos/modules/services/misc/mx-puppet-discord.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ in {
serviceDependencies = mkOption {
type = with types; listOf str;
default = optional config.services.matrix-synapse.enable "matrix-synapse.service";
defaultText = literalExpression ''
optional config.services.matrix-synapse.enable "matrix-synapse.service"
'';
description = ''
List of Systemd services to require and wait for when starting the application service.
'';
Expand Down
3 changes: 3 additions & 0 deletions nixos/modules/services/misc/sourcehut/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ in
originBase = mkOption {
type = types.str;
default = with config.networking; hostName + lib.optionalString (domain != null) ".${domain}";
defaultText = literalExpression ''
with config.networking; hostName + optionalString (domain != null) ".''${domain}"
'';
description = ''
Host name used by reverse-proxy and for default settings. Will host services at git."''${originBase}". For example: git.sr.ht
'';
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/misc/xmrig.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ with lib;
package = mkOption {
type = types.package;
default = pkgs.xmrig;
defaultText = literalExpression "pkgs.xmrig";
example = literalExpression "pkgs.xmrig-mo";
description = "XMRig package to use.";
};
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/monitoring/graphite.nix
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ in {

mongoUrl = mkOption {
default = "mongodb://${config.services.mongodb.bind_ip}:27017/seyren";
defaultText = literalExpression ''"mongodb://''${config.services.mongodb.bind_ip}:27017/seyren"'';
description = "Mongodb connection string.";
type = types.str;
};
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/monitoring/nagios.nix
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ in
validateConfig = mkOption {
type = types.bool;
default = pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform;
defaultText = literalExpression "pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform";
description = "if true, the syntax of the nagios configuration file is checked at build time";
};

Expand Down
1 change: 1 addition & 0 deletions nixos/modules/services/monitoring/parsedmarc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ in
dashboard = lib.mkOption {
type = lib.types.bool;
default = config.services.grafana.enable;
defaultText = lib.literalExpression "config.services.grafana.enable";
description = ''
Whether the official parsedmarc grafana dashboard should
be provisioned to the local grafana instance.
Expand Down
3 changes: 3 additions & 0 deletions nixos/modules/services/monitoring/smartd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ in
mail = {
enable = mkOption {
default = config.services.mail.sendmailSetuidWrapper != null;
defaultText = literalExpression "config.services.mail.sendmailSetuidWrapper != null";
type = types.bool;
description = "Whenever to send e-mail notifications.";
};
Expand Down Expand Up @@ -169,12 +170,14 @@ in
x11 = {
enable = mkOption {
default = config.services.xserver.enable;
defaultText = literalExpression "config.services.xserver.enable";
type = types.bool;
description = "Whenever to send X11 xmessage notifications.";
};

display = mkOption {
default = ":${toString config.services.xserver.display}";
defaultText = literalExpression ''":''${toString config.services.xserver.display}"'';
type = types.str;
description = "DISPLAY to send X11 notifications to.";
};
Expand Down
Loading