Automate updating system flake
This commit is contained in:
parent
631bf8c848
commit
03988024dc
|
@ -14,10 +14,35 @@ let
|
||||||
openssh
|
openssh
|
||||||
bash
|
bash
|
||||||
nix
|
nix
|
||||||
|
nix-prefetch
|
||||||
];
|
];
|
||||||
in {
|
in {
|
||||||
# Setup hosts for gitea automation
|
# Setup hosts for gitea automation
|
||||||
networking.hosts = { "100.99.69.14" = [ "git.stranger.systems" ]; };
|
networking.hosts = { "100.99.69.14" = [ "git.stranger.systems" ]; };
|
||||||
|
|
||||||
|
# Automate updating the system flake
|
||||||
|
systemd.services."system-flake-update" = {
|
||||||
|
inherit environment;
|
||||||
|
inherit path;
|
||||||
|
script = ''
|
||||||
|
env
|
||||||
|
${repo-updater}/bin/repo-updater gitea@git.stranger.systems:nix/System.git trunk
|
||||||
|
'';
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
User = "nathan";
|
||||||
|
Group = "users";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.timers."system-flake-update" = {
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
partOf = [ "system-flake-update.service" ];
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = "Mon, 4:00";
|
||||||
|
Unit = "system-flake-update.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Automate updating rust utility flake
|
# Automate updating rust utility flake
|
||||||
systemd.services."rust-util-update" = {
|
systemd.services."rust-util-update" = {
|
||||||
inherit environment;
|
inherit environment;
|
||||||
|
|
Loading…
Reference in New Issue