43 lines
937 B
Nix
43 lines
937 B
Nix
{
|
|
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"
|
|
"/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"
|
|
];
|
|
};
|
|
})
|
|
];
|
|
}
|