Switch to impermanence
This commit is contained in:
parent
44af0493db
commit
7e05e5ddc0
5 changed files with 37 additions and 46 deletions
|
@ -34,34 +34,23 @@
|
|||
ssss
|
||||
];
|
||||
|
||||
######################################## Preservation ###########################################
|
||||
preservation = {
|
||||
######################################## Impermanence ###########################################
|
||||
environment.persistence."/persist" = {
|
||||
enable = lib.mkDefault false;
|
||||
preserveAt."/persist" = {
|
||||
files = [
|
||||
{
|
||||
file = "/etc/machine-id";
|
||||
inInitrd = true;
|
||||
}
|
||||
{
|
||||
file = "/etc/ssh/ssh_host_rsa_key";
|
||||
how = "symlink";
|
||||
inInitrd = true; # sops-nix
|
||||
}
|
||||
{
|
||||
file = "/etc/ssh/ssh_host_ed25519_key";
|
||||
how = "symlink";
|
||||
inInitrd = true; # sops-nix
|
||||
}
|
||||
];
|
||||
directories = [
|
||||
"/var/lib/systemd/timers"
|
||||
"/var/lib/nixos"
|
||||
"/var/log"
|
||||
];
|
||||
};
|
||||
hideMounts = true;
|
||||
|
||||
files = [
|
||||
"/etc/machine-id"
|
||||
"/etc/ssh/ssh_host_rsa_key"
|
||||
"/etc/ssh/ssh_host_ed25519_key"
|
||||
];
|
||||
|
||||
directories = [
|
||||
"/var/lib/systemd/timers"
|
||||
"/var/lib/nixos"
|
||||
"/var/log"
|
||||
];
|
||||
};
|
||||
systemd.suppressedSystemUnits = [ "systemd-machine-id-commit.service" ];
|
||||
|
||||
######################################## ZSH configuration ######################################
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
fileSystems."/persist".neededForBoot = true;
|
||||
|
||||
services.zfs = {
|
||||
autoScrub.enable = true;
|
||||
autoSnapshot = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue