diff --git a/nixos/modules/services/enthalpy/services.nix b/nixos/modules/services/enthalpy/services.nix index 1c4bd6c..9b9524e 100644 --- a/nixos/modules/services/enthalpy/services.nix +++ b/nixos/modules/services/enthalpy/services.nix @@ -118,5 +118,17 @@ in wantedBy = [ "multi-user.target" ]; }; }) + + (mkIf (cfg.users != { }) { + environment.systemPackages = with pkgs; [ + (pkgs.writeShellApplication { + name = "netns-run-default"; + runtimeInputs = with pkgs; [ util-linux ]; + text = '' + pkexec nsenter -t $$ -e --mount=/proc/1/ns/mnt --net=/proc/1/ns/net -S "$(id -u)" -G "$(id -g)" --wdns="$PWD" "$@" + ''; + }) + ]; + }) ]); }