feat: updated pool names
This commit is contained in:
parent
ac0f1ce2e6
commit
1eb66d1c31
63 changed files with 81 additions and 78 deletions
|
|
@ -72,8 +72,8 @@ in {
|
|||
"var-lib-private-permissions" = {
|
||||
deps = ["specialfs"];
|
||||
text = ''
|
||||
mkdir -p /persist/system/root/var/lib/private
|
||||
chmod 0700 /persist/system/root/var/lib/private
|
||||
mkdir -p /persist/replicate/system/root/var/lib/private
|
||||
chmod 0700 /persist/replicate/system/root/var/lib/private
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
lib.mkIf config.storage.zfs.enable (lib.mkMerge [
|
||||
{
|
||||
storage.zfs.datasets = {
|
||||
"persist/system/nix" = {
|
||||
"persist/local/nix" = {
|
||||
type = "zfs_fs";
|
||||
mount = {
|
||||
enable = true;
|
||||
|
|
@ -22,15 +22,12 @@
|
|||
atime = "off";
|
||||
relatime = "off";
|
||||
};
|
||||
"persist/system/var/log" = {
|
||||
"persist/replicate/system/var/log" = {
|
||||
type = "zfs_fs";
|
||||
mount = {
|
||||
enable = true;
|
||||
mountPoint = "/var/log";
|
||||
};
|
||||
snapshot = {
|
||||
autoSnapshot = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -53,11 +50,11 @@
|
|||
})
|
||||
(lib.mkIf config.storage.impermanence.enable {
|
||||
boot.initrd.postResumeCommands = lib.mkAfter ''
|
||||
zfs rollback -r rpool/local/system/root@blank
|
||||
zfs rollback -r rpool/ephemeral/system/root@blank
|
||||
'';
|
||||
|
||||
storage.zfs.datasets = {
|
||||
"local/system/root" = {
|
||||
"ephemeral/system/root" = {
|
||||
type = "zfs_fs";
|
||||
mount = {
|
||||
enable = true;
|
||||
|
|
@ -70,10 +67,13 @@
|
|||
};
|
||||
|
||||
storage.impermanence.datasets = {
|
||||
"persist/system/root" = {
|
||||
"persist/replicate/system/root" = {
|
||||
mount = {
|
||||
enable = true;
|
||||
mountPoint = "/persist/system/root";
|
||||
mountPoint = "/persist/replicate/system/root";
|
||||
};
|
||||
snapshot = {
|
||||
autoSnapshot = true;
|
||||
};
|
||||
directories = {
|
||||
"/var/lib/nixos".enable = true;
|
||||
|
|
@ -83,10 +83,13 @@
|
|||
"/etc/machine-id".enable = true;
|
||||
};
|
||||
};
|
||||
"persist/home" = {
|
||||
"persist/replicate/home" = {
|
||||
mount = {
|
||||
enable = true;
|
||||
mountPoint = "/persist/home";
|
||||
mountPoint = "/persist/replicate/home";
|
||||
};
|
||||
snapshot = {
|
||||
autoSnapshot = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ in {
|
|||
};
|
||||
cache = lib.mkOption {
|
||||
type = lib.types.listOf deviceType;
|
||||
default = {};
|
||||
default = [];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -264,7 +264,7 @@ in {
|
|||
members = builtins.map (device: hashDisk device.device) vdev;
|
||||
})
|
||||
config.storage.zfs.pool.vdevs;
|
||||
cache = builtins.map (device: hashDisk device.device) (builtins.attrValues config.storage.zfs.pool.cache);
|
||||
cache = builtins.map (device: hashDisk device.device) config.storage.zfs.pool.cache;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue