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" ];
fs.".profile".symlink.text = lib.mkIf cfg.config.showOnLogin ''
if [ -z "$SSH_TTY" ]; then
sane-deadlines
fi
maybeShowDeadlines() {
if [ -z "$SSH_TTY" ]; then
sane-deadlines
fi
}
sessionCommands+=('maybeShowDeadlines')
'';
};
}

View File

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