diff options
Diffstat (limited to 'machines/feneri.nix')
| -rw-r--r-- | machines/feneri.nix | 76 |
1 files changed, 71 insertions, 5 deletions
diff --git a/machines/feneri.nix b/machines/feneri.nix index 2f3878b..edd0922 100644 --- a/machines/feneri.nix +++ b/machines/feneri.nix @@ -1,12 +1,12 @@ -{ flake, modulesPath, ... }: +{ config, modulesPath, ... }: { imports = [ - flake.outputs.nixosModules.disk - flake.outputs.nixosModules.network (modulesPath + "/profiles/qemu-guest.nix") + (modulesPath + "/virtualisation/qemu-guest-agent.nix") ]; + services.qemuGuest.enable = true; nixpkgs.hostPlatform.system = "x86_64-linux"; depot.disk = { @@ -14,11 +14,77 @@ # device = "/dev/vda"; }; + xnet = { + nginx.enable = true; + gitServer = { + enable = true; + path = "/var/lib/gitsrv"; + gitweb.enable = true; + }; + }; + depot.net = { sshd.enable = true; }; - services.getty.autologinUser = "root"; + systemd.network = { + enable = true; + networks."30-wan" = { + matchConfig = { + Type = "ether"; + MACAddress = "8a:33:83:f4:b1:80"; + }; + linkConfig.RequiredForOnline = true; + networkConfig.Description = "WAN"; + address = [ "152.53.193.118/22" "2a0a:4cc0:2000:bfbf::1/64" ]; + routes = [ + { Gateway = "152.53.192.1"; } + { Gateway = "fe80::1"; } + ]; + }; + }; + + security.acme = { + acceptTerms = true; + defaults.email = "certs@4kb.net"; + certs."4kb.net" = { + dnsProvider = "porkbun"; + environmentFile = "/var/secrets/porkbun"; + extraDomainNames = [ + "*.4kb.net" + "*.web.4kb.net" + ]; + group = "nginx"; + reloadServices = [ "nginx.service" ]; + }; + }; + + services.hydra = { + enable = true; + hydraURL = "https://hydra.web.4kb.net"; + notificationSender = "hydra@localhost"; + buildMachinesFiles = []; + useSubstitutes = true; + }; + + services.nginx.virtualHosts."hydra.web.4kb.net" = { + useACMEHost = "4kb.net"; + forceSSL = true; + + locations."/".proxyPass = "http://localhost:${toString config.services.hydra.port}"; + }; + + nix.settings.allowed-uris = [ + "git+https://github.com/NixOS/nixpkgs/" + "https://channels.nixos.org/" + "https://releases.nixos.org/nixos/" + ]; + + systemd.services.hydra-notify.enable = false; - networking.hostName = "feneri"; + networking = { + hostName = "feneri"; + domain = "4kb.net"; + useDHCP = false; + }; } |
