add caddy

This commit is contained in:
Philip Peterson 2024-12-24 06:49:21 -05:00
parent 761872493a
commit 742aa14eae
3 changed files with 26 additions and 8 deletions

16
nixos/caddy.nix Normal file
View file

@ -0,0 +1,16 @@
{
lib,
pkgs,
config,
...
}: {
services.caddy = {
enable = true;
virtualHosts."localhost" = {
extraConfig = ''
respond "Hello, world!"
'';
listen = [ ":9091" ];
};
};
}

View file

@ -1,14 +1,15 @@
{pkgs, ...}: { {pkgs, ...}: {
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [
80 80 #nginx/http
22 22 #ssh
443 222 #ubuntu vm ssh
8009 443 #ssl
222 #ubuntu vm
2200 #forgejo ssh
3000 #forgejo http
9090 #sync.io 9090 #sync.io
3000 #forgejo 9091 #caddy
2200 #forgejo
]; ];
} }

View file

@ -39,9 +39,10 @@
''; '';
in { in {
imports = [ imports = [
(import ./caddy.nix {inherit pkgs lib config;})
(import ./cloned_repos {inherit pkgs pullomatic lib;}) (import ./cloned_repos {inherit pkgs pullomatic lib;})
(import ./nginx.nix {inherit pkgs lib config;})
(import ./firewall.nix {inherit pkgs;}) (import ./firewall.nix {inherit pkgs;})
(import ./nginx.nix {inherit pkgs lib config;})
(import ./system/users.nix {inherit pkgs config lib nix-index-database;}) (import ./system/users.nix {inherit pkgs config lib nix-index-database;})
]; ];