feat(home): Journalctl & Systemctl

This commit is contained in:
punkfairie 2024-11-15 22:18:13 -08:00
parent 4dd208ca1b
commit a3979f544a
Signed by: punkfairie
GPG key ID: A509E8F77FB9D696
3 changed files with 49 additions and 21 deletions

View file

@ -0,0 +1,22 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
cfg = config.${namespace}.programs.journalctl;
in
{
options.programs = mkEnableModule "journalctl";
config = mkIf cfg.enable {
home.shellAbbrs = {
jctlf = "sudo journalctl --follow --unit";
jctle = "sudo journalctl --pager-end --unit";
};
};
}

View file

@ -0,0 +1,27 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
cfg = config.${namespace}.programs.systemctl;
in
{
options.programs = mkEnableModule "systemctl";
config = mkIf cfg.enable {
home.shellAbbrs = {
sctl = "sudo systemctl";
sctls = "sudo systemctl status";
sctle = "sudo systemctl enable --now";
sctld = "sudo systemctl disable --now";
sctlr = "sudo systemctl restart";
sctla = "sudo systemctl start";
sctlo = "sudo systemctl stop";
};
};
}

View file

@ -1,21 +0,0 @@
{ ... }:
{
home.shellAbbrs = {
jctlf = "sudo journalctl --follow --unit";
jctle = "sudo journalctl --pager-end --unit";
sctl = "sudo systemctl";
sctls = "sudo systemctl status";
sctle = "sudo systemctl enable --now";
sctld = "sudo systemctl disable --now";
sctlr = "sudo systemctl restart";
sctla = "sudo systemctl start";
sctlo = "sudo systemctl stop";
};
imports = [
./clipboard.nix
./dunst.nix
./syncthing.nix
];
}