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, ...}: {
networking.firewall.allowedTCPPorts = [
80
22
443
8009
222 #ubuntu vm
80 #nginx/http
22 #ssh
222 #ubuntu vm ssh
443 #ssl
2200 #forgejo ssh
3000 #forgejo http
9090 #sync.io
3000 #forgejo
2200 #forgejo
9091 #caddy
];
}

View file

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