diff options
author | Azat Bahawi <azat@bahawi.net> | 2024-04-21 02:15:42 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2024-04-21 02:15:42 +0300 |
commit | e6ed60548397627bf10f561f9438201dbba0a36e (patch) | |
tree | f9a84c5957d2cc4fcd148065ee9365a0c851ae1c /modules/nixos/psd.nix | |
parent | 2024-04-18 (diff) |
2024-04-21
Diffstat (limited to 'modules/nixos/psd.nix')
-rw-r--r-- | modules/nixos/psd.nix | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/modules/nixos/psd.nix b/modules/nixos/psd.nix deleted file mode 100644 index f974af2..0000000 --- a/modules/nixos/psd.nix +++ /dev/null @@ -1,65 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; -let - cfg = config.nixfiles.modules.psd; -in -{ - options.nixfiles.modules.psd.enable = mkEnableOption "Profile Sync Daemon"; - - config = mkIf cfg.enable { - hm = { - home.packages = with pkgs; [ profile-sync-daemon ]; - - xdg.configFile."psd/psd.conf".text = '' - USE_OVERLAYFS="yes" - ''; - }; - - systemd.user = { - services = - let - exe = getExe' pkgs.profile-sync-daemon "profile-sync-daemon"; - in - { - psd = { - unitConfig = { - Description = "Profile-sync-daemon"; - Wants = [ "psd-resync.service" ]; - RequiresMountsFor = "/home/"; - After = [ "local-fs.target" ]; - }; - serviceConfig = { - RemainAfterExit = true; - ExecStart = "${exe} startup"; - ExecStop = "${exe} unsync"; - }; - wantedBy = [ "graphical.target" ]; - }; - - psd-resync = { - unitConfig = { - Description = "Profile-sync-daemon resync"; - After = [ "psd.service" ]; - Wants = [ "psd-resync.timer" ]; - BindsTo = [ "psd.service" ]; - }; - serviceConfig.ExecStart = "${exe} resync"; - wantedBy = [ "graphical.target" ]; - }; - }; - - timers.psd-resync = { - unitConfig = { - Description = "Profile-sync-daemon resync timer"; - BindsTo = [ "psd.service" ]; - }; - timerConfig.OnUnitActiveSec = "1h"; - }; - }; - }; -} |