{
  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}";
    };
  };
}
