diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-10-21 18:01:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-21 18:01:53 +0000 |
commit | f4afba201428530fdb713fda18d055bd99daf333 (patch) | |
tree | a760cddec5bad37433f29f2c1c2c75b6fba8d05d /nixos/modules/tasks/filesystems | |
parent | b52540749224057bb31cfb20168fe71474cf2116 (diff) | |
parent | a01279cf2329f710bb84f3aa64d32ea87a8c4124 (diff) | |
download | nixlib-f4afba201428530fdb713fda18d055bd99daf333.tar nixlib-f4afba201428530fdb713fda18d055bd99daf333.tar.gz nixlib-f4afba201428530fdb713fda18d055bd99daf333.tar.bz2 nixlib-f4afba201428530fdb713fda18d055bd99daf333.tar.lz nixlib-f4afba201428530fdb713fda18d055bd99daf333.tar.xz nixlib-f4afba201428530fdb713fda18d055bd99daf333.tar.zst nixlib-f4afba201428530fdb713fda18d055bd99daf333.zip |
Merge staging-next into staging
Diffstat (limited to 'nixos/modules/tasks/filesystems')
-rw-r--r-- | nixos/modules/tasks/filesystems/zfs.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix index 7e7811fd3339..082634ec9d01 100644 --- a/nixos/modules/tasks/filesystems/zfs.nix +++ b/nixos/modules/tasks/filesystems/zfs.nix @@ -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; |