diff --git a/modules/home/profiles.nix b/modules/home/profiles.nix index 7a74634..f526b7a 100644 --- a/modules/home/profiles.nix +++ b/modules/home/profiles.nix @@ -30,6 +30,7 @@ in { ripgrep = enabled; ssh = enabled; starship = enabled; + systemctl = enabled; }; } # diff --git a/modules/home/programs/default.nix b/modules/home/programs/default.nix index 9fc68d3..2004176 100644 --- a/modules/home/programs/default.nix +++ b/modules/home/programs/default.nix @@ -27,6 +27,7 @@ ./ripgrep.nix ./ssh.nix ./starship + ./systemctl.nix ./waybar.nix # TODO: uncomment when swaylock is figured out diff --git a/modules/home/programs/systemctl.nix b/modules/home/programs/systemctl.nix new file mode 100644 index 0000000..e5e27b6 --- /dev/null +++ b/modules/home/programs/systemctl.nix @@ -0,0 +1,30 @@ +{ + config, + lib, + pkgs, + ... +}: let + cfg = config.marleyos.programs.systemctl; +in { + options.marleyos.programs.systemctl.enable = lib.mkEnableOption "systemctl"; + + config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) { + home.shellAbbrs = rec { + sctl = "systemctl"; + sctls = "systemctl status"; + sctle = "systemctl enable --now"; + sctld = "systemctl disable --now"; + sctlr = "systemctl restart"; + sctla = "systemctl start"; + sctlo = "systemctl stop"; + + ssctl = "sudo ${sctl}"; + ssctls = "sudo ${sctls}"; + ssctle = "sudo ${sctle}"; + ssctld = "sudo ${sctld}"; + ssctlr = "sudo ${sctlr}"; + ssctla = "sudo ${sctla}"; + ssctlo = "sudo ${sctlo}"; + }; + }; +} diff --git a/snowflake/modules/home/programs/cli/systemctl/default.nix b/snowflake/modules/home/programs/cli/systemctl/default.nix deleted file mode 100644 index b268770..0000000 --- a/snowflake/modules/home/programs/cli/systemctl/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - lib, - config, - ... -}: let - cfg = config.marleyos.programs.systemctl; -in { - options.marleyos.programs.systemctl.enable = lib.mkEnableOption "systemctl"; - - config = lib.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"; - }; - }; -}