add diwan module: packages + scheduled tick via systemd timer
New modules/ai/diwan.nix: pulls in the diwan flake's package, requires ai.pi and ai.herdr (diwan's real runtime dependencies, not optional extras), and exposes notesDir (DIWAN_NOTES_DIR, required) / cadence (systemd OnCalendar, default hourly) / user (default the host's primary user) as options, wiring a systemd.timer + oneshot systemd.service that runs 'diwan tick'. diwan.url is a temporary path: input (see the flake.nix TODO) -- switch to a real git remote before deploying to any host that isn't this one. Verified via nix eval against an extended thingvellir config: pi/herdr get force-enabled, cadence flows through to OnCalendar, notesDir flows through to the service environment and WorkingDirectory, ExecStart resolves to the real built diwan package.
This commit is contained in:
1 parent
7c58561dc5
commit
83e6c8c140
3 files changed
+101
No files matched your search
@@ -5,6 +5,7 @@
|
||||
|
||||
# - Nixpkgs ----------------------------------
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
|
||||
# - Home Manager -----------------------------
|
||||
home-manager.url = "github:nix-community/home-manager/release-26.05";
|
||||
@@ -43,6 +44,14 @@
|
||||
# - Herdr -------------------------------------
|
||||
herdr.url = "github:herdrdev/herdr";
|
||||
|
||||
# - Diwan -------------------------------------
|
||||
# TODO: switch to a real git remote (e.g. git.samfelag.xyz) once diwan
|
||||
# is pushed there -- a local path: input only resolves on whatever
|
||||
# machine evaluates this flake, which breaks on hosts (like thingvellir)
|
||||
# that clone and build samfelag themselves.
|
||||
diwan.url = "path:/home/marc/projects/diwan";
|
||||
diwan.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
};
|
||||
|
||||
outputs = inputs @ { self, nixpkgs, home-manager, ... }:
|
||||
|
||||
Reference in new issue
Block a user