From 1fb9a149a50801b439142c1e0c61b4b16c15f7b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Tue, 3 Dec 2024 23:07:46 +0100 Subject: [PATCH] NixOS 24.11: Remove remaining warnings --- hm/vim/decoration.nix | 83 ++++++++++++++++++++++--------------------- os/gaming/default.nix | 2 +- 2 files changed, 43 insertions(+), 42 deletions(-) diff --git a/hm/vim/decoration.nix b/hm/vim/decoration.nix index f09f10a..eb1f37d 100644 --- a/hm/vim/decoration.nix +++ b/hm/vim/decoration.nix @@ -1,4 +1,7 @@ -{ pkgs, lib, config, ... }: +{ pkgs, lib, config, nixvimLib, ... }: +let + nv = nixvimLib.nixvim; +in { config = { programs = { @@ -56,61 +59,59 @@ settings = rec { inactive_sections = sections; sections = { - lualine_a = [{ - name = ''string.format('%d', vim.fn.line('$'))''; - }]; - lualine_b = [ - "mode" + lualine_a = [ + (nv.listToUnkeyedAttrs [ "string.format('%d', vim.fn.line('$'))" ]) ]; - lualine_c = [{ - name = "filename"; - color = { - __raw = '' + lualine_b = [ "mode" ]; + lualine_c = [ + ((nv.listToUnkeyedAttrs [ "filename" ]) // { + color = nv.mkRaw '' function(section) return { fg = vim.bo.modified and '${base08}' or '${normal.fg}' } end ''; - }; - path = 1; # Relative path - symbols = { - modified = "●"; - newfile = "󰻭"; - readonly = "󰏯"; - unnamed = "󱀶"; - }; - } - "location"]; - lualine_x = [{ - name = ''(next(vim.lsp.buf_get_clients()) == nil) and "󰒲 " or ""''; - separator = { left = ""; right = ""; }; - }] ++ (lib.mapAttrsToList - (diag_name: diag_color: { - name = "diagnostics"; + path = 1; # Relative path + symbols = { + modified = "●"; + newfile = "󰻭"; + readonly = "󰏯"; + unnamed = "󱀶"; + }; + }) + "location" + ]; + lualine_x = [ + ((nv.listToUnkeyedAttrs [ ''(next(vim.lsp.buf_get_clients()) == nil) and "󰒲 " or ""'' ]) // { + separator = { left = ""; right = ""; }; + }) + ] ++ (lib.mapAttrsToList + (diag_name: diag_color: ((nv.listToUnkeyedAttrs [ "diagnostics" ]) // { color.bg = diag_color; colored = false; separator = { left = ""; right = ""; }; sections = [ diag_name ]; - }) + })) { error = base08; warn = base0A; hint = base0C; info = base0B; }); - lualine_y = [{ - name = "diff"; - diff_color = { - added.fg = base0B; - modified.fg = base0A; - removed.fg = base08; - }; - symbols = { - added = " "; - modified = " "; - removed = " "; - }; - } - "branch"]; + lualine_y = [ + ((nv.listToUnkeyedAttrs [ "diff" ]) // { + diff_color = { + added.fg = base0B; + modified.fg = base0A; + removed.fg = base08; + }; + symbols = { + added = " "; + modified = " "; + removed = " "; + }; + }) + "branch" + ]; lualine_z = [ "filetype" "fileformat" diff --git a/os/gaming/default.nix b/os/gaming/default.nix index 460b4c3..75d10a6 100644 --- a/os/gaming/default.nix +++ b/os/gaming/default.nix @@ -3,7 +3,7 @@ config = lib.mkIf config.frogeye.gaming { programs.steam.enable = true; - hardware.opengl.driSupport32Bit = true; # Enables support for 32bit libs that steam uses + hardware.graphics.enable32Bit = true; # Needed by Steam services = { udev.packages = [ pkgs.python3Packages.ds4drv ]; xserver.config = ''