nixos: fix some types

Changed files
+44 -48
nixos
+2 -6
nixos/modules/config/fonts/fontconfig.nix
···
subpixel = {
rgba = mkOption {
-
type = types.string // {
-
check = flip elem ["rgb" "bgr" "vrgb" "vbgr" "none"];
-
};
default = "rgb";
+
type = types.enum ["rgb" "bgr" "vrgb" "vbgr" "none"];
description = ''
Subpixel order, one of <literal>none</literal>,
<literal>rgb</literal>, <literal>bgr</literal>,
···
};
lcdfilter = mkOption {
-
type = types.str // {
-
check = flip elem ["none" "default" "light" "legacy"];
-
};
default = "default";
+
type = types.enum ["none" "default" "light" "legacy"];
description = ''
FreeType LCD filter, one of <literal>none</literal>,
<literal>default</literal>, <literal>light</literal>, or
+5 -5
nixos/modules/config/ldap.nix
···
extraConfig = mkOption {
default = "";
-
type = types.string;
+
type = types.lines;
description = ''
Extra configuration options that will be added verbatim at
the end of the nslcd configuration file (nslcd.conf).
···
distinguishedName = mkOption {
default = "";
example = "cn=admin,dc=example,dc=com";
-
type = types.string;
+
type = types.str;
description = ''
The distinguished name to bind to the LDAP server with. If this
is not specified, an anonymous bind will be done.
···
password = mkOption {
default = "/etc/ldap/bind.password";
-
type = types.string;
+
type = types.str;
description = ''
The path to a file containing the credentials to use when binding
to the LDAP server (if not binding anonymously).
···
policy = mkOption {
default = "hard_open";
-
type = types.string;
+
type = types.enum [ "hard_open" "hard_init" "soft" ];
description = ''
Specifies the policy to use for reconnecting to an unavailable
LDAP server. The default is <literal>hard_open</literal>, which
···
extraConfig = mkOption {
default = "";
-
type = types.string;
+
type = types.lines;
description = ''
Extra configuration options that will be added verbatim at
the end of the ldap configuration file (ldap.conf).
+7 -7
nixos/modules/programs/venus.nix
···
dates = mkOption {
default = "*:0/15";
-
type = types.string;
+
type = types.str;
description = ''
Specification (in the format described by
<citerefentry><refentrytitle>systemd.time</refentrytitle>
···
user = mkOption {
default = "root";
-
type = types.string;
+
type = types.str;
description = ''
User for running venus script.
'';
···
group = mkOption {
default = "root";
-
type = types.string;
+
type = types.str;
description = ''
Group for running venus script.
'';
···
name = mkOption {
default = "NixOS Planet";
-
type = types.string;
+
type = types.str;
description = ''
Your planet's name.
'';
···
link = mkOption {
default = "http://planet.nixos.org";
-
type = types.string;
+
type = types.str;
description = ''
Link to the main page.
'';
···
ownerName = mkOption {
default = "Rok Garbas";
-
type = types.string;
+
type = types.str;
description = ''
Your name.
'';
···
ownerEmail = mkOption {
default = "some@example.com";
-
type = types.string;
+
type = types.str;
description = ''
Your e-mail address.
'';
+2 -2
nixos/modules/programs/wvdial.nix
···
dialerDefaults = mkOption {
default = "";
-
type = types.string;
+
type = types.str;
example = ''Init1 = AT+CGDCONT=1,"IP","internet.t-mobile"'';
description = ''
Contents of the "Dialer Defaults" section of
···
persist
noauth
'';
-
type = types.string;
+
type = types.str;
description = "Default ppp settings for wvdial.";
};
+4 -4
nixos/modules/programs/xfs_quota.nix
···
};
fileSystem = mkOption {
-
type = types.string;
+
type = types.str;
description = "XFS filesystem hosting the xfs_quota project.";
default = "/";
};
path = mkOption {
-
type = types.string;
+
type = types.str;
description = "Project directory.";
};
sizeSoftLimit = mkOption {
-
type = types.nullOr types.string;
+
type = types.nullOr types.str;
default = null;
example = "30g";
description = "Soft limit of the project size";
};
sizeHardLimit = mkOption {
-
type = types.nullOr types.string;
+
type = types.nullOr types.str;
default = null;
example = "50g";
description = "Hard limit of the project size.";
+1 -1
nixos/modules/security/pam.nix
···
users.motd = mkOption {
default = null;
example = "Today is Sweetmorn, the 4th day of The Aftermath in the YOLD 3178.";
-
type = types.nullOr types.string;
+
type = types.nullOr types.lines;
description = "Message of the day shown to users when they log in.";
};
+2 -2
nixos/modules/security/prey.nix
···
};
deviceKey = mkOption {
-
type = types.string;
+
type = types.str;
description = ''
<literal>Device key</literal> obtained by visiting
<link xlink:href="https://panel.preyproject.com/devices" />
···
};
apiKey = mkOption {
-
type = types.string;
+
type = types.str;
description = ''
<literal>API key</literal> obtained from
<link xlink:href="https://panel.preyproject.com/profile" />.
+2 -2
nixos/modules/services/monitoring/smartd.nix
···
recipient = mkOption {
default = "root";
-
type = types.string;
+
type = types.str;
description = "Recipient of the notification messages.";
};
···
display = mkOption {
default = ":${toString config.services.xserver.display}";
-
type = types.string;
+
type = types.str;
description = "DISPLAY to send X11 notifications to.";
};
};
+1 -1
nixos/modules/system/boot/loader/efi.nix
···
efiSysMountPoint = mkOption {
default = "/boot";
-
type = types.string;
+
type = types.str;
description = "Where the EFI System Partition is mounted.";
};
+8 -8
nixos/modules/system/boot/luksroot.nix
···
name = mkOption {
example = "luksroot";
-
type = types.string;
+
type = types.str;
description = "Named to be used for the generated device in /dev/mapper.";
};
device = mkOption {
example = "/dev/sda2";
-
type = types.string;
+
type = types.str;
description = "Path of the underlying block device.";
};
header = mkOption {
default = null;
example = "/root/header.img";
-
type = types.nullOr types.string;
+
type = types.nullOr types.str;
description = ''
The name of the file or block device that
should be used as header for the encrypted device.
···
keyFile = mkOption {
default = null;
example = "/dev/sdb1";
-
type = types.nullOr types.string;
+
type = types.nullOr types.str;
description = ''
The name of the file (can be a raw device or a partition) that
should be used as the decryption key for the encrypted device. If
···
ramfsMountPoint = mkOption {
default = "/crypt-ramfs";
-
type = types.string;
+
type = types.str;
description = "Path where the ramfs used to update the LUKS key will be mounted during early boot.";
};
···
fsType = mkOption {
default = "vfat";
-
type = types.string;
+
type = types.str;
description = "The filesystem of the unencrypted device.";
};
mountPoint = mkOption {
default = "/crypt-storage";
-
type = types.string;
+
type = types.str;
description = "Path where the unencrypted device will be mounted during early boot.";
};
path = mkOption {
default = "/crypt-storage/default";
-
type = types.string;
+
type = types.str;
description = ''
Absolute path of the salt on the unencrypted device with
that device's root directory as "/".
+3 -3
nixos/modules/tasks/encrypted-devices.nix
···
blkDev = mkOption {
default = null;
example = "/dev/sda1";
-
type = types.uniq (types.nullOr types.string);
+
type = types.nullOr types.str;
description = "Location of the backing encrypted device.";
};
label = mkOption {
default = null;
example = "rootfs";
-
type = types.uniq (types.nullOr types.string);
+
type = types.nullOr types.str;
description = "Label of the backing encrypted device.";
};
keyFile = mkOption {
default = null;
example = "/root/.swapkey";
-
type = types.uniq (types.nullOr types.string);
+
type = types.nullOr types.str;
description = "File system location of keyfile.";
};
};
+2 -2
nixos/modules/tasks/filesystems.nix
···
device = mkOption {
default = null;
example = "/dev/sda";
-
type = types.uniq (types.nullOr types.string);
+
type = types.nullOr types.str;
description = "Location of the device.";
};
label = mkOption {
default = null;
example = "root-partition";
-
type = types.uniq (types.nullOr types.string);
+
type = types.nullOr types.str;
description = "Label of the device (if any).";
};
+2 -2
nixos/modules/tasks/network-interfaces.nix
···
interface = mkOption {
example = "enp4s0";
-
type = types.string;
+
type = types.str;
description = "The interface the macvlan will transmit packets through.";
};
···
interface = mkOption {
example = "enp4s0";
-
type = types.string;
+
type = types.str;
description = "The interface the vlan will transmit packets through.";
};
+2 -2
nixos/modules/virtualisation/containers.nix
···
};
hostAddress = mkOption {
-
type = types.nullOr types.string;
+
type = types.nullOr types.str;
default = null;
example = "10.231.136.1";
description = ''
···
};
localAddress = mkOption {
-
type = types.nullOr types.string;
+
type = types.nullOr types.str;
default = null;
example = "10.231.136.2";
description = ''
+1 -1
nixos/modules/virtualisation/docker.nix
···
postStart =
mkOption {
-
type = types.string;
+
type = types.lines;
default = ''
while ! [ -e /var/run/docker.sock ]; do
sleep 0.1