diff options
| -rw-r--r-- | hosts/mercury/config.nix | 6 | ||||
| -rw-r--r-- | modules/user/nixos/default.nix | 5 | ||||
| -rw-r--r-- | modules/user/options.nix | 4 |
3 files changed, 10 insertions, 5 deletions
diff --git a/hosts/mercury/config.nix b/hosts/mercury/config.nix index 338ec7f..e5e0b17 100644 --- a/hosts/mercury/config.nix +++ b/hosts/mercury/config.nix @@ -1,7 +1,11 @@ { collinux = { theme = "catppuccin"; - user.name = "collin"; + + user = { + name = "collin"; + useRun0 = true; + }; desktop = { wallpaper = ./wallpapers/abstract-swirls.jpg; diff --git a/modules/user/nixos/default.nix b/modules/user/nixos/default.nix index f9a3940..4edd535 100644 --- a/modules/user/nixos/default.nix +++ b/modules/user/nixos/default.nix @@ -19,9 +19,8 @@ in { # sudo security = { sudo.enable = false; - sudo-rs.enable = false; - - run0.enableSudoAlias = true; + sudo-rs.enable = !cfg.useRun0; + run0.enableSudoAlias = cfg.useRun0; }; time.timeZone = "America/Chicago"; diff --git a/modules/user/options.nix b/modules/user/options.nix index d805bf9..31f166d 100644 --- a/modules/user/options.nix +++ b/modules/user/options.nix @@ -1,5 +1,5 @@ {lib, ...}: let - inherit (lib) mkOption types; + inherit (lib) mkEnableOption mkOption types; in { options = { collinux.user = { @@ -12,6 +12,8 @@ in { type = types.bool; default = true; }; + + useRun0 = mkEnableOption "whether to use systemd's run0 instead of sudo-rs"; }; }; } |
