added hetzner profile, ssh for luks unlocking, and neededForBoot for state

This commit is contained in:
eyjhb 2024-08-08 14:36:04 +02:00
parent 2ca4b5440a
commit d980ba204a
Signed by: eyjhb
GPG key ID: 609F508E3239F920
5 changed files with 187 additions and 4 deletions

View file

@ -8,6 +8,7 @@ in {
(modulesPath + "/profiles/qemu-guest.nix")
(sources.disko + "/module.nix")
./../shared/modules
./../shared/platforms/hetzner.nix
./gerd/disk-zfs.nix
@ -19,8 +20,6 @@ in {
networking.hostName = "gerd";
networking.hostId = "e1166ac9";
networking.interfaces.enp1s0.ipv6.addresses = [ { address = "2a01:4f9:c012:743e::1"; prefixLength = 64; }];
networking.defaultGateway6 = { address = "fe80::1"; interface = "enp1s0"; };
boot.loader.grub = {
# no need to set devices, disko will add all devices that have a EF02 partition to the list already
# devices = [ ];
@ -29,10 +28,18 @@ in {
};
services.openssh.enable = true;
mine.state.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/local/root@blank
zfs rollback -r rpool/root@blank
'';
environment.systemPackages = with pkgs; [

View file

@ -78,4 +78,8 @@ in {
};
};
};
fileSystems."/state/root".neededForBoot = true;
fileSystems."/state/home".neededForBoot = true;
fileSystems."/state/stash".neededForBoot = true;
}