nix/overlay: add posh and use podman/conman from master
This commit is contained in:
parent
1c84c702d0
commit
352a0ed5e1
1 changed files with 31 additions and 6 deletions
|
@ -23,15 +23,9 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
|
||||
|
||||
podman = nixpkgs-master.podman;
|
||||
conmon = nixpkgs-master.conmon;
|
||||
|
||||
duplicacy = super.callPackage ./pkgs/duplicacy {};
|
||||
just = super.callPackage ./pkgs/just.nix {};
|
||||
mfcl3770cdw = super.callPackage ./pkgs/mfcl3770cdw.nix {};
|
||||
slirp4netns = super.callPackage ./pkgs/slirp4netns.nix {};
|
||||
staruml = super.callPackage ./pkgs/staruml.nix { inherit (super.gnome2) GConf; libgcrypt = super.libgcrypt_1_5; };
|
||||
|
||||
roxterm = super.stdenv.mkDerivation {
|
||||
|
@ -76,4 +70,35 @@ in {
|
|||
facetimehd-firmware = super.hello;
|
||||
|
||||
qtile = nixpkgs-master.qtile;
|
||||
|
||||
inherit (nixpkgs-master) podman conmon slirp4netns;
|
||||
|
||||
# posh makes use of podman to run an encapsulated shell session
|
||||
posh = { image, pull ? "always", global_args ? "", run_args ? "" }:
|
||||
(super.writeScriptBin "posh" ''
|
||||
#! ${super.bash}/bin/bash
|
||||
source /etc/profile
|
||||
|
||||
tty -s && tty="-t" || quiet="-q"
|
||||
|
||||
POSH_IMAGE=${image}
|
||||
POSH_PULL=${pull}
|
||||
|
||||
if [ "$1" == "-c" ]; then
|
||||
# we've most likely been spawned by sshd
|
||||
# $2 contains the command string
|
||||
shift
|
||||
# TODO: make the variables overridable via the command_string
|
||||
fi
|
||||
|
||||
exec ${self.podman}/bin/podman \
|
||||
${global_args} run --rm -i $tty -v ~/:/root -w /root --pull=always --network host --pull=''${POSH_PULL} \
|
||||
${run_args} ''${POSH_IMAGE} $@
|
||||
'')
|
||||
.overrideAttrs(attrs: attrs // {
|
||||
passthru = {
|
||||
shellPath = "/bin/posh";
|
||||
};
|
||||
});
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue