ops/nixos: enable flameshot on graphical-client hosts

This commit is contained in:
Luke Granger-Brown 2021-04-05 12:42:35 +01:00
parent e11229d070
commit 21fe79c904
2 changed files with 6 additions and 4 deletions

View file

@ -22,5 +22,8 @@ in
sound.enable = true;
hardware.pulseaudio.enable = true;
services.dbus.packages = [ depot.nix.pkgs.flameshot ];
systemd.packages = [ depot.nix.pkgs.flameshot ];
};
}

View file

@ -1,4 +1,4 @@
{ pkgs, lib, config, ... }:
{ pkgs, depot, lib, config, ... }:
{
imports = [ ./client.nix ];
@ -33,8 +33,7 @@
executable = true;
text = ''
#!/usr/bin/env bash
set -euxo pipefail
import png:/dev/stdout | pngquant - | xclip -t image/png -selection clipboard -in
exec ${depot.nix.pkgs.flameshot}/bin/flameshot gui
'';
};
home.file.".xprofile".text = ''
@ -56,7 +55,7 @@
modifier = config.xsession.windowManager.i3.config.modifier;
in lib.mkOptionDefault {
"${modifier}+l" = "exec loginctl lock-session";
"${modifier}+p" = "exec screencap";
"${modifier}+p" = "exec ${depot.nix.pkgs.flameshot}/bin/flameshot gui";
};
startup = [
{ command = "xss-lock --transfer-sleep-lock -- i3lock --nofork"; notification = false; }