caddy: make a shared module

This commit is contained in:
Rouven Seifert 2025-05-09 14:23:57 +02:00
parent ff44839229
commit f511f7d146
Signed by: rouven.seifert
SSH key fingerprint: SHA256:WedRxwyCvqwDG6cd16qf/fizYDK1pvN4p5bawXlnKk0
6 changed files with 53 additions and 42 deletions

24
shared/caddy/default.nix Normal file
View file

@ -0,0 +1,24 @@
{ config, ... }:
{
services.caddy = {
enable = true;
email = "ca@${config.networking.domain}";
logFormat = "format console";
globalConfig = ''
servers {
metrics
}
'';
virtualHosts.":2018" = {
extraConfig = ''
metrics
'';
logFormat = ''
output discard
'';
};
};
systemd.services.caddy.environment.XDG_DATA_HOME = "/var/lib";
networking.firewall.allowedTCPPorts = [ 80 443 ];
networking.firewall.allowedUDPPorts = [ 443 ];
}

View file

@ -26,6 +26,8 @@ in
iperf
jq
helix
nushell
atuin
];
users.defaultUserShell = pkgs.zsh;
programs.fzf = {
@ -68,6 +70,8 @@ in
zstyle ':completion:*:complete:networkctl:*' list-grouped true
source ${pkgs.agdsn-zsh-config}/etc/zsh/zshrc
source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh
source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
zvm_after_init_commands+=(eval "$(atuin init zsh)")
unsetopt extendedglob
@ -100,7 +104,6 @@ in
# then
# cat ${../images/cat.sixel}
# fi
eval "$(${pkgs.mcfly}/bin/mcfly init zsh)"
eval "$(${pkgs.zoxide}/bin/zoxide init zsh)"
'';
};