feat(home): Journalctl & Systemctl
This commit is contained in:
parent
4dd208ca1b
commit
a3979f544a
3 changed files with 49 additions and 21 deletions
22
modules/home/programs/journalctl/default.nix
Normal file
22
modules/home/programs/journalctl/default.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
27
modules/home/programs/systemctl/default.nix
Normal file
27
modules/home/programs/systemctl/default.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue