From dd142cf1baf1c7d0078f1d51d8a167f44db55f84 Mon Sep 17 00:00:00 2001 From: fredrikr79 Date: Fri, 15 Aug 2025 16:10:11 +0200 Subject: [PATCH] fix issues that arose after `nix flake update` --- configuration.nix | 77 +++++++-------- flake.lock | 204 +++++++--------------------------------- flake.nix | 10 +- home.nix | 233 +++++++++++++++++++++++++++++++++------------- 4 files changed, 248 insertions(+), 276 deletions(-) diff --git a/configuration.nix b/configuration.nix index 5aabcb8..ade14b3 100644 --- a/configuration.nix +++ b/configuration.nix @@ -256,15 +256,16 @@ in { gdb valgrind-light gnumake - qemu_full + # qemu_full powertop gamemode alsa-utils acpi # fcitx5 # fcitx5-configtool - dolphin + kdePackages.dolphin libreoffice-qt6-fresh + nix-tree ]); programs.steam.enable = true; @@ -422,44 +423,44 @@ in { # (nerdfonts.override { fonts = [ "FiraCode" "Monoid" ]; }) nerd-fonts.fira-code nerd-fonts.droid-sans-mono - noto-fonts - ubuntu_font_family - unifont - noto-fonts-cjk-sans - noto-fonts-cjk-serif - carlito - dejavu_fonts - ipafont - kochi-substitute - source-code-pro - ttf_bitstream_vera + # noto-fonts + # ubuntu_font_family + # unifont + # noto-fonts-cjk-sans + # noto-fonts-cjk-serif + # carlito + # dejavu_fonts + # ipafont + # kochi-substitute + # source-code-pro + # ttf_bitstream_vera ]; - fontconfig = { - antialias = true; - # defaultFonts = { - # serif = [ "Ubuntu" ]; - # sansSerif = [ "Ubuntu" ]; - # monospace = [ "Ubuntu Source" ]; - # }; - # defaultFonts = { - # monospace = [ "Monoid" ]; - # }; - defaultFonts = { - monospace = [ - "DejaVu Sans Mono" - "IPAGothic" - ]; - sansSerif = [ - "DejaVu Sans" - "IPAPGothic" - ]; - serif = [ - "DejaVu Serif" - "IPAPMincho" - ]; - }; - }; + # fontconfig = { + # antialias = true; + # # defaultFonts = { + # # serif = [ "Ubuntu" ]; + # # sansSerif = [ "Ubuntu" ]; + # # monospace = [ "Ubuntu Source" ]; + # # }; + # # defaultFonts = { + # # monospace = [ "Monoid" ]; + # # }; + # defaultFonts = { + # monospace = [ + # "DejaVu Sans Mono" + # "IPAGothic" + # ]; + # sansSerif = [ + # "DejaVu Sans" + # "IPAPGothic" + # ]; + # serif = [ + # "DejaVu Serif" + # "IPAPMincho" + # ]; + # }; + # }; }; xdg.mime = { diff --git a/flake.lock b/flake.lock index e3d64cb..d871727 100644 --- a/flake.lock +++ b/flake.lock @@ -15,41 +15,6 @@ "type": "github" } }, - "devshell": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1735644329, - "narHash": "sha256-tO3HrHriyLvipc4xr+Ewtdlo7wM1OjXNjlWRgmM7peY=", - "owner": "numtide", - "repo": "devshell", - "rev": "f7795ede5b02664b57035b3b757876703e2c3eac", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, - "flake-compat": { - "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", - "revCount": 69, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -58,11 +23,11 @@ ] }, "locked": { - "lastModified": 1736143030, - "narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=", + "lastModified": 1754487366, + "narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de", + "rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18", "type": "github" }, "original": { @@ -110,54 +75,6 @@ "type": "github" } }, - "git-hooks": { - "inputs": { - "flake-compat": [ - "nixvim", - "flake-compat" - ], - "gitignore": "gitignore", - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1737465171, - "narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "nixvim", - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -165,32 +82,11 @@ ] }, "locked": { - "lastModified": 1738275749, - "narHash": "sha256-PM+cGduJ05EZ+YXulqAwUFjvfKpPmW080mcuN6R1POw=", + "lastModified": 1755313937, + "narHash": "sha256-pQb7bNcolxYGRiylUCrTddiF+qW2wsUiM9+eRIDUrVU=", "owner": "nix-community", "repo": "home-manager", - "rev": "a8159195bfaef3c64df75d3b1e6a68d49d392be9", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_2": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1738275749, - "narHash": "sha256-PM+cGduJ05EZ+YXulqAwUFjvfKpPmW080mcuN6R1POw=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "a8159195bfaef3c64df75d3b1e6a68d49d392be9", + "rev": "2a749f4790a14f7168be67cdf6e548ef1c944e10", "type": "github" }, "original": { @@ -213,48 +109,27 @@ ] }, "locked": { - "lastModified": 1729958008, - "narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=", + "lastModified": 1748294338, + "narHash": "sha256-FVO01jdmUNArzBS7NmaktLdGA5qA3lUMJ4B7a05Iynw=", "owner": "NuschtOS", "repo": "ixx", - "rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb", + "rev": "cc5f390f7caf265461d4aab37e98d2292ebbdb85", "type": "github" }, "original": { "owner": "NuschtOS", - "ref": "v0.0.6", + "ref": "v0.0.8", "repo": "ixx", "type": "github" } }, - "nix-darwin": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1738277753, - "narHash": "sha256-iyFcCOk0mmDiv4ut9mBEuMxMZIym3++0qN1rQBg8FW0=", - "owner": "lnl7", - "repo": "nix-darwin", - "rev": "49b807fa7c37568d7fbe2aeaafb9255c185412f9", - "type": "github" - }, - "original": { - "owner": "lnl7", - "repo": "nix-darwin", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1738342376, - "narHash": "sha256-ipYO/UVD5ghNYmtR7oFpPMKep+6Tnc9oJjhbDKIZpS8=", + "lastModified": 1755344339, + "narHash": "sha256-qqTSrpvUBSqZ5Xrfesci6DFFNpSdpLFCugtPUvDbeaQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "da266ea1ed2379206577303730b51457be1382d3", + "rev": "ae0ba2b2e6cdbe107c2b11897110793a6388a5a7", "type": "github" }, "original": { @@ -265,24 +140,19 @@ }, "nixvim": { "inputs": { - "devshell": "devshell", - "flake-compat": "flake-compat", "flake-parts": "flake-parts", - "git-hooks": "git-hooks", - "home-manager": "home-manager_2", - "nix-darwin": "nix-darwin", "nixpkgs": [ "nixpkgs" ], "nuschtosSearch": "nuschtosSearch", - "treefmt-nix": "treefmt-nix" + "systems": "systems_2" }, "locked": { - "lastModified": 1738325616, - "narHash": "sha256-Khti8mGVd4WiYmLp3TVMgzuy2BtREcD1mh9ECarQK7k=", + "lastModified": 1755095763, + "narHash": "sha256-cFwtMaONA4uKYk/rBrmFvIAQieZxZytoprzIblTn1HA=", "owner": "nix-community", "repo": "nixvim", - "rev": "eb611349a70df9f87001752aa7c49e9672099415", + "rev": "ecc7880e00a2a735074243d8a664a931d73beace", "type": "github" }, "original": { @@ -301,11 +171,11 @@ ] }, "locked": { - "lastModified": 1737924095, - "narHash": "sha256-9RO/IlxiE7bpY7GYsdDMNB533PnDOBo9UvYyXXqlN4c=", + "lastModified": 1754301638, + "narHash": "sha256-aRgzcPDd2axHFOuMlPLuzmDptUM2JU8mUL3jfgbBeyc=", "owner": "NuschtOS", "repo": "search", - "rev": "5efc9c966bb9bdad07a3c28667eac38b758c6f18", + "rev": "a60091045273484c040a91f5c229ba298f8ecc27", "type": "github" }, "original": { @@ -359,24 +229,18 @@ "type": "github" } }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, + "systems_2": { "locked": { - "lastModified": 1738070913, - "narHash": "sha256-j6jC12vCFsTGDmY2u1H12lMr62fnclNjuCtAdF1a4Nk=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "bebf27d00f7d10ba75332a0541ac43676985dea3", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { - "owner": "numtide", - "repo": "treefmt-nix", + "owner": "nix-systems", + "repo": "default", "type": "github" } }, @@ -390,11 +254,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1752778198, - "narHash": "sha256-dA1oYGyqAKzQ7M6t2/ovJ7+DpvWjFyX1ZSM7zgIGka0=", + "lastModified": 1755285384, + "narHash": "sha256-r379Qj04DD3N7bCyiXD4ooqIUMM/3Wna/HenvYECavY=", "owner": "uiua-lang", "repo": "uiua", - "rev": "cc0e504110d87fd898af054883f549654b745a19", + "rev": "637789911eae71316cd818fa81b25213724a437d", "type": "github" }, "original": { @@ -406,11 +270,11 @@ "vi-xournalpp": { "flake": false, "locked": { - "lastModified": 1732626314, - "narHash": "sha256-SMwNaZ5joosyMre6ZiB5nSjDJWFvPZ77//VPvaSRpUY=", + "lastModified": 1741503291, + "narHash": "sha256-2h7jD4wD+Clutq1NDL6ozmqIcO1DuVU6WtK7C23bpbY=", "owner": "raw-bacon", "repo": "vi-xournalpp", - "rev": "43126b1d2f2cce3f509c265d6ec7c09ccffc8e3b", + "rev": "96a3968be0eef67565f51f0d3604bffb122ee83d", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 1be9c1c..c6d4e50 100644 --- a/flake.nix +++ b/flake.nix @@ -45,6 +45,14 @@ inherit system; config.allowUnfree = true; # overlays = [ qotd.overlays.default ]; + config.allowInsecurePredicate = pkg: let + name = "${lib.getName pkg}-${lib.getVersion pkg}"; + byName = builtins.elem name [ + # "libxml2-2.13.8" + ]; + in if byName + then lib.warn "Allowing insecure package: ${name}" true + else false; }; lib = nixpkgs.lib; in @@ -80,7 +88,7 @@ users.fredrikr = { imports = [ ./home.nix - nixvim.homeManagerModules.nixvim + nixvim.homeModules.nixvim ]; }; extraSpecialArgs = { diff --git a/home.nix b/home.nix index fbb8ea0..83e1ca1 100644 --- a/home.nix +++ b/home.nix @@ -1,4 +1,10 @@ -{ config, pkgs, inputs, lib, ... }: +{ + config, + pkgs, + inputs, + lib, + ... +}: let lock-false = { @@ -9,7 +15,8 @@ let Value = true; Status = "locked"; }; -in { +in +{ home.username = "fredrikr"; home.homeDirectory = "/home/fredrikr"; @@ -24,7 +31,7 @@ in { brightnessctl python3 sage - quickemu + # quickemu maven vscode-fhs anki-bin @@ -45,7 +52,7 @@ in { ghc monocraft zsh-syntax-highlighting - unityhub + # unityhub dotnet-sdk omnisharp-roslyn # emacs @@ -71,11 +78,11 @@ in { shfmt libtool tinymist - emacsPackages.treesit-grammars.with-all-grammars + # emacsPackages.treesit-grammars.with-all-grammars librewolf cargo vulkan-tools - mesa.drivers + mesa vulkan-loader python312Packages.python-lsp-server editorconfig-core-c @@ -120,7 +127,9 @@ in { ".doom.d".source = home/doom.d; }; - home.sessionVariables = { EDITOR = "nvim"; }; + home.sessionVariables = { + EDITOR = "nvim"; + }; home.sessionPath = [ "/home/fredrikr/.config/emacs/bin/" ]; @@ -238,9 +247,9 @@ in { key = "cm"; action = ":CompilerOpen"; mode = [ "n" ]; - options = { - noremap = true; - silent = true; + options = { + noremap = true; + silent = true; }; } @@ -249,8 +258,8 @@ in { action = ":CompilerStop:CompilerRedo"; mode = [ "n" ]; options = { - noremap = true; - silent = true; + noremap = true; + silent = true; }; } @@ -259,15 +268,18 @@ in { action = ":CompilerToggleResults"; mode = [ "n" ]; options = { - noremap = true; - silent = true; + noremap = true; + silent = true; }; } { key = "y"; action = "\"+y"; - mode = [ "n" "v" ]; + mode = [ + "n" + "v" + ]; options = { noremap = true; silent = true; @@ -285,6 +297,38 @@ in { action = ""; mode = [ "i" ]; } + + # harpoon2 syntax + { + mode = "n"; + key = "ha"; + action.__raw = "function() require'harpoon':list():add() end"; + } + { + mode = "n"; + key = "hl"; + action.__raw = "function() require'harpoon'.ui:toggle_quick_menu(require'harpoon':list()) end"; + } + { + mode = "n"; + key = ""; + action.__raw = "function() require'harpoon':list():select(1) end"; + } + { + mode = "n"; + key = ""; + action.__raw = "function() require'harpoon':list():select(2) end"; + } + { + mode = "n"; + key = ""; + action.__raw = "function() require'harpoon':list():select(3) end"; + } + { + mode = "n"; + key = ""; + action.__raw = "function() require'harpoon':list():select(4) end"; + } ]; colorschemes.dracula = { @@ -298,7 +342,9 @@ in { viAlias = true; vimAlias = true; - globals = { mapleader = " "; }; + globals = { + mapleader = " "; + }; opts = { termguicolors = true; @@ -378,7 +424,7 @@ in { settings = { sections = { # lualine_z = [ '' - # { + # { # function() return require("battery").get_status_line() end # } # '' ]; @@ -403,14 +449,24 @@ in { enable = true; settings = { autoEnableSources = true; - experimental = { ghost_text = true; }; + experimental = { + ghost_text = true; + }; performance = { debounce = 60; fetchingTimeout = 200; maxViewEntries = 30; }; - snippet = { expand = "luasnip"; }; - formatting = { fields = [ "kind" "abbr" "menu" ]; }; + snippet = { + expand = "luasnip"; + }; + formatting = { + fields = [ + "kind" + "abbr" + "menu" + ]; + }; sources = [ { name = "git"; } { name = "nvim_lsp"; } @@ -427,7 +483,7 @@ in { name = "conventionalcommits"; } { - name = "treesitter"; # treesitter + name = "treesitter"; # treesitter } { name = "path"; # file system paths @@ -447,17 +503,33 @@ in { window = { completion = { - winhighlight = - "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel"; + winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel"; scrollbar = false; sidePadding = 0; - border = [ "╭" "─" "╮" "│" "╯" "─" "╰" "│" ]; + border = [ + "╭" + "─" + "╮" + "│" + "╯" + "─" + "╰" + "│" + ]; }; settings.documentation = { - border = [ "╭" "─" "╮" "│" "╯" "─" "╰" "│" ]; - winhighlight = - "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel"; + border = [ + "╭" + "─" + "╮" + "│" + "╯" + "─" + "╰" + "│" + ]; + winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel"; }; }; @@ -471,20 +543,33 @@ in { "" = "cmp.mapping.scroll_docs(4)"; "" = "cmp.mapping.complete()"; "" = "cmp.mapping.confirm({ select = true })"; - "" = - "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })"; + "" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })"; }; }; }; - cmp-nvim-lsp = { enable = true; }; # lsp + cmp-nvim-lsp = { + enable = true; + }; # lsp # cmp-buffer = { enable = true; }; - cmp-treesitter = { enable = true; }; - cmp-path = { enable = true; }; # file system paths - cmp_luasnip = { enable = true; }; # snippets - cmp-cmdline = { enable = true; }; # autocomplete for cmdline - cmp-conventionalcommits = { enable = true; }; - cmp-calc = { enable = true; }; + cmp-treesitter = { + enable = true; + }; + cmp-path = { + enable = true; + }; # file system paths + cmp_luasnip = { + enable = true; + }; # snippets + cmp-cmdline = { + enable = true; + }; # autocomplete for cmdline + cmp-conventionalcommits = { + enable = true; + }; + cmp-calc = { + enable = true; + }; lsp-format.enable = true; @@ -572,19 +657,21 @@ in { harpoon = { enable = true; - keymaps = { - navFile = { - "1" = ""; - "2" = ""; - "3" = ""; - "4" = ""; - }; - addFile = "ha"; - toggleQuickMenu = "hl"; - }; + # keymaps = { + # navFile = { + # "1" = ""; + # "2" = ""; + # "3" = ""; + # "4" = ""; + # }; + # addFile = "ha"; + # toggleQuickMenu = "hl"; + # }; }; - treesitter = { enable = true; }; + treesitter = { + enable = true; + }; undotree.enable = true; @@ -596,9 +683,9 @@ in { which-key.enable = true; - nvim-jdtls = { + jdtls = { enable = true; - data = "/home/fredrikr/.cache/jdtls/workspace"; + # data = "/home/fredrikr/.cache/jdtls/workspace"; }; telescope = { @@ -630,7 +717,9 @@ in { view.mergeTool.layout = "diff3_mixed"; }; - markview = { enable = true; }; + markview = { + enable = true; + }; rainbow-delimiters = { enable = true; @@ -675,7 +764,6 @@ in { direnv.enable = true; - smartcolumn = { enable = true; settings = { @@ -708,7 +796,8 @@ in { fzf-lua.enable = true; - overseer = { # depended on by compiler.nvim + overseer = { + # depended on by compiler.nvim enable = true; settings = { strategy = "toggleterm"; @@ -717,8 +806,7 @@ in { fidget = { enable = true; - settings = - { + settings = { notification = { window = { winblend = 0; @@ -737,7 +825,7 @@ in { easyescape = { enable = true; settings = { - chars = { + chars = { j = 1; k = 1; }; @@ -889,7 +977,7 @@ in { # rev = "5b0fc97f8ae29ddd2668eced7f352337d5d07f52"; # sha256 = "sha256-RgCk/BFi8vb6SAq6NchcRm/Lshvvw7hymxGNY0A+M1U="; # }; - # propagatedBuildInputs = [ + # propagatedBuildInputs = [ # pkgs.lua51Packages.plenary-nvim # ]; # disabled = pkgs.lua51Packages.lua.luaversion != "5.1"; @@ -934,16 +1022,22 @@ in { oh-my-zsh = { enable = true; - plugins = [ "git" "shrink-path" "direnv" ]; + plugins = [ + "git" + "shrink-path" + "direnv" + ]; # theme = ""; }; zplug = { enable = true; - plugins = [{ - name = "dracula/zsh"; - tags = [ "as:theme" ]; - }]; + plugins = [ + { + name = "dracula/zsh"; + tags = [ "as:theme" ]; + } + ]; }; shellAliases = { @@ -960,8 +1054,12 @@ in { zsh-abbr.enable = true; syntaxHighlighting = { - highlighters = [ "main" "cursor" ]; - styles = { # dracula + highlighters = [ + "main" + "cursor" + ]; + styles = { + # dracula "comment" = "fg=#6272A4"; "alias" = "fg=#50FA7B"; "suffix-alias" = "fg=#50FA7B"; @@ -1011,7 +1109,7 @@ in { }; }; - initExtra = '' + initContent = '' bindkey -v export TERM=xterm-256color @@ -1035,7 +1133,9 @@ in { # package = pkgs.jdk21; }; - programs.direnv = { enable = true; }; + programs.direnv = { + enable = true; + }; services.redshift = { enable = true; @@ -1119,7 +1219,6 @@ in { }; services.emacs.enable = true; - programs.tmux = { enable = true; clock24 = true; @@ -1136,7 +1235,7 @@ in { extraConfig = '' set -g @continuum-restore 'on' set -g @continuum-save-interval '60' # minutes - ''; + ''; } { plugin = tmuxPlugins.session-wizard;