0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

nixos/zfs: do not auto-import pools marked noauto (#352391)

This commit is contained in:
Arne Keller 2024-12-12 06:51:39 +01:00 committed by GitHub
commit e3f940648e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -104,6 +104,8 @@
2.0](https://github.com/containerd/containerd/blob/main/docs/containerd-2.0.md) documentation for more 2.0](https://github.com/containerd/containerd/blob/main/docs/containerd-2.0.md) documentation for more
details. details.
- The ZFS import service now respects `fileSystems.*.options = [ "noauto" ];` and does not add that pool's import service to `zfs-import.target`, meaning it will not be automatically imported at boot.
- `nodePackages.stackdriver-statsd-backend` has been removed, as the StackDriver service has been discontinued by Google, and therefore the package no longer works. - `nodePackages.stackdriver-statsd-backend` has been removed, as the StackDriver service has been discontinued by Google, and therefore the package no longer works.
- the notmuch vim plugin now lives in a separate output of the `notmuch` - the notmuch vim plugin now lives in a separate output of the `notmuch`

View file

@ -128,7 +128,9 @@ let
"systemd-modules-load.service" "systemd-modules-load.service"
"systemd-ask-password-console.service" "systemd-ask-password-console.service"
] ++ lib.optional (config.boot.initrd.clevis.useTang) "network-online.target"; ] ++ lib.optional (config.boot.initrd.clevis.useTang) "network-online.target";
requiredBy = getPoolMounts prefix pool ++ [ "zfs-import.target" ]; requiredBy = let
noauto = lib.all (fs: lib.elem "noauto" fs.options) (getPoolFilesystems pool);
in getPoolMounts prefix pool ++ lib.optional (!noauto) "zfs-import.target";
before = getPoolMounts prefix pool ++ [ "shutdown.target" "zfs-import.target" ]; before = getPoolMounts prefix pool ++ [ "shutdown.target" "zfs-import.target" ];
conflicts = [ "shutdown.target" ]; conflicts = [ "shutdown.target" ];
unitConfig = { unitConfig = {