update for hetzner

This commit is contained in:
reym 2026-04-29 22:49:00 +02:00
parent 53f5850a3d
commit 75cc37566a
3 changed files with 24 additions and 16 deletions

View file

@ -2,20 +2,26 @@
config,
pkgs,
lib,
modulesPath,
...
}:
let
# CHANGE THESE
domain = "git.example.com";
acmeEmail = "you@example.com";
domain = "garp.kyrus.dev";
email = "antoni.romanski@protonmail.com";
sshKeys = [
"ssh-ed25519 AAAA...replace-with-your-public-key... user@host"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMPqKKWflJRNTexs2VaMY3VgF7tPnR7MmxF4yQ6+U9VM hetzner"
];
in
{
# ─── Boot ──────────────────────────────────────────────────────────
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
boot.loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
};
# ─── Networking ────────────────────────────────────────────────────
networking.hostName = "garp";
@ -45,7 +51,6 @@ in
};
console.keyMap = "de";
# SSH (needed for nixos-anywhere and later rebuilds)
services.openssh = {
enable = true;
settings = {
@ -80,7 +85,7 @@ in
services.caddy = {
enable = true;
email = acmeEmail;
email = email;
virtualHosts.${domain}.extraConfig = ''
reverse_proxy 127.0.0.1:3000
'';
@ -92,6 +97,7 @@ in
btop
tmux
curl
config.services.forgejo.package
];
# VM-only overrides (applied by `nixos-rebuild build-vm`)

View file

@ -1,14 +1,14 @@
{
disko.devices.disk.main = {
# CHANGE THIS to match the target disk:
# /dev/sda — typical SATA / SCSI
# /dev/vda — KVM / QEMU virtio
# /dev/nvme0n1 — NVMe
device = "/dev/vda";
device = "/dev/sda";
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02";
};
ESP = {
size = "512M";
type = "EF00";

View file

@ -1,5 +1,7 @@
# https://just.systems
domain := "garp.kyrus.dev"
default:
echo 'Hello, world!'
@ -7,5 +9,5 @@ vm:
nixos-rebuild build-vm --flake .#server
./result/bin/run-garp-vm -nographic
rebuild-remote:
nixos-rebuild switch --flake .#garp --target-host root@{{ domain }}
rebuild-remote:
nixos-rebuild switch --flake .#garp --target-host root@{{ domain }}