Break juri apart and add scaffolding for system timers
This commit is contained in:
parent
863101b6f6
commit
54c04f9c02
3 changed files with 96 additions and 67 deletions
23
hosts/juri/bskyannouncements.nix
Normal file
23
hosts/juri/bskyannouncements.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
systemd.timers."bsky-announcements" = {
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
timerConfig = {
|
||||||
|
OnBootSec = "20s";
|
||||||
|
# OnCalendar = "Thu *-*-* 8:00:00 America/Los_Angeles";
|
||||||
|
# Persistent = true;
|
||||||
|
Unit = "bsky-announcements.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services."bsky-announcements" = {
|
||||||
|
script = ''
|
||||||
|
set -eu
|
||||||
|
${pkgs.coreutils}/bin/echo "Hello World"
|
||||||
|
'';
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
User = "root";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
{ config, ... }:
|
{ ... }:
|
||||||
let
|
{
|
||||||
email = "admin@woach.me";
|
|
||||||
in {
|
|
||||||
imports = [
|
imports = [
|
||||||
./hardware.nix ];
|
./hardware.nix
|
||||||
|
./webservices.nix
|
||||||
|
./bskyannouncements.nix
|
||||||
|
];
|
||||||
system.stateVersion = "24.11";
|
system.stateVersion = "24.11";
|
||||||
system.timezone = "America/Los_Angeles";
|
system.timezone = "America/Los_Angeles";
|
||||||
system.users.bigWheels = [ "pan" ];
|
system.users.bigWheels = [ "pan" ];
|
||||||
|
|
@ -20,67 +21,6 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
caddy = {
|
|
||||||
enable = true;
|
|
||||||
adminEmail = email;
|
|
||||||
vhosts = {
|
|
||||||
"juri.woach.me" = {
|
|
||||||
extraConfig = ''
|
|
||||||
reverse_proxy :3000
|
|
||||||
'';
|
|
||||||
serverAliases = [ "*.juri.woach.me" ];
|
|
||||||
};
|
|
||||||
"winry.woach.me" = {
|
|
||||||
extraConfig = ''
|
|
||||||
reverse_proxy :${builtins.toString config.forgejo.server.port}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
"ginko.woach.me" = {
|
|
||||||
extraConfig = ''
|
|
||||||
reverse_proxy :${builtins.toString config.headscale.server.port}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
pds = {
|
|
||||||
enable = true;
|
|
||||||
hostname = "juri.woach.me";
|
|
||||||
adminEmail = email;
|
|
||||||
environmentFile = config.sops.secrets.pdsEnv.path;
|
|
||||||
};
|
|
||||||
|
|
||||||
forgejo = {
|
|
||||||
enable = true;
|
|
||||||
server.domain = "winry.woach.me";
|
|
||||||
users.admin = {
|
|
||||||
enable = true;
|
|
||||||
username = "Julia";
|
|
||||||
passwordFile = config.sops.secrets.forgejoPassword.path;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
headscale = {
|
|
||||||
enable = true;
|
|
||||||
server.domain = "ginko.woach.me";
|
|
||||||
};
|
|
||||||
|
|
||||||
syncthing = {
|
|
||||||
enable = true;
|
|
||||||
devices = {
|
|
||||||
"homura".id = "NEP24DB-DVXAHTZ-TCCNREQ-Q5TSC7K-ZXPWC4L-5ELGKQX-4I2P47O-2FT5QAU";
|
|
||||||
"onizuka".id = "5S6QMND-MHD2HYR-DR6KQD4-6AWJTRL-FQUCR7W-FD2KBT3-AF6RE6R-F47KBQC";
|
|
||||||
};
|
|
||||||
|
|
||||||
folders = {
|
|
||||||
"wiki" = {
|
|
||||||
path = "/var/lib/wiki";
|
|
||||||
devices = [ "homura" "onizuka" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
systemd.tmpfiles.rules = [ "d /var/lib/wiki 0755 syncthing syncthing -" ];
|
|
||||||
|
|
||||||
postgres.enable = true;
|
postgres.enable = true;
|
||||||
|
|
||||||
shell.enabledShells = [ "fish" ];
|
shell.enabledShells = [ "fish" ];
|
||||||
|
|
|
||||||
66
hosts/juri/webservices.nix
Normal file
66
hosts/juri/webservices.nix
Normal file
|
|
@ -0,0 +1,66 @@
|
||||||
|
{ config, ... }:
|
||||||
|
let
|
||||||
|
email = "admin@woach.me";
|
||||||
|
in {
|
||||||
|
caddy = {
|
||||||
|
enable = true;
|
||||||
|
adminEmail = email;
|
||||||
|
vhosts = {
|
||||||
|
"juri.woach.me" = {
|
||||||
|
extraConfig = ''
|
||||||
|
reverse_proxy :3000
|
||||||
|
'';
|
||||||
|
serverAliases = [ "*.juri.woach.me" ];
|
||||||
|
};
|
||||||
|
"winry.woach.me" = {
|
||||||
|
extraConfig = ''
|
||||||
|
reverse_proxy :${builtins.toString config.forgejo.server.port}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
"ginko.woach.me" = {
|
||||||
|
extraConfig = ''
|
||||||
|
reverse_proxy :${builtins.toString config.headscale.server.port}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
pds = {
|
||||||
|
enable = true;
|
||||||
|
hostname = "juri.woach.me";
|
||||||
|
adminEmail = email;
|
||||||
|
environmentFile = config.sops.secrets.pdsEnv.path;
|
||||||
|
};
|
||||||
|
|
||||||
|
forgejo = {
|
||||||
|
enable = true;
|
||||||
|
server.domain = "winry.woach.me";
|
||||||
|
users.admin = {
|
||||||
|
enable = true;
|
||||||
|
username = "Julia";
|
||||||
|
passwordFile = config.sops.secrets.forgejoPassword.path;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
headscale = {
|
||||||
|
enable = true;
|
||||||
|
server.domain = "ginko.woach.me";
|
||||||
|
};
|
||||||
|
|
||||||
|
syncthing = {
|
||||||
|
enable = true;
|
||||||
|
devices = {
|
||||||
|
"homura".id = "NEP24DB-DVXAHTZ-TCCNREQ-Q5TSC7K-ZXPWC4L-5ELGKQX-4I2P47O-2FT5QAU";
|
||||||
|
"onizuka".id = "5S6QMND-MHD2HYR-DR6KQD4-6AWJTRL-FQUCR7W-FD2KBT3-AF6RE6R-F47KBQC";
|
||||||
|
};
|
||||||
|
|
||||||
|
folders = {
|
||||||
|
"wiki" = {
|
||||||
|
path = "/var/lib/wiki";
|
||||||
|
devices = [ "homura" "onizuka" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.tmpfiles.rules = [ "d /var/lib/wiki 0755 syncthing syncthing -" ];
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue