mirror of
https://gitee.com/amber-ce/amber-pm
synced 2026-06-21 21:53:55 +08:00
chore(nix/module): 为amber-pm模块添加运行时依赖PATH
将常用工具加入运行时PATH,确保activation脚本可以正常调用依赖命令
This commit is contained in:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user