Skip to content

Commit

Permalink
Add isos.acmcsuf.com
Browse files Browse the repository at this point in the history
This will serve as our mirror for ISOs and other large images that we
want to keep immutable, such as Ubuntu ISOs.

Official mirrors are allowed to change these files over time which
violates Nix's immutability guarantees, so we'll mirror them ourselves.
  • Loading branch information
diamondburned committed May 1, 2024
1 parent 4fe9c38 commit a862fe4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
11 changes: 11 additions & 0 deletions servers/cs306/caddy/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,14 @@ netdata.acmcsuf.com {
madness.acmcsuf.com {
reverse_proxy * localhost:8391
}

# Host ISOs locally for the club.
# ISOs stored here must be immutable. New ISO releases must have a different
# file path.
isos.acmcsuf.com {
file_server {
root /var/www/isos
browse
}
header Cache-Control "public, max-age=31536000, immutable"
}
5 changes: 5 additions & 0 deletions servers/cs306/caddy/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@ in
configFile = preprocessedCaddyfile;
inherit environment;
};

systemd.tmpfiles.rules = [
"d /var/www 0755 caddy caddy -"
"d /var/www/isos 0755 root root -"
];
}

0 comments on commit a862fe4

Please sign in to comment.