prefect: Add new records and enable go-jamming on marvin
This commit is contained in:
parent
4401806893
commit
31388902c2
4 changed files with 45 additions and 4 deletions
|
@ -9,11 +9,11 @@
|
|||
"thehedgehog.me",
|
||||
"blog.thehedgehog.me",
|
||||
"mrhedgehog.xyz",
|
||||
"mrhedgehog.blog",
|
||||
"mrhedgehog.blog"
|
||||
],
|
||||
"blacklist": [
|
||||
"youtube.com"
|
||||
],
|
||||
]
|
||||
}
|
||||
'';
|
||||
in {
|
||||
|
@ -27,7 +27,7 @@ in {
|
|||
Group = "go-jamming";
|
||||
WorkingDirectory = "/var/lib/go-jamming";
|
||||
ExecStart = "${pkgs.my-pkgs.go-jamming}/bin/go-jamming";
|
||||
ExecStartPre = "cp -f ${config} /var/lib/go-jamming/config.json";
|
||||
ExecStartPre = "if [ ! -d "/var/lib/go-jamming" ]; then mkdir /var/lib/go-jamming; fi; cp -f ${config} /var/lib/go-jamming/config.json";
|
||||
SuccessExitStatus = 0;
|
||||
};
|
||||
};
|
||||
|
|
31
hosts/prefect/services/blog-update.nix
Normal file
31
hosts/prefect/services/blog-update.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{pkgs, ...}: {
|
||||
systemd.timers.blog-update = {
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
description = "Blog Update Timer";
|
||||
timerConfig = {
|
||||
Unit = "blog-update.service";
|
||||
OnUnitActiveSec = 3600;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.blog-update = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
description = "Blog Update Service";
|
||||
path = [
|
||||
"${pkgs.hugo}/bin"
|
||||
"${pkgs.go}/bin"
|
||||
"${pkgs.nodejs}/bin"
|
||||
];
|
||||
environment = {
|
||||
NODE_ENV = "production";
|
||||
WEBMENTION_TOKEN = "VeryCoolToken";
|
||||
};
|
||||
serviceConfig = {
|
||||
User = "caddy";
|
||||
Type = "oneshot";
|
||||
ExecStart = "cd blog && npm install && hugo -d out && cp -fvr out/ /var/www/blog/ && exit 0";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -13,6 +13,15 @@
|
|||
http_port 81
|
||||
'';
|
||||
virtualHosts = {
|
||||
# My blog/about page
|
||||
"thehedgehog.me" = {
|
||||
extraConfig = ''
|
||||
file_server {
|
||||
root /var/www/blog/
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
# Adguard Home - Adblocking DNS Server
|
||||
"adguard.thehedgehog.me" = {
|
||||
extraConfig = ''
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
SOA = {
|
||||
nameServer = "ns1.thehedgehog.me.";
|
||||
adminEmail = "me@thehedgehog.me";
|
||||
serial = 2022071014;
|
||||
serial = 2022071201;
|
||||
# Refresh the records every hour
|
||||
refresh = 3600;
|
||||
# If retry fails, retry after 10 minutes
|
||||
|
@ -103,6 +103,7 @@
|
|||
sync = prefect;
|
||||
todo = prefect;
|
||||
vpn = prefect;
|
||||
wm = prefect;
|
||||
|
||||
# Externally hosted services
|
||||
## Statuspage, hosted at PikaPods
|
||||
|
|
Loading…
Reference in a new issue