diff --git a/hosts/hetzner-vpn2/nginx.nix b/hosts/hetzner-vpn2/nginx.nix index bd45ab7..ac37f25 100644 --- a/hosts/hetzner-vpn2/nginx.nix +++ b/hosts/hetzner-vpn2/nginx.nix @@ -1,4 +1,4 @@ -{ pkgs, inputs,... }: +{ pkgs, inputs, ... }: { security.acme = { acceptTerms = true; @@ -20,31 +20,40 @@ recommendedOptimisation = true; virtualHosts = - #let - # servicesDomain = "services.zerforschen.plus"; - # mkServiceConfig = host: port: { - # addSSL = true; - # enableACME = true; - # locations."/" = { - # proxyPass = "http://${host}:${toString port}/"; - # extraConfig = '' - # # bind to tailscale ip - # proxy_bind 100.88.118.60; - # # pam auth - # limit_except OPTIONS { - # auth_pam "Password Required"; - # auth_pam_service_name "nginx"; - # } - # ''; - # }; - # }; - # pc2 = "vinzenz-pc2.donkey-pentatonic.ts.net"; - #in + let + servicesDomain = "services.zerforschen.plus"; + mkServiceConfig = + { host, port }: + { + addSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://${host}:${toString port}/"; + extraConfig = '' + # bind to tailscale ip + proxy_bind 100.88.118.60; + # pam auth + limit_except OPTIONS { + auth_pam "Password Required"; + auth_pam_service_name "nginx"; + } + ''; + }; + }; + pc2 = "vinzenz-pc2.donkey-pentatonic.ts.net"; + in { - #"vscode.${servicesDomain}" = lib.mkMerge [ - # (mkServiceConfig pc2 8542) - # { locations."/".proxyWebsockets = true; } - #]; + "code.${servicesDomain}" = lib.mkMerge [ + (mkServiceConfig { + host = pc2; + port = 8542; + }) + { locations."/".proxyWebsockets = true; } + ]; + "view.${servicesDomain}" = mkServiceConfig { + host = pc2; + port = 1313; + }; "zerforschen.plus" = { addSSL = true; diff --git a/hosts/ronja-pc/configuration.nix b/hosts/ronja-pc/configuration.nix index 0d0a968..0e9124d 100644 --- a/hosts/ronja-pc/configuration.nix +++ b/hosts/ronja-pc/configuration.nix @@ -2,7 +2,8 @@ config, pkgs, ... -}: { +}: +{ # Configure keymap in X11 services.xserver.xkb = { layout = "de"; diff --git a/hosts/ronja-pc/hardware.nix b/hosts/ronja-pc/hardware.nix index 68f6e8d..f668726 100644 --- a/hosts/ronja-pc/hardware.nix +++ b/hosts/ronja-pc/hardware.nix @@ -1,10 +1,18 @@ -{lib, ...}: { +{ lib, ... }: +{ boot = { - kernelModules = ["kvm-intel"]; - extraModulePackages = []; + kernelModules = [ "kvm-intel" ]; + extraModulePackages = [ ]; initrd = { - availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"]; - kernelModules = []; + availableKernelModules = [ + "xhci_pci" + "ahci" + "nvme" + "usbhid" + "usb_storage" + "sd_mod" + ]; + kernelModules = [ ]; }; }; @@ -12,18 +20,21 @@ "/" = { device = "/dev/disk/by-uuid/27eccf93-a79f-4fcb-8588-ec55d913508f"; fsType = "btrfs"; - options = ["subvol=@"]; + options = [ "subvol=@" ]; }; "/boot" = { device = "/dev/disk/by-uuid/85D4-43FC"; fsType = "vfat"; - options = ["fmask=0077" "dmask=0077"]; + options = [ + "fmask=0077" + "dmask=0077" + ]; }; }; swapDevices = [ - {device = "/dev/disk/by-uuid/bf9d19fb-499b-4bfb-b67d-131fa5bf8259";} + { device = "/dev/disk/by-uuid/bf9d19fb-499b-4bfb-b67d-131fa5bf8259"; } ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; diff --git a/hosts/vinzenz-pc2/vscode-server.nix b/hosts/vinzenz-pc2/vscode-server.nix index 6f8e2d4..770a347 100644 --- a/hosts/vinzenz-pc2/vscode-server.nix +++ b/hosts/vinzenz-pc2/vscode-server.nix @@ -21,6 +21,7 @@ 8543 8544 80 + 1313 ]; }; };