sane-screenshot: port to sane.programs

This commit is contained in:
Colin 2024-03-02 05:53:05 +00:00
parent 063d99dd73
commit a7bd831ad8
4 changed files with 29 additions and 1 deletions

View File

@ -834,6 +834,8 @@ in
superTux.sandbox.whitelistWayland = true;
superTux.persist.byStore.plaintext = [ ".local/share/supertux2" ];
swappy = {};
tcpdump.sandbox.method = "landlock";
tcpdump.sandbox.net = "all";
tcpdump.sandbox.autodetectCliPaths = "existingFileOrParent";

View File

@ -83,6 +83,7 @@
./ripgrep.nix
./rofi
./sane-input-handler
./sane-screenshot.nix
./sane-scripts.nix
./sfeed.nix
./signal-desktop.nix

View File

@ -0,0 +1,15 @@
{ ... }:
{
sane.programs.sane-screenshot = {
sandbox.method = "bwrap";
sandbox.whitelistWayland = true;
sandbox.whitelistDbus = [ "user" ]; #< to send notifications
suggestedPrograms = [
"libnotify"
"swappy"
"sway-contrib.grimshot"
"util-linux"
"wl-clipboard"
];
};
}

View File

@ -1,6 +1,16 @@
{ static-nix-shell }:
{ static-nix-shell, copyDesktopItems, makeDesktopItem }:
static-nix-shell.mkBash {
pname = "sane-screenshot";
srcRoot = ./.;
pkgs = [ "libnotify" "swappy" "sway-contrib.grimshot" "util-linux" "wl-clipboard" ];
nativeBuildInputs = [
copyDesktopItems
];
desktopItems = [
(makeDesktopItem {
name = "sane-screenshot";
exec = "sane-screenshot";
desktopName = "interactive screenshotter";
})
];
}