diff --git a/devices.nix b/devices.nix index 26a274d..a4fbeb4 100644 --- a/devices.nix +++ b/devices.nix @@ -38,9 +38,6 @@ in hetzner-vpn2 = { system = "aarch64-linux"; }; - hyperforge = { - system = "aarch64-linux"; - }; muede-lpt2 = { system = "x86_64-linux"; isDesktop = true; diff --git a/nixosConfigurations/forgejo-runner-1/default.nix b/nixosConfigurations/forgejo-runner-1/default.nix index 88cc281..41c7717 100644 --- a/nixosConfigurations/forgejo-runner-1/default.nix +++ b/nixosConfigurations/forgejo-runner-1/default.nix @@ -10,6 +10,9 @@ # uncomment for build check on non arm system (requires --impure) # nixpkgs.buildPlatform = builtins.currentSystem; + services.tailscale.useRoutingFeatures = "both"; + system.autoUpgrade.allowReboot = true; + users.users = { root.openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY pixel-JuiceSSH" diff --git a/nixosConfigurations/forgejo-runner-1/hardware.nix b/nixosConfigurations/forgejo-runner-1/hardware.nix index 9786ed6..e8fbc56 100644 --- a/nixosConfigurations/forgejo-runner-1/hardware.nix +++ b/nixosConfigurations/forgejo-runner-1/hardware.nix @@ -3,12 +3,56 @@ imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; config = { - my.hetznerVm = { + boot = { + tmp.cleanOnBoot = true; + kernelParams = [ "console=tty" ]; + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + initrd = { + availableKernelModules = [ + "xhci_pci" + "virtio_scsi" + "sr_mod" + "virtio_gpu" + ]; + kernelModules = [ ]; + }; + }; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/47bc77ff-12e1-4d39-bb5c-fb100ccd3aab"; + fsType = "ext4"; + }; + "/boot" = { + device = "/dev/disk/by-uuid/05F2-8F9A"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/bbd18a70-b0bb-4e1a-b45b-3c1f8ecc0c10"; } + ]; + + networking.useNetworkd = true; + systemd.network = { enable = true; - rootUuid = "47bc77ff-12e1-4d39-bb5c-fb100ccd3aab"; - bootUuid = "05F2-8F9A"; - swapUuid = "bbd18a70-b0bb-4e1a-b45b-3c1f8ecc0c10"; - ipv6Address = "2a01:4f8:c013:a524::1/64"; + networks."10-wan" = { + matchConfig.Name = "enp1s0"; + networkConfig.DHCP = "ipv4"; + address = [ + "2a01:4f8:c013:a524::1/64" + ]; + routes = [ + { Gateway = "fe80::1"; } + ]; + }; }; }; } diff --git a/nixosConfigurations/hetzner-vpn2/default.nix b/nixosConfigurations/hetzner-vpn2/default.nix index b12cecd..5974763 100644 --- a/nixosConfigurations/hetzner-vpn2/default.nix +++ b/nixosConfigurations/hetzner-vpn2/default.nix @@ -8,11 +8,15 @@ # uncomment for build check on non arm system (requires --impure) # nixpkgs.buildPlatform = builtins.currentSystem; + services.tailscale.useRoutingFeatures = "both"; + users.users.root.openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICdYqY3Y1/f1bsAi5Qfyr/UWuX9ixu96IeAlhoQaJkbf" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY pixel-JuiceSSH" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1CRn4yYTL4XUdCebE8Z4ZeuMujBjorTdWifg911EOv pc2 home roaming" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPDNpLDmctyqGpow/ElQvdhY4BLBPS/sigDJ1QEcC7wC lpt2-roaming" ]; + + system.autoUpgrade.allowReboot = true; }; } diff --git a/nixosConfigurations/hetzner-vpn2/hardware.nix b/nixosConfigurations/hetzner-vpn2/hardware.nix index 6c9f315..d7c96f0 100644 --- a/nixosConfigurations/hetzner-vpn2/hardware.nix +++ b/nixosConfigurations/hetzner-vpn2/hardware.nix @@ -3,12 +3,56 @@ imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; config = { - my.hetznerVm = { + boot = { + tmp.cleanOnBoot = true; + kernelParams = [ "console=tty" ]; + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + initrd = { + availableKernelModules = [ + "xhci_pci" + "virtio_scsi" + "sr_mod" + "virtio_gpu" + ]; + kernelModules = [ ]; + }; + }; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/3263489d-9819-433c-b198-9d2e732a94e4"; + fsType = "ext4"; + }; + "/boot" = { + device = "/dev/disk/by-uuid/6C25-6BDC"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/e147721d-86b5-40d7-a231-c6ea391c563d"; } + ]; + + networking.useNetworkd = true; + systemd.network = { enable = true; - rootUuid = "3263489d-9819-433c-b198-9d2e732a94e4"; - bootUuid = "6C25-6BDC"; - swapUuid = "e147721d-86b5-40d7-a231-c6ea391c563d"; - ipv6Address = "2a01:4f8:c013:65dd::1/64"; + networks."10-wan" = { + matchConfig.Name = "enp1s0"; + networkConfig.DHCP = "ipv4"; + address = [ + "2a01:4f8:c013:65dd::1/64" + ]; + routes = [ + { Gateway = "fe80::1"; } + ]; + }; }; }; } diff --git a/nixosConfigurations/hyperforge/default.nix b/nixosConfigurations/hyperforge/default.nix deleted file mode 100644 index 693a7a8..0000000 --- a/nixosConfigurations/hyperforge/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - imports = [ - ./hardware.nix - ./forgejo.nix - ./nginx.nix - ]; - - config = { - # uncomment for build check on non arm system (requires --impure) - # nixpkgs.buildPlatform = builtins.currentSystem; - - users.users.root.openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY pixel-JuiceSSH" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1CRn4yYTL4XUdCebE8Z4ZeuMujBjorTdWifg911EOv pc2 home roaming" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPDNpLDmctyqGpow/ElQvdhY4BLBPS/sigDJ1QEcC7wC lpt2-roaming" - ]; - }; -} diff --git a/nixosConfigurations/hyperforge/forgejo.nix b/nixosConfigurations/hyperforge/forgejo.nix deleted file mode 100644 index 51b86b3..0000000 --- a/nixosConfigurations/hyperforge/forgejo.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ config, lib, ... }: -let - srv = config.services.forgejo.settings.server; -in -{ - services.forgejo = { - enable = true; - database.type = "sqlite3"; - lfs.enable = true; - - settings = { - server = { - DOMAIN = "forge.darkest.space"; - ROOT_URL = "https://${srv.DOMAIN}/"; - HTTP_PORT = 3000; - SSH_PORT = lib.head config.services.openssh.ports; - }; - service.DISABLE_REGISTRATION = true; - session.COOKIE_SECURE = true; - }; - }; - - services.openssh.enable = true; -} diff --git a/nixosConfigurations/hyperforge/hardware.nix b/nixosConfigurations/hyperforge/hardware.nix deleted file mode 100644 index a196adb..0000000 --- a/nixosConfigurations/hyperforge/hardware.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ modulesPath, ... }: -{ - imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; - - config = { - my.hetznerVm = { - enable = true; - rootUuid = "73dfcfd2-3a61-4b05-8440-d57072b89eda"; - bootUuid = "E9C2-D85B"; - swapUuid = "737140f2-c2fd-4af9-9974-f05642f8d90e"; - ipv6Address = "2a01:4f8:c013:cbdd::1/64"; - }; - }; -} diff --git a/nixosConfigurations/hyperforge/nginx.nix b/nixosConfigurations/hyperforge/nginx.nix deleted file mode 100644 index 2faf8d9..0000000 --- a/nixosConfigurations/hyperforge/nginx.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ config, ... }: -let - srv = config.services.forgejo.settings.server; -in -{ - security.acme = { - acceptTerms = true; - defaults.email = "acme@darkest.space"; - }; - - services.nginx = { - enable = true; - recommendedProxySettings = true; - recommendedTlsSettings = true; - recommendedGzipSettings = true; - recommendedOptimisation = true; - - virtualHosts.${srv.DOMAIN} = { - enableACME = true; - forceSSL = true; - extraConfig = '' - client_max_body_size 512M; - ''; - locations."/".proxyPass = "http://127.0.0.1:${toString srv.HTTP_PORT}"; - }; - }; - - networking.firewall.allowedTCPPorts = [ - 80 - 443 - ]; -} diff --git a/nixosModules/hetzner-vm.nix b/nixosModules/hetzner-vm.nix deleted file mode 100644 index d59b4ad..0000000 --- a/nixosModules/hetzner-vm.nix +++ /dev/null @@ -1,86 +0,0 @@ -{ - lib, - config, - ... -}: -let - cfg = config.my.hetznerVm; -in -{ - options.my.hetznerVm = { - enable = lib.mkEnableOption "Hetzner Cloud aarch64 qemu-guest defaults"; - - rootUuid = lib.mkOption { - type = lib.types.str; - description = "UUID of the root ext4 filesystem."; - }; - bootUuid = lib.mkOption { - type = lib.types.str; - description = "UUID of the FAT /boot partition."; - }; - swapUuid = lib.mkOption { - type = lib.types.str; - description = "UUID of the swap device."; - }; - ipv6Address = lib.mkOption { - type = lib.types.str; - description = "Static IPv6 address (with /prefix) assigned to enp1s0."; - example = "2a01:4f8:c013:cbdd::1/64"; - }; - }; - - config = lib.mkIf cfg.enable { - boot = { - tmp.cleanOnBoot = true; - kernelParams = [ "console=tty" ]; - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; - initrd = { - availableKernelModules = [ - "xhci_pci" - "virtio_scsi" - "sr_mod" - "virtio_gpu" - ]; - kernelModules = [ ]; - }; - }; - - fileSystems = { - "/" = { - device = "/dev/disk/by-uuid/${cfg.rootUuid}"; - fsType = "ext4"; - }; - "/boot" = { - device = "/dev/disk/by-uuid/${cfg.bootUuid}"; - fsType = "vfat"; - options = [ - "fmask=0077" - "dmask=0077" - ]; - }; - }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/${cfg.swapUuid}"; } - ]; - - networking.useNetworkd = true; - systemd.network = { - enable = true; - networks."10-wan" = { - matchConfig.Name = "enp1s0"; - networkConfig.DHCP = "ipv4"; - address = [ cfg.ipv6Address ]; - routes = [ - { Gateway = "fe80::1"; } - ]; - }; - }; - - services.tailscale.useRoutingFeatures = "both"; - system.autoUpgrade.allowReboot = true; - }; -}