From 629387a38b3a434e851ebc7858e5a7018abce84d Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 5 Feb 2025 13:30:53 +0000 Subject: [PATCH] timers and services are working --- hosts/x86_64/edi/configuration.nix | 55 +++++++++++++++++------------- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/hosts/x86_64/edi/configuration.nix b/hosts/x86_64/edi/configuration.nix index 17d1a53..3e71813 100644 --- a/hosts/x86_64/edi/configuration.nix +++ b/hosts/x86_64/edi/configuration.nix @@ -119,32 +119,39 @@ ## These are disabled currently as I am testing this. -# systemd.user.services.website-git-update = { -# enable = true; -# description = "runs git to pull latest website changes"; -# serviceConfig = { -# ExecStart = "/run/current-system/sw/bin/git -C /mnt/DATA/Website/ahoneybun.net pull"; -# }; -# wantedBy = [ "multi-user.target" ]; -# }; + systemd.user.services."website-git-update" = { + enable = false; + description = "website-git-update runs git to pull latest website changes"; + serviceConfig = { + ExecStart = "/run/current-system/sw/bin/git -C /mnt/DATA/Website/ahoneybun.net pull"; + }; + wantedBy = [ "default.target" ]; + }; -# systemd.timers."website-git-update" = { -# wantedBy = [ "timers.target" ]; -# timerConfig = { -# OnBootSec = "15m"; -# OnUnitActiveSec = "15m"; -# Unit = "website-git-update.service"; -# }; -# }; + systemd.user.timers."website-git-update" = { + wantedBy = [ "timers.target" ]; + timerConfig = { + OnBootSec = "15m"; + OnUnitActiveSec = "15m"; + }; + }; -# systemd.services.zola-build = { -# enable = true; -# description = "rebuild zola website"; -# serviceConfig = { -# ExecStart = "/run/current-system/sw/bin/zola -r /mnt/DATA/Website/ahoneybun.net build"; -# }; -# wantedBy = [ "multi-user.target" ]; -# }; + systemd.user.services."website-zola-build" = { + enable = false; + description = "rebuild zola website"; + serviceConfig = { + ExecStart = "/run/current-system/sw/bin/zola -r /mnt/DATA/Website/ahoneybun.net build"; + }; + wantedBy = [ "default.target" ]; + }; + + systemd.user.timers."website-zola-build" = { + wantedBy = [ "timers.target" ]; + timerConfig = { + OnBootSec = "30m"; + OnUnitActiveSec = "30m"; + }; + }; # System system.stateVersion = "24.11";