diff options
| Commit | 705da9ba2e25fad5f680896f50307f3373d621e2 (patch) | |
|---|---|---|
| Author | 2026-01-24 15:32:45 +0200 | |
| Committer | 2026-01-24 15:32:45 +0200 | |
| Files | c55547f39fb2dd92112ebf8aa3de4ee0848d16c9 /machines/uttu/httpd.nix | |
| nix-705da9ba2e25fad5f680896f50307f3373d621e2.tar nix-705da9ba2e25fad5f680896f50307f3373d621e2.tar.gz nix-705da9ba2e25fad5f680896f50307f3373d621e2.zip | ||
| Parent | ffb894c8b173eb65db9496243521382b54a525c3 (diff) | |
feat(machines): Add uttu machine
1 files changed, 40 insertions, 0 deletions
| -rw-r--r-- | machines/uttu/httpd.nix | 40 |
diff --git a/machines/uttu/httpd.nix b/machines/uttu/httpd.nix new file mode 100644 index 0000000..eb6d8af --- /dev/null +++ b/machines/uttu/httpd.nix @@ -0,0 +1,40 @@ +{ config, ... }: let + inherit (config.constants) ip tld; +in { + services.dnsmasq.settings.address = [ + "/server.${tld}/ftp.${tld}/samba.${tld}/${ip}" + ]; + + services.httpd = { + virtualHosts = { + "server.${tld}" = { + listen = [ { port = 80; } ]; + documentRoot = "/var/www/server"; + locations."/server-status".extraConfig = '' + SetHandler server-status + ''; + }; + + #== File servers ==# + + "samba.${tld}" = rec { + listen = [ { port = 80; } ]; + documentRoot = "/NetworkDirectory"; + extraConfig = '' + <Directory "${documentRoot}"> + IndexOptions +NameWidth=* +Charset=UTF-8 + </Directory> + ''; + }; + "ftp.${tld}" = rec { + listen = [ { port = 80; } ]; + documentRoot = "/home/ftp"; + extraConfig = '' + <Directory "${documentRoot}"> + IndexOptions +NameWidth=* +Charset=UTF-8 + </Directory> + ''; + }; + }; + }; +} |
