code domain

This commit is contained in:
Vinzenz Schroeter 2025-05-01 15:14:32 +02:00
parent 3240ba9bdf
commit 4aa418f562
4 changed files with 56 additions and 34 deletions

View file

@ -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;

View file

@ -2,7 +2,8 @@
config,
pkgs,
...
}: {
}:
{
# Configure keymap in X11
services.xserver.xkb = {
layout = "de";

View file

@ -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";

View file

@ -21,6 +21,7 @@
8543
8544
80
1313
];
};
};