From 76ed037b04fccdf71dc8e7de6739affc833c2130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20D=C3=B6nszelmann?= Date: Sat, 1 Feb 2025 15:55:05 +0100 Subject: [PATCH] update ci --- flake.lock | 973 +++++++++++++++++++++++++++++++++++++- flake.nix | 7 +- hosts/kili/home.nix | 9 +- programs/fish/default.nix | 9 + programs/git/default.nix | 4 +- programs/jj/default.nix | 4 +- programs/nvim/config.lua | 137 +++++- programs/nvim/default.nix | 59 ++- programs/nvim/options.nix | 9 +- programs/nvim/plugins.nix | 121 ++++- programs/tmux/default.nix | 1 + 11 files changed, 1278 insertions(+), 55 deletions(-) diff --git a/flake.lock b/flake.lock index 41c6966..859c596 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,206 @@ { "nodes": { + "cachix": { + "inputs": { + "devenv": [ + "noteslsp", + "crate2nix" + ], + "flake-compat": [ + "noteslsp", + "crate2nix" + ], + "nixpkgs": "nixpkgs_3", + "pre-commit-hooks": [ + "noteslsp", + "crate2nix" + ] + }, + "locked": { + "lastModified": 1709700175, + "narHash": "sha256-A0/6ZjLmT9qdYzKHmevnEIC7G+GiZ4UCr8v0poRPzds=", + "owner": "cachix", + "repo": "cachix", + "rev": "be97b37989f11b724197b5f4c7ffd78f12c8c4bf", + "type": "github" + }, + "original": { + "owner": "cachix", + "ref": "latest", + "repo": "cachix", + "type": "github" + } + }, + "cachix_2": { + "inputs": { + "devenv": [ + "noteslsp", + "crate2nix", + "crate2nix_stable" + ], + "flake-compat": [ + "noteslsp", + "crate2nix", + "crate2nix_stable" + ], + "nixpkgs": "nixpkgs_4", + "pre-commit-hooks": [ + "noteslsp", + "crate2nix", + "crate2nix_stable" + ] + }, + "locked": { + "lastModified": 1716549461, + "narHash": "sha256-lHy5kgx6J8uD+16SO47dPrbob98sh+W1tf4ceSqPVK4=", + "owner": "cachix", + "repo": "cachix", + "rev": "e2bb269fb8c0828d5d4d2d7b8d09ea85abcacbd4", + "type": "github" + }, + "original": { + "owner": "cachix", + "ref": "latest", + "repo": "cachix", + "type": "github" + } + }, + "cachix_3": { + "inputs": { + "devenv": [ + "noteslsp", + "crate2nix", + "crate2nix_stable", + "crate2nix_stable" + ], + "flake-compat": [ + "noteslsp", + "crate2nix", + "crate2nix_stable", + "crate2nix_stable" + ], + "nixpkgs": "nixpkgs_5", + "pre-commit-hooks": [ + "noteslsp", + "crate2nix", + "crate2nix_stable", + "crate2nix_stable" + ] + }, + "locked": { + "lastModified": 1716549461, + "narHash": "sha256-lHy5kgx6J8uD+16SO47dPrbob98sh+W1tf4ceSqPVK4=", + "owner": "cachix", + "repo": "cachix", + "rev": "e2bb269fb8c0828d5d4d2d7b8d09ea85abcacbd4", + "type": "github" + }, + "original": { + "owner": "cachix", + "ref": "latest", + "repo": "cachix", + "type": "github" + } + }, + "crate2nix": { + "inputs": { + "cachix": "cachix", + "crate2nix_stable": "crate2nix_stable", + "devshell": "devshell_4", + "flake-compat": "flake-compat_5", + "flake-parts": "flake-parts_4", + "nix-test-runner": "nix-test-runner_3", + "nixpkgs": [ + "noteslsp", + "nixpkgs" + ], + "pre-commit-hooks": "pre-commit-hooks_3" + }, + "locked": { + "lastModified": 1734429562, + "narHash": "sha256-V2XNs3Ir8WXNHdocfzkR/fu0FzkZ9uTDJkVecxJrGmQ=", + "owner": "nix-community", + "repo": "crate2nix", + "rev": "8537c2d7cb623679aaeff62c4c4c43a91566ab09", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "crate2nix", + "type": "github" + } + }, + "crate2nix_stable": { + "inputs": { + "cachix": "cachix_2", + "crate2nix_stable": "crate2nix_stable_2", + "devshell": "devshell_3", + "flake-compat": "flake-compat_4", + "flake-parts": "flake-parts_3", + "nix-test-runner": "nix-test-runner_2", + "nixpkgs": "nixpkgs_7", + "pre-commit-hooks": "pre-commit-hooks_2" + }, + "locked": { + "lastModified": 1719760004, + "narHash": "sha256-esWhRnt7FhiYq0CcIxw9pvH+ybOQmWBfHYMtleaMhBE=", + "owner": "nix-community", + "repo": "crate2nix", + "rev": "1dee214bb20855fa3e1e7bb98d28922ddaff8c57", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "0.14.1", + "repo": "crate2nix", + "type": "github" + } + }, + "crate2nix_stable_2": { + "inputs": { + "cachix": "cachix_3", + "crate2nix_stable": "crate2nix_stable_3", + "devshell": "devshell_2", + "flake-compat": "flake-compat_3", + "flake-parts": "flake-parts_2", + "nix-test-runner": "nix-test-runner", + "nixpkgs": "nixpkgs_6", + "pre-commit-hooks": "pre-commit-hooks" + }, + "locked": { + "lastModified": 1712821484, + "narHash": "sha256-rGT3CW64cJS9nlnWPFWSc1iEa3dNZecVVuPVGzcsHe8=", + "owner": "nix-community", + "repo": "crate2nix", + "rev": "42883afcad3823fa5811e967fb7bff54bc3c9d6d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "0.14.0", + "repo": "crate2nix", + "type": "github" + } + }, + "crate2nix_stable_3": { + "inputs": { + "flake-utils": "flake-utils_6" + }, + "locked": { + "lastModified": 1702842982, + "narHash": "sha256-A9AowkHIjsy1a4LuiPiVP88FMxyCWK41flZEZOUuwQM=", + "owner": "nix-community", + "repo": "crate2nix", + "rev": "75ac2973affa6b9b4f661a7b592cba6e4f51d426", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "0.12.0", + "repo": "crate2nix", + "type": "github" + } + }, "devshell": { "inputs": { "nixpkgs": [ @@ -21,6 +222,78 @@ "type": "github" } }, + "devshell_2": { + "inputs": { + "flake-utils": "flake-utils_7", + "nixpkgs": [ + "noteslsp", + "crate2nix", + "crate2nix_stable", + "crate2nix_stable", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1717408969, + "narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=", + "owner": "numtide", + "repo": "devshell", + "rev": "1ebbe68d57457c8cae98145410b164b5477761f4", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "devshell_3": { + "inputs": { + "flake-utils": "flake-utils_8", + "nixpkgs": [ + "noteslsp", + "crate2nix", + "crate2nix_stable", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1717408969, + "narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=", + "owner": "numtide", + "repo": "devshell", + "rev": "1ebbe68d57457c8cae98145410b164b5477761f4", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "devshell_4": { + "inputs": { + "flake-utils": "flake-utils_9", + "nixpkgs": [ + "noteslsp", + "crate2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1711099426, + "narHash": "sha256-HzpgM/wc3aqpnHJJ2oDqPBkNsqWbW0WfWUO8lKu8nGk=", + "owner": "numtide", + "repo": "devshell", + "rev": "2d45b54ca4a183f2fdcf4b19c895b64fbf620ee8", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, "dumpasm": { "inputs": { "flake-utils": "flake-utils", @@ -70,6 +343,48 @@ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, + "flake-compat_3": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-compat_4": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-compat_5": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -91,6 +406,75 @@ "type": "github" } }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "noteslsp", + "crate2nix", + "crate2nix_stable", + "crate2nix_stable", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1719745305, + "narHash": "sha256-xwgjVUpqSviudEkpQnioeez1Uo2wzrsMaJKJClh+Bls=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c3c5ecc05edc7dafba779c6c1a61cd08ac6583e9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_3": { + "inputs": { + "nixpkgs-lib": [ + "noteslsp", + "crate2nix", + "crate2nix_stable", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1719745305, + "narHash": "sha256-xwgjVUpqSviudEkpQnioeez1Uo2wzrsMaJKJClh+Bls=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c3c5ecc05edc7dafba779c6c1a61cd08ac6583e9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_4": { + "inputs": { + "nixpkgs-lib": [ + "noteslsp", + "crate2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712014858, + "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -109,6 +493,60 @@ "type": "github" } }, + "flake-utils_10": { + "inputs": { + "systems": "systems_10" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_11": { + "inputs": { + "systems": "systems_11" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_12": { + "inputs": { + "systems": "systems_12" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "flake-utils_2": { "inputs": { "systems": "systems_2" @@ -186,11 +624,65 @@ "systems": "systems_6" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_7": { + "inputs": { + "systems": "systems_7" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_8": { + "inputs": { + "systems": "systems_8" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_9": { + "inputs": { + "systems": "systems_9" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", "type": "github" }, "original": { @@ -276,6 +768,78 @@ "type": "github" } }, + "gitignore_2": { + "inputs": { + "nixpkgs": [ + "noteslsp", + "crate2nix", + "crate2nix_stable", + "crate2nix_stable", + "pre-commit-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" + } + }, + "gitignore_3": { + "inputs": { + "nixpkgs": [ + "noteslsp", + "crate2nix", + "crate2nix_stable", + "pre-commit-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" + } + }, + "gitignore_4": { + "inputs": { + "nixpkgs": [ + "noteslsp", + "crate2nix", + "pre-commit-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": [ @@ -404,6 +968,54 @@ "type": "github" } }, + "nix-test-runner": { + "flake": false, + "locked": { + "lastModified": 1588761593, + "narHash": "sha256-FKJykltAN/g3eIceJl4SfDnnyuH2jHImhMrXS2KvGIs=", + "owner": "stoeffel", + "repo": "nix-test-runner", + "rev": "c45d45b11ecef3eb9d834c3b6304c05c49b06ca2", + "type": "github" + }, + "original": { + "owner": "stoeffel", + "repo": "nix-test-runner", + "type": "github" + } + }, + "nix-test-runner_2": { + "flake": false, + "locked": { + "lastModified": 1588761593, + "narHash": "sha256-FKJykltAN/g3eIceJl4SfDnnyuH2jHImhMrXS2KvGIs=", + "owner": "stoeffel", + "repo": "nix-test-runner", + "rev": "c45d45b11ecef3eb9d834c3b6304c05c49b06ca2", + "type": "github" + }, + "original": { + "owner": "stoeffel", + "repo": "nix-test-runner", + "type": "github" + } + }, + "nix-test-runner_3": { + "flake": false, + "locked": { + "lastModified": 1588761593, + "narHash": "sha256-FKJykltAN/g3eIceJl4SfDnnyuH2jHImhMrXS2KvGIs=", + "owner": "stoeffel", + "repo": "nix-test-runner", + "rev": "c45d45b11ecef3eb9d834c3b6304c05c49b06ca2", + "type": "github" + }, + "original": { + "owner": "stoeffel", + "repo": "nix-test-runner", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1732521221, @@ -420,6 +1032,20 @@ "type": "github" } }, + "nixpkgs_10": { + "locked": { + "lastModified": 1710377395, + "narHash": "sha256-KMubsUWtVr7L55pXMBibBDBdmk3xrjbBPduc0E8z28c=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "db001797591bf76f7b8d4c4ed3b49233391e0c97", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1733759999, @@ -438,18 +1064,110 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1710377395, - "narHash": "sha256-KMubsUWtVr7L55pXMBibBDBdmk3xrjbBPduc0E8z28c=", + "lastModified": 1700612854, + "narHash": "sha256-yrQ8osMD+vDLGFX7pcwsY/Qr5PUd6OmDMYJZzZi0+zc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "db001797591bf76f7b8d4c4ed3b49233391e0c97", + "rev": "19cbff58383a4ae384dea4d1d0c823d72b49d614", "type": "github" }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1715534503, + "narHash": "sha256-5ZSVkFadZbFP1THataCaSf0JH2cAH3S29hU9rrxTEqk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2057814051972fa1453ddfb0d98badbea9b83c06", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1715534503, + "narHash": "sha256-5ZSVkFadZbFP1THataCaSf0JH2cAH3S29hU9rrxTEqk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2057814051972fa1453ddfb0d98badbea9b83c06", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1719506693, + "narHash": "sha256-C8e9S7RzshSdHB7L+v9I51af1gDM5unhJ2xO1ywxNH8=", + "path": "/nix/store/4p0avw1s3vf27hspgqsrqs37gxk4i83i-source", + "rev": "b2852eb9365c6de48ffb0dc2c9562591f652242a", + "type": "path" + }, "original": { "id": "nixpkgs", "type": "indirect" } }, + "nixpkgs_7": { + "locked": { + "lastModified": 1719506693, + "narHash": "sha256-C8e9S7RzshSdHB7L+v9I51af1gDM5unhJ2xO1ywxNH8=", + "path": "/nix/store/4p0avw1s3vf27hspgqsrqs37gxk4i83i-source", + "rev": "b2852eb9365c6de48ffb0dc2c9562591f652242a", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_8": { + "locked": { + "lastModified": 1720031269, + "narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9f4128e00b0ae8ec65918efeba59db998750ead6", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_9": { + "locked": { + "lastModified": 1728538411, + "narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixvim": { "inputs": { "devshell": "devshell", @@ -478,6 +1196,27 @@ "type": "github" } }, + "noteslsp": { + "inputs": { + "crate2nix": "crate2nix", + "flake-utils": "flake-utils_11", + "nixpkgs": "nixpkgs_8", + "rust-overlay": "rust-overlay_2" + }, + "locked": { + "lastModified": 1735730799, + "narHash": "sha256-J4lMtpvImga9iud/c4yNpc7fd9Vo2N+4Uxp0B7nZ9cU=", + "ref": "refs/heads/main", + "rev": "5956888aa5c899f107e89aa349d26a005a267a62", + "revCount": 54, + "type": "git", + "url": "ssh://git@github.com/jdonszelmann/notes" + }, + "original": { + "type": "git", + "url": "ssh://git@github.com/jdonszelmann/notes" + } + }, "nuschtosSearch": { "inputs": { "flake-utils": "flake-utils_5", @@ -501,6 +1240,115 @@ "type": "github" } }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": [ + "noteslsp", + "crate2nix", + "crate2nix_stable", + "crate2nix_stable", + "flake-compat" + ], + "gitignore": "gitignore_2", + "nixpkgs": [ + "noteslsp", + "crate2nix", + "crate2nix_stable", + "crate2nix_stable", + "nixpkgs" + ], + "nixpkgs-stable": [ + "noteslsp", + "crate2nix", + "crate2nix_stable", + "crate2nix_stable", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1719259945, + "narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, + "pre-commit-hooks_2": { + "inputs": { + "flake-compat": [ + "noteslsp", + "crate2nix", + "crate2nix_stable", + "flake-compat" + ], + "gitignore": "gitignore_3", + "nixpkgs": [ + "noteslsp", + "crate2nix", + "crate2nix_stable", + "nixpkgs" + ], + "nixpkgs-stable": [ + "noteslsp", + "crate2nix", + "crate2nix_stable", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1719259945, + "narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, + "pre-commit-hooks_3": { + "inputs": { + "flake-compat": [ + "noteslsp", + "crate2nix", + "flake-compat" + ], + "flake-utils": "flake-utils_10", + "gitignore": "gitignore_4", + "nixpkgs": [ + "noteslsp", + "crate2nix", + "nixpkgs" + ], + "nixpkgs-stable": [ + "noteslsp", + "crate2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712055707, + "narHash": "sha256-4XLvuSIDZJGS17xEwSrNuJLL7UjDYKGJSbK1WWX2AK8=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "e35aed5fda3cc79f88ed7f1795021e559582093a", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, "root": { "inputs": { "dumpasm": "dumpasm", @@ -511,6 +1359,7 @@ "kitty-search": "kitty-search", "nixpkgs": "nixpkgs_2", "nixvim": "nixvim", + "noteslsp": "noteslsp", "t": "t" } }, @@ -535,6 +1384,24 @@ "type": "github" } }, + "rust-overlay_2": { + "inputs": { + "nixpkgs": "nixpkgs_9" + }, + "locked": { + "lastModified": 1735698720, + "narHash": "sha256-+skLL6mq/T7s6J5YmSp89ivQOHBPQ40GEU2n8yqp6bs=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "a00807363a8a6cae6c3fa84ff494bf9d96333674", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, @@ -550,6 +1417,51 @@ "type": "github" } }, + "systems_10": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_11": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_12": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "systems_2": { "locked": { "lastModified": 1681028828, @@ -625,10 +1537,55 @@ "type": "github" } }, + "systems_7": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_8": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_9": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "t": { "inputs": { - "flake-utils": "flake-utils_6", - "nixpkgs": "nixpkgs_3" + "flake-utils": "flake-utils_12", + "nixpkgs": "nixpkgs_10" }, "locked": { "lastModified": 1710410762, diff --git a/flake.nix b/flake.nix index 0ec22db..7b5519d 100644 --- a/flake.nix +++ b/flake.nix @@ -32,6 +32,8 @@ inputs.nixpkgs-unstable.follows = "nixpkgs"; }; + # sorry, secret... for now + noteslsp.url = "git+ssh://git@github.com/jdonszelmann/notes"; }; outputs = @@ -44,6 +46,7 @@ dumpasm, jujutsu, ghostty, + noteslsp, ... }@inputs: let @@ -61,6 +64,7 @@ inherit (dumpasm.packages.${system}) dumpasm; inherit (jujutsu.packages.${system}) jujutsu; inherit (ghostty.packages.${system}) ghostty; + inherit (noteslsp.packages.${system}) noteslsp; }; }) ]; @@ -89,7 +93,8 @@ '') (pkgs.writeShellScriptBin "apply-home" '' - nix run .#home-manager -- switch --flake .#$@ + export NIX_BUILD_CORES=$(($(nproc) * 2)) + nix run .#home-manager -j $NIX_BUILD_CORES --cores $NIX_BUILD_CORES -- switch --flake .#$@ --max-jobs $NIX_BUILD_CORES '') (pkgs.writeShellScriptBin "apply" '' diff --git a/hosts/kili/home.nix b/hosts/kili/home.nix index cde9eb3..3649f7d 100644 --- a/hosts/kili/home.nix +++ b/hosts/kili/home.nix @@ -1,9 +1,10 @@ -{ config, pkgs, ... }: { +{ config, pkgs, ... }: +{ home = { stateVersion = "24.05"; - username = "jonathan"; - homeDirectory = "/home/jonathan"; - packages = with pkgs; [config.programs.neovim.package]; + username = "jana"; + homeDirectory = "/home/jana"; + packages = with pkgs; [ config.programs.neovim.package ]; }; imports = [ diff --git a/programs/fish/default.nix b/programs/fish/default.nix index fa12ef2..62f7bf1 100644 --- a/programs/fish/default.nix +++ b/programs/fish/default.nix @@ -95,6 +95,15 @@ in enable = true; shellAliases = aliases; plugins = with pkgs.fishPlugins; [ + { + name = "bang-bang"; + src = pkgs.fetchFromGitHub { + owner = "oh-my-fish"; + repo = "plugin-bang-bang"; + rev = "ec991b80ba7d4dda7a962167b036efc5c2d79419"; + hash = "sha256-oPPCtFN2DPuM//c48SXb4TrFRjJtccg0YPXcAo0Lxq0="; + }; + } { name = "tide"; inherit (tide) src; diff --git a/programs/git/default.nix b/programs/git/default.nix index 3031401..14b8642 100644 --- a/programs/git/default.nix +++ b/programs/git/default.nix @@ -1,8 +1,8 @@ _: { programs.git = { enable = true; - userEmail = "jonathan@donsz.nl"; - userName = "Jonathan Dönszelmann"; + userEmail = "jana@donsz.nl"; + userName = "Jana Dönszelmann"; signing.key = "/home/jonathan/.ssh/id_ed25519.pub"; signing.signByDefault = true; diff --git a/programs/jj/default.nix b/programs/jj/default.nix index aa86285..988b6fb 100644 --- a/programs/jj/default.nix +++ b/programs/jj/default.nix @@ -6,8 +6,8 @@ settings = { user = { - email = "jonathan@donsz.nl"; - name = "Jonathan Dönszelmann"; + email = "jana@donsz.nl"; + name = "Jana Dönszelmann"; }; ui = { diff --git a/programs/nvim/config.lua b/programs/nvim/config.lua index e100cf4..cdf0b4d 100644 --- a/programs/nvim/config.lua +++ b/programs/nvim/config.lua @@ -1,8 +1,5 @@ vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions" -require("render-markdown").setup { - latex_converter = '${pkgs.python312Packages.pylatexenc}/bin/latex2text', -} local otter = require'otter' otter.setup{} @@ -91,30 +88,128 @@ vim.keymap.set('n', 'gd', (function() builtin.lsp_definitions({jump_type="vsplit vim.keymap.set('n', 'gt', (function() builtin.lsp_type_definitions({jump_type="vsplit"}) end), {}) local barbar_state = require("barbar.state") -vim.api.nvim_create_user_command('CustomCloseBuffer', function (tbl) - count = 0 - for _ in pairs(barbar_state.buffers) do count = count + 1 end +function find_windows_with_buffer(bufnum) + windows = {} - if count == 1 then - vim.cmd "quit" + local window_list = vim.api.nvim_list_wins() + + for _, window in ipairs(window_list) do + local win_info = vim.fn.getwininfo(window) + + if win_info ~= nil then + for _, buf in ipairs(win_info) do + if buf.bufnr == bufnum then + table.insert(windows, window) + end + end + end end - vim.cmd "silent! BufferClose" + return windows +end - if vim.api.nvim_buf_get_name(0) == "" then - vim.cmd "quit" +function num_useful_windows() + local window_list = vim.api.nvim_tabpage_list_wins(0) + local num = 0 + + for _, window in ipairs(window_list) do + local win_info = vim.fn.getwininfo(window) + + if win_info ~= nil then + for _, win_info in ipairs(win_info) do + if buf_is_useful(win_info.bufnr) then + num = num + 1 + end + end + end end -end, { desc = "Close Buffer without errors" }) + + return num +end + +function buf_is_useful(bufnr) + local bufname = vim.api.nvim_buf_get_name(bufnr) + + -- if the window's buffer has no name, it's not useful + if bufname == '' then + return false + end + + -- print("bufname: ", bufname) + + -- if the window's buffer is read only, it's not useful + local readonly = vim.api.nvim_buf_get_option(bufnr, 'readonly') + if readonly then + -- print("=readonly") + return false + end + + -- -- if the buffer is not listed, it's not useful + local listed = vim.api.nvim_buf_get_option(bufnr, 'buflisted') + if not listed then + -- print("=unlisted") + return false + end + + local buftype = vim.api.nvim_buf_get_option(bufnr, 'buftype') + if buftype == "quickfix" then + -- print("=readonly") + return false + end + + local lines = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false) + if #lines > 1 or (#lines == 1 and #lines[1] > 0) then + return true -- If the buffer has content, return false + else + return false + end + + -- the window contains a useful buffer + return true +end + +function quit_window(window) + vim.api.nvim_win_call(window, function() + vim.cmd "quit" + end) +end + +vim.api.nvim_create_user_command('CloseBuffer', function (opts) + if num_useful_windows() > 1 then + vim.cmd { + cmd = "quit", + bang = opts.bang, + } + else + vim.cmd { + cmd = "BufferDelete", + bang = opts.bang, + } + if not buf_is_useful(vim.api.nvim_get_current_buf()) then + vim.cmd { + cmd = "quit", + bang = opts.bang, + } + end + end +end, { desc = "Close Current Buffer", bang = true, }) + +vim.keymap.set("ca", "W", "w") +vim.keymap.set("ca", "X", "x") +vim.keymap.set("ca", "Q", "q") + +vim.keymap.set("ca", "q", "CloseBuffer") +vim.keymap.set("ca", "qw", "quit") -- format on wq and x and replace X, W and Q with x, w and q -vim.cmd [[cnoreabbrev w execute "Format sync" w]] -vim.cmd [[cnoreabbrev x execute "Format sync" w CustomCloseBuffer ]] -vim.cmd [[cabbrev W w]] -vim.cmd [[cabbrev X execute "Format sync" x]] -vim.cmd [[cabbrev Q CustomCloseBuffer]] -vim.cmd [[cnoreabbrev q CustomCloseBuffer ]] -vim.cmd [[cnoreabbrev qa q]] -vim.cmd [[nnoremap ; :]] +-- vim.cmd [[cnoreabbrev w execute "Format sync" w]] +-- vim.cmd [[cnoreabbrev x execute "Format sync" w CustomCloseBuffer ]] +-- vim.cmd [[cabbrev W w]] +-- vim.cmd [[cabbrev X execute "Format sync" x]] +-- vim.cmd [[cabbrev Q CustomCloseBuffer]] +-- vim.cmd [[cnoreabbrev q CustomCloseBuffer ]] +-- vim.cmd [[cnoreabbrev qa q]] +-- vim.cmd [[nnoremap ; :]] local builtin = require('telescope.builtin') @@ -137,7 +232,7 @@ vim.keymap.set('n', 'cl', "silent! BufferCloseBuffersLeft") vim.keymap.set('n', 'cr', "silent! BufferCloseBuffersRight") -- like quit but for a single tab -vim.keymap.set('n', 'q', "BD", {}) +vim.keymap.set('n', 'q', "BufferClose", {}) vim.keymap.set('n', 'oq', "BufOnly", {}) vim.keymap.set("n", "x", require("telescope.builtin").resume, { diff --git a/programs/nvim/default.nix b/programs/nvim/default.nix index cfd7a30..5d5e543 100644 --- a/programs/nvim/default.nix +++ b/programs/nvim/default.nix @@ -5,7 +5,11 @@ let }; in { - home = { sessionVariables = { EDITOR = "nvim"; }; }; + home = { + sessionVariables = { + EDITOR = "nvim"; + }; + }; imports = [ ./options.nix @@ -40,6 +44,9 @@ in }; }; + extraLuaPackages = ps: [ ps.magick ]; + extraPackages = [ pkgs.imagemagick ]; + # package = pkgs.neovim-unwrapped; package = (pkgs.neovim-unwrapped.override { lua = pkgs.luajit; }).overrideAttrs (_: { version = "git"; @@ -49,20 +56,22 @@ in rev = "76dcc7029b200e1d85024d7ba4a34c602e730dbe"; hash = "sha256-y3LmGebXuQhLz9w1IzkDU8b464WvMvPCbIImpVvxmcI="; }; - buildInputs = [ - (pkgs.utf8proc.overrideAttrs (_: { - version = "git"; + buildInputs = + [ + (pkgs.utf8proc.overrideAttrs (_: { + version = "git"; - src = pkgs.fetchFromGitHub - { + src = pkgs.fetchFromGitHub { owner = "JuliaStrings"; repo = "utf8proc"; rev = "3de4596fbe28956855df2ecb3c11c0bbc3535838"; hash = "sha256-DNnrKLwks3hP83K56Yjh9P3cVbivzssblKIx4M/RKqw="; }; - })) - ] ++ pkgs.neovim-unwrapped.buildInputs ++ pkgs.neovim-unwrapped.nativeBuildInputs; + })) + ] + ++ pkgs.neovim-unwrapped.buildInputs + ++ pkgs.neovim-unwrapped.nativeBuildInputs; }); keymaps = [ @@ -92,6 +101,9 @@ in (map "i" "" "") (map "v" "" ">gv") (map "v" "" "