feat: added more development notes
This commit is contained in:
parent
adc6b90c93
commit
0de97fa4a2
2 changed files with 20 additions and 3 deletions
|
|
@ -59,6 +59,13 @@ in {
|
|||
|
||||
config = lib.mkIf config.storage.impermanence.enable (lib.mkMerge [
|
||||
{
|
||||
assertions = [
|
||||
{
|
||||
assertion = config.storage.zfs.enable;
|
||||
message = "storage.impermanence can not be used without storage.zfs.";
|
||||
}
|
||||
];
|
||||
|
||||
environment.persistence =
|
||||
lib.mapAttrs (datasetName: dataset: {
|
||||
enable = true;
|
||||
|
|
@ -77,8 +84,12 @@ in {
|
|||
}) (lib.filterAttrs (_: fileConfig: fileConfig.enable) dataset.files);
|
||||
})
|
||||
config.storage.impermanence.datasets;
|
||||
# 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:
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
};
|
||||
"persist/system/var/log" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/persist/system/var/log";
|
||||
mountpoint = "/var/log";
|
||||
options = {
|
||||
"com.sun:auto-snapshot" = "false";
|
||||
};
|
||||
|
|
@ -31,7 +31,6 @@
|
|||
};
|
||||
}
|
||||
(util.mkUnless config.storage.impermanence.enable {
|
||||
# TODO: configure datasets for normal zfs
|
||||
# TODO: create datasets for systemd.services.<name>.storage.impermanence.datasets
|
||||
storage.zfs.datasets = {
|
||||
"persist/system/root" = {
|
||||
|
|
@ -48,7 +47,6 @@
|
|||
};
|
||||
};
|
||||
storage.zfs.datasets = {
|
||||
# TODO: is there a way that we can link these two folders in configs via storage.impermanence.datasets
|
||||
"local/system/root" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/";
|
||||
|
|
@ -58,6 +56,14 @@
|
|||
postCreateHook = ''
|
||||
zfs snapshot rpool/local/system/root@blank
|
||||
'';
|
||||
|
||||
directories = {
|
||||
"/var/lib/nixos".enable = true;
|
||||
"/var/lib/systemd/coredump".enable = true;
|
||||
};
|
||||
files = {
|
||||
"/etc/machine-id".enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue