feat(vesuvio): tweak things and use systemd-boot

This commit is contained in:
uku 2024-08-17 18:50:01 +02:00
parent 7399f8bbc0
commit d2e32f8b38
Signed by: uku
SSH key fingerprint: SHA256:4P0aN6M8ajKukNi6aPOaX0LacanGYtlfjmN+m/sHY/o
3 changed files with 22 additions and 8 deletions

View file

@ -36,6 +36,8 @@ in {
boot = {
kernelPackages = pkgs.linuxPackages; # use lts
kernelParams = ["quiet" "loglevel=3"];
tmp.cleanOnBoot = true;
};
console.keyMap = "fr";

View file

@ -8,7 +8,6 @@
in {
imports = [secrets.generate];
boot.tmp.cleanOnBoot = true;
zramSwap.enable = true;
environment.systemPackages = with pkgs; [dig traceroute];
@ -16,6 +15,9 @@ in {
services = {
openssh.ports = [4269];
# Needed by the Hetzner Cloud password reset feature.
qemuGuest.enable = true;
frp = {
enable = true;
role = "server";
@ -29,7 +31,12 @@ in {
};
};
systemd.services.frp.serviceConfig.EnvironmentFile = secrets.get "frpToken";
systemd.services = {
frp.serviceConfig.EnvironmentFile = secrets.get "frpToken";
# https://discourse.nixos.org/t/qemu-guest-agent-on-hetzner-cloud-doesnt-work/8864/2
qemu-guest-agent.path = [pkgs.shadow];
};
networking.firewall = {
allowedTCPPorts = [22]; # forgejo-ssh

View file

@ -1,16 +1,21 @@
{modulesPath, ...}: {
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
imports = ["${modulesPath}/profiles/qemu-guest.nix"];
boot = {
loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
device = "nodev";
# arm so we can use systemd-boot
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
# set console because the console defaults to serial and
# initialize the display early to get a complete log.
# this is required for typing in LUKS passwords on boot too.
kernelParams = ["console=tty"];
initrd = {
availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront"];
kernelModules = ["nvme"];
kernelModules = ["nvme" "virtio_gpu"];
};
};