From 293ce7006c3fc780471ee609879bffc90aeaa4a7 Mon Sep 17 00:00:00 2001 From: shenmo Date: Sun, 7 Jun 2026 21:27:49 +0800 Subject: [PATCH] =?UTF-8?q?chore(nix/module):=20=E4=B8=BAamber-pm=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E6=B7=BB=E5=8A=A0=E8=BF=90=E8=A1=8C=E6=97=B6=E4=BE=9D?= =?UTF-8?q?=E8=B5=96PATH?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将常用工具加入运行时PATH,确保activation脚本可以正常调用依赖命令 --- nix/module.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nix/module.nix b/nix/module.nix index 4a92ad4..01795ad 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -7,6 +7,17 @@ let cfg = config.programs.amber-pm; + + aceRuntimePath = lib.makeBinPath (with pkgs; [ + bash + bubblewrap + coreutils + gawk + gnugrep + gnused + gnutar + sudo + ]); in { options.programs.amber-pm = { @@ -29,6 +40,7 @@ in boot.kernel.sysctl."kernel.apparmor_restrict_unprivileged_userns" = lib.mkDefault 0; system.activationScripts.amber-pm-state = lib.mkIf cfg.initializeState '' + export PATH="${aceRuntimePath}:$PATH" target="/var/lib/apm/apm" version_file="$target/.amber-pm-version" current_version="${cfg.package.version}"