nix-config/hosts/common/optional/desktop/hyprland.nix
2024-12-08 17:32:47 +01:00

25 lines
1 KiB
Nix

{ pkgs, ... }: {
imports = [ ./global.nix ./x11.nix ./wayland.nix ];
programs.hyprland.enable = true;
xdg.portal = {
enable = true;
wlr.enable = true;
xdgOpenUsePortal = true;
extraPortals = [
pkgs.xdg-desktop-portal-hyprland
pkgs.xdg-desktop-portal-gtk
];
};
environment.etc."systemd/system-sleep/post-hibernate-bluelight.sh".source = pkgs.writeShellScript "post-hibernate-bluelight.sh" ''
if [ "$1-$SYSTEMD_SLEEP_ACTION" = "post-hibernate" ]; then
${pkgs.systemd}/bin/busctl --user set-property rs.wl-gammarelay / rs.wl.gammarelay Temperature q 4000
${pkgs.systemd}/bin/busctl --user set-property rs.wl-gammarelay / rs.wl.gammarelay Temperature q 6000
${pkgs.systemd}/bin/busctl --user set-property rs.wl-gammarelay / rs.wl.gammarelay Temperature q 4000
${pkgs.systemd}/bin/busctl --user set-property rs.wl-gammarelay / rs.wl.gammarelay Temperature q 4000
${pkgs.systemd}/bin/busctl --user set-property rs.wl-gammarelay / rs.wl.gammarelay Temperature q 4000
fi
'';
}