ephemeral is now a nixosModule
This commit is contained in:
parent
79ecda817e
commit
5edad8b957
6 changed files with 121 additions and 74 deletions
37
hosts/modules/ephemeral.nix
Normal file
37
hosts/modules/ephemeral.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.impermanence.nixosModules.impermanence
|
||||
inputs.self.nixosModules.ephemeral
|
||||
];
|
||||
|
||||
ephemeral = {
|
||||
enable = true;
|
||||
rootDevice = "/dev/mapper/cryptroot";
|
||||
rootSubvolume = "@root";
|
||||
};
|
||||
|
||||
environment.persistence.main = {
|
||||
persistentStoragePath = "/persistent";
|
||||
files = [
|
||||
"/etc/machine-id"
|
||||
"/etc/ssh/ssh_host_ed25519_key"
|
||||
"/etc/ssh/ssh_host_ed25519_key.pub"
|
||||
"/etc/ssh/ssh_host_rsa_key"
|
||||
"/etc/ssh/ssh_host_rsa_key.pub"
|
||||
];
|
||||
directories = [
|
||||
"/etc/NetworkManager/system-connections"
|
||||
"/etc/nixos"
|
||||
"/var/lib/bluetooth"
|
||||
"/var/lib/flatpak"
|
||||
"/var/lib/lxd"
|
||||
"/var/lib/nixos"
|
||||
"/var/lib/systemd/coredump"
|
||||
"/var/lib/systemd/timers"
|
||||
"/var/lib/tailscale"
|
||||
"/var/log"
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue