diff options
Diffstat (limited to 'nixos/modules/system/boot')
-rw-r--r-- | nixos/modules/system/boot/initrd-openvpn.nix | 2 | ||||
-rw-r--r-- | nixos/modules/system/boot/initrd-ssh.nix | 2 | ||||
-rw-r--r-- | nixos/modules/system/boot/kernel.nix | 12 | ||||
-rw-r--r-- | nixos/modules/system/boot/kernel_config.nix | 2 | ||||
-rw-r--r-- | nixos/modules/system/boot/loader/grub/grub.nix | 12 | ||||
-rw-r--r-- | nixos/modules/system/boot/loader/grub/ipxe.nix | 2 | ||||
-rw-r--r-- | nixos/modules/system/boot/luksroot.nix | 2 | ||||
-rw-r--r-- | nixos/modules/system/boot/networkd.nix | 16 | ||||
-rw-r--r-- | nixos/modules/system/boot/plymouth.nix | 3 | ||||
-rw-r--r-- | nixos/modules/system/boot/stage-1.nix | 6 | ||||
-rw-r--r-- | nixos/modules/system/boot/systemd.nix | 10 |
11 files changed, 34 insertions, 35 deletions
diff --git a/nixos/modules/system/boot/initrd-openvpn.nix b/nixos/modules/system/boot/initrd-openvpn.nix index b35fb0b57c0..9b52d4bbdb1 100644 --- a/nixos/modules/system/boot/initrd-openvpn.nix +++ b/nixos/modules/system/boot/initrd-openvpn.nix @@ -35,7 +35,7 @@ in </para> </warning> ''; - example = "./configuration.ovpn"; + example = literalExpression "./configuration.ovpn"; }; }; diff --git a/nixos/modules/system/boot/initrd-ssh.nix b/nixos/modules/system/boot/initrd-ssh.nix index 00ac83a1897..0999142de86 100644 --- a/nixos/modules/system/boot/initrd-ssh.nix +++ b/nixos/modules/system/boot/initrd-ssh.nix @@ -78,7 +78,7 @@ in authorizedKeys = mkOption { type = types.listOf types.str; default = config.users.users.root.openssh.authorizedKeys.keys; - defaultText = "config.users.users.root.openssh.authorizedKeys.keys"; + defaultText = literalExpression "config.users.users.root.openssh.authorizedKeys.keys"; description = '' Authorized keys for the root user on initrd. ''; diff --git a/nixos/modules/system/boot/kernel.nix b/nixos/modules/system/boot/kernel.nix index 15a5fd23609..46f2e3fec04 100644 --- a/nixos/modules/system/boot/kernel.nix +++ b/nixos/modules/system/boot/kernel.nix @@ -23,7 +23,7 @@ in boot.kernel.features = mkOption { default = {}; - example = literalExample "{ debug = true; }"; + example = literalExpression "{ debug = true; }"; internal = true; description = '' This option allows to enable or disable certain kernel features. @@ -46,8 +46,8 @@ in }); # We don't want to evaluate all of linuxPackages for the manual # - some of it might not even evaluate correctly. - defaultText = "pkgs.linuxPackages"; - example = literalExample "pkgs.linuxKernel.packages.linux_5_10"; + defaultText = literalExpression "pkgs.linuxPackages"; + example = literalExpression "pkgs.linuxKernel.packages.linux_5_10"; description = '' This option allows you to override the Linux kernel used by NixOS. Since things like external kernel module packages are @@ -65,7 +65,7 @@ in boot.kernelPatches = mkOption { type = types.listOf types.attrs; default = []; - example = literalExample "[ pkgs.kernelPatches.ubuntu_fan_4_4 ]"; + example = literalExpression "[ pkgs.kernelPatches.ubuntu_fan_4_4 ]"; description = "A list of additional patches to apply to the kernel."; }; @@ -113,7 +113,7 @@ in boot.extraModulePackages = mkOption { type = types.listOf types.package; default = []; - example = literalExample "[ config.boot.kernelPackages.nvidia_x11 ]"; + example = literalExpression "[ config.boot.kernelPackages.nvidia_x11 ]"; description = "A list of additional packages supplying kernel modules."; }; @@ -181,7 +181,7 @@ in system.requiredKernelConfig = mkOption { default = []; - example = literalExample '' + example = literalExpression '' with config.lib.kernelConfig; [ (isYes "MODULES") (isEnabled "FB_CON_DECOR") diff --git a/nixos/modules/system/boot/kernel_config.nix b/nixos/modules/system/boot/kernel_config.nix index 5d9534024b0..495fe74bc21 100644 --- a/nixos/modules/system/boot/kernel_config.nix +++ b/nixos/modules/system/boot/kernel_config.nix @@ -100,7 +100,7 @@ in settings = mkOption { type = types.attrsOf kernelItem; - example = literalExample '' with lib.kernel; { + example = literalExpression '' with lib.kernel; { "9P_NET" = yes; USB = option yes; MMC_BLOCK_MINORS = freeform "32"; diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix index 1be66367038..fa8500dd42b 100644 --- a/nixos/modules/system/boot/loader/grub/grub.nix +++ b/nixos/modules/system/boot/loader/grub/grub.nix @@ -329,7 +329,7 @@ in extraInstallCommands = mkOption { default = ""; - example = literalExample '' + example = '' # the example below generates detached signatures that GRUB can verify # https://www.gnu.org/software/grub/manual/grub/grub.html#Using-digital-signatures ''${pkgs.findutils}/bin/find /boot -not -path "/boot/efi/*" -type f -name '*.sig' -delete @@ -392,7 +392,7 @@ in extraFiles = mkOption { type = types.attrsOf types.path; default = {}; - example = literalExample '' + example = literalExpression '' { "memtest.bin" = "''${pkgs.memtest86plus}/memtest.bin"; } ''; description = '' @@ -413,7 +413,7 @@ in splashImage = mkOption { type = types.nullOr types.path; - example = literalExample "./my-background.png"; + example = literalExpression "./my-background.png"; description = '' Background image used for GRUB. Set to <literal>null</literal> to run GRUB in text mode. @@ -449,7 +449,7 @@ in theme = mkOption { type = types.nullOr types.path; - example = literalExample "pkgs.nixos-grub2-theme"; + example = literalExpression "pkgs.nixos-grub2-theme"; default = null; description = '' Grub theme to be used. @@ -475,7 +475,7 @@ in font = mkOption { type = types.nullOr types.path; default = "${realGrub}/share/grub/unicode.pf2"; - defaultText = ''"''${pkgs.grub2}/share/grub/unicode.pf2"''; + defaultText = literalExpression ''"''${pkgs.grub2}/share/grub/unicode.pf2"''; description = '' Path to a TrueType, OpenType, or pf2 font to be used by Grub. ''; @@ -483,7 +483,7 @@ in fontSize = mkOption { type = types.nullOr types.int; - example = literalExample 16; + example = 16; default = null; description = '' Font size for the grub menu. Ignored unless <literal>font</literal> diff --git a/nixos/modules/system/boot/loader/grub/ipxe.nix b/nixos/modules/system/boot/loader/grub/ipxe.nix index 249c2761934..ef8595592f4 100644 --- a/nixos/modules/system/boot/loader/grub/ipxe.nix +++ b/nixos/modules/system/boot/loader/grub/ipxe.nix @@ -33,7 +33,7 @@ in booting from the GRUB boot menu. ''; default = { }; - example = literalExample '' + example = literalExpression '' { demo = ''' #!ipxe dhcp diff --git a/nixos/modules/system/boot/luksroot.nix b/nixos/modules/system/boot/luksroot.nix index f87d3b07a36..fb5269e43d0 100644 --- a/nixos/modules/system/boot/luksroot.nix +++ b/nixos/modules/system/boot/luksroot.nix @@ -663,13 +663,11 @@ in }; encryptedPass = mkOption { - default = ""; type = types.path; description = "Path to the GPG encrypted passphrase."; }; publicKey = mkOption { - default = ""; type = types.path; description = "Path to the Public Key."; }; diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix index bf254be1341..51e105bf627 100644 --- a/nixos/modules/system/boot/networkd.nix +++ b/nixos/modules/system/boot/networkd.nix @@ -668,6 +668,9 @@ let "SendOption" "UserClass" "VendorClass" + "DUIDType" + "DUIDRawData" + "IAID" ]) (assertValueOneOf "UseAddress" boolValues) (assertValueOneOf "UseDNS" boolValues) @@ -677,6 +680,7 @@ let (assertValueOneOf "ForceDHCPv6PDOtherInformation" boolValues) (assertValueOneOf "WithoutRA" ["solicit" "information-request"]) (assertRange "SendOption" 1 65536) + (assertInt "IAID") ]; sectionDHCPv6PrefixDelegation = checkUnitConfig "DHCPv6PrefixDelegation" [ @@ -844,7 +848,6 @@ let options = { wireguardPeerConfig = mkOption { default = {}; - example = { }; type = types.addCheck (types.attrsOf unitOption) check.netdev.sectionWireGuardPeer; description = '' Each attribute in this set specifies an option in the @@ -859,7 +862,6 @@ let netdevOptions = commonNetworkOptions // { netdevConfig = mkOption { - default = {}; example = { Name = "mybridge"; Kind = "bridge"; }; type = types.addCheck (types.attrsOf unitOption) check.netdev.sectionNetdev; description = '' @@ -896,7 +898,6 @@ let vxlanConfig = mkOption { default = {}; - example = { Id = "4"; }; type = types.addCheck (types.attrsOf unitOption) check.netdev.sectionVXLAN; description = '' Each attribute in this set specifies an option in the @@ -959,7 +960,7 @@ let example = { PrivateKeyFile = "/etc/wireguard/secret.key"; ListenPort = 51820; - FwMark = 42; + FirewallMark = 42; }; type = types.addCheck (types.attrsOf unitOption) check.netdev.sectionWireGuard; description = '' @@ -1038,7 +1039,6 @@ let addressOptions = { options = { addressConfig = mkOption { - default = {}; example = { Address = "192.168.0.100/24"; }; type = types.addCheck (types.attrsOf unitOption) check.network.sectionAddress; description = '' @@ -1055,7 +1055,7 @@ let options = { routingPolicyRuleConfig = mkOption { default = { }; - example = { routingPolicyRuleConfig = { Table = 10; IncomingInterface = "eth1"; Family = "both"; } ;}; + example = { Table = 10; IncomingInterface = "eth1"; Family = "both"; }; type = types.addCheck (types.attrsOf unitOption) check.network.sectionRoutingPolicyRule; description = '' Each attribute in this set specifies an option in the @@ -1146,7 +1146,7 @@ let dhcpV6Config = mkOption { default = {}; - example = { UseDNS = true; UseRoutes = true; }; + example = { UseDNS = true; }; type = types.addCheck (types.attrsOf unitOption) check.network.sectionDHCPv6; description = '' Each attribute in this set specifies an option in the @@ -1213,7 +1213,7 @@ let ipv6Prefixes = mkOption { default = []; - example = { AddressAutoconfiguration = true; OnLink = true; }; + example = [ { AddressAutoconfiguration = true; OnLink = true; } ]; type = with types; listOf (submodule ipv6PrefixOptions); description = '' A list of ipv6Prefix sections to be added to the unit. See diff --git a/nixos/modules/system/boot/plymouth.nix b/nixos/modules/system/boot/plymouth.nix index 2a545e55251..4b8194d2f85 100644 --- a/nixos/modules/system/boot/plymouth.nix +++ b/nixos/modules/system/boot/plymouth.nix @@ -62,6 +62,7 @@ in font = mkOption { default = "${pkgs.dejavu_fonts.minimal}/share/fonts/truetype/DejaVuSans.ttf"; + defaultText = literalExpression ''"''${pkgs.dejavu_fonts.minimal}/share/fonts/truetype/DejaVuSans.ttf"''; type = types.path; description = '' Font file made available for displaying text on the splash screen. @@ -88,7 +89,7 @@ in type = types.path; # Dimensions are 48x48 to match GDM logo default = "${nixos-icons}/share/icons/hicolor/48x48/apps/nix-snowflake-white.png"; - defaultText = ''pkgs.fetchurl { + defaultText = literalExpression ''pkgs.fetchurl { url = "https://nixos.org/logo/nixos-hires.png"; sha256 = "1ivzgd7iz0i06y36p8m5w48fd8pjqwxhdaavc0pxs7w1g7mcy5si"; }''; diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index 03133fa1bc4..bd7e955a6f4 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -411,7 +411,7 @@ in boot.initrd.enable = mkOption { type = types.bool; default = !config.boot.isContainer; - defaultText = "!config.boot.isContainer"; + defaultText = literalExpression "!config.boot.isContainer"; description = '' Whether to enable the NixOS initial RAM disk (initrd). This may be needed to perform some initialisation tasks (like mounting @@ -527,7 +527,7 @@ in then "zstd" else "gzip" ); - defaultText = "zstd if the kernel supports it (5.9+), gzip if not."; + defaultText = literalDocBook "<literal>zstd</literal> if the kernel supports it (5.9+), <literal>gzip</literal> if not"; type = types.unspecified; # We don't have a function type... description = '' The compressor to use on the initrd image. May be any of: @@ -559,7 +559,7 @@ in is the path it should be copied from (or null for the same path inside and out). ''; - example = literalExample + example = literalExpression '' { "/etc/dropbear/dropbear_rsa_host_key" = ./secret-dropbear-key; diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 9693e2e377a..93ea77d1ee7 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -426,7 +426,7 @@ in systemd.package = mkOption { default = pkgs.systemd; - defaultText = "pkgs.systemd"; + defaultText = literalExpression "pkgs.systemd"; type = types.package; description = "The systemd package."; }; @@ -446,7 +446,7 @@ in systemd.packages = mkOption { default = []; type = types.listOf types.package; - example = literalExample "[ pkgs.systemd-cryptsetup-generator ]"; + example = literalExpression "[ pkgs.systemd-cryptsetup-generator ]"; description = "Packages providing systemd units and hooks."; }; @@ -663,7 +663,7 @@ in services.journald.forwardToSyslog = mkOption { default = config.services.rsyslogd.enable || config.services.syslog-ng.enable; - defaultText = "services.rsyslogd.enable || services.syslog-ng.enable"; + defaultText = literalExpression "services.rsyslogd.enable || services.syslog-ng.enable"; type = types.bool; description = '' Whether to forward log messages to syslog. @@ -722,7 +722,7 @@ in services.logind.lidSwitchExternalPower = mkOption { default = config.services.logind.lidSwitch; - defaultText = "services.logind.lidSwitch"; + defaultText = literalExpression "services.logind.lidSwitch"; example = "ignore"; type = logindHandlerType; @@ -768,7 +768,7 @@ in systemd.tmpfiles.packages = mkOption { type = types.listOf types.package; default = []; - example = literalExample "[ pkgs.lvm2 ]"; + example = literalExpression "[ pkgs.lvm2 ]"; apply = map getLib; description = '' List of packages containing <command>systemd-tmpfiles</command> rules. |