dotfiles/nixos/boxes/mb1/blog.nix

37 lines
740 B
Nix

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