2023-11-05 21:12:22 +00:00
|
|
|
{
|
|
|
|
flake,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
{
|
2023-10-28 09:28:41 +00:00
|
|
|
# Use GRUB2 as the boot loader.
|
|
|
|
# We don't use systemd-boot because Hetzner uses BIOS legacy boot.
|
|
|
|
boot.loader.systemd-boot.enable = false;
|
|
|
|
boot.loader.grub = {
|
|
|
|
enable = true;
|
|
|
|
efiSupport = false;
|
|
|
|
mirroredBoots = [
|
|
|
|
{
|
|
|
|
devices = [ "/dev/disk/by-id/nvme-SAMSUNG_MZVL21T0HCLR-00B00_S676NF0R517371" ];
|
|
|
|
path = "/boot1";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
devices = [ "/dev/disk/by-id/nvme-KXG60ZNV1T02_TOSHIBA_Z9NF704ZF9ZL" ];
|
|
|
|
path = "/boot2";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
copyKernels = true;
|
|
|
|
};
|
|
|
|
boot.supportedFilesystems = [ "zfs" ];
|
|
|
|
|
|
|
|
boot.kernelParams = [
|
|
|
|
"boot.shell_on_fail=1"
|
|
|
|
"ip=138.201.80.102::138.201.80.65:255.255.255.192:nachtigall::off"
|
|
|
|
];
|
|
|
|
|
|
|
|
boot.initrd.availableKernelModules = [ "igb" ];
|
|
|
|
|
2023-10-28 13:19:48 +00:00
|
|
|
# https://nixos.wiki/wiki/ZFS#declarative_mounting_of_ZFS_datasets
|
|
|
|
systemd.services.zfs-mount.enable = false;
|
|
|
|
|
2024-06-23 13:14:30 +00:00
|
|
|
services.zfs.autoScrub = {
|
|
|
|
enable = true;
|
|
|
|
pools = [ "root_pool" ];
|
|
|
|
};
|
|
|
|
|
2023-11-09 02:20:48 +00:00
|
|
|
# Declarative SSH private key
|
|
|
|
age.secrets."nachtigall-root-ssh-key" = {
|
|
|
|
file = "${flake.self}/secrets/nachtigall-root-ssh-key.age";
|
|
|
|
path = "/root/.ssh/id_ed25519";
|
|
|
|
mode = "400";
|
|
|
|
owner = "root";
|
|
|
|
};
|
|
|
|
|
2024-08-27 08:08:46 +00:00
|
|
|
age.secrets.keycloak-database-password = {
|
|
|
|
file = "${flake.self}/secrets/keycloak-database-password.age";
|
|
|
|
mode = "600";
|
|
|
|
#owner = "keycloak";
|
|
|
|
};
|
2024-05-15 17:15:04 +00:00
|
|
|
|
2024-08-27 08:08:46 +00:00
|
|
|
pub-solar-os.auth = {
|
|
|
|
enable = true;
|
|
|
|
database-password-file = config.age.secrets.keycloak-database-password.path;
|
|
|
|
};
|
|
|
|
|
|
|
|
pub-solar-os.backups.repos.storagebox = {
|
|
|
|
passwordFile = config.age.secrets."restic-repo-storagebox".path;
|
|
|
|
repository = "sftp:u377325@u377325.your-storagebox.de:/backups";
|
|
|
|
};
|
2024-05-15 17:15:04 +00:00
|
|
|
|
2024-08-27 07:59:55 +00:00
|
|
|
systemd.services.postgresql = {
|
|
|
|
after = [ "var-lib-postgresql.mount" ];
|
|
|
|
requisite = [ "var-lib-postgresql.mount" ];
|
|
|
|
};
|
|
|
|
|
2023-10-28 09:28:41 +00:00
|
|
|
# This value determines the NixOS release with which your system is to be
|
|
|
|
# compatible, in order to avoid breaking some software such as database
|
|
|
|
# servers. You should change this only after NixOS release notes say you
|
|
|
|
# should.
|
|
|
|
system.stateVersion = "23.05"; # Did you read the comment?
|
|
|
|
}
|