diff --git a/flake.lock b/flake.lock index c3df1071..ad87468b 100644 --- a/flake.lock +++ b/flake.lock @@ -975,11 +975,11 @@ ] }, "locked": { - "lastModified": 1762128458, - "narHash": "sha256-3HzJXCdXVNP+FxIeXRYit/fkNoDw7h2P47898Szokto=", + "lastModified": 1764310947, + "narHash": "sha256-iOzr6zahmX+bb/OXQopueTKc8Ae7ZGz//9MlavuNsCU=", "owner": "kittywitch", "repo": "mewtris", - "rev": "22e623f0a1689e98f0d3217c23c22b59aabf6bf1", + "rev": "d6cce244bd3bed11bea2d01ace6340ede9fccc22", "type": "github" }, "original": { diff --git a/home/profiles/nixvim/nixvim.nix b/home/profiles/nixvim/nixvim.nix index f08bada4..3c15ae78 100644 --- a/home/profiles/nixvim/nixvim.nix +++ b/home/profiles/nixvim/nixvim.nix @@ -1,109 +1,20 @@ { - lib, tree, std, ... }: let - inherit (std) set; - inherit (lib.attrsets) genAttrs; + stdarg = _: { + _module.args = { + inherit std; + }; + }; in { programs.nixvim = { enable = true; defaultEditor = true; imports = [ - tree.home.profiles.nixvim.plugins + stdarg + tree.nixvim ]; - vimAlias = true; - opts = { - mouse = "a"; - clipboard = "unnamedplus"; - completeopt = "longest,menuone"; - backup = false; - writebackup = false; - ttimeoutlen = 100; - number = true; - relativenumber = true; - showmatch = true; - foldmethod = "marker"; - colorcolumn = "80"; - splitright = true; - splitbelow = true; - ignorecase = true; - smartcase = true; - wrap = true; - linebreak = true; - showbreak = "↳"; - termguicolors = true; - laststatus = 3; - cursorline = true; - cmdheight = 1; - hlsearch = true; - expandtab = true; - shiftwidth = 2; - tabstop = 2; - smartindent = true; - list = true; - listchars = { - tab = "» "; - extends = "›"; - precedes = "‹"; - nbsp = "·"; - trail = "✖"; - }; - hidden = true; - history = 1000; - shada = "'1000,f1,<500,@500,/500"; - lazyredraw = true; - synmaxcol = 240; - updatetime = 700; - }; - globals = { - mapleader = " "; - maplocalleader = ","; - }; - plugins = let - pluginsToGen = [ - "lastplace" - "commentary" - "treesitter" - "treesitter-context" - "nix-develop" - "lualine" - "startup" - "lazygit" - "web-devicons" - "auto-session" - "overseer" - "twilight" - "bufferline" - "zk" - "rainbow" - ]; - basePlugin = { - enable = true; - autoLoad = true; - }; - in - set.merge [ - (genAttrs pluginsToGen (_: basePlugin)) - { - auto-session.settings = { - auto_save = true; - auto_create = true; - bypass_save_filetypes = ["startup"]; - close_filetypes_on_save = ["startup"]; - }; - twilight.settings = { - context = 10; - dimming.alpha = 0.5; - expand = [ - "function" - "method" - "table" - "if_statement" - ]; - }; - } - ]; }; } diff --git a/nixos/profiles/gaming/wine.nix b/nixos/profiles/gaming/wine.nix index 8437e566..7acf1c96 100644 --- a/nixos/profiles/gaming/wine.nix +++ b/nixos/profiles/gaming/wine.nix @@ -8,6 +8,9 @@ inherit (lib.modules) mkMerge mkForce; cfg = config.mewtris; in { + # Future notes for kat: + # dotnet40 dotnet48 vcrun2010 vcrun2012 vcrun2018 + # set msvcr110.dll to native mewtris = let inherit (lib.strings) concatStringsSep; gameStorage = "/home/kat/Games"; @@ -18,6 +21,9 @@ in { runnerVariants = { PROTON_CACHYOS = "${inputs.chaotic.packages.${pkgs.system}.proton-cachyos_x86_64_v3.out}/bin"; PROTON_GE = "${inputs.chaotic.packages.${pkgs.system}.proton-ge-custom.out}/bin"; + PROTON_EXPERIMENTAL = "/games/Steam Library/steamapps/common/Proton - Experimental"; + PROTON_HOTFIX = "/games/Steam Library/steamapps/common/Proton Hotfix/"; + PROTON_VRC = "/home/kat/.local/share/Steam/compatibilitytools.d/GE-Proton10-20-rtsp19/"; WINE_TKG = pkgs.wine-tkg; WINE_CACHYOS = pkgs.wine-cachyos; }; @@ -27,7 +33,6 @@ in { ]; runnerEnvironments = { common = { - # inherit WINEDEBUG; PROTON_LOG = builtins.toString 1; WINEUSERSANDBOX = builtins.toString 1; }; @@ -68,7 +73,8 @@ in { }; proton = { PROTON_USE_NTSYNC = builtins.toString 1; - PRESSURE_VESSEL_FILESYSTEMS_RW = "/games"; + PRESSURE_VESSEL_IMPORT_OPENXR_1_RUNTIMES = "1"; + PRESSURE_VESSEL_FILESYSTEMS_RW = "/games:$XDG_RUNTIME_DIR/wivrn_comp_ipc:$XDG_RUNTIME_DIR/wivrn/comp_ipc:$XDG_RUNTIME_DIR/monado_comp_ipc"; }; }; winTimezoneVariant = "PST8PDT"; @@ -85,6 +91,11 @@ in { "shaderCache" ]; }; + vrCommon = { + variant = lib.mkForce "PROTON_GE"; + environment = { + }; + }; wineCommon = { runner = "wine"; variant = "WINE_TKG"; @@ -204,6 +215,42 @@ in { } ]; + # + # Bethesda + # + + f4vr = mkMerge [ + protonCommon + vrCommon + rec { + enableGamemode = lib.mkForce false; + long_name = "Fallout 4 VR"; + prefixFolder = gameStorage + "/Fallout-4-VR"; + gameFolder = prefixFolder + "/drive_c/Modding/MO2"; + gameExecutable = gameFolder + "/ModOrganizer.exe"; + environments = ["vkbasalt"]; + environment = { + WINEDLLOVERRIDES = "xaudio2_7=n,b"; + }; + } + ]; + + skyrimvr = mkMerge [ + protonCommon + vrCommon + rec { + enableGamemode = lib.mkForce false; + long_name = "Skyrim VR"; + prefixFolder = gameStorage + "/Skyrim-VR"; + gameFolder = prefixFolder + "/drive_c/Modding/MO2"; + gameExecutable = gameFolder + "/ModOrganizer.exe"; + environments = ["vkbasalt"]; + environment = { + WINEDLLOVERRIDES = "xaudio2_7=n,b"; + }; + } + ]; + # # Battle.net games # @@ -276,8 +323,27 @@ in { gamescope-wsi mangohud vkbasalt + umu-launcher ]; + systemd.user.services = let + inherit (lib.attrsets) genAttrs; + in + genAttrs [ + "f4vr" + "skyrimvr" + ] (_g: { + serviceConfig = { + #ProtectHome = true; + #BindPaths = (list.optionals (g == "f4vr") [ + # "/home/kat/Games/Fallout-4-VR" + # "/games/Fallout\\ 4\\ VR" + #]) ++ (list.optionals (g == "skyrimvr") [ + # "/home/kat/Games/Skyrim-VR" + # "/games/SkyrimVR" + #]); + }; + }); home-manager.users.kat.home.file = let inherit (lib.attrsets) listToAttrs nameValuePair attrNames; inherit (lib.lists) concatMap; @@ -288,6 +354,8 @@ in { pfxes = [ "Games/VNs/drive_c/windows" "Games/guild-wars/drive_c/windows" + "Games/Fallout-4-VR/drive_c/windows" + "Games/Skyrim-VR/drive_c/windows" ]; arches = { "x32" = "system32"; @@ -300,6 +368,15 @@ in { "d3d11.dll" "dxgi.dll" ]; + vkd3d = pkgs.vkd3d-proton; + vkd3d_files = [ + "libvkd3d-proton-d3d12.so" + "libvkd3d-proton-d3d12core.so" + ]; + vkd3dLinker = pfx: arch: file: + nameValuePair "${pfx}/${arches.${arch}}/${file}" { + source = "${vkd3d}/lib/${file}"; + }; dxvkLinker = pfx: arch: file: let dxvk = dxvks.${arch}; in @@ -311,10 +388,14 @@ in { pfx: concatMap ( arch: - concatMap ( - file: [(dxvkLinker pfx arch file)] - ) - files + (concatMap ( + file: [(dxvkLinker pfx arch file)] + ) + files) + ++ (concatMap ( + file: [(vkd3dLinker pfx arch file)] + ) + vkd3d_files) ) (attrNames arches) ) pfxes)) diff --git a/nixvim/general.nix b/nixvim/general.nix new file mode 100644 index 00000000..1a45642a --- /dev/null +++ b/nixvim/general.nix @@ -0,0 +1,161 @@ +{ + std, + lib, + ... +}: let + inherit (std) set; + inherit (lib.attrsets) genAttrs; +in { + vimAlias = true; + opts = { + mouse = "a"; + clipboard = "unnamedplus"; + completeopt = "longest,menuone"; + backup = false; + writebackup = false; + ttimeoutlen = 100; + number = true; + relativenumber = true; + showmatch = true; + foldmethod = "marker"; + colorcolumn = "80"; + splitright = true; + splitbelow = true; + ignorecase = true; + smartcase = true; + wrap = true; + linebreak = true; + showbreak = "↳"; + termguicolors = true; + laststatus = 3; + cursorline = true; + cmdheight = 1; + hlsearch = true; + expandtab = true; + shiftwidth = 2; + tabstop = 2; + smartindent = true; + list = true; + listchars = { + tab = "» "; + extends = "›"; + precedes = "‹"; + nbsp = "·"; + trail = "✖"; + }; + hidden = true; + history = 1000; + shada = "'1000,f1,<500,@500,/500"; + lazyredraw = true; + synmaxcol = 240; + updatetime = 700; + }; + globals = { + mapleader = " "; + maplocalleader = ","; + }; + plugins = let + pluginsToGen = [ + "lastplace" + "mini-animate" + "mini-clue" + "commentary" + "treesitter" + "treesitter-context" + "nix-develop" + "lualine" + "startup" + "lazygit" + "web-devicons" + "auto-session" + "overseer" + "twilight" + "bufferline" + "zk" + "rainbow" + "indent-blankline" + ]; + basePlugin = { + enable = true; + autoLoad = true; + }; + in + set.merge [ + (genAttrs pluginsToGen (_: basePlugin)) + { + mini-animate.settings = { + scroll.enable = false; + }; + indent-blankline = { + luaConfig.pre = '' + local highlight = { + "RainbowRed", + "RainbowYellow", + "RainbowBlue", + "RainbowOrange", + "RainbowGreen", + "RainbowViolet", + "RainbowCyan", + } + + local hooks = require "ibl.hooks" + -- create the highlight groups in the highlight setup hook, so they are reset + -- every time the colorscheme changes + hooks.register(hooks.type.HIGHLIGHT_SETUP, function() + vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" }) + vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" }) + vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" }) + vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" }) + vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" }) + vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" }) + vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" }) + end) + + ''; + settings = { + exclude = { + buftypes = [ + "terminal" + "quickfix" + ]; + filetypes = [ + "" + "checkhealth" + "help" + "lspinfo" + "packer" + "TelescopePrompt" + "TelescopeResults" + "yaml" + ]; + }; + indent = { + char = "│"; + highlight.__raw = ''highlight''; + }; + scope = { + show_end = false; + show_exact_scope = true; + show_start = false; + }; + }; + }; + auto-session.settings = { + auto_save = true; + auto_create = true; + bypass_save_filetypes = ["startup"]; + close_filetypes_on_save = ["startup"]; + }; + twilight.settings = { + context = 10; + dimming.alpha = 0.5; + expand = [ + "function" + "method" + "table" + "if_statement" + ]; + }; + } + ]; +} diff --git a/home/profiles/nixvim/plugins/aerial.nix b/nixvim/plugins/aerial.nix similarity index 100% rename from home/profiles/nixvim/plugins/aerial.nix rename to nixvim/plugins/aerial.nix diff --git a/home/profiles/nixvim/plugins/hop.nix b/nixvim/plugins/hop.nix similarity index 100% rename from home/profiles/nixvim/plugins/hop.nix rename to nixvim/plugins/hop.nix diff --git a/home/profiles/nixvim/plugins/lsp.nix b/nixvim/plugins/lsp.nix similarity index 64% rename from home/profiles/nixvim/plugins/lsp.nix rename to nixvim/plugins/lsp.nix index cc50bd5a..7528df11 100644 --- a/home/profiles/nixvim/plugins/lsp.nix +++ b/nixvim/plugins/lsp.nix @@ -1,4 +1,9 @@ -{lib, ...}: let +{ + lib, + std, + ... +}: let + inherit (std) set; inherit (lib.attrsets) genAttrs; in { lsp.servers = let @@ -6,15 +11,29 @@ in { enable = true; activate = true; }; + disablePackage = { + package = null; + }; serversToGen = [ "rust_analyzer" "nixd" "zk" + "gleam" + "luau_lsp" + "stylua" + ]; + disabledPackageServers = [ + "rust_analyzer" + "luau_lsp" + "stylua" ]; in - (genAttrs serversToGen (_: baseServer)) - // { - }; + set.merge [ + (genAttrs serversToGen (_: baseServer)) + (genAttrs disabledPackageServers (_: disablePackage)) + { + } + ]; plugins = let pluginsToGen = [ "lspconfig" diff --git a/home/profiles/nixvim/plugins/startup.nix b/nixvim/plugins/startup.nix similarity index 100% rename from home/profiles/nixvim/plugins/startup.nix rename to nixvim/plugins/startup.nix diff --git a/home/profiles/nixvim/plugins/telescope.nix b/nixvim/plugins/telescope.nix similarity index 100% rename from home/profiles/nixvim/plugins/telescope.nix rename to nixvim/plugins/telescope.nix diff --git a/packages/jackify-bin.nix b/packages/jackify-bin.nix new file mode 100644 index 00000000..b3c47e77 --- /dev/null +++ b/packages/jackify-bin.nix @@ -0,0 +1,44 @@ +{ + appimageTools, + fetchurl, + lib, + stdenv, + python3, + libGL, +}: let + version = "0.1.6.6"; + pname = "Jackify"; + id = "com.jackify.app"; + + src = fetchurl { + url = "https://github.com/Omni-guides/Jackify/releases/download/v${version}/${pname}.AppImage"; + hash = "sha256-4BLqhmZC/ltom0rTzJpYUvHdn6WzUwS4UYo9TZAhFBI="; + }; + + appimageContents = appimageTools.extract {inherit pname version src;}; +in + appimageTools.wrapType2 { + inherit pname version src; + + extraPkgs = pkgs: (with pkgs; [ + icu + zstd + python3 + protontricks + stdenv.cc.cc.lib + libGL + ]); + + extraInstallCommands = '' + install -Dm444 ${appimageContents}/${id}.desktop -t $out/share/applications + install -Dm444 ${appimageContents}/${id}.png -t $out/share/pixmaps + ''; + + meta = { + description = "A modlist installation and configuration tool for Wabbajack modlists on Linux"; + homepage = "https://github.com/Omni-guides/Jackify"; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [merrkry]; + platforms = lib.platforms.linux; + }; + } diff --git a/tree.nix b/tree.nix index 6eaa01eb..003497c8 100644 --- a/tree.nix +++ b/tree.nix @@ -30,6 +30,10 @@ "microvms/*".functor.enable = true; + "nixvim".functor.enable = true; + "nixvim/*".functor.enable = true; + "nixvim/plugins/*".functor.enable = true; + "home/*".functor.enable = true; "home/profiles/*".functor.enable = true; "home/profiles/nixvim".functor.excludes = [