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 ''
if [ -z "$SSH_TTY" ]; then maybeShowDeadlines() {
sane-deadlines if [ -z "$SSH_TTY" ]; then
fi sane-deadlines
fi
}
sessionCommands+=('maybeShowDeadlines')
''; '';
}; };
} }

View File

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