diff --git a/example/gpt-name-with-whitespace.nix b/example/gpt-name-with-whitespace.nix index dc29558..22a74b5 100644 --- a/example/gpt-name-with-whitespace.nix +++ b/example/gpt-name-with-whitespace.nix @@ -17,12 +17,19 @@ }; }; "name with spaces" = { - type = "EF00"; size = "100M"; content = { type = "filesystem"; format = "vfat"; - mountpoint = "/name_with_spaces"; + mountpoint = "/name with spaces"; + }; + }; + "name^with\\some@special#chars" = { + size = "100M"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/name^with\\some@special#chars"; }; }; root = { diff --git a/example/legacy-table-with-whitespace.nix b/example/legacy-table-with-whitespace.nix index aa13eca..5eb28ab 100644 --- a/example/legacy-table-with-whitespace.nix +++ b/example/legacy-table-with-whitespace.nix @@ -21,8 +21,8 @@ } { name = "name with spaces"; - start = "1MiB"; - end = "100MiB"; + start = "100MiB"; + end = "200MiB"; bootable = true; content = { type = "filesystem"; @@ -32,7 +32,7 @@ } { name = "root"; - start = "100MiB"; + start = "200MiB"; end = "100%"; part-type = "primary"; bootable = true; diff --git a/lib/default.nix b/lib/default.nix index fb8afee..6cbd369 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -82,6 +82,39 @@ let ${dev} seems not to be a supported disk format. Please add this to disko in https://github.com/nix-community/disko/blob/master/lib/default.nix ''; + /* Escape a string as required to be used in udev symlinks + + The allowed characters are "0-9A-Za-z#+-.:=@_/", valid UTF-8 character sequences, and "\x00" hex encoding. + Everything else is escaped as "\xXX" where XX is the hex value of the character. + + The source of truth for the list of allowed characters is the udev documentation: + https://www.freedesktop.org/software/systemd/man/latest/udev.html#SYMLINK1 + + This function is implemented as a best effort. It is not guaranteed to be 100% in line + with the udev implementation, and we hope that you're not crazy enough to try to break it. + + hexEscapeUdevSymlink :: str -> str + + Example: + hexEscapeUdevSymlink "Boot data partition" + => "Boot\x20data\x20partition" + + hexEscapeUdevSymlink "Even(crazier)par&titi^onName" + => "Even\x28crazier\x29par\x26titi\x5EonName" + + hexEscapeUdevSymlink "all0these@char#acters+_are-allow.ed" + => "all0these@char#acters+_are-allow.ed" + */ + hexEscapeUdevSymlink = with lib; let + allowedChars = "[0-9A-Za-z#+-.:=@_/]"; + charToHex = c: toHexString (strings.charToInt c); + in + str: pipe str [ + (splitString "") + (map (c: if match allowedChars c != null || c == "" then c else "\\x" + charToHex c)) + concatStrings + ]; + /* get the index an item in a list indexOf :: (a -> bool) -> [a] -> int -> int @@ -92,7 +125,7 @@ let indexOf (x: x == "x") [ 1 2 3 ] 0 => 0 - */ + */ indexOf = f: list: fallback: let iter = index: list: diff --git a/lib/interactive-vm.nix b/lib/interactive-vm.nix index 4b013cf..f5c8e91 100644 --- a/lib/interactive-vm.nix +++ b/lib/interactive-vm.nix @@ -20,7 +20,7 @@ let disks = lib.attrValues cfg_.disko.devices.disk; rootDisk = { name = "root"; - file = ''"$tmp"/${(builtins.head disks).name}.qcow2''; + file = ''"$tmp/${(builtins.head disks).name}.qcow2"''; driveExtraOpts.cache = "writeback"; driveExtraOpts.werror = "report"; deviceExtraOpts.bootindex = "1"; @@ -29,7 +29,7 @@ let otherDisks = map (disk: { name = disk.name; - file = ''"$tmp"/${disk.name}.qcow2''; + file = ''"$tmp/${disk.name}.qcow2"''; driveExtraOpts.werror = "report"; }) (builtins.tail disks); @@ -72,8 +72,8 @@ in trap 'rm -rf "$tmp"' EXIT ${lib.concatMapStringsSep "\n" (disk: '' ${hostPkgs.qemu}/bin/qemu-img create -f qcow2 \ - -b ${config.system.build.diskoImages}/${disk.name}.qcow2 \ - -F qcow2 "$tmp"/${disk.name}.qcow2 + -b "${config.system.build.diskoImages}/${disk.name}.qcow2" \ + -F qcow2 "$tmp/${disk.name}.qcow2" '') disks} set +f ${config.system.build.vm}/bin/run-*-vm diff --git a/lib/types/btrfs.nix b/lib/types/btrfs.nix index 1c83b0f..78b5e44 100644 --- a/lib/types/btrfs.nix +++ b/lib/types/btrfs.nix @@ -135,7 +135,7 @@ in inherit config options; default = '' # create the filesystem only if the device seems empty - if ! (blkid '${config.device}' -o export | grep -q '^TYPE='); then + if ! (blkid "${config.device}" -o export | grep -q '^TYPE='); then mkfs.btrfs "${config.device}" ${toString config.extraArgs} fi ${lib.optionalString (config.swap != {} || config.subvolumes != {}) '' @@ -151,7 +151,7 @@ in ${lib.concatMapStrings (subvol: '' ( MNTPOINT=$(mktemp -d) - mount ${config.device} "$MNTPOINT" -o subvol=/ + mount "${config.device}" "$MNTPOINT" -o subvol=/ trap 'umount $MNTPOINT; rm -rf $MNTPOINT' EXIT SUBVOL_ABS_PATH="$MNTPOINT/${subvol.name}" mkdir -p "$(dirname "$SUBVOL_ABS_PATH")" @@ -177,8 +177,8 @@ in (subvol.mountpoint != null) { ${subvol.mountpoint} = '' - if ! findmnt ${config.device} "${rootMountPoint}${subvol.mountpoint}" > /dev/null 2>&1; then - mount ${config.device} "${rootMountPoint}${subvol.mountpoint}" \ + if ! findmnt "${config.device}" "${rootMountPoint}${subvol.mountpoint}" > /dev/null 2>&1; then + mount "${config.device}" "${rootMountPoint}${subvol.mountpoint}" \ ${lib.concatMapStringsSep " " (opt: "-o ${opt}") (subvol.mountOptions ++ [ "subvol=${subvol.name}" ])} \ -o X-mount.mkdir fi @@ -190,8 +190,8 @@ in { fs = subvolMounts // lib.optionalAttrs (config.mountpoint != null) { ${config.mountpoint} = '' - if ! findmnt ${config.device} "${rootMountPoint}${config.mountpoint}" > /dev/null 2>&1; then - mount ${config.device} "${rootMountPoint}${config.mountpoint}" \ + if ! findmnt "${config.device}" "${rootMountPoint}${config.mountpoint}" > /dev/null 2>&1; then + mount "${config.device}" "${rootMountPoint}${config.mountpoint}" \ ${lib.concatMapStringsSep " " (opt: "-o ${opt}") config.mountOptions} \ -o X-mount.mkdir fi diff --git a/lib/types/filesystem.nix b/lib/types/filesystem.nix index 5327e7a..c4cd3bb 100644 --- a/lib/types/filesystem.nix +++ b/lib/types/filesystem.nix @@ -44,10 +44,10 @@ _create = diskoLib.mkCreateOption { inherit config options; default = '' - if ! (blkid '${config.device}' | grep -q 'TYPE='); then + if ! (blkid "${config.device}" | grep -q 'TYPE='); then mkfs.${config.format} \ ${lib.escapeShellArgs config.extraArgs} \ - ${config.device} + "${config.device}" fi ''; }; @@ -55,8 +55,8 @@ inherit config options; default = lib.optionalAttrs (config.mountpoint != null) { fs.${config.mountpoint} = '' - if ! findmnt ${config.device} "${rootMountPoint}${config.mountpoint}" >/dev/null 2>&1; then - mount ${config.device} "${rootMountPoint}${config.mountpoint}" \ + if ! findmnt "${config.device}" "${rootMountPoint}${config.mountpoint}" >/dev/null 2>&1; then + mount "${config.device}" "${rootMountPoint}${config.mountpoint}" \ -t "${config.format}" \ ${lib.concatMapStringsSep " " (opt: "-o ${lib.escapeShellArg opt}") config.mountOptions} \ -o X-mount.mkdir diff --git a/lib/types/gpt.nix b/lib/types/gpt.nix index 442ad7b..c52ef8c 100644 --- a/lib/types/gpt.nix +++ b/lib/types/gpt.nix @@ -41,7 +41,7 @@ in # workaround because mdadm partlabel do not appear in /dev/disk/by-partlabel "/dev/disk/by-id/md-name-any:${config._parent.name}-part${toString partition.config._index}" else - "/dev/disk/by-partlabel/${partition.config.label}"; + "/dev/disk/by-partlabel/${diskoLib.hexEscapeUdevSymlink partition.config.label}"; description = "Device to use for the partition"; }; priority = lib.mkOption { @@ -127,12 +127,12 @@ in inherit config options; default = '' ${lib.optionalString (hp.config.mbrPartitionType != null) '' - sfdisk --label-nested dos --part-type ${parent.device} ${(toString partition.config._index)} ${hp.config.mbrPartitionType} + sfdisk --label-nested dos --part-type "${parent.device}" ${(toString partition.config._index)} ${hp.config.mbrPartitionType} udevadm trigger --subsystem-match=block udevadm settle ''} ${lib.optionalString hp.config.mbrBootableFlag '' - sfdisk --label-nested dos --activate ${parent.device} ${(toString partition.config._index)} + sfdisk --label-nested dos --activate "${parent.device}" ${(toString partition.config._index)} ''} ''; }; @@ -175,23 +175,23 @@ in inherit config options; default = '' if ! blkid "${config.device}" >&2; then - sgdisk --clear ${config.device} + sgdisk --clear "${config.device}" fi ${lib.concatStrings (map (partition: '' # try to create the partition, if it fails, try to change the type and name if ! sgdisk \ --align-end ${lib.optionalString (partition.alignment != 0) ''--set-alignment=${builtins.toString partition.alignment}''} \ --new=${toString partition._index}:${partition.start}:${partition.end} \ - --change-name=${toString partition._index}:${partition.label} \ + --change-name="${toString partition._index}:${partition.label}" \ --typecode=${toString partition._index}:${partition.type} \ - ${config.device} + "${config.device}" then sgdisk \ - --change-name=${toString partition._index}:${partition.label} \ + --change-name="${toString partition._index}:${partition.label}" \ --typecode=${toString partition._index}:${partition.type} \ - ${config.device} + "${config.device}" fi # ensure /dev/disk/by-path/..-partN exists before continuing - partprobe ${config.device} || : # sometimes partprobe fails, but the partitions are still up2date + partprobe "${config.device}" || : # sometimes partprobe fails, but the partitions are still up2date udevadm trigger --subsystem-match=block udevadm settle '') sortedPartitions)} @@ -203,7 +203,7 @@ in + ( lib.optionalString (!config.efiGptPartitionFirst) ":EE " ) - + parent.device) + + ''"${parent.device}"'') } ${lib.concatMapStrings (p: p.hybrid._create diff --git a/lib/types/luks.nix b/lib/types/luks.nix index dd89f37..8056b35 100644 --- a/lib/types/luks.nix +++ b/lib/types/luks.nix @@ -21,7 +21,7 @@ let ${lib.optionalString (lib.hasAttr "keyFileOffset" config.settings) "--keyfile-offset ${builtins.toString config.settings.keyFileOffset}"} \ ''; cryptsetupOpen = '' - cryptsetup open ${config.device} ${config.name} \ + cryptsetup open "${config.device}" "${config.name}" \ ${lib.optionalString (config.settings.allowDiscards or false) "--allow-discards"} \ ${lib.optionalString (config.settings.bypassWorkqueues or false) "--perf-no_read_workqueue --perf-no_write_workqueue"} \ ${toString config.extraOpenArgs} \ @@ -132,10 +132,10 @@ in echo "Passwords did not match, please try again." done ''} - cryptsetup -q luksFormat ${config.device} ${toString config.extraFormatArgs} ${keyFileArgs} + cryptsetup -q luksFormat "${config.device}" ${toString config.extraFormatArgs} ${keyFileArgs} ${cryptsetupOpen} --persistent ${toString (lib.forEach config.additionalKeyFiles (keyFile: '' - cryptsetup luksAddKey ${config.device} ${keyFile} ${keyFileArgs} + cryptsetup luksAddKey "${config.device}" ${keyFile} ${keyFileArgs} ''))} fi ${lib.optionalString (config.content != null) config.content._create} @@ -149,7 +149,7 @@ in in { dev = '' - if ! cryptsetup status ${config.name} >/dev/null 2>/dev/null; then + if ! cryptsetup status "${config.name}" >/dev/null 2>/dev/null; then ${lib.optionalString config.askPassword '' if [ -z ''${IN_DISKO_TEST+x} ]; then set +x diff --git a/lib/types/lvm_pv.nix b/lib/types/lvm_pv.nix index 5657fc2..6de594e 100644 --- a/lib/types/lvm_pv.nix +++ b/lib/types/lvm_pv.nix @@ -31,10 +31,10 @@ _create = diskoLib.mkCreateOption { inherit config options; default = '' - if ! (blkid '${config.device}' | grep -q 'TYPE='); then - pvcreate ${config.device} + if ! (blkid "${config.device}" | grep -q 'TYPE='); then + pvcreate "${config.device}" fi - echo "${config.device}" >>"$disko_devices_dir"/lvm_${config.vg} + echo "${config.device}" >>"$disko_devices_dir/lvm_${config.vg}" ''; }; _mount = diskoLib.mkMountOption { diff --git a/lib/types/lvm_vg.nix b/lib/types/lvm_vg.nix index cb2c750..c125fd7 100644 --- a/lib/types/lvm_vg.nix +++ b/lib/types/lvm_vg.nix @@ -84,23 +84,23 @@ in in '' ${lib.concatMapStringsSep "\n" (k: ''modprobe "${k}"'') kernelModules} - readarray -t lvm_devices < <(cat "$disko_devices_dir"/lvm_${config.name}) + readarray -t lvm_devices < <(cat "$disko_devices_dir/lvm_${config.name}") if ! vgdisplay "${config.name}" >/dev/null; then - vgcreate ${config.name} \ + vgcreate "${config.name}" \ "''${lvm_devices[@]}" fi ${lib.concatMapStrings (lv: '' - if ! lvdisplay '${config.name}/${lv.name}'; then + if ! lvdisplay "${config.name}/${lv.name}"; then lvcreate \ --yes \ ${if (lv.lvm_type == "thinlv") then "-V" else if lib.hasInfix "%" lv.size then "-l" else "-L"} \ ${lv.size} \ - -n ${lv.name} \ + -n "${lv.name}" \ ${lib.optionalString (lv.lvm_type == "thinlv") "--thinpool=${lv.pool}"} \ ${lib.optionalString (lv.lvm_type != null && lv.lvm_type != "thinlv") "--type=${lv.lvm_type}"} \ ${toString lv.extraArgs} \ - ${config.name} + "${config.name}" fi '') sortedLvs} diff --git a/lib/types/mdadm.nix b/lib/types/mdadm.nix index 1564e17..f6ff120 100644 --- a/lib/types/mdadm.nix +++ b/lib/types/mdadm.nix @@ -34,20 +34,20 @@ _create = diskoLib.mkCreateOption { inherit config options; default = '' - if ! test -e /dev/md/${config.name}; then - readarray -t disk_devices < <(cat "$disko_devices_dir"/raid_${config.name}) - echo 'y' | mdadm --create /dev/md/${config.name} \ + if ! test -e "/dev/md/${config.name}"; then + readarray -t disk_devices < <(cat "$disko_devices_dir/raid_${config.name}") + echo 'y' | mdadm --create "/dev/md/${config.name}" \ --level=${toString config.level} \ - --raid-devices="$(wc -l "$disko_devices_dir"/raid_${config.name} | cut -f 1 -d " ")" \ + --raid-devices="$(wc -l "$disko_devices_dir/raid_${config.name}" | cut -f 1 -d " ")" \ --metadata=${config.metadata} \ --force \ --homehost=any \ "''${disk_devices[@]}" - partprobe /dev/md/${config.name} + partprobe "/dev/md/${config.name}" udevadm trigger --subsystem-match=block udevadm settle # for some reason mdadm devices spawn with an existing partition table, so we need to wipe it - sgdisk --zap-all /dev/md/${config.name} + sgdisk --zap-all "/dev/md/${config.name}" fi ${lib.optionalString (config.content != null) config.content._create} ''; diff --git a/lib/types/mdraid.nix b/lib/types/mdraid.nix index 75f5d22..1ac81b9 100644 --- a/lib/types/mdraid.nix +++ b/lib/types/mdraid.nix @@ -32,7 +32,7 @@ _create = diskoLib.mkCreateOption { inherit config options; default = '' - echo "${config.device}" >>"$disko_devices_dir"/raid_${config.name} + echo "${config.device}" >>"$disko_devices_dir/raid_${config.name}" ''; }; _mount = diskoLib.mkMountOption { diff --git a/lib/types/nodev.nix b/lib/types/nodev.nix index fd2f51a..5db0630 100644 --- a/lib/types/nodev.nix +++ b/lib/types/nodev.nix @@ -42,7 +42,7 @@ default = lib.optionalAttrs (config.mountpoint != null) { fs.${config.mountpoint} = '' if ! findmnt ${config.fsType} "${rootMountPoint}${config.mountpoint}" > /dev/null 2>&1; then - mount -t ${config.fsType} ${config.device} "${rootMountPoint}${config.mountpoint}" \ + mount -t ${config.fsType} "${config.device}" "${rootMountPoint}${config.mountpoint}" \ ${lib.concatMapStringsSep " " (opt: "-o ${opt}") config.mountOptions} \ -o X-mount.mkdir fi diff --git a/lib/types/swap.nix b/lib/types/swap.nix index cdffde6..401ac12 100644 --- a/lib/types/swap.nix +++ b/lib/types/swap.nix @@ -71,7 +71,7 @@ if ! blkid "${config.device}" -o export | grep -q '^TYPE='; then mkswap \ ${toString config.extraArgs} \ - ${config.device} + "${config.device}" fi ''; }; @@ -80,7 +80,7 @@ # TODO: we don't support encrypted swap yet default = lib.optionalAttrs (!config.randomEncryption) { fs.${config.device} = '' - if ! swapon --show | grep -q "^$(readlink -f ${config.device}) "; then + if ! swapon --show | grep -q "^$(readlink -f "${config.device}") "; then swapon ${ lib.optionalString (config.discardPolicy != null) "--discard${lib.optionalString (config.discardPolicy != "both") @@ -90,7 +90,7 @@ "--priority=${toString config.priority}" } \ --options=${lib.concatStringsSep "," config.mountOptions} \ - ${config.device} + "${config.device}" fi ''; }; diff --git a/lib/types/table.nix b/lib/types/table.nix index f181553..8aec03d 100644 --- a/lib/types/table.nix +++ b/lib/types/table.nix @@ -91,26 +91,26 @@ inherit config options; default = '' if ! blkid "${config.device}" >/dev/null; then - parted -s ${config.device} -- mklabel ${config.format} + parted -s "${config.device}" -- mklabel ${config.format} ${lib.concatStrings (map (partition: '' ${lib.optionalString (config.format == "gpt") '' - parted -s ${config.device} -- mkpart ${partition.name} ${diskoLib.maybeStr partition.fs-type} ${partition.start} ${partition.end} + parted -s "${config.device}" -- mkpart "${diskoLib.hexEscapeUdevSymlink partition.name}" ${diskoLib.maybeStr partition.fs-type} ${partition.start} ${partition.end} ''} ${lib.optionalString (config.format == "msdos") '' - parted -s ${config.device} -- mkpart ${partition.part-type} ${diskoLib.maybeStr partition.fs-type} ${partition.start} ${partition.end} + parted -s "${config.device}" -- mkpart ${partition.part-type} ${diskoLib.maybeStr partition.fs-type} ${partition.start} ${partition.end} ''} # ensure /dev/disk/by-path/..-partN exists before continuing - partprobe ${config.device} + partprobe "${config.device}" udevadm trigger --subsystem-match=block udevadm settle ${lib.optionalString partition.bootable '' - parted -s ${config.device} -- set ${toString partition._index} boot on + parted -s "${config.device}" -- set ${toString partition._index} boot on ''} ${lib.concatMapStringsSep "" (flag: '' - parted -s ${config.device} -- set ${toString partition._index} ${flag} on + parted -s "${config.device}" -- set ${toString partition._index} ${flag} on '') partition.flags} # ensure further operations can detect new partitions - partprobe ${config.device} + partprobe "${config.device}" udevadm trigger --subsystem-match=block udevadm settle '') config.partitions)} diff --git a/lib/types/zfs.nix b/lib/types/zfs.nix index 9aa8577..cca9120 100644 --- a/lib/types/zfs.nix +++ b/lib/types/zfs.nix @@ -31,7 +31,7 @@ _create = diskoLib.mkCreateOption { inherit config options; default = '' - echo "${config.device}" >>"$disko_devices_dir"/zfs_${config.pool} + echo "${config.device}" >>"$disko_devices_dir/zfs_${config.pool}" ''; }; _mount = diskoLib.mkMountOption { diff --git a/lib/types/zfs_volume.nix b/lib/types/zfs_volume.nix index 77f143f..8f2fff7 100644 --- a/lib/types/zfs_volume.nix +++ b/lib/types/zfs_volume.nix @@ -47,12 +47,12 @@ _create = diskoLib.mkCreateOption { inherit config options; default = '' - if ! zfs get type ${config._parent.name}/${config.name} >/dev/null 2>&1; then - zfs create ${config._parent.name}/${config.name} \ + if ! zfs get type "${config._parent.name}/${config.name}" >/dev/null 2>&1; then + zfs create "${config._parent.name}/${config.name}" \ ${lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "-o ${n}=${v}") config.options)} \ -V ${config.size} zvol_wait - partprobe /dev/zvol/${config._parent.name}/${config.name} + partprobe "/dev/zvol/${config._parent.name}/${config.name}" udevadm trigger --subsystem-match=block udevadm settle fi diff --git a/lib/types/zpool.nix b/lib/types/zpool.nix index e534db3..46bab77 100644 --- a/lib/types/zpool.nix +++ b/lib/types/zpool.nix @@ -79,7 +79,7 @@ in }; cache = lib.mkOption { type = lib.types.listOf lib.types.str; - default = []; + default = [ ]; description = '' A dedicated zfs cache device (L2ARC). See https://openzfs.github.io/openzfs-docs/man/master/7/zpoolconcepts.7.html#Cache_Devices @@ -146,14 +146,14 @@ in topology = lib.optionalAttrs hasTopology config.mode.topology; in '' - readarray -t zfs_devices < <(cat "$disko_devices_dir"/zfs_${config.name}) + readarray -t zfs_devices < <(cat "$disko_devices_dir/zfs_${config.name}") if [ ''${#zfs_devices[@]} -eq 0 ]; then echo "no devices found for zpool ${config.name}. Did you misspell the pool name?" >&2 exit 1 fi # Try importing the pool without mounting anything if it exists. # This allows us to set mounpoints. - if zpool import -N -f '${config.name}' || zpool list '${config.name}'; then + if zpool import -N -f "${config.name}" || zpool list "${config.name}"; then echo "not creating zpool ${config.name} as a pool with that name already exists" >&2 else continue=1 @@ -206,13 +206,13 @@ in fi fi if [ $continue -eq 1 ]; then - zpool create -f ${config.name} \ + zpool create -f "${config.name}" \ -R ${rootMountPoint} \ ${lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "-o ${n}=${v}") config.options)} \ ${lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "-O ${n}=${v}") config.rootFsOptions)} \ ''${topology:+ $topology} - if [[ $(zfs get -H mounted ${config.name} | cut -f3) == "yes" ]]; then - zfs unmount ${config.name} + if [[ $(zfs get -H mounted "${config.name}" | cut -f3) == "yes" ]]; then + zfs unmount "${config.name}" fi fi fi @@ -227,8 +227,8 @@ in in { dev = '' - zpool list '${config.name}' >/dev/null 2>/dev/null || - zpool import -l -R ${rootMountPoint} '${config.name}' + zpool list "${config.name}" >/dev/null 2>/dev/null || + zpool import -l -R ${rootMountPoint} "${config.name}" ${lib.concatMapStrings (x: x.dev or "") (lib.attrValues datasetMounts)} ''; fs = datasetMounts.fs or { }; diff --git a/tests/gpt-name-with-whitespace.nix b/tests/gpt-name-with-special-chars.nix similarity index 69% rename from tests/gpt-name-with-whitespace.nix rename to tests/gpt-name-with-special-chars.nix index 21954e4..48b4304 100644 --- a/tests/gpt-name-with-whitespace.nix +++ b/tests/gpt-name-with-special-chars.nix @@ -7,6 +7,7 @@ diskoLib.testLib.makeDiskoTest { disko-config = ../example/gpt-name-with-whitespace.nix; extraTestScript = '' machine.succeed("mountpoint /"); - machine.succeed("mountpoint /name_with_spaces"); + machine.succeed("mountpoint '/name with spaces'"); + machine.succeed("mountpoint '/name^with\\some@special#chars'"); ''; }