dotfiles/nixos/boxes/mb1/blog.nix

36 lines
727 B
Nix
Raw Normal View History

2023-08-12 18:15:18 +01:00
{ config, pkgs, ... }:
let
path = "/var/www/blog/";
in
{
imports = [ ../nginx.nix ];
services.nginx = {
virtualHosts = {
"blog.cyplo.dev" = {
2023-08-12 18:15:18 +01:00
forceSSL = true;
enableACME = true;
locations."/" = {
root = path;
};
};
"blog.cyplo.net" = {
forceSSL = true;
enableACME = true;
globalRedirect = "blog.cyplo.dev";
};
2023-08-12 18:15:18 +01:00
};
};
users.extraUsers.blog = {
openssh.authorizedKeys.keys = [
2023-08-12 20:47:06 +01:00
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILqDeXcIQwLXxuueu9KTC6y6NPUUzDRdF4Q5NUk+nFwt upload@blog"
2023-08-12 18:15:18 +01:00
];
group = "nginx";
isSystemUser = false;
isNormalUser = true;
home = path;
createHome = true;
homeMode = "750";
};
}