feat: backups wake and sleep device
This commit is contained in:
parent
83c51f89a9
commit
a9f6470dc2
2 changed files with 13 additions and 1 deletions
|
|
@ -43,7 +43,16 @@
|
|||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
WakeSystem = true;
|
||||
RandomizedDelaySec = "5h";
|
||||
};
|
||||
backupCleanupCommand = ''
|
||||
loginctl list-sessions --no-legend | awk '{print $1}' | while read -r s; do
|
||||
class=$(loginctl show-session "$s" -p Class --value)
|
||||
if [ "$class" = "user" ]; then
|
||||
loginctl show-session "$s" -p LockedHint --value
|
||||
fi
|
||||
done | grep -qx no && echo "unlocked session found — skip suspend" || systemctl suspend
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ username, ... }:
|
||||
{ username, pkgs, ... }:
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
|
|
@ -6,6 +6,9 @@
|
|||
enable = true;
|
||||
theme = "nanotech";
|
||||
};
|
||||
initContent = ''
|
||||
${pkgs.pfetch}/bin/pfetch
|
||||
'';
|
||||
sessionVariables = {
|
||||
SSH_AUTH_SOCK = "/home/${username}/.bitwarden-ssh-agent.sock";
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue