Skip to content

Commit

Permalink
users: add option to run systemctl --failed on login (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 authored Oct 24, 2024
1 parent 9a8e3d8 commit c459609
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions modules/users.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{ config, lib, ... }:

{
options = {
users.showFailedUnitsOnLogin = lib.mkEnableOption "show failed systemd units on interactive login";
};

config = lib.mkIf config.users.showFailedUnitsOnLogin {
environment.interactiveShellInit = /* sh */ ''
# raise some awareness towards failed services
systemctl --no-pager --failed || true
'';
};
}

0 comments on commit c459609

Please sign in to comment.