update for hetzner
This commit is contained in:
parent
53f5850a3d
commit
75cc37566a
3 changed files with 24 additions and 16 deletions
|
|
@ -2,20 +2,26 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
# CHANGE THESE
|
domain = "garp.kyrus.dev";
|
||||||
domain = "git.example.com";
|
email = "antoni.romanski@protonmail.com";
|
||||||
acmeEmail = "you@example.com";
|
|
||||||
sshKeys = [
|
sshKeys = [
|
||||||
"ssh-ed25519 AAAA...replace-with-your-public-key... user@host"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMPqKKWflJRNTexs2VaMY3VgF7tPnR7MmxF4yQ6+U9VM hetzner"
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# ─── Boot ──────────────────────────────────────────────────────────
|
# ─── Boot ──────────────────────────────────────────────────────────
|
||||||
boot.loader.systemd-boot.enable = true;
|
imports = [
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.loader.grub = {
|
||||||
|
efiSupport = true;
|
||||||
|
efiInstallAsRemovable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# ─── Networking ────────────────────────────────────────────────────
|
# ─── Networking ────────────────────────────────────────────────────
|
||||||
networking.hostName = "garp";
|
networking.hostName = "garp";
|
||||||
|
|
@ -45,7 +51,6 @@ in
|
||||||
};
|
};
|
||||||
console.keyMap = "de";
|
console.keyMap = "de";
|
||||||
|
|
||||||
# SSH (needed for nixos-anywhere and later rebuilds)
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
@ -80,7 +85,7 @@ in
|
||||||
|
|
||||||
services.caddy = {
|
services.caddy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
email = acmeEmail;
|
email = email;
|
||||||
virtualHosts.${domain}.extraConfig = ''
|
virtualHosts.${domain}.extraConfig = ''
|
||||||
reverse_proxy 127.0.0.1:3000
|
reverse_proxy 127.0.0.1:3000
|
||||||
'';
|
'';
|
||||||
|
|
@ -92,6 +97,7 @@ in
|
||||||
btop
|
btop
|
||||||
tmux
|
tmux
|
||||||
curl
|
curl
|
||||||
|
config.services.forgejo.package
|
||||||
];
|
];
|
||||||
|
|
||||||
# VM-only overrides (applied by `nixos-rebuild build-vm`)
|
# VM-only overrides (applied by `nixos-rebuild build-vm`)
|
||||||
|
|
|
||||||
10
disko.nix
10
disko.nix
|
|
@ -1,14 +1,14 @@
|
||||||
{
|
{
|
||||||
disko.devices.disk.main = {
|
disko.devices.disk.main = {
|
||||||
# CHANGE THIS to match the target disk:
|
device = "/dev/sda";
|
||||||
# /dev/sda — typical SATA / SCSI
|
|
||||||
# /dev/vda — KVM / QEMU virtio
|
|
||||||
# /dev/nvme0n1 — NVMe
|
|
||||||
device = "/dev/vda";
|
|
||||||
type = "disk";
|
type = "disk";
|
||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions = {
|
||||||
|
boot = {
|
||||||
|
size = "1M";
|
||||||
|
type = "EF02";
|
||||||
|
};
|
||||||
ESP = {
|
ESP = {
|
||||||
size = "512M";
|
size = "512M";
|
||||||
type = "EF00";
|
type = "EF00";
|
||||||
|
|
|
||||||
4
justfile
4
justfile
|
|
@ -1,5 +1,7 @@
|
||||||
# https://just.systems
|
# https://just.systems
|
||||||
|
|
||||||
|
domain := "garp.kyrus.dev"
|
||||||
|
|
||||||
default:
|
default:
|
||||||
echo 'Hello, world!'
|
echo 'Hello, world!'
|
||||||
|
|
||||||
|
|
@ -7,5 +9,5 @@ vm:
|
||||||
nixos-rebuild build-vm --flake .#server
|
nixos-rebuild build-vm --flake .#server
|
||||||
./result/bin/run-garp-vm -nographic
|
./result/bin/run-garp-vm -nographic
|
||||||
|
|
||||||
rebuild-remote:
|
rebuild-remote:
|
||||||
nixos-rebuild switch --flake .#garp --target-host root@{{ domain }}
|
nixos-rebuild switch --flake .#garp --target-host root@{{ domain }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue