nixos/syncoid: add missing ZFS mount permission
This commit is contained in:
parent
7671e1a210
commit
de0a5c6a6b
2 changed files with 4 additions and 1 deletions
|
@ -134,7 +134,7 @@ in
|
||||||
localSourceAllow = mkOption {
|
localSourceAllow = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
# Permissions snapshot and destroy are in case --no-sync-snap is not used
|
# Permissions snapshot and destroy are in case --no-sync-snap is not used
|
||||||
default = [ "bookmark" "hold" "send" "snapshot" "destroy" ];
|
default = [ "bookmark" "hold" "send" "snapshot" "destroy" "mount" ];
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
Permissions granted for the {option}`services.syncoid.user` user
|
Permissions granted for the {option}`services.syncoid.user` user
|
||||||
for local source datasets. See
|
for local source datasets. See
|
||||||
|
|
|
@ -115,8 +115,11 @@ in {
|
||||||
source.systemctl("start --wait syncoid-pool-sanoid.service")
|
source.systemctl("start --wait syncoid-pool-sanoid.service")
|
||||||
target.succeed("cat /mnt/pool/sanoid/test.txt")
|
target.succeed("cat /mnt/pool/sanoid/test.txt")
|
||||||
source.systemctl("start --wait syncoid-pool-syncoid.service")
|
source.systemctl("start --wait syncoid-pool-syncoid.service")
|
||||||
|
source.systemctl("start --wait syncoid-pool-syncoid.service")
|
||||||
target.succeed("cat /mnt/pool/syncoid/test.txt")
|
target.succeed("cat /mnt/pool/syncoid/test.txt")
|
||||||
|
|
||||||
|
assert(len(source.succeed("zfs list -H -t snapshot pool/syncoid").splitlines()) == 1), "Syncoid should only retain one sync snapshot"
|
||||||
|
|
||||||
source.systemctl("start --wait syncoid-pool.service")
|
source.systemctl("start --wait syncoid-pool.service")
|
||||||
target.succeed("[[ -d /mnt/pool/full-pool/syncoid ]]")
|
target.succeed("[[ -d /mnt/pool/full-pool/syncoid ]]")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue