Compare commits
9 commits
46adf7040b
...
efb6bc7b95
Author | SHA1 | Date | |
---|---|---|---|
|
efb6bc7b95 | ||
|
3928a5b44d | ||
|
a0ed02d158 | ||
|
384f965b3b | ||
|
54c4b7136d | ||
|
71368d5081 | ||
|
437097a71b | ||
|
510672f779 | ||
|
f2e7d24b2f |
45
bert/services/http/chandlerswift.com.nix
Normal file
45
bert/services/http/chandlerswift.com.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
|
||||||
|
{
|
||||||
|
services.caddy.virtualHosts."chandlerswift.com".extraConfig = ''
|
||||||
|
encode zstd gzip
|
||||||
|
file_server
|
||||||
|
root * /srv/www/chandlerswift.com
|
||||||
|
# hide .git # ???
|
||||||
|
|
||||||
|
@html_redirect {
|
||||||
|
file {path}.html
|
||||||
|
not path *.html
|
||||||
|
}
|
||||||
|
redir @html_redirect {path}.html 301
|
||||||
|
|
||||||
|
redir /.well-known/host-meta* https://social.chandlerswift.com{uri} permanent
|
||||||
|
redir /.well-known/webfinger* https://social.chandlerswift.com{uri} permanent
|
||||||
|
redir /.well-known/nodeinfo* https://social.chandlerswift.com{uri} permanent
|
||||||
|
|
||||||
|
handle_errors {
|
||||||
|
respond "{err.status_code} {err.status_text}"
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
services.caddy.virtualHosts."blog.chandlerswift.com".extraConfig = ''
|
||||||
|
redir /2018/auto-timed-fish-tank-light/ https://chandlerswift.com/projects/fish-tank-light.html permanent
|
||||||
|
redir /2018/using-a-5-25-floppy-as-a-midi-instrument/ https://chandlerswift.com/projects/midi-floppy.html permanent
|
||||||
|
redir /2017/building-a-midi-pedalboard/ https://chandlerswift.com/projects/midi-pedalboard.html permanent
|
||||||
|
redir /2017/esp8266-light-switch-a-few-revisions/ https://chandlerswift.com/projects/light-switch.html permanent
|
||||||
|
redir /2016/new-relic-and-appfog-2/ https://chandlerswift.com/2016/02/18/new-relic-appfog-v2.html permanent
|
||||||
|
redir /2015/piano-heatmap-analysis-part-1/ https://chandlerswift.com/2015/09/10/piano-heatmap-part-1.html permanent
|
||||||
|
redir /2015/solving-windows-update-error-8024402f/ https://chandlerswift.com/2015/08/31/solving-8024402F.html permanent
|
||||||
|
redir /2015/enable-hotspot-rooted-s6/ https://chandlerswift.com/2015/08/30/enabling-s6-hotspot.html permanent
|
||||||
|
|
||||||
|
redir /* https://chandlerswift.com/
|
||||||
|
|
||||||
|
handle_errors {
|
||||||
|
respond "{err.status_code} {err.status_text}"
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
services.caddy.virtualHosts."www.chandlerswift.com".extraConfig = "redir https://chandlerswift.com{uri}";
|
||||||
|
systemd.tmpfiles.settings."10-chandlerswift-com" = {
|
||||||
|
"/srv/www/chandlerswift.com" = {
|
||||||
|
d = {};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -2,6 +2,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./0hats.com.nix
|
./0hats.com.nix
|
||||||
./bannergen.chandlerswift.com.nix
|
./bannergen.chandlerswift.com.nix
|
||||||
|
./chandlerswift.com.nix
|
||||||
./files.chandlerswift.com.nix
|
./files.chandlerswift.com.nix
|
||||||
./git.chandlerswift.com.nix
|
./git.chandlerswift.com.nix
|
||||||
./harborpaperco.com.nix
|
./harborpaperco.com.nix
|
||||||
|
@ -12,6 +13,8 @@
|
||||||
./maps.chandlerswift.com.nix
|
./maps.chandlerswift.com.nix
|
||||||
./music.chandlerswift.com.nix
|
./music.chandlerswift.com.nix
|
||||||
./preview.chandlerswift.com.nix
|
./preview.chandlerswift.com.nix
|
||||||
|
./social.chandlerswift.com.nix
|
||||||
|
./stjohnscccc.com.nix
|
||||||
./stjohnscccc.org.nix
|
./stjohnscccc.org.nix
|
||||||
./swiftgang.net.nix
|
./swiftgang.net.nix
|
||||||
./whereis.chandlerswift.com.nix
|
./whereis.chandlerswift.com.nix
|
||||||
|
@ -44,8 +47,11 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>not found - chandlerswift.com</h1>
|
<h1>not found - chandlerswift.com</h1>
|
||||||
<p>This page is hosted with <a href="https://chandlerswift.com/">chandlerswift.com</a>,
|
<p>
|
||||||
but the site couldn't be found.</p>
|
You've reached a server at
|
||||||
|
<a href="https://chandlerswift.com/">chandlerswift.com</a>,
|
||||||
|
but the requested site couldn't be found.
|
||||||
|
</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
EOF 404
|
EOF 404
|
||||||
|
|
28
bert/services/http/social.chandlerswift.com.nix
Normal file
28
bert/services/http/social.chandlerswift.com.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{
|
||||||
|
services.gotosocial = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
landing-page-user = "chandler";
|
||||||
|
protocol = "https";
|
||||||
|
host = "social.chandlerswift.com";
|
||||||
|
account-domain = "chandlerswift.com";
|
||||||
|
bind-address = "127.0.0.1";
|
||||||
|
port = 8001;
|
||||||
|
# log-timestamp-format = "";
|
||||||
|
storage-local-base-path = "/srv/gotosocial/storage";
|
||||||
|
db-type = "sqlite";
|
||||||
|
db-address = "/srv/gotosocial/database.sqlite";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.tmpfiles.settings."10-social-chandlerswift-com" = {
|
||||||
|
"/srv/gotosocial" = {
|
||||||
|
d = {
|
||||||
|
user = "gotosocial";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.caddy.virtualHosts."social.chandlerswift.com".extraConfig = ''
|
||||||
|
encode zstd gzip
|
||||||
|
reverse_proxy localhost:8001
|
||||||
|
'';
|
||||||
|
}
|
19
bert/services/http/stjohnscccc.com.nix
Normal file
19
bert/services/http/stjohnscccc.com.nix
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
services.caddy.virtualHosts."stjohnscccc.com" = {
|
||||||
|
serverAliases = ["www.stjohnscccc.com"];
|
||||||
|
extraConfig = ''
|
||||||
|
encode zstd gzip
|
||||||
|
file_server
|
||||||
|
root * /srv/www/stjohnscccc.com
|
||||||
|
|
||||||
|
handle_errors {
|
||||||
|
respond "{err.status_code} {err.status_text}"
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
systemd.tmpfiles.settings."10-stjohnscccc-com" = {
|
||||||
|
"/srv/www/stjohnscccc.com" = {
|
||||||
|
d = {};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,11 +1,6 @@
|
||||||
{ pkgs, lib, config, ... }:
|
{ pkgs, lib, config, ... }: {
|
||||||
let
|
services.phpfpm.pools.stjohnscccc = {
|
||||||
app = "stjohnscccc";
|
user = "stjohnscccc";
|
||||||
domain = "${app}.chandlerswift.com"; # TODO
|
|
||||||
dataDir = "/srv/www/stjohnscccc.org";
|
|
||||||
in {
|
|
||||||
services.phpfpm.pools.${app} = {
|
|
||||||
user = app;
|
|
||||||
settings = {
|
settings = {
|
||||||
"listen.owner" = config.services.caddy.user;
|
"listen.owner" = config.services.caddy.user;
|
||||||
"pm" = "dynamic";
|
"pm" = "dynamic";
|
||||||
|
@ -20,32 +15,37 @@ in {
|
||||||
};
|
};
|
||||||
# phpEnv."PATH" = lib.makeBinPath [ pkgs.php ];
|
# phpEnv."PATH" = lib.makeBinPath [ pkgs.php ];
|
||||||
};
|
};
|
||||||
services.caddy.virtualHosts.${domain}.extraConfig = ''
|
services.caddy.virtualHosts."stjohnscccc.org" = {
|
||||||
root * ${dataDir}/public
|
serverAliases = ["www.stjohnscccc.org"];
|
||||||
|
extraConfig = ''
|
||||||
|
root * /srv/www/stjohnscccc.org/public
|
||||||
|
|
||||||
handle /downloads/* {
|
redir /downloads /downloads/
|
||||||
file_server {
|
|
||||||
browse ${./caddy-browse-template.html}
|
handle /downloads/* {
|
||||||
hide .gitignore
|
file_server {
|
||||||
|
browse ${./caddy-browse-template.html}
|
||||||
|
hide .gitignore
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
handle {
|
handle {
|
||||||
encode zstd gzip
|
encode zstd gzip
|
||||||
php_fastcgi unix/${config.services.phpfpm.pools.${app}.socket}
|
php_fastcgi unix/${config.services.phpfpm.pools.stjohnscccc.socket}
|
||||||
file_server
|
file_server
|
||||||
}
|
}
|
||||||
|
|
||||||
handle_errors {
|
handle_errors {
|
||||||
respond "{err.status_code} {err.status_text}"
|
respond "{err.status_code} {err.status_text}"
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
users.users.${app} = {
|
|
||||||
isSystemUser = true;
|
|
||||||
home = dataDir;
|
|
||||||
group = app;
|
|
||||||
};
|
};
|
||||||
users.groups.${app} = {};
|
users.users.stjohnscccc = {
|
||||||
|
isSystemUser = true;
|
||||||
|
home = "/srv/www/stjohnscccc.org";
|
||||||
|
group = "stjohnscccc";
|
||||||
|
};
|
||||||
|
users.groups.stjohnscccc = {};
|
||||||
systemd.tmpfiles.settings."10-stjohnscccc.org" = {
|
systemd.tmpfiles.settings."10-stjohnscccc.org" = {
|
||||||
"/srv/www/stjohnscccc.org" = {
|
"/srv/www/stjohnscccc.org" = {
|
||||||
d = {};
|
d = {};
|
||||||
|
|
|
@ -189,7 +189,10 @@
|
||||||
|
|
||||||
programs.thunderbird.enable = true;
|
programs.thunderbird.enable = true;
|
||||||
|
|
||||||
programs.bash.enable = true;
|
programs.bash = {
|
||||||
|
enable = true;
|
||||||
|
historyControl = [ "ignoredups" "ignorespace" ];
|
||||||
|
};
|
||||||
|
|
||||||
programs.direnv = {
|
programs.direnv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Reference in a new issue