diff options
Diffstat (limited to 'nix')
| -rw-r--r-- | nix/amdgpu.nix | 2 | ||||
| -rw-r--r-- | nix/gaming.nix | 54 | ||||
| -rw-r--r-- | nix/programs/firefox.nix | 4 | ||||
| -rw-r--r-- | nix/programs/kitty.nix | 25 | ||||
| -rw-r--r-- | nix/programs/sway.nix | 2 | ||||
| -rw-r--r-- | nix/steam.nix | 48 | ||||
| -rw-r--r-- | nix/user.nix | 7 |
7 files changed, 85 insertions, 57 deletions
diff --git a/nix/amdgpu.nix b/nix/amdgpu.nix index 9c25608..5cb89c0 100644 --- a/nix/amdgpu.nix +++ b/nix/amdgpu.nix @@ -24,7 +24,7 @@ }; }; # https://github.com/sibradzic/amdgpu-clocks -# TODO: Fetch and patch scripts from the git repo. +# @TODO: Fetch and patch scripts from the git repo. # environment.etc = { # XFX RX 6600 # "default/amdgpu-custom-states.card0".text = '' # OD_VDDGFX_OFFSET: diff --git a/nix/gaming.nix b/nix/gaming.nix index 2b52aa2..4a7d25a 100644 --- a/nix/gaming.nix +++ b/nix/gaming.nix @@ -8,38 +8,17 @@ in { environment.systemPackages = with pkgs; lib.lists.flatten [ (asNeeded "gamepad-tool" ["gamepad-tool"]) (asNeeded "sdl-jstest" ["sdl-jstest" "sdl2-jstest"]) - (asNeeded "protontricks" ["protontricks" "protontricks-launch"]) + (asNeeded "parsec-bin" ["parsecd"]) (asNeeded "[lutris umu-launcher]" ["lutris"]) - (asNeeded "prismlauncher" ["prismlauncher"]) - (asNeeded "retroarch" ["retroarch"]) + (asNeeded "(retroarch.withCores (cores: with cores; [ mesen bsnes ]))" ["retroarch"]) (asNeeded "dolphin-emu" ["dolphin-emu"]) + (asNeeded "cemu" ["cemu"]) + (asNeeded "ryujinx" ["ryujinx"]) (asNeeded "pcsx2" ["pcsx2-qt"]) (asNeeded "(ppsspp.override { enableQt = true; })" ["ppsspp"]) - (asNeeded "cemu" ["cemu"]) (asNeeded "rpcs3" ["rpcs3"]) - (asNeeded "ryujinx" ["ryujinx"]) + (asNeeded "prismlauncher" ["prismlauncher"]) (asNeeded "osu-lazer-bin" ["osu!"]) - (asNeeded "parsec-bin" ["parsecd"]) - (writeShellScriptBin "run-steam-gamescope" '' - export TTY=/dev/tty4 - export XDG_VTNR=4 - cd $HOME - exec ${pkgs.kbd}/bin/openvt --switch --login --console 4 -f -- steam-gamescope - '') - (writeShellScriptBin "proton-env" '' - export STEAM_COMPAT_LAUNCHER_SERVICE=proton - export DXVK_HUD=compiler - export DXVK_LOG_LEVEL=none - export DXVK_DEBUG=none - export VKD3D_HUD=compiler - export VKD3D_CONFIG=dxr - export VKD3D_DEBUG=none - export VKD3D_SHADER_DEBUG=none - export mesa_glthread=true - xrandr --output ${loc.monitors.monitor1} --primary - #exec env --unset=SDL_VIDEODRIVER --unset=SDL_VIDEO_DRIVER mangohud gamemoderun "$@" - exec env mangohud gamemoderun "$@" - '') ]; #hardware.xone.enable = true; #hardware.opentabletdriver.enable = true; @@ -62,33 +41,12 @@ in { #}; }; }; - programs.steam = { - enable = true; - gamescopeSession = let - width = "2560"; - height = "1440"; - in { - enable = true; - args = [ - "-W ${width}" "-H ${height}" - "-w ${width}" "-h ${height}" - "-r 144" - "-O ${loc.monitors.monitor1}" - "--rt" - "-f" - "-e" -# "-o 10" - "--adaptive-sync" -# "--force-grab-cursor" - "--mangoapp" - ]; - }; - }; programs.gamescope = { enable = true; package = pkgs.gamescope; capSysNice = true; }; +# chaotic.mesa-git.enable = true; # services.ananicy = { # enable = true; # # package = pkgs.ananicy-cpp; diff --git a/nix/programs/firefox.nix b/nix/programs/firefox.nix index 6ee2751..fd10f99 100644 --- a/nix/programs/firefox.nix +++ b/nix/programs/firefox.nix @@ -19,8 +19,8 @@ in { source = (pkgs.fetchFromGitHub { owner = "rafaelmardojai"; repo = "firefox-gnome-theme"; - rev = "59e3de00f01e5adb851d824cf7911bd90c31083a"; - hash = "sha256-5A6LL7T0lttn1vrKsNOKUk9V0ittdW0VEqh6AtefxJ4="; + rev = "6b2061ac6faf5dfb52d5b41dca98fa0c022b2b91"; + hash = "sha256-c3oiw6RysUVxRqkv39gxhiO1WjfvuEzZw4PemN0C7Kk="; }); }; home.file."customChrome.css" = { diff --git a/nix/programs/kitty.nix b/nix/programs/kitty.nix index 0e2ad0b..c070871 100644 --- a/nix/programs/kitty.nix +++ b/nix/programs/kitty.nix @@ -17,6 +17,7 @@ in { mode = "enabled"; enableBashIntegration = true; }; + # @TODO: https://sw.kovidgoyal.net/kitty/conf/#opt-kitty.active_tab_title_template extraConfig = '' shell ${pkgs.bashInteractive}/bin/bash --login update_check_interval 0 @@ -33,13 +34,14 @@ in { paste_actions confirm,confirm-if-large disable_ligatures always modify_font baseline ${toString loc.font.baseline} - cursor #${colo.foreground} cursor_shape block #cursor_blink_interval -1 linear ease-out #cursor_stop_blinking_after 20.0 cursor_trail 2 cursor_trail_decay 0.075 0.425 cursor_trail_start_threshold 3 + cursor #${colo.foreground} + cursor_text_color background foreground #${colo.foreground} background #${colo.background} color0 #${colo.color0} @@ -67,8 +69,27 @@ in { mark3_foreground #${colo.background} mark3_background #${colo.color4} background_opacity ${toString colo.alpha} + active_border_color #${colo.color4} + bell_border_color #${colo.color1} + inactive_border_color #${colo.color3} + url_color #${colo.color5} + enabled_layouts splits,stack ''; }; + home.file.".config/kitty/quick-access-terminal.conf".text = '' + lines 18 + background_opacity 0.925 + kitty_override startup_session=quick-access-session.conf + kitty_override placement_strategy=bottom-right + kitty_override window_padding_width=0 12 8 0 + ''; + home.file.".config/kitty/quick-access-session.conf".text = '' + output_name ${loc.monitors.monitor1} + layout splits + launch --var window=main + launch --location=vsplit --bias=17.1 /home/andrew/dl/tmp/clock/a.out + focus_matching_window var:window=first + ''; wayland.windowManager.sway = { config = rec { terminal = "${pkgs.kitty}/bin/kitty -1"; @@ -76,7 +97,7 @@ in { mod1 = "Mod1"; in { "${mod1}+Return" = "exec ${terminal}"; - "${mod1}+backslash" = "exec ${terminal} --class=\"kitty-popup\""; + "${mod1}+backslash" = "exec ${pkgs.kitty}/bin/kitten quick-access-terminal"; }; }; }; diff --git a/nix/programs/sway.nix b/nix/programs/sway.nix index eb30595..5e9cb08 100644 --- a/nix/programs/sway.nix +++ b/nix/programs/sway.nix @@ -282,12 +282,12 @@ in { titlebar = false; commands = [ { command = "move to scratchpad"; criteria.app_id = "kitty-server"; } - { command = "floating enable; allow_tearing yes"; criteria.app_id = "kitty-popup"; } { command = "allow_tearing yes"; criteria.app_id = "kitty"; } { command = "inhibit_idle fullscreen; floating enable; allow_tearing yes"; criteria.app_id = "cmv"; } { command = "floating enable"; criteria.class = "cmv.exe"; } { command = "floating enable"; criteria.app_id = "mauri"; } { command = "inhibit_idle fullscreen"; criteria.title = "Parsec"; } + { command = "inhibit_idle fullscreen"; criteria.class = "streaming_client"; } { command = "inhibit_idle fullscreen; allow_tearing yes"; criteria.class = "steam_app_.*"; } { command = "inhibit_idle fullscreen; allow_tearing yes; floating enable"; criteria.app_id = "gamescope"; } { command = "inhibit_idle fullscreen; allow_tearing yes"; criteria.class = ".gamescope-wrapped"; } diff --git a/nix/steam.nix b/nix/steam.nix new file mode 100644 index 0000000..9ecb21f --- /dev/null +++ b/nix/steam.nix @@ -0,0 +1,48 @@ +{ config, lib, pkgs, ... }: let + loc = config.local; +in { + environment.systemPackages = with pkgs; lib.lists.flatten [ + (asNeeded "protontricks" ["protontricks" "protontricks-launch"]) + (writeShellScriptBin "run-steam-gamescope" '' + export TTY=/dev/tty4 + export XDG_VTNR=4 + cd $HOME + exec ${pkgs.kbd}/bin/openvt --switch --login --console 4 -f -- steam-gamescope + '') + (writeShellScriptBin "proton-env" '' + export STEAM_COMPAT_LAUNCHER_SERVICE=proton + export DXVK_HUD=compiler + export DXVK_LOG_LEVEL=none + export DXVK_DEBUG=none + export VKD3D_HUD=compiler + export VKD3D_CONFIG=dxr + export VKD3D_DEBUG=none + export VKD3D_SHADER_DEBUG=none + export mesa_glthread=true + xrandr --output ${loc.monitors.monitor1} --primary + exec env --unset=SDL_VIDEODRIVER --unset=SDL_VIDEO_DRIVER mangohud gamemoderun "$@" + '') + ]; + programs.steam = { + enable = true; + gamescopeSession = let + width = "2560"; + height = "1440"; + in { + enable = true; + args = [ + "-W ${width}" "-H ${height}" + "-w ${width}" "-h ${height}" + "-r 144" + "-O ${loc.monitors.monitor1}" + "--rt" + "-f" + "-e" +# "-o 10" + "--adaptive-sync" +# "--force-grab-cursor" + "--mangoapp" + ]; + }; + }; +} diff --git a/nix/user.nix b/nix/user.nix index a7b71a8..0050182 100644 --- a/nix/user.nix +++ b/nix/user.nix @@ -59,7 +59,7 @@ in { file bc screen - sloccount + loccount (aspellWithDicts (dicts: with dicts; [ en en-computers en-science ])) rsync (python3.withPackages (python-pkgs: [ python-pkgs.requests python-pkgs.beautifulsoup4 ])) @@ -67,6 +67,7 @@ in { neofetch (asNeeded "cmatrix" ["cmatrix"]) hdparm + dcfldd usbutils cryptsetup (asNeeded "nix-index" ["nix-channel-index" "nix-index" "nix-locate"]) @@ -74,7 +75,7 @@ in { (asNeeded "optipng" ["optipng"]) (asNeeded "dmtx-utils" ["dmtxquery" "dmtxread" "dmtxwrite"]) (asNeeded "zbar" ["zbarcam" "zbarcam-gtk" "zbarcam-qt" "zbarimg"]) - perlPackages.ArchiveZip + perlPackages.ArchiveZip # For crc32. b3sum libfaketime cpulimit @@ -103,7 +104,7 @@ in { local.scripts.imports = [ "install-as-needed" "cpu-vulns" - "spell" + "sp" # spell "ts-date" "term-font-size" "shift-jis-zip" |