Compare commits

...

3 commits

Author SHA1 Message Date
02eb3b5599
fix: rename system -> stdenv.hostPlatform.system
All checks were successful
/ check (push) Successful in 57s
nixos a supprime l'alias system
2026-01-05 19:41:57 +01:00
c36ea77671
open firewall for monitoring 2026-01-05 19:41:31 +01:00
f4155bc8a8
add zamok safe ip 2026-01-05 19:40:23 +01:00
4 changed files with 53 additions and 2 deletions

View file

@ -2,6 +2,10 @@
{ {
services.fail2ban = { services.fail2ban = {
enable = true; enable = true;
ignoreIP = [
"zamok.crans.org"
];
}; };
services.openssh.settings.LogLevel = "VERBOSE"; services.openssh.settings.LogLevel = "VERBOSE";

View file

@ -0,0 +1,34 @@
{ config, ... }:
let
domain = "pass.${config.networking.domain}";
in
{
age.secrets = {
vaultwarden_secret = {
file = ../../secrets/services/vaultwarden.age;
owner = "vaultwarden";
};
};
services.vaultwarden = {
enable = false; # TODO: enable
# TODO: move to pgsql
#dbBackend = "postgresql";
environmentFile = config.age.secrets.vaultwarden_secret.path;
config = {
DOMAIN = "https://${domain}";
SIGNUPS_ALLOWED = false;
ROCKET_ADDRESS = "::1";
ROCKET_PORT = 8222;
};
};
services.caddy.virtualHosts."${domain}" = {
extraConfig = ''
reverse_proxy localhost:${builtins.toString config.services.vaultwarden.config.ROCKET_PORT}
'';
};
}

View file

@ -1,4 +1,4 @@
{ ... }: { config, ... }:
{ {
services.prometheus.exporters = { services.prometheus.exporters = {
node = { node = {
@ -9,6 +9,19 @@
"--collector.softirqs" "--collector.softirqs"
"--collector.tcpstat" "--collector.tcpstat"
]; ];
openFirewall = true;
};
postgres = {
enable = config.services.postgresql.enable;
}; };
}; };
services.caddy.globalConfig = "
metrics {
per_host
}
";
} }

View file

@ -8,7 +8,7 @@ pkgs.mkShell {
packages = with pkgs; [ packages = with pkgs; [
nil nil
nixpkgs-fmt nixpkgs-fmt
agenix.packages.${system}.default agenix.packages.${stdenv.hostPlatform.system}.default
]; ];
shellHook = '' shellHook = ''