hugo
This commit is contained in:
@@ -42,6 +42,7 @@
|
|||||||
./system-modules/ydotool.nix
|
./system-modules/ydotool.nix
|
||||||
]) ++ (if (host == "NxACE") then [
|
]) ++ (if (host == "NxACE") then [
|
||||||
./system-modules/nx2site.nix
|
./system-modules/nx2site.nix
|
||||||
|
./system-modules/hugo.nix
|
||||||
./system-modules/postgres.nix
|
./system-modules/postgres.nix
|
||||||
./system-modules/nx2site/proxy.nix
|
./system-modules/nx2site/proxy.nix
|
||||||
./system-modules/nx2site/audiobookshelf.nix
|
./system-modules/nx2site/audiobookshelf.nix
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
hugo
|
|
||||||
dart-sass
|
|
||||||
];
|
|
||||||
}
|
|
||||||
1
home.nix
1
home.nix
@@ -62,7 +62,6 @@
|
|||||||
./home-modules/zathura.nix
|
./home-modules/zathura.nix
|
||||||
./home-modules/zoxide.nix
|
./home-modules/zoxide.nix
|
||||||
] ++ (if (host == "NxACE") then [
|
] ++ (if (host == "NxACE") then [
|
||||||
./home-modules/hugo.nix
|
|
||||||
./home-modules/nx2site.nix
|
./home-modules/nx2site.nix
|
||||||
./home-modules/nx2site-backup.nix
|
./home-modules/nx2site-backup.nix
|
||||||
] else []);
|
] else []);
|
||||||
|
|||||||
32
system-modules/hugo.nix
Normal file
32
system-modules/hugo.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{ pkgs-unstable, user, ... }:
|
||||||
|
let p = pkgs-unstable; in
|
||||||
|
{
|
||||||
|
environment.systemPackages = with p; [
|
||||||
|
hugo
|
||||||
|
dart-sass
|
||||||
|
];
|
||||||
|
|
||||||
|
users = {
|
||||||
|
groups = {
|
||||||
|
"hugo".name = "hugo";
|
||||||
|
};
|
||||||
|
users = {
|
||||||
|
"${user}".extraGroups = [ "hugo" ];
|
||||||
|
"nginx".extraGroups = [ "hugo" ];
|
||||||
|
"hugo" = {
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "hugo";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services."hugo" = {
|
||||||
|
script = with p; /* shell */ ''
|
||||||
|
${hugo}/bin/hugo serve --port 8000 --bind 10.0.1.1 --baseURL http://10.0.1.1:8000 -s /var/lib/hugo/nx2site/
|
||||||
|
'';
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
User = "hugo";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
};
|
};
|
||||||
certs = {
|
certs = {
|
||||||
"${domain}" = {
|
"${domain}" = {
|
||||||
extraDomainNames = builtins.map (subd: "${subd}.${domain}") [ "sync" ];
|
extraDomainNames = builtins.map (subd: "${subd}.${domain}") [ "sync" "dev" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -145,10 +145,21 @@
|
|||||||
# };
|
# };
|
||||||
"abs.${domain}" = vh // {
|
"abs.${domain}" = vh // {
|
||||||
listen = dl;
|
listen = dl;
|
||||||
locations = { "/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:${builtins.toString config.services.audiobookshelf.port}";
|
proxyPass = "http://127.0.0.1:${builtins.toString config.services.audiobookshelf.port}";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
}; };
|
};
|
||||||
|
};
|
||||||
|
"dev.${domain}" = vh // {
|
||||||
|
listen = dl ++ [
|
||||||
|
# { addr = "0.0.0.0"; port = 8000; ssl = true; }
|
||||||
|
# { addr = "[::0]"; port = 8000; ssl = true; }
|
||||||
|
];
|
||||||
|
root = "/var/lib/hugo/nx2site/public";
|
||||||
|
# locations."/" = {
|
||||||
|
# proxyPass = "http://127.0.0.1:8000";
|
||||||
|
# proxyWebsockets = true;
|
||||||
|
# };
|
||||||
};
|
};
|
||||||
# is done atomatically
|
# is done atomatically
|
||||||
# "cal.${domain}" = vh // {
|
# "cal.${domain}" = vh // {
|
||||||
|
|||||||
Reference in New Issue
Block a user