refactor home.packages and add scrot, tree_hugger packages

This commit is contained in:
Joakim Repomaa
2026-03-14 21:36:35 +02:00
parent 6d9bad1e5a
commit 7cf3a3dd60

View File

@@ -30,9 +30,7 @@
# release notes. # release notes.
home.stateVersion = "23.11"; # Please read the comment before changing. home.stateVersion = "23.11"; # Please read the comment before changing.
home.packages = home.packages = with pkgs; [
with pkgs;
[
htop htop
gnupg gnupg
pkgs-unstable.yubioath-flutter pkgs-unstable.yubioath-flutter
@@ -100,7 +98,7 @@
${lib.getExe nix} run "nixpkgs#''${1}" "$@" ${lib.getExe nix} run "nixpkgs#''${1}" "$@"
'') '')
pkgs-unstable.tidal-hifi pkgs-unstable.tidal-hifi
inputs.tonearm.packages.${pkgs.stdenv.hostPlatform.system}.tonearm inputs.tonearm.packages.${stdenv.hostPlatform.system}.tonearm
blueman blueman
pavucontrol pavucontrol
(writeShellScriptBin "voxtoggle" '' (writeShellScriptBin "voxtoggle" ''
@@ -115,18 +113,13 @@
kill -SIGUSR1 "$pid" kill -SIGUSR1 "$pid"
fi fi
'') '')
] (writeShellScriptBin "scrot" ''
++ lib.optional osConfig.programs.niri.enable ( set -eo pipefail
pkgs.writeShellScriptBin "handle-lid-close" ''
alias niri=${lib.getExe osConfig.programs.niri.package}
output_count=$(niri outputs | ${lib.getExe jq} -r 'length') ${lib.getExe grim} -t ppm -g "$(${lib.getExe slurp} -o -d -F monospace)" - | ${lib.getExe gradia}
if [ "$output_count" -eq 1 ]; then '')
niri msg action spawn hyprlock inputs.tree_hugger.packages.${stdenv.hostPlatform.system}.default
systemctl suspend ];
fi
''
);
programs = { programs = {
ashell = { ashell = {