feat(storage): import ZFS pools and add the shared write group
Add `modules.storage.zfs`, the host-level pool import: a host declares its ZFS host id and the pools to import with their dataset mountpoints, and the module imports those pools as durable state rather than recreating them, so a service's data survives any rebuild or reimage. Add a shared `storage` group with a fixed gid to the base config both the host base and the guest-base build on, so a host and every guest carry the same number and an identity-mapped container write lands on the pool as that group without per-service permission juggling. No host enables the module: the only host is a laptop with no pools and a kernel with no ZFS build, so the enabled build was verified by ad-hoc enablement against a ZFS-supported kernel while the committed tree stays inert.
This commit is contained in:
6
base.nix
6
base.nix
@@ -62,6 +62,12 @@ in
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
|
||||
# The shared write group.
|
||||
# Its gid is fixed, so a host and every guest carry the same number.
|
||||
# An identity-mapped container write then lands on the pool as this group, sparing every service the permission juggling.
|
||||
# 2000 clears the system-group ids assigned automatically and leaves headroom above the primary user, so nothing else claims it.
|
||||
users.groups.storage.gid = 2000;
|
||||
|
||||
# home-manager as a NixOS module: one build produces the system and user
|
||||
# environment together, sharing the system's pkgs and installing user
|
||||
# packages into the system profile.
|
||||
|
||||
Reference in New Issue
Block a user