feat: added activation and resume scripts to storage and impermanence
This commit is contained in:
parent
1310b50794
commit
4da5d65d8f
2 changed files with 31 additions and 15 deletions
|
|
@ -66,6 +66,20 @@ in {
|
|||
}
|
||||
];
|
||||
|
||||
# fixes issues with /var/lib/private not having the correct permissions https://github.com/nix-community/impermanence/issues/254
|
||||
system.activationScripts."createPersistentStorageDirs".deps = ["var-lib-private-permissions" "users" "groups"];
|
||||
system.activationScripts = {
|
||||
"var-lib-private-permissions" = {
|
||||
deps = ["specialfs"];
|
||||
text = ''
|
||||
mkdir -p /persist/system/root/var/lib/private
|
||||
chmod 0700 /persist/system/root/var/lib/private
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
programs.fuse.userAllowOther = true;
|
||||
|
||||
environment.persistence =
|
||||
lib.mapAttrs (datasetName: dataset: {
|
||||
enable = true;
|
||||
|
|
@ -90,9 +104,6 @@ in {
|
|||
# TODO: need for boot on filesystems
|
||||
}
|
||||
(lib.mkIf config.storage.zfs.enable {
|
||||
# TODO: activationScripts config for private folders
|
||||
# TODO: rollback post resume
|
||||
# TODO: fuse userAllowOther
|
||||
storage.zfs.datasets =
|
||||
lib.mapAttrs (
|
||||
datasetName: dataset:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue