diff --git a/hosts/dionysos/configuration.nix b/hosts/dionysos/configuration.nix index 6bba19c..4208fc5 100644 --- a/hosts/dionysos/configuration.nix +++ b/hosts/dionysos/configuration.nix @@ -7,7 +7,7 @@ let username = "harry123"; in { - imports = [../../features/server/tailscale.nix]; + imports = [ ../../features/server/tailscale.nix ]; environment.systemPackages = with pkgs; [ weechat tmux @@ -29,10 +29,12 @@ in ]; }; - users.users.${username}.initialHashedPassword = "$y$j9T$s4isXqWcg4N8TEPjmj0fD/$zog2cpUwstnvwDnQsFmH3br/WAeD2Uu/L7ePr00cKkA"; + users.users.${username}.initialHashedPassword = + "$y$j9T$s4isXqWcg4N8TEPjmj0fD/$zog2cpUwstnvwDnQsFmH3br/WAeD2Uu/L7ePr00cKkA"; environment.variables.EDITOR = "nvim"; + # TODO: migrate this to sisyphe services.nginx = { enable = true; recommendedGzipSettings = true; diff --git a/hosts/dionysos/features/caddy.nix b/hosts/dionysos/features/caddy.nix new file mode 100644 index 0000000..6acfc3c --- /dev/null +++ b/hosts/dionysos/features/caddy.nix @@ -0,0 +1,57 @@ +{ pkgs, ... }: +{ + services.caddy = { + enable = true; + package = ( + pkgs.callPackage + "${builtins.fetchurl "https://raw.githubusercontent.com/jpds/nixpkgs/a33b02fa9d664f31dadc8a874eb1a5dbaa9f4ecf/pkgs/servers/caddy/default.nix"}" + { + externalPlugins = [ + { + name = "caddy-dns/acmedns"; + repo = "https://github.com/caddy-dns/acmedns"; + version = ""; + } + { + name = "caddy-dns/cloudflare"; + repo = "https://github.com/caddy-dns/cloudflare"; + version = ""; + } + ]; + } + ); + + virtualHosts = { + "hypervirtual.world" = { + serverAliases = [ "www.hypervirtual.world" ]; + extraConfig = '' + encode zstd gzip + reverse_proxy 192.168.1.203:8088 + ''; + }; + "git.hypervirtual.world".extraConfig = '' + reverse_proxy 192.168.1.177:80 + encode zstd gzip + ''; + + "freshrss.hypervirtual.world".extraConfig = ''''; + "status.hypervirtual.world".extraConfig = ''''; + "books.hypervirtual.world".extraConfig = ''''; + "fish.hypervirtual.world".extraConfig = ''''; + "cloud.hypervirtual.world".extraConfig = '' + redir /.well-known/carddav /remote.php/dav/ 301 + redir /.well-known/caldav /remote.php/dav/ 301 + + reverse_proxy 192.168.1.177:80 + encode zstd gzip + ''; + + # TODO: migrate rougebordeaux config + "rougebordeaux.xyz" = { + + }; + + "pds.rougebordeaux.xyz".extraConfig = ''''; + }; + }; +} diff --git a/hosts/dionysos/features/i2pd.nix b/hosts/dionysos/features/i2pd.nix new file mode 100644 index 0000000..8fc68b0 --- /dev/null +++ b/hosts/dionysos/features/i2pd.nix @@ -0,0 +1,3 @@ +{ + # TODO: configure i2pd redirection +}