diff --git a/hosts/common/programs/sane-deadlines.nix b/hosts/common/programs/sane-deadlines.nix index 77e32fbf3..61edd24eb 100644 --- a/hosts/common/programs/sane-deadlines.nix +++ b/hosts/common/programs/sane-deadlines.nix @@ -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') ''; }; } diff --git a/hosts/common/programs/sane-sysload.nix b/hosts/common/programs/sane-sysload.nix index b5b754caa..8aafc8be0 100644 --- a/hosts/common/programs/sane-sysload.nix +++ b/hosts/common/programs/sane-sysload.nix @@ -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') ''; }; }