mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
18 lines
582 B
Nix
18 lines
582 B
Nix
_: {lib, ...}: {
|
|
systemd.tmpfiles.rules = [
|
|
"d /mnt - - - - -"
|
|
"L+ /etc/ssh/ssh_host_ed25519_key - - - - /persist/ssh/ssh_host_ed25519_key"
|
|
"L+ /etc/ssh/ssh_host_ed25519_key.pub - - - - /persist/ssh/ssh_host_ed25519_key.pub"
|
|
"L+ /etc/nixos - - - - /persist/nixos"
|
|
];
|
|
boot.initrd.postDeviceCommands = lib.mkAfter ''
|
|
zfs snapshot destroy rpool/root@prev
|
|
zfs snapshot destroy rpool/var@prev
|
|
|
|
zfs snapshot create rpool/root@prev
|
|
zfs snapshot create rpool/var@prev
|
|
|
|
zfs rollback -r rpool/root@empty
|
|
zfs rollback -r rpool/var@empty
|
|
'';
|
|
}
|