diff --git a/modules/games/default.nix b/modules/games/default.nix index 0efa2a2..5b1329f 100644 --- a/modules/games/default.nix +++ b/modules/games/default.nix @@ -1,5 +1,12 @@ { lib, config, pkgs, ... }: let inherit (lib) mkIf mkMerge; + holo = pkgs.writeShellApplication { + name = "holo"; + runtimeInputs = [ pkgs.steam pkgs.gamescope ]; + text = '' + gamescope -f -h 1504 -w 2256 -r 60 -F fsr -e -- steam + ''; + }; in mkIf config.withGames (mkMerge [ (mkIf config.withImpermanence { environment.persistence."/persist".users.${config.username}= { @@ -15,8 +22,9 @@ in mkIf config.withGames (mkMerge [ programs.gamemode.enable = true; home-manager.users.${config.username} = { - home.packages = with pkgs; [ - prismlauncher + home.packages = [ + pkgs.prismlauncher + holo ]; }; } diff --git a/modules/niri/default.nix b/modules/niri/default.nix index f34815b..10a71fa 100644 --- a/modules/niri/default.nix +++ b/modules/niri/default.nix @@ -13,8 +13,7 @@ services.logind = { powerKey = "poweroff"; - powerKeyLongPress = "reboot"; - lidSwitch = "poweroff"; + lidSwitch = "suspend"; }; home-manager.users.${config.username} = { @@ -38,6 +37,19 @@ style = builtins.readFile(./waybar.conf.css); }; + programs.swaylock = { + enable = true; + package = pkgs.swaylock-effects; + settings = import ./swaylock.conf.nix { lib = lib; config = config; }; + }; + + programs.swayidle = { + enable = true; + events = [ + { event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock"; } + ]; + }; + services.mako = { enable = true; defaultTimeout = 5000; diff --git a/modules/niri/niri.conf.nix b/modules/niri/niri.conf.nix index ecefba8..05cc966 100644 --- a/modules/niri/niri.conf.nix +++ b/modules/niri/niri.conf.nix @@ -146,6 +146,7 @@ "Mod+Shift+Ctrl+S".action.screenshot-window = []; "Print".action.screenshot-screen = []; + "Mod+Shift+L".action.spawn = "swaylock"; "Mod+Shift+Q".action.quit = []; }; } diff --git a/modules/niri/swaylock.conf.nix b/modules/niri/swaylock.conf.nix new file mode 100644 index 0000000..7d2ed94 --- /dev/null +++ b/modules/niri/swaylock.conf.nix @@ -0,0 +1,32 @@ +{ lib, config, ... }: { + ignore-empty-password = true; + screenshots = true; + clock = true; + submit-on-touch = true; + indicator = true; + indicator-caps-lock = true; + indicator-radius = 100; + indicator-thickness = 4; + inside-color = lib.strings.concatStrings [ config.theme.overlay "aa" ]; + inside-clear-color = lib.strings.concatStrings [ config.theme.subtle "aa" ]; + inside-caps-lock-color = lib.strings.concatStrings [ config.theme.rose "aa" ]; + inside-ver-color = lib.strings.concatStrings [ config.theme.foam "aa" ]; + inside-wrong-color = lib.strings.concatStrings [ config.theme.love "aa" ]; + line-uses-inside = true; + ring-color = config.theme.surface; + ring-clear-color = config.theme.muted; + ring-caps-lock-color = config.theme.gold; + ring-ver-color = config.theme.pine; + ring-wrong-color = config.theme.love; + seperator-color = config.theme.base; + key-hl-color = config.theme.iris; + bs-hl-color = config.theme.love; + caps-lock-key-hl-color = config.theme.iris; + caps-lock-bs-hl-color = config.theme.love; + text-color = config.theme.text; + text-clear-color = config.theme.text; + text-caps-lock-color = config.theme.text; + text-ver-color = config.theme.text; + text-wrong-color = config.theme.text; + effect-blur = "30x10"; +}