diff options
author | Joachim Fasting <joachifm@fastmail.fm> | 2019-10-05 18:32:22 +0200 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-03-14 03:09:48 +0000 |
commit | 1b575dbd79682cb347140ac9b45996d1f3abe501 (patch) | |
tree | bd7a9a58af9c92d09b02333d3d7b3e3934d5c12f /nixos | |
parent | 991bbef68351b4aa228f5f763c8d2ded2aeeb84e (diff) |
nixos/firejail: use local runCommand
Also: - use `runtimeShell`; and - remove unused `makeWrapper` input; and - `exec()` to shed wrapping shell
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/programs/firejail.nix | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/nixos/modules/programs/firejail.nix b/nixos/modules/programs/firejail.nix index 5e53f73379434..484f9eb444060 100644 --- a/nixos/modules/programs/firejail.nix +++ b/nixos/modules/programs/firejail.nix @@ -5,20 +5,20 @@ with lib; let cfg = config.programs.firejail; - wrappedBins = pkgs.stdenv.mkDerivation { - name = "firejail-wrapped-binaries"; - nativeBuildInputs = with pkgs; [ makeWrapper ]; - buildCommand = '' + wrappedBins = pkgs.runCommand "firejail-wrapped-binaries" + { preferLocalBuild = true; + allowSubstitutes = false; + } + '' mkdir -p $out/bin ${lib.concatStringsSep "\n" (lib.mapAttrsToList (command: binary: '' - cat <<_EOF >$out/bin/${command} - #!${pkgs.stdenv.shell} -e - /run/wrappers/bin/firejail ${binary} "\$@" - _EOF - chmod 0755 $out/bin/${command} + cat <<_EOF >$out/bin/${command} + #! ${pkgs.runtimeShell} -e + exec /run/wrappers/bin/firejail ${binary} "\$@" + _EOF + chmod 0755 $out/bin/${command} '') cfg.wrappedBinaries)} ''; - }; in { options.programs.firejail = { |