feat[client]: push to attic automatically

This commit is contained in:
Leon Schwarzäugl 2025-12-23 02:50:16 +01:00 committed by Leon Schwarzäugl
parent 1cc890ea9d
commit 3cad9a6720
3 changed files with 115 additions and 2 deletions

View file

@ -0,0 +1,24 @@
{ lib, config, pkgs, ... }:
{
options.swarselmodules.attic-store-push = lib.mkEnableOption "enable automatic attic store push";
config = lib.mkIf config.swarselmodules.attic-store-push {
systemd.user.services.attic-store-push = {
Unit = {
Description = "Attic store pusher";
Requires = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ];
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${lib.getExe pkgs.attic-client} watch-store ${config.swarselsystems.mainUser}:${config.swarselsystems.mainUser}";
};
};
};
}