sane-deadlines, sane-sysload: fix ordering to not run before the environment is configured

This commit is contained in:
2024-08-02 01:04:07 +00:00
parent 48cc718700
commit 2ee1fb17c4
2 changed files with 14 additions and 8 deletions

View File

@@ -19,9 +19,12 @@ in
sandbox.extraHomePaths = [ "knowledge/planner/deadlines.tsv" ]; sandbox.extraHomePaths = [ "knowledge/planner/deadlines.tsv" ];
fs.".profile".symlink.text = lib.mkIf cfg.config.showOnLogin '' fs.".profile".symlink.text = lib.mkIf cfg.config.showOnLogin ''
maybeShowDeadlines() {
if [ -z "$SSH_TTY" ]; then if [ -z "$SSH_TTY" ]; then
sane-deadlines sane-deadlines
fi fi
}
sessionCommands+=('maybeShowDeadlines')
''; '';
}; };
} }

View File

@@ -7,11 +7,14 @@
"/sys/devices" "/sys/devices"
]; ];
fs.".profile".symlink.text = '' fs.".profile".symlink.text = ''
maybeShowSysload() {
# show ssh users the current resource usage. # show ssh users the current resource usage.
# especially useful for moby (to see battery) # especially useful for moby (to see battery)
if [ -n "$SSH_TTY" ]; then if [ -n "$SSH_TTY" ]; then
sane-sysload sane-sysload
fi fi
}
sessionCommands+=('maybeShowSysload')
''; '';
}; };
} }