feat: journalctl

This commit is contained in:
punkfairie 2025-05-27 17:30:05 -07:00
parent bcab411b3a
commit 23c028f620
Signed by: punkfairie
GPG key ID: B3C5488E9A1A7CA6
4 changed files with 21 additions and 16 deletions

View file

@ -21,6 +21,7 @@ in {
gpg = enabled; gpg = enabled;
httpie = enabled; httpie = enabled;
hyfetch = enabled; hyfetch = enabled;
journalctl = enabled;
nh = enabled; nh = enabled;
}; };
} }

View file

@ -15,6 +15,7 @@
./gpg.nix ./gpg.nix
./httpie.nix ./httpie.nix
./hyfetch ./hyfetch
./journalctl.nix
./nemo.nix ./nemo.nix
./nh.nix ./nh.nix
./waybar.nix ./waybar.nix

View file

@ -0,0 +1,19 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.marleyos.programs.journalctl;
in {
options.marleyos.programs.journalctl.enable = lib.mkEnableOption "journalctl";
config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
home.shellAbbrs = rec {
jctlf = "journalctl --follow --unit";
jctle = "journalctl --pager-end --unit";
sjctlf = "sudo ${jctlf}";
sjctle = "sudo ${jctle}";
};
};
}

View file

@ -1,16 +0,0 @@
{
lib,
config,
...
}: let
cfg = config.marleyos.programs.journalctl;
in {
options.marleyos.programs.journalctl.enable = lib.mkEnableOption "journalctl";
config = lib.mkIf cfg.enable {
home.shellAbbrs = {
jctlf = "sudo journalctl --follow --unit";
jctle = "sudo journalctl --pager-end --unit";
};
};
}