Compare commits

..

No commits in common. "2bbbe034447cac485b2dd04723b4f8de8ab28f58" and "4fd0b16db0fab33baab4dc403b867b893878ab60" have entirely different histories.

6 changed files with 32 additions and 45 deletions

14
flake.lock generated
View file

@ -83,11 +83,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1774258552,
"narHash": "sha256-wTJJxhLPr3OHXQ23H9+Ch1YjdlaoMf3605ezfRYLaC4=",
"rev": "28bb98f5aec0ea70b623ab4953eb8186acdb7bba",
"lastModified": 1774210137,
"narHash": "sha256-QaPn/8NlrXd6jd8S9+KV2pYsGNZ8KWU5+jv2/QtRlUw=",
"rev": "1862f2641e54a51755b0b9acb907d01f6b324b2a",
"type": "tarball",
"url": "https://git.clan.lol/api/v1/repos/clan/clan-core/archive/28bb98f5aec0ea70b623ab4953eb8186acdb7bba.tar.gz"
"url": "https://git.clan.lol/api/v1/repos/clan/clan-core/archive/1862f2641e54a51755b0b9acb907d01f6b324b2a.tar.gz"
},
"original": {
"type": "tarball",
@ -980,11 +980,11 @@
},
"nixpkgs_5": {
"locked": {
"lastModified": 1774259547,
"narHash": "sha256-5EQ1TL+R/tcsoGas1oALp5Tj2ACfSul+pfrrxP72xC0=",
"lastModified": 1774253681,
"narHash": "sha256-U3LMRHov4wQ4olZq/zvf94Qf7oL6W11fjvZGvWg3gZc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b3f8d82c4c685fb6f3080745dab8f07606ae50d3",
"rev": "16b430b0e3a5233df0444f14928af915555308ac",
"type": "github"
},
"original": {

View file

@ -543,12 +543,12 @@ in
networking.caddy = {
hosts = {
"auth.kruining.eu" = ''
reverse_proxy h2c://[::1]:9092
reverse_proxy h2c://::1:9092
'';
};
extraConfig = ''
(auth) {
forward_auth h2c://[::1]:9092 {
forward_auth h2c://::1:9092 {
uri /api/authz/forward-auth
copy_headers Remote-User Remote-Groups Remote-Email Remote-Name
}

View file

@ -89,8 +89,8 @@ in {
'';
"${fqn}" = ''
reverse_proxy /_matrix/* http://[::1]:${toString port}
reverse_proxy /_synapse/client/* http://[::1]:${toString port}
reverse_proxy /_matrix/* http://::1:${toString port}
reverse_proxy /_synapse/client/* http://::1:${toString port}
'';
};
};

View file

@ -10,15 +10,6 @@
cfg = config.${namespace}.services.networking.caddy;
hasHosts = (cfg.hosts |> attrNames |> length) > 0;
caddyBase = pkgs.callPackage "${pkgs.path}/pkgs/by-name/ca/caddy/package.nix" {
buildGo125Module = pkgs.buildGo126Module;
caddy = caddyBase;
};
caddyPackage =
caddyBase.withPlugins {
plugins = ["github.com/corazawaf/coraza-caddy/v2@v2.1.0"];
hash = "sha256-pSXjLaZoRtKV3eFl2ySRSjl3yxi514G1Cb7pfrpxxtE=";
};
in {
options.${namespace}.services.networking.caddy = {
enable = mkEnableOption "enable caddy" // {default = true;};
@ -36,7 +27,10 @@ in {
services.caddy = {
enable = cfg.enable;
package = caddyPackage;
package = pkgs.caddy.withPlugins {
plugins = ["github.com/corazawaf/coraza-caddy/v2@v2.1.0"];
hash = "sha256-rsDnTunR8C7hVOX5aKcba+iFYHbpWek65DZgbMxOdTs=";
};
virtualHosts =
cfg.hosts

View file

@ -33,15 +33,15 @@ in {
};
config = mkIf hasPeers {
# networking.firewall.allowedUDPPorts = cfg.peer |> lib.attrValues |> lib.map (p: p.port);
# networking.wq-quick = {
# # enable = cfg.enable;
networking.firewall.allowedUDPPorts = cfg.peer |> lib.attrValues |> lib.map (p: p.port);
networking.wq-quick = {
# enable = cfg.enable;
# interfaces =
# cfg.peer
# |> attrsToList
# |> imap0 (i: { name, value }: (namevaluepair "wg${i}" (value // {})))
# |> listToAttrs;
# };
interfaces =
cfg.peer
|> attrsToList
|> imap0 (i: { name, value }: (namevaluepair "wg${i}" (value // { }));
|> listToAttrs
};
};
}

View file

@ -1,15 +1,11 @@
{
pkgs,
config,
lib,
namespace,
...
}: let
{ pkgs, config, lib, namespace, ... }:
let
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
cfg = config.${namespace}.services.observability.promtail;
in {
in
{
options.${namespace}.services.observability.promtail = {
enable = mkEnableOption "enable Grafana Promtail";
};
@ -35,7 +31,7 @@ in {
clients = [
{
url = "http://[::1]:9003/loki/api/v1/push";
url = "http://::1:9003/loki/api/v1/push";
}
];
@ -50,16 +46,13 @@ in {
};
};
relabel_configs = [
{
source_labels = ["__journal__systemd_unit"];
target_label = "unit";
}
{ source_labels = [ "__journal__systemd_unit" ]; target_label = "unit"; }
];
}
];
};
};
networking.firewall.allowedTCPPorts = [9004];
networking.firewall.allowedTCPPorts = [ 9004 ];
};
}