Compare commits

..

1 Commits
gergle ... main

Author SHA1 Message Date
13c921c47b bekkalokk: Update nettsiden (re-enable events)
All checks were successful
Eval nix flake / evals (push) Successful in 6m42s
2025-01-17 23:11:19 +01:00
3 changed files with 30 additions and 99 deletions

29
flake.lock generated
View File

@ -20,26 +20,6 @@
"type": "github" "type": "github"
} }
}, },
"gergle": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1736621371,
"narHash": "sha256-45UIQSQA7R5iU4YWvilo7mQbhY1Liql9bHBvYa3qRI0=",
"ref": "refs/heads/main",
"rev": "3729796c1213fe76e568ac28f1df8de4e596950b",
"revCount": 20,
"type": "git",
"url": "https://git.pvv.ntnu.no/Grzegorz/gergle.git"
},
"original": {
"type": "git",
"url": "https://git.pvv.ntnu.no/Grzegorz/gergle.git"
}
},
"greg-ng": { "greg-ng": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -196,11 +176,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1734820349, "lastModified": 1737151758,
"narHash": "sha256-ZjfttVIMtDqns9wNRyWfP7Ae+kuEZfyXK5sqLmxzsgU=", "narHash": "sha256-yZBsefIarFUEhFRj+rCGMp9Zvag3MCafqV/JfGVRVwc=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "2930f9863ffa4bdc036535159717c9605bcb5a06", "rev": "a4ebe6ded0c8c124561a41cb329ff30891914b5e",
"revCount": 474, "revCount": 475,
"type": "git", "type": "git",
"url": "https://git.pvv.ntnu.no/Projects/nettsiden.git" "url": "https://git.pvv.ntnu.no/Projects/nettsiden.git"
}, },
@ -212,7 +192,6 @@
"root": { "root": {
"inputs": { "inputs": {
"disko": "disko", "disko": "disko",
"gergle": "gergle",
"greg-ng": "greg-ng", "greg-ng": "greg-ng",
"grzegorz-clients": "grzegorz-clients", "grzegorz-clients": "grzegorz-clients",
"matrix-next": "matrix-next", "matrix-next": "matrix-next",

View File

@ -25,8 +25,6 @@
greg-ng.url = "git+https://git.pvv.ntnu.no/Grzegorz/greg-ng.git"; greg-ng.url = "git+https://git.pvv.ntnu.no/Grzegorz/greg-ng.git";
greg-ng.inputs.nixpkgs.follows = "nixpkgs"; greg-ng.inputs.nixpkgs.follows = "nixpkgs";
gergle.url = "git+https://git.pvv.ntnu.no/Grzegorz/gergle.git";
gergle.inputs.nixpkgs.follows = "nixpkgs";
grzegorz-clients.url = "git+https://git.pvv.ntnu.no/Grzegorz/grzegorz-clients.git"; grzegorz-clients.url = "git+https://git.pvv.ntnu.no/Grzegorz/grzegorz-clients.git";
grzegorz-clients.inputs.nixpkgs.follows = "nixpkgs"; grzegorz-clients.inputs.nixpkgs.follows = "nixpkgs";
@ -126,23 +124,19 @@
brzeczyszczykiewicz = stableNixosConfig "brzeczyszczykiewicz" { brzeczyszczykiewicz = stableNixosConfig "brzeczyszczykiewicz" {
modules = [ modules = [
inputs.grzegorz-clients.nixosModules.grzegorz-webui inputs.grzegorz-clients.nixosModules.grzegorz-webui
inputs.gergle.nixosModules.default
inputs.greg-ng.nixosModules.default inputs.greg-ng.nixosModules.default
]; ];
overlays = [ overlays = [
inputs.greg-ng.overlays.default inputs.greg-ng.overlays.default
inputs.gergle.overlays.default
]; ];
}; };
georg = stableNixosConfig "georg" { georg = stableNixosConfig "georg" {
modules = [ modules = [
inputs.grzegorz-clients.nixosModules.grzegorz-webui inputs.grzegorz-clients.nixosModules.grzegorz-webui
inputs.gergle.nixosModules.default
inputs.greg-ng.nixosModules.default inputs.greg-ng.nixosModules.default
]; ];
overlays = [ overlays = [
inputs.greg-ng.overlays.default inputs.greg-ng.overlays.default
inputs.gergle.overlays.default
]; ];
}; };
}; };

View File

@ -2,8 +2,6 @@
let let
grg = config.services.greg-ng; grg = config.services.greg-ng;
grgw = config.services.grzegorz-webui; grgw = config.services.grzegorz-webui;
machine = config.networking.hostName;
in { in {
services.greg-ng = { services.greg-ng = {
enable = true; enable = true;
@ -18,77 +16,37 @@ in {
listenAddr = "localhost"; listenAddr = "localhost";
listenPort = 42069; listenPort = 42069;
listenWebsocketPort = 42042; listenWebsocketPort = 42042;
hostName = "${machine}-old.pvv.ntnu.no"; hostName = "${config.networking.fqdn}";
apiBase = "https://${machine}-backend.pvv.ntnu.no/api"; apiBase = "http://${grg.settings.host}:${toString grg.settings.port}/api";
};
services.gergle = {
enable = true;
virtualHost = config.networking.fqdn;
}; };
services.nginx.enable = true; services.nginx.enable = true;
services.nginx.virtualHosts = { services.nginx.virtualHosts."${config.networking.fqdn}" = {
${config.networking.fqdn} = { forceSSL = true;
forceSSL = true; enableACME = true;
enableACME = true; kTLS = true;
kTLS = true; serverAliases = [
serverAliases = [ "${config.networking.hostName}.pvv.org"
"${machine}.pvv.org" ];
]; extraConfig = ''
extraConfig = '' allow 129.241.210.128/25;
allow 129.241.210.128/25; allow 2001:700:300:1900::/64;
allow 2001:700:300:1900::/64; deny all;
deny all; '';
'';
locations."/" = {
proxyPass = "http://${grgw.listenAddr}:${toString grgw.listenPort}";
}; };
# https://github.com/rawpython/remi/issues/216
"${machine}-backend.pvv.ntnu.no" = { locations."/websocket" = {
forceSSL = true; proxyPass = "http://${grgw.listenAddr}:${toString grgw.listenWebsocketPort}";
enableACME = true; proxyWebsockets = true;
kTLS = true;
serverAliases = [
"${machine}-backend.pvv.org"
];
extraConfig = ''
allow 129.241.210.128/25;
allow 2001:700:300:1900::/64;
deny all;
'';
locations."/" = {
proxyPass = "http://${grg.settings.host}:${toString grg.settings.port}";
proxyWebsockets = true;
};
}; };
locations."/api" = {
"${machine}-old.pvv.ntnu.no" = { proxyPass = "http://${grg.settings.host}:${toString grg.settings.port}";
forceSSL = true; };
enableACME = true; locations."/docs" = {
kTLS = true; proxyPass = "http://${grg.settings.host}:${toString grg.settings.port}";
serverAliases = [
"${machine}-old.pvv.org"
];
extraConfig = ''
allow 129.241.210.128/25;
allow 2001:700:300:1900::/64;
deny all;
'';
locations."/" = {
proxyPass = "http://${grgw.listenAddr}:${toString grgw.listenPort}";
};
# https://github.com/rawpython/remi/issues/216
locations."/websocket" = {
proxyPass = "http://${grgw.listenAddr}:${toString grgw.listenWebsocketPort}";
proxyWebsockets = true;
};
locations."/api" = {
proxyPass = "http://${grg.settings.host}:${toString grg.settings.port}";
};
locations."/docs" = {
proxyPass = "http://${grg.settings.host}:${toString grg.settings.port}";
};
}; };
}; };
} }