refactoring for iServer and isWorkstation: part 2
This commit is contained in:
parent
af1d9ac368
commit
021ab24e79
15 changed files with 116 additions and 131 deletions
37
hosts/modules/impermanence.nix
Normal file
37
hosts/modules/impermanence.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ hostType, lib, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkMerge [
|
||||
# Common configuration
|
||||
{
|
||||
}
|
||||
|
||||
# Server specific configuration
|
||||
(lib.mkIf hostType.isServer {
|
||||
})
|
||||
|
||||
# Workstation specific configuration
|
||||
(lib.mkIf hostType.isWorkstation {
|
||||
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"
|
||||
"/var/lib/bluetooth"
|
||||
"/var/lib/flatpak"
|
||||
"/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