2024-02-03 19:58:18 +00:00
|
|
|
{
|
2024-08-18 22:22:59 +00:00
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: {
|
2024-02-08 18:00:15 +00:00
|
|
|
environment.persistence."/persist" = {
|
|
|
|
hideMounts = true;
|
|
|
|
directories = [
|
|
|
|
"/var/log"
|
|
|
|
"/var/lib/bluetooth"
|
|
|
|
"/var/lib/nixos"
|
|
|
|
"/var/lib/systemd/coredump"
|
|
|
|
"/etc/NetworkManager/system-connections"
|
|
|
|
];
|
2024-02-03 19:58:18 +00:00
|
|
|
|
2024-02-08 18:00:15 +00:00
|
|
|
files = [
|
|
|
|
"/etc/machine-id"
|
|
|
|
];
|
|
|
|
};
|
2024-02-03 19:58:18 +00:00
|
|
|
|
2024-02-08 18:27:28 +00:00
|
|
|
fileSystems."/etc/nixos" = {
|
|
|
|
device = "/home/${config.pub-solar.user.name}/Workspace/os";
|
2024-08-18 22:22:59 +00:00
|
|
|
options = ["bind"];
|
2024-02-08 18:27:28 +00:00
|
|
|
};
|
|
|
|
|
2024-02-08 18:00:15 +00:00
|
|
|
systemd.tmpfiles.rules = [
|
2024-02-03 19:58:18 +00:00
|
|
|
"d /persist/etc/ssh 0400 root root"
|
|
|
|
];
|
|
|
|
|
|
|
|
services.openssh = {
|
|
|
|
enable = true;
|
|
|
|
hostKeys = [
|
|
|
|
{
|
|
|
|
path = "/persist/etc/ssh/ssh_host_ed25519_key";
|
|
|
|
type = "ed25519";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
path = "/persist/etc/ssh/ssh_host_rsa_key";
|
|
|
|
type = "rsa";
|
|
|
|
bits = 4096;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|