This commit is contained in:
PapaTutuWawa 2022-01-14 18:08:47 +01:00
parent 9b8e0c4fd7
commit ed1f4f4fc6
8 changed files with 129 additions and 91 deletions

View File

@ -38,6 +38,8 @@
cantata cantata
newsflash newsflash
sublime-music-no-test sublime-music-no-test
psst
staruml-wrapped
]; ];
ptw = { ptw = {

View File

@ -43,6 +43,7 @@ in inputs.nixpkgs.lib.nixosSystem {
emacs.overlay emacs.overlay
(import ../packages) (import ../packages)
(import ../overlays/simple.nix) (import ../overlays/simple.nix)
(import ../overlays/sandbox.nix)
]; ];
} }

View File

@ -3,4 +3,5 @@
{ {
simple = import ./simple.nix; simple = import ./simple.nix;
surface = import ./surface.nix pkgs; surface = import ./surface.nix pkgs;
sandbox = import ./sandbox.nix;
} }

59
overlays/sandbox.nix Normal file
View File

@ -0,0 +1,59 @@
final: prev:
let
wrapInSandbox = prev.callPackage ../lib/sandbox.nix {};
in {
discord-wrapped = wrapInSandbox {
name = "discord";
package = prev.discord;
#package = discord-system-electron;
binaryName = "discord";
mountInHome = [ ".config/discord" ".config/BetterDiscord" ];
additionalBlacklist = [ "/mnt" ];
chdirTo = "/home/$USER";
version = "1.0.1";
copyIntoSandbox = [ "share/pixmaps" ];
desktopFileArgs = {
name = "Discord (wrapped)";
#exec = "discord";
icon = "discord";
desktopName = "Discord (wrapped)";
genericName = "Instant Messenger";
categories = "Network;InstantMessaging;";
};
};
minecraft-wrapped = wrapInSandbox {
name = "minecraft-launcher";
package = prev.minecraft;
binaryName = "minecraft-launcher";
mountInHome = [ ".local/share/minecraft" ".minecraft" ];
additionalBlacklist = [ "/mnt" ];
chdirTo = "/home/$USER";
};
steam-wrapped = wrapInSandbox {
name = "steam";
package = prev.steam;
binaryName = "steam";
mountInHome = [ ".steam" ".local/share/Steam" ];
additionalBlacklist = [ "/mnt" ];
additionalMounts = [ "/mnt/Storage/Games/SteamLibrary" ];
chdirTo = "/home/$USER";
extraEnv = {
DRI_PRIME = "1";
};
copyIntoSandbox = [ "/share" ];
};
android-studio-wrapped = wrapInSandbox {
name = "android-studio";
package = prev.android-studio;
binaryName = "android-studio";
additionalBlacklist = [ "/mnt" ];
mountInHome = [ "Development/Personal/Android" ".android" ];
chdirTo = "/home/$USER";
};
}

View File

@ -67,4 +67,26 @@ final: prev:
}) })
]; ];
}); });
# TODO: Remove once upstream has a new version tagged
kasts-git = prev.libsForQt5.kasts.overrideAttrs (old: {
src = let
commit = "b39be0118ef6ff587b433af185c584f3d5bcec30";
in builtins.fetchTarball {
url = "https://invent.kde.org/plasma-mobile/kasts/-/archive/${commit}/kasts-${commit}.tar.gz";
sha256 = "06myymbwj89357cpg7phha1x8q84mlhcy4f44pdkqmg7lkd5a6df";
};
buildInputs = old.buildInputs ++ [ prev.taglib prev.libsForQt5.qtkeychain ];
});
xournalpp-git = prev.xournalpp.overrideAttrs (old: {
version = "1.1.1";
src = prev.fetchFromGitHub {
owner = "bhennion";
repo = "xournalpp";
rev = "5d1545b0c4303e45b4ddf4ef8a1565eba822a9af";
sha256 = "1d17lvydlny9pvaxa9xy53wxs7i6d563lp5r9g3r1xpgnb7zli8v";
};
});
} }

View File

@ -9,7 +9,6 @@ let
extraStartupArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland"; extraStartupArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
#extraStartupArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-features=WebRTCPipeWireCapturer"; #extraStartupArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-features=WebRTCPipeWireCapturer";
}; };
wrapInSandbox = prev.callPackage ./sandbox.nix {};
in { in {
key-mapper = prev.callPackage ./tools/games/key-mapper {}; key-mapper = prev.callPackage ./tools/games/key-mapper {};
vfio-isolate = prev.callPackage ./tools/virtualisation/vfio-isolate {}; vfio-isolate = prev.callPackage ./tools/virtualisation/vfio-isolate {};
@ -31,90 +30,12 @@ key-mapper = prev.callPackage ./tools/games/key-mapper {};
pySmartDL = pySmartDL; pySmartDL = pySmartDL;
cfscrape = cfscrape; cfscrape = cfscrape;
}; };
discord-wrapped = wrapInSandbox {
name = "discord";
package = prev.discord;
#package = discord-system-electron;
binaryName = "discord";
mountInHome = [ ".config/discord" ".config/BetterDiscord" ];
additionalBlacklist = [ "/mnt" ];
chdirTo = "/home/$USER";
version = "1.0.1";
copyIntoSandbox = [ "share/pixmaps" ];
desktopFileArgs = {
name = "Discord (wrapped)";
#exec = "discord";
icon = "discord";
desktopName = "Discord (wrapped)";
genericName = "Instant Messenger";
categories = "Network;InstantMessaging;";
};
};
sddm-sugar-dark = prev.callPackage ./sddm-sugar-dark {}; sddm-sugar-dark = prev.callPackage ./sddm-sugar-dark {};
surface-control = prev.callPackage ./tools/system/surface-control {}; surface-control = prev.callPackage ./tools/system/surface-control {};
trackma = prev.callPackage ./tools/video/trackma {}; trackma = prev.callPackage ./tools/video/trackma {};
multimc-wrapped = wrapInSandbox {
name = "multimc";
package = prev.multimc.override {
jdk = prev.jdk11;
jdk8 = prev.jdk11;
};
binaryName = "multimc";
mountInHome = [ ".local/share/multimc" ];
additionalBlacklist = [ "/mnt" ];
chdirTo = "/home/$USER";
#extraEnv = {
# DRI_PRIME = "1";
#};
};
minecraft-wrapped = wrapInSandbox {
name = "minecraft-launcher";
package = prev.minecraft;
binaryName = "minecraft-launcher";
mountInHome = [ ".local/share/minecraft" ".minecraft" ];
additionalBlacklist = [ "/mnt" ];
chdirTo = "/home/$USER";
};
steam-wrapped = wrapInSandbox {
name = "steam";
package = prev.steam;
binaryName = "steam";
mountInHome = [ ".steam" ".local/share/Steam" ];
additionalBlacklist = [ "/mnt" ];
additionalMounts = [ "/mnt/Storage/Games/SteamLibrary" ];
chdirTo = "/home/$USER";
extraEnv = {
DRI_PRIME = "1";
};
copyIntoSandbox = [ "/share" ];
};
android-studio-wrapped = wrapInSandbox {
name = "android-studio";
package = prev.android-studio;
binaryName = "android-studio";
additionalBlacklist = [ "/mnt" ];
mountInHome = [ "Development/Personal/Android" ".android" ];
chdirTo = "/home/$USER";
};
xournalpp-git = prev.xournalpp.overrideAttrs (old: {
version = "1.1.1";
src = prev.fetchFromGitHub {
owner = "bhennion";
repo = "xournalpp";
rev = "5d1545b0c4303e45b4ddf4ef8a1565eba822a9af";
sha256 = "1d17lvydlny9pvaxa9xy53wxs7i6d563lp5r9g3r1xpgnb7zli8v";
};
});
gajim-mainwindow = prev.callPackage ./applications/networking/instant-messengers/gajim { gajim-mainwindow = prev.callPackage ./applications/networking/instant-messengers/gajim {
nbxmpp = prev.python3Packages.nbxmpp.overrideAttrs (old: { nbxmpp = prev.python3Packages.nbxmpp.overrideAttrs (old: {
@ -133,20 +54,10 @@ key-mapper = prev.callPackage ./tools/games/key-mapper {};
# TODO: Remove once NixOS has version 0.11.16 in their repos # TODO: Remove once NixOS has version 0.11.16 in their repos
sublime-music-no-test = prev.callPackage ./applications/audio/sublime-music {}; sublime-music-no-test = prev.callPackage ./applications/audio/sublime-music {};
# TODO: Remove once upstream has a new version tagged
kasts-git = prev.libsForQt5.kasts.overrideAttrs (old: {
src = let
commit = "b39be0118ef6ff587b433af185c584f3d5bcec30";
in builtins.fetchTarball {
url = "https://invent.kde.org/plasma-mobile/kasts/-/archive/${commit}/kasts-${commit}.tar.gz";
sha256 = "06myymbwj89357cpg7phha1x8q84mlhcy4f44pdkqmg7lkd5a6df";
};
buildInputs = old.buildInputs ++ [ prev.taglib prev.libsForQt5.qtkeychain ];
});
sound-gambit = prev.callPackage tools/audio/sound-gambit {}; sound-gambit = prev.callPackage tools/audio/sound-gambit {};
ebu-norm = prev.callPackage tools/audio/ebu-norm {}; ebu-norm = prev.callPackage tools/audio/ebu-norm {};
payload-dumper = prev.callPackage tools/system/payload-dumper {}; payload-dumper = prev.callPackage tools/system/payload-dumper {};
psst = prev.callPackage tools/audio/psst {};
} }

View File

@ -0,0 +1,42 @@
{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, cairo
, openssl
, alsa-lib
, dbus
, gtk3
}:
rustPlatform.buildRustPackage rec {
pname = "psst";
version = "1.2.1";
src = fetchFromGitHub {
owner = "jpochyla";
repo = "psst";
rev = "8f142a3232a706537c8477bff43d2e52309f6b78";
sha256 = "00pdijd70rq98lrrfgh6pzqa6w3pp49lmpzaviw7nrgfl7l6j3v0";
};
cargoSha256 = "sha256-/nbYi7n58D8V3qa9rStg7JfGh4sAhTxC2niFFW5Ta34=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ cairo openssl gtk3 alsa-lib dbus ];
postInstall = ''
# Install the desktop file
mkdir -p $out/share
cp .pkg/psst.desktop $out/share/
'';
meta = with lib; {
description = "A modern Volume Mixer for PulseAudio";
homepage = "https://github.com/Aurailus/Myxer";
license = licenses.gpl3Only;
maintainers = with maintainers; [ erin ];
platforms = platforms.linux;
};
}