server-configs/machines/gerd.nix

56 lines
1.4 KiB
Nix

{ modulesPath, config, lib, pkgs, ... }:
let
sources = import ./../shared/sources/sources.nix;
in {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/profiles/qemu-guest.nix")
(sources.disko + "/module.nix")
./../shared/modules
./../shared/platforms/hetzner.nix
./gerd/disk-zfs.nix
./../shared/applications/server/nginx.nix
./../shared/applications/state/ssh.nix
./gerd/services/forgejo.nix
];
networking.hostName = "gerd";
networking.hostId = "e1166ac9";
boot.loader.grub = {
# no need to set devices, disko will add all devices that have a EF02 partition to the list already
# devices = [ ];
efiSupport = true;
efiInstallAsRemovable = true;
};
services.openssh.enable = true;
mine = {
state.enable = true;
ssh-on-boot.enable = true;
platforms.hetzner.network.address = [
"65.108.221.240/32"
"2a01:4f9:c012:743e::1/64"
];
};
boot.initrd.postDeviceCommands = lib.mkAfter ''
zfs rollback -r rpool/root@blank
'';
environment.systemPackages = with pkgs; [
vim
jq
];
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPuma8g+U8Wh+4mLvZoV9V+ngPqxjuIG4zhsbaTeXq65 eyjhb@chronos"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGee4uz+HDOj4Y4ANOhWJhoc4mMLP1gz6rpKoMueQF2J rendal@popper"
];
system.stateVersion = "24.05";
}