diff --git a/home-manager/modules/gui/default.nix b/home-manager/modules/gui/default.nix index 98d8c93..01fd208 100644 --- a/home-manager/modules/gui/default.nix +++ b/home-manager/modules/gui/default.nix @@ -107,6 +107,7 @@ in "${mod}+x" = "exec ${cfg.menu}"; "${mod}+q" = "kill"; "${mod}+Shift+q" = "exec swaynag -t warning -m 'bruh you really wanna kill sway?' -b 'ye' 'systemctl --user stop graphical-session.target && swaymsg exit'"; + "${mod}+shift+s" = "exec ${pkgs.flameshot}/bin/flameshot gui"; }; menu = "rofi -show run"; @@ -120,6 +121,19 @@ in }; }; + services = { + flameshot = { + enable = true; + settings = { + General = { + disabledTrayIcon = true; + savePath = "/tmp/screenshots"; + savePathFixed = false; + }; + }; + }; + }; + programs = { git = { enable = true; diff --git a/nixos/modules/gui.nix b/nixos/modules/gui.nix index 9cea180..ad3b96e 100644 --- a/nixos/modules/gui.nix +++ b/nixos/modules/gui.nix @@ -15,6 +15,12 @@ in opengl.enable = mkDefault true; }; + systemd = { + tmpfiles.rules = [ + "d /tmp/screenshots 0777 root root" + ]; + }; + services = { pipewire = { enable = true; @@ -34,5 +40,28 @@ in unifont noto-fonts-emoji ]; + + nixpkgs.overlays = [ + (self: super: { + xdg-desktop-portal = super.xdg-desktop-portal.overrideAttrs (old: rec { + # https://github.com/flatpak/xdg-desktop-portal/issues/861 + version = "1.14.6"; + + src = pkgs.fetchFromGitHub { + owner = "flatpak"; + repo = old.pname; + rev = version; + sha256 = "sha256-MD1zjKDWwvVTui0nYPgvVjX48DaHWcP7Q10vDrNKYz0="; + }; + }); + }) + ]; + xdg = { + portal = { + enable = true; + # For sway + wlr.enable = true; + }; + }; }; }