mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-11 07:10:39 +02:00
feat: enable impermanence
This commit is contained in:
parent
30cfdaf860
commit
4cee692eff
7 changed files with 55 additions and 27 deletions
|
@ -8,6 +8,7 @@
|
|||
}: {
|
||||
imports = [
|
||||
./inputrc.nix
|
||||
./impermanence.nix
|
||||
./issue.nix
|
||||
./net.nix
|
||||
./nix.nix
|
||||
|
|
28
hosts/common/core/impermanence.nix
Normal file
28
hosts/common/core/impermanence.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
# State that should be kept across reboots, but is otherwise
|
||||
# NOT important information in any way that needs to be backed up.
|
||||
#environment.persistence."/nix/state" = {
|
||||
# hideMounts = true;
|
||||
# files = [
|
||||
# "/etc/machine-id"
|
||||
# "/etc/ssh/ssh_host_ed25519_key"
|
||||
# "/etc/ssh/ssh_host_ed25519_key.pub"
|
||||
# ];
|
||||
# directories = [
|
||||
# "/var/log"
|
||||
# ];
|
||||
#};
|
||||
|
||||
# State that should be kept forever, and backed up accordingly.
|
||||
environment.persistence."/persist" = {
|
||||
hideMounts = true;
|
||||
files = [
|
||||
"/etc/machine-id"
|
||||
"/etc/ssh/ssh_host_ed25519_key"
|
||||
"/etc/ssh/ssh_host_ed25519_key.pub"
|
||||
];
|
||||
directories = [
|
||||
"/var/log"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
lib,
|
||||
extraLib,
|
||||
nodeSecrets,
|
||||
pkgs,
|
||||
|
@ -39,6 +40,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
fileSystems."/persist".neededForBoot = true;
|
||||
|
||||
#environment.persistence."/persist".directories = [
|
||||
# { directory = "/var/lib/acme"; user = "acme"; group = "acme"; }
|
||||
#];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue