feat: get proper 404
This is admittedly super hacky, because it uses an unused subdomain, invalid certs, and actually just directs somewhere that doesn't exist, but it kinda works, and going on a weird subdomain at least doesn't redirect to bitwarden.
This commit is contained in:
parent
df67724405
commit
e4f8faf9d0
6 changed files with 24 additions and 15 deletions
17
hosts/ami/404.nix
Normal file
17
hosts/ami/404.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{website, ...}: {
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
|
||||
virtualHosts."404.buffet.sh" = {
|
||||
default = true;
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
root = "${website}/404.html";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -3,9 +3,6 @@ _: {
|
|||
acceptTerms = true;
|
||||
defaults.email = "acme@buffet.sh";
|
||||
certs."buffet.sh" = {
|
||||
extraDomainNames = [
|
||||
"bitwarden.buffet.sh"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
agenix.nixosModules.default
|
||||
disko.nixosModules.disko
|
||||
|
||||
./404.nix
|
||||
./acme.nix
|
||||
./bitwarden.nix
|
||||
./borg.nix
|
||||
|
@ -19,7 +20,7 @@
|
|||
../../users/maintainer
|
||||
];
|
||||
|
||||
age.identityPaths = [ "/root/.ssh/id_agenix" ];
|
||||
age.identityPaths = ["/root/.ssh/id_agenix"];
|
||||
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ...}: let
|
||||
{pkgs, ...}: let
|
||||
port = 3000;
|
||||
in {
|
||||
services = {
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
time.timeZone = "UTC";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
boot.loader.grub = {
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = true;
|
||||
};
|
||||
boot.loader.grub = {
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = true;
|
||||
};
|
||||
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
services.openssh.enable = true;
|
||||
|
|
|
@ -14,11 +14,5 @@
|
|||
forceSSL = true;
|
||||
root = "${website}";
|
||||
};
|
||||
|
||||
virtualHosts."unix.pics" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
root = "/var/lib/stuff/unix.pics";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue