Compare commits
2 commits
84e40bfb78
...
e4ecd7a259
Author | SHA1 | Date | |
---|---|---|---|
|
e4ecd7a259 | ||
|
ead47f3cdb |
3 changed files with 30 additions and 5 deletions
|
@ -19,6 +19,7 @@ in
|
||||||
./paste.nix
|
./paste.nix
|
||||||
./smtp.nix
|
./smtp.nix
|
||||||
./imap.nix
|
./imap.nix
|
||||||
|
./web-misc.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
let
|
let
|
||||||
up_dir = "/srv/up";
|
up_dir = "/srv/up";
|
||||||
isomorphisme_dir = "/srv/isomorphis.me";
|
isomorphisme_dir = "/srv/isomorphis.me";
|
||||||
|
tremeg_dir = "/srv/tremeg.net";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services.nginx.enable = true;
|
services.nginx.enable = true;
|
||||||
|
@ -11,7 +12,7 @@ in
|
||||||
# in /home. So we need to use a different location.
|
# in /home. So we need to use a different location.
|
||||||
users.users."up" = {
|
users.users."up" = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
home = up_dir;
|
home = "${up_dir}";
|
||||||
# group = config.services.nginx.group;
|
# group = config.services.nginx.group;
|
||||||
group = "nginx";
|
group = "nginx";
|
||||||
createHome = true;
|
createHome = true;
|
||||||
|
@ -21,7 +22,7 @@ in
|
||||||
services.nginx.virtualHosts."srv.isomorphis.me" = {
|
services.nginx.virtualHosts."srv.isomorphis.me" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
root = up_dir;
|
root = "${up_dir}";
|
||||||
locations = {
|
locations = {
|
||||||
"/" = {
|
"/" = {
|
||||||
extraConfig = "autoindex on;";
|
extraConfig = "autoindex on;";
|
||||||
|
@ -39,12 +40,21 @@ in
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
root = isomorphisme_dir;
|
root = "${isomorphisme_dir}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."tremeg.net" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/" = {
|
||||||
|
root = "${tremeg_dir}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
system.activationScripts."srv-permissions" = ''
|
system.activationScripts."srv-permissions" = ''
|
||||||
chown -R up:nginx /srv/up
|
chown -R up:nginx ${up_dir}
|
||||||
chown -R nginx:nginx /srv/isomorphis.me
|
chown -R nginx:nginx ${isomorphisme_dir}
|
||||||
|
chown -R nginx:nginx ${tremeg_dir}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
14
pastila/web-misc.nix
Normal file
14
pastila/web-misc.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.nginx.enable = true;
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."armael.gueneau.me" = {
|
||||||
|
globalRedirect = "gallium.inria.fr/~agueneau";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."gueneau.me" = {
|
||||||
|
globalRedirect = "armael.gueneau.me";
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue