Loading nixos/modules/tasks/filesystems/zfs.nix +6 −1 Original line number Diff line number Diff line Loading @@ -90,12 +90,17 @@ let getPoolMounts = prefix: pool: let poolFSes = getPoolFilesystems pool; # Remove the "/" suffix because even though most mountpoints # won't have it, the "/" mountpoint will, and we can't have the # trailing slash in "/sysroot/" in stage 1. mountPoint = fs: escapeSystemdPath (prefix + (lib.removeSuffix "/" fs.mountPoint)); hasUsr = lib.any (fs: fs.mountPoint == "/usr") poolFSes; in map (x: "${mountPoint x}.mount") (getPoolFilesystems pool); map (x: "${mountPoint x}.mount") poolFSes ++ lib.optional hasUsr "sysusr-usr.mount"; getKeyLocations = pool: if isBool cfgZfs.requestEncryptionCredentials then { hasKeys = cfgZfs.requestEncryptionCredentials; Loading nixos/tests/installer.nix +3 −0 Original line number Diff line number Diff line Loading @@ -690,6 +690,9 @@ in { "zpool create rpool /dev/vda2", "zfs create -o mountpoint=legacy rpool/root", "mount -t zfs rpool/root /mnt", "zfs create -o mountpoint=legacy rpool/root/usr", "mkdir /mnt/usr", "mount -t zfs rpool/root/usr /mnt/usr", "udevadm settle", ) ''; Loading Loading
nixos/modules/tasks/filesystems/zfs.nix +6 −1 Original line number Diff line number Diff line Loading @@ -90,12 +90,17 @@ let getPoolMounts = prefix: pool: let poolFSes = getPoolFilesystems pool; # Remove the "/" suffix because even though most mountpoints # won't have it, the "/" mountpoint will, and we can't have the # trailing slash in "/sysroot/" in stage 1. mountPoint = fs: escapeSystemdPath (prefix + (lib.removeSuffix "/" fs.mountPoint)); hasUsr = lib.any (fs: fs.mountPoint == "/usr") poolFSes; in map (x: "${mountPoint x}.mount") (getPoolFilesystems pool); map (x: "${mountPoint x}.mount") poolFSes ++ lib.optional hasUsr "sysusr-usr.mount"; getKeyLocations = pool: if isBool cfgZfs.requestEncryptionCredentials then { hasKeys = cfgZfs.requestEncryptionCredentials; Loading
nixos/tests/installer.nix +3 −0 Original line number Diff line number Diff line Loading @@ -690,6 +690,9 @@ in { "zpool create rpool /dev/vda2", "zfs create -o mountpoint=legacy rpool/root", "mount -t zfs rpool/root /mnt", "zfs create -o mountpoint=legacy rpool/root/usr", "mkdir /mnt/usr", "mount -t zfs rpool/root/usr /mnt/usr", "udevadm settle", ) ''; Loading