Last active
May 25, 2023 16:19
-
-
Save zmej420/5719367a9788ddd659db7c8c0107ed37 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run histdb-sync as zmej420 every hour to share zsh history across my machines | |
{ | |
systemd = { | |
user.timers = { | |
histdb-sync = { | |
wantedBy = ["default.target"]; | |
unitConfig = { | |
Description = "sync zsh histdb"; | |
Requires = ["network-online.target"]; | |
}; | |
timerConfig = { | |
OnCalendar = ["*:00"]; | |
}; | |
}; | |
}; | |
user.services = { | |
histdb-sync = { | |
unitConfig = { | |
Description = "sync zsh histdb"; | |
ConditionUser = "zmej420"; | |
Requires = "network-online.target"; | |
}; | |
serviceConfig = { | |
Environment = "PATH=/run/current-system/sw/bin"; | |
ExecStart = "/run/current-system/sw/bin/zsh --login --interactive -c histdb-sync"; | |
}; | |
}; | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment