mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2026-04-14 21:29:12 +02:00
feat[client]: push to attic automatically
This commit is contained in:
parent
1cc890ea9d
commit
3cad9a6720
3 changed files with 115 additions and 2 deletions
24
modules/home/common/attic-store-push.nix
Normal file
24
modules/home/common/attic-store-push.nix
Normal 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}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue