web hosting

This commit is contained in:
Ezri Zhu 2024-09-27 10:25:51 -04:00
parent eb59baaa30
commit 005e63e1e0
Signed by: ezri
SSH key fingerprint: SHA256:PjS2hKMfl3gJ5Furjjq+kXa4ZvS1c0gb4/djAxxAf6c
4 changed files with 25 additions and 1 deletions

View file

@ -1,6 +1,9 @@
{ {
users.motd = '' users.motd = ''
Welcome to wolfgirl.systems! Welcome to wolfgirl.systems!
Latest news: flakes now enabled. Join our Matrix chat: #wolfgirlsgen:envs.net
Latest news
* Flakes now enabled
* Web hosting now available, contact an admin to enable
''; '';
} }

View file

@ -35,6 +35,7 @@
uid = 2003; uid = 2003;
isNormalUser = true; isNormalUser = true;
shell = pkgs.zsh; shell = pkgs.zsh;
homeMode = "755";
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHp8yRnahmUS7l8STsx0pH25O4xTWGYQyQEWeKWxeM7gbkTNPGpiUswmsHgN8Ng0+FwjIw0FHkjQeLSMH9OTSB4= ipad0esp" "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHp8yRnahmUS7l8STsx0pH25O4xTWGYQyQEWeKWxeM7gbkTNPGpiUswmsHgN8Ng0+FwjIw0FHkjQeLSMH9OTSB4= ipad0esp"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJdN4a3yJUlKIaVezOe4hE8fRK9DkGSzwoZ9vfpsBsHh ide0" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJdN4a3yJUlKIaVezOe4hE8fRK9DkGSzwoZ9vfpsBsHh ide0"

19
hosts/stella-web.nix Normal file
View file

@ -0,0 +1,19 @@
{
services.nginx.enable = true;
systemd.services.nginx.serviceConfig.ProtectHome = false;
services.nginx.virtualHosts."stella.wolfgirl.systems" = {
forceSSL = true;
enableACME = true;
locations."~ \"^/~(.+?)(/.*)?$\"" = {
alias = "/home/$1/public_html$2";
index = "index.html";
extraConfig = ''
error_page 404 /~$1/404.html;
'';
};
};
security.acme = {
acceptTerms = true;
defaults.email = "me@ezri.pet";
};
}

View file

@ -3,6 +3,7 @@
{ {
imports = imports =
[ (modulesPath + "/profiles/qemu-guest.nix") [ (modulesPath + "/profiles/qemu-guest.nix")
./stella-web.nix
]; ];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ]; boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];