expose blog via nginx
This commit is contained in:
parent
d43f1b2867
commit
6190998c8a
2 changed files with 34 additions and 0 deletions
32
nixos/boxes/mb1/blog.nix
Normal file
32
nixos/boxes/mb1/blog.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
path = "/var/www/blog/";
|
||||
in
|
||||
{
|
||||
imports = [ ../nginx.nix ];
|
||||
services.nginx = {
|
||||
virtualHosts = {
|
||||
"blog.cyplo.net" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
root = path;
|
||||
index = "index.html";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
users.extraUsers.blog = {
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB9dJ1elfJvH9SgmSVKOYgkxJBagWusLvJJ9RsEnzCik cyryl@foryog"
|
||||
];
|
||||
shell = null;
|
||||
group = "nginx";
|
||||
isSystemUser = false;
|
||||
isNormalUser = true;
|
||||
home = path;
|
||||
createHome = true;
|
||||
homeMode = "750";
|
||||
};
|
||||
}
|
|
@ -6,9 +6,11 @@
|
|||
./boot.nix
|
||||
./disks.nix
|
||||
./search.nix
|
||||
./blog.nix
|
||||
];
|
||||
networking.hostName = "mb1";
|
||||
|
||||
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
algorithm = "zstd";
|
||||
|
|
Loading…
Reference in a new issue