From d142a451a6c01e1874a2fecb56333286fdee60b3 Mon Sep 17 00:00:00 2001 From: Don Harper Date: Sat, 13 Dec 2025 18:21:02 -0600 Subject: [PATCH] hosts | moved systemd-primary up one, and point workstation and server at it --- hosts/server/default.nix | 4 +- hosts/{server => }/systemd-primary.nix | 0 hosts/workstation/default.nix | 2 +- hosts/workstation/systemd-primary.nix | 72 -------------------------- 4 files changed, 3 insertions(+), 75 deletions(-) rename hosts/{server => }/systemd-primary.nix (100%) delete mode 100644 hosts/workstation/systemd-primary.nix diff --git a/hosts/server/default.nix b/hosts/server/default.nix index 839bc5a..b8fb0e7 100644 --- a/hosts/server/default.nix +++ b/hosts/server/default.nix @@ -34,11 +34,11 @@ in { }; imports = [ ../../home - ./systemd.nix ../vars.nix + ./systemd.nix + ../systemd-primary.nix # ./tailscale.nix ./upgrade-diff.nix - ./systemd-primary.nix ../../modules/beszel-agent.nix ]; diff --git a/hosts/server/systemd-primary.nix b/hosts/systemd-primary.nix similarity index 100% rename from hosts/server/systemd-primary.nix rename to hosts/systemd-primary.nix diff --git a/hosts/workstation/default.nix b/hosts/workstation/default.nix index 6b9f5b2..6b01506 100644 --- a/hosts/workstation/default.nix +++ b/hosts/workstation/default.nix @@ -49,7 +49,7 @@ in { ./kmscon.nix ./ollama.nix ./systemd.nix - ./systemd-primary.nix + ../systemd-primary.nix ./auto-cpufreq.nix ./tlp.nix ./upgrade-diff.nix diff --git a/hosts/workstation/systemd-primary.nix b/hosts/workstation/systemd-primary.nix deleted file mode 100644 index d85ced6..0000000 --- a/hosts/workstation/systemd-primary.nix +++ /dev/null @@ -1,72 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: -with lib; let - cfg = config.primary; -in { - options.primary = {enable = mkEnableOption "is primary host";}; - config = mkIf cfg.enable { - systemd = { - user = { - services = { - do_agenda = { - description = "Send today's agenda"; - unitConfig = {Type = "simple";}; - serviceConfig = { - Type = "oneshot"; - Environment = "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; - ExecStart = "/home/don/bin/do_agenda"; - }; - }; - do_agenda_tomorrow = { - description = "Send tomorrow's agenda"; - unitConfig = {Type = "simple";}; - serviceConfig = { - Type = "oneshot"; - Environment = "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; - ExecStart = "/home/don/bin/do_agenda.tomorrow"; - }; - }; - gosleep = { - description = "Adjust tailscale MTU based on location"; - unitConfig = {Type = "simple";}; - serviceConfig = { - Type = "oneshot"; - Environment = "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; - ExecStart = "/home/don/bin/gosleep"; - }; - }; - }; - timers = { - do_agenda = { - wantedBy = ["timers.target"]; - partOf = ["do_agenda.service"]; - timerConfig = { - OnCalendar = "05:00"; - Unit = "do_agenda.service"; - }; - }; - do_agenda_tomorrow = { - wantedBy = ["timers.target"]; - partOf = ["do_agenda_tomorrow.service"]; - timerConfig = { - OnCalendar = "20:00"; - Unit = "do_agenda_tomorrow.service"; - }; - }; - gosleep = { - wantedBy = ["timers.target"]; - partOf = ["gosleep.service"]; - timerConfig = { - OnCalendar = "1m"; - Unit = "gosleep.service"; - }; - }; - }; - }; - }; - }; -}