os/modules/persistence/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
804 B
Nix
Raw Permalink Normal View History

{
2024-08-18 22:22:59 +00:00
lib,
config,
...
}: {
environment.persistence."/persist" = {
hideMounts = true;
directories = [
"/var/log"
"/var/lib/bluetooth"
"/var/lib/nixos"
"/var/lib/systemd/coredump"
"/etc/NetworkManager/system-connections"
];
files = [
"/etc/machine-id"
];
};
fileSystems."/etc/nixos" = {
device = "/home/${config.pub-solar.user.name}/Workspace/os";
2024-08-18 22:22:59 +00:00
options = ["bind"];
};
systemd.tmpfiles.rules = [
"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;
}
];
};
}