From 588ed29f965eb9f7052acb66ece47d65f1b48058 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Mon, 10 Feb 2025 21:12:24 -0800 Subject: [PATCH] feat: switch back to upstream nh and use doas-sudo-shim --- flake.lock | 21 --------------------- flake.nix | 5 ----- modules/linux/core/default.nix | 10 +++++----- 3 files changed, 5 insertions(+), 31 deletions(-) diff --git a/flake.lock b/flake.lock index 2dc5e8e..4cd597c 100644 --- a/flake.lock +++ b/flake.lock @@ -648,26 +648,6 @@ "type": "github" } }, - "nh-doas": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1738564910, - "narHash": "sha256-rd1pnAiRYolXH1R1Zbs6UQFjW1b5DdEJeyq2udUnjCo=", - "owner": "youwen5", - "repo": "nh", - "rev": "f4d93dfda62f034bbc08dc3bfea78213ec99b3be", - "type": "github" - }, - "original": { - "owner": "youwen5", - "repo": "nh", - "type": "github" - } - }, "nix-darwin": { "inputs": { "nixpkgs": [ @@ -943,7 +923,6 @@ "homebrew-core": "homebrew-core", "lanzaboote": "lanzaboote", "musnix": "musnix", - "nh-doas": "nh-doas", "nix-darwin": "nix-darwin", "nix-flatpak": "nix-flatpak", "nix-homebrew": "nix-homebrew", diff --git a/flake.nix b/flake.nix index 7f5fb2f..fe213c4 100755 --- a/flake.nix +++ b/flake.nix @@ -106,11 +106,6 @@ url = "github:musnix/musnix"; inputs.nixpkgs.follows = "nixpkgs"; }; - - nh-doas = { - url = "github:youwen5/nh"; - inputs.nixpkgs.follows = "nixpkgs"; - }; }; outputs = diff --git a/modules/linux/core/default.nix b/modules/linux/core/default.nix index 484c852..2dea298 100644 --- a/modules/linux/core/default.nix +++ b/modules/linux/core/default.nix @@ -65,7 +65,8 @@ in ] ++ [ config.liminalOS.defaultEditor - ]; + ] + ++ lib.optionals cfg.replaceSudoWithDoas [ doas-sudo-shim ]; # tells electron apps to use Wayland environment.sessionVariables = lib.mkIf cfg.waylandFixes { @@ -129,12 +130,11 @@ in extraArgs = "--keep-since 4d --keep 3"; }; flake = config.liminalOS.flakeLocation; - package = lib.mkIf config.security.doas.enable inputs.nh-doas.packages.${pkgs.system}.default; }; - environment.variables = lib.mkIf (cfg.useNh && config.security.doas.enable) { - NH_FLAKE = config.programs.nh.flake; - }; + # environment.variables = lib.mkIf (cfg.useNh && config.security.doas.enable) { + # NH_FLAKE = config.programs.nh.flake; + # }; programs.nix-ld = { enable = true;