diff --git a/default-machine-config.nix b/default-machine-config.nix index bd6655b..9061727 100644 --- a/default-machine-config.nix +++ b/default-machine-config.nix @@ -9,7 +9,7 @@ # inputs.home-manager.nixosModules.home-manager ]; - system.stateVersion = "25.05"; + system.stateVersion = "26.05"; services.resolved.enable = false; # Enable SSH @@ -38,6 +38,9 @@ atuin rcon lix + nix-output-monitor + wget + comma ]; # Set up direnv @@ -125,10 +128,5 @@ nixos.enable = lib.mkForce false; }; - # home-manager = { - # useGlobalPkgs = true; - # useUserPackages = true; - # verbose = true; - # extraSpecialArgs = { inherit inputs; }; - # }; + security.polkit.enable = true; } diff --git a/fili/configuration.nix b/fili/configuration.nix index 0b41d94..6453e59 100644 --- a/fili/configuration.nix +++ b/fili/configuration.nix @@ -35,4 +35,12 @@ _: { # secrets sops.age.keyFile = "/sops/sops-key.txt"; sops.defaultSopsFormat = "dotenv"; + + users.extraUsers.jana.extraGroups = [ + "storage" + "syncthing" + "jellyfin" + "media" + "nginx" + ]; } diff --git a/flake.lock b/flake.lock index 117ac98..4adfd32 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,88 @@ { "nodes": { + "agenix": { + "inputs": { + "darwin": "darwin", + "home-manager": [ + "p1n3appl3", + "home-manager" + ], + "nixpkgs": [ + "p1n3appl3", + "ragenix", + "nixpkgs" + ], + "systems": "systems_12" + }, + "locked": { + "lastModified": 1761656077, + "narHash": "sha256-lsNWuj4Z+pE7s0bd2OKicOFq9bK86JE0ZGeKJbNqb94=", + "owner": "ryantm", + "repo": "agenix", + "rev": "9ba0d85de3eaa7afeab493fed622008b6e4924f5", + "type": "github" + }, + "original": { + "owner": "ryantm", + "repo": "agenix", + "type": "github" + } + }, + "agenix_2": { + "inputs": { + "darwin": [ + "rahul-config", + "darwin" + ], + "home-manager": [ + "rahul-config", + "home-manager" + ], + "nixpkgs": [ + "rahul-config", + "nixpkgs" + ], + "systems": [ + "rahul-config", + "flake-utils", + "systems" + ] + }, + "locked": { + "lastModified": 1720546205, + "narHash": "sha256-boCXsjYVxDviyzoEyAk624600f3ZBo/DKtUdvMTpbGY=", + "owner": "ryantm", + "repo": "agenix", + "rev": "de96bd907d5fbc3b14fc33ad37d1b9a3cb15edc6", + "type": "github" + }, + "original": { + "owner": "ryantm", + "repo": "agenix", + "type": "github" + } + }, + "catppuccin": { + "inputs": { + "nixpkgs": [ + "p1n3appl3", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1767967164, + "narHash": "sha256-Cx4VETh9dGoQYDtWhre7g66d7SAr+h1h6f+SSHxVrck=", + "owner": "catppuccin", + "repo": "nix", + "rev": "e973584280e3b0e1d5b5a1a5e9948dc222c54af7", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "nix", + "type": "github" + } + }, "colmena": { "inputs": { "flake-compat": "flake-compat", @@ -41,6 +124,108 @@ "url": "ssh://forgejo@git.donsz.nl/jana/eelco-visser-compiler-construction.git" } }, + "crane": { + "locked": { + "lastModified": 1760924934, + "narHash": "sha256-tuuqY5aU7cUkR71sO2TraVKK2boYrdW3gCSXUkF4i44=", + "owner": "ipetkov", + "repo": "crane", + "rev": "c6b4d5308293d0d04fcfeee92705017537cad02f", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "crane_2": { + "inputs": { + "nixpkgs": [ + "rahul-config", + "ragenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1708794349, + "narHash": "sha256-jX+B1VGHT0ruHHL5RwS8L21R6miBn4B6s9iVyUJsJJY=", + "owner": "ipetkov", + "repo": "crane", + "rev": "2c94ff9a6fbeb9f3ea0107f28688edbe9c81deaa", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "darwin": { + "inputs": { + "nixpkgs": [ + "p1n3appl3", + "ragenix", + "agenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1744478979, + "narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "43975d782b418ebf4969e9ccba82466728c2851b", + "type": "github" + }, + "original": { + "owner": "lnl7", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, + "darwin_2": { + "inputs": { + "nixpkgs": [ + "rahul-config", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722082646, + "narHash": "sha256-od8dBWVP/ngg0cuoyEl/w9D+TCNDj6Kh4tr151Aax7w=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "0413754b3cdb879ba14f6e96915e5fdf06c6aab6", + "type": "github" + }, + "original": { + "owner": "lnl7", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, + "dumpasm": { + "inputs": { + "flake-utils": "flake-utils_3", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1732916787, + "narHash": "sha256-CIidjQcQNvwuxMOGc6WKVTXO4MWTOp+Rr5HN2ZCRR58=", + "owner": "jdonszelmann", + "repo": "dumpasm", + "rev": "8f2bb630aa90bddf3ada83e5a57eba6aa42a06f5", + "type": "github" + }, + "original": { + "owner": "jdonszelmann", + "repo": "dumpasm", + "type": "github" + } + }, "fenix": { "inputs": { "nixpkgs": [ @@ -87,6 +272,44 @@ "type": "github" } }, + "firefox-addons": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "dir": "pkgs/firefox-addons", + "lastModified": 1768881817, + "narHash": "sha256-yEG418W8a7C/bcmRI5Lgd03XbBc8K2yV0kp1WUHTYbA=", + "owner": "rycee", + "repo": "nur-expressions", + "rev": "bbd2046d41083954fd28c31cb4f2d3510c9e2b1e", + "type": "gitlab" + }, + "original": { + "dir": "pkgs/firefox-addons", + "owner": "rycee", + "repo": "nur-expressions", + "type": "gitlab" + } + }, + "firefox-sidebar-css": { + "flake": false, + "locked": { + "lastModified": 1755054837, + "narHash": "sha256-E2TBqMuSco0D53nozFNWNgoy8y8Mw0hO2aRdM4awoC8=", + "owner": "drannex", + "repo": "FirefoxSidebar", + "rev": "ec3bbe90028bd80d255dfe802c28599bb3b358bc", + "type": "github" + }, + "original": { + "owner": "drannex", + "repo": "FirefoxSidebar", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -103,6 +326,27 @@ "type": "github" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1765835352, + "narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "a34fae9c08a15ad73f295041fec82323541400a9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "locked": { "lastModified": 1659877975, @@ -118,6 +362,114 @@ "type": "github" } }, + "flake-utils_10": { + "inputs": { + "systems": "systems_13" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_11": { + "inputs": { + "systems": "systems_14" + }, + "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_15" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_13": { + "inputs": { + "systems": "systems_16" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_14": { + "inputs": { + "systems": "systems_17" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_15": { + "inputs": { + "systems": "systems_18" + }, + "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" @@ -159,11 +511,11 @@ "systems": "systems_3" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -212,6 +564,24 @@ "inputs": { "systems": "systems_6" }, + "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_8": { + "inputs": { + "systems": "systems_8" + }, "locked": { "lastModified": 1731533236, "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", @@ -226,9 +596,9 @@ "type": "github" } }, - "flake-utils_8": { + "flake-utils_9": { "inputs": { - "systems": "systems_7" + "systems": "systems_10" }, "locked": { "lastModified": 1731533236, @@ -246,7 +616,7 @@ }, "harmonica": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1738890519, @@ -262,17 +632,80 @@ "url": "ssh://git@github.com/jdonszelmann/harmonica-tabs" } }, - "homepage": { + "home-manager": { "inputs": { - "flake-utils": "flake-utils_4", - "nixpkgs": "nixpkgs_4" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1767710337, - "narHash": "sha256-IjtTEr5ZTIvlE/ceC68144dxe38cv7RM0bhIUKeehT0=", + "lastModified": 1768836546, + "narHash": "sha256-nJZkTamcXXMW+SMYiGFB6lB8l0aJw0xjssfN8xYd/Fs=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "b56c5ad14fcf8b5bc887463552483bf000ca562a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "p1n3appl3", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1768512489, + "narHash": "sha256-jZi945d3e6DYhrw3K5Pew+QaL3qSgq3O6xiVaEVLgXs=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "bba859cd85b90dd9e4e6fd44b2af4aa64ae801a1", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_3": { + "inputs": { + "nixpkgs": [ + "rahul-config", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722203588, + "narHash": "sha256-91V5FMSQ4z9bkhTCf0f86Zjw0bh367daSf0mzCIW0vU=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "792757f643cedc13f02098d8ed506d82e19ec1da", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "home-manager", + "type": "github" + } + }, + "homepage": { + "inputs": { + "flake-utils": "flake-utils_5", + "nixpkgs": "nixpkgs_5" + }, + "locked": { + "lastModified": 1767948332, + "narHash": "sha256-TfGH5+8H70FUNmEuyLW799G3EVmij0aJcjaL+hYhvk0=", "owner": "jdonszelmann", "repo": "homepage", - "rev": "479a5d6f064ea52d942bc85e2b3f19e4c79d2805", + "rev": "d236b50f86a638f15a58468b28a218797c1d4c4e", "type": "github" }, "original": { @@ -281,10 +714,64 @@ "type": "github" } }, + "impermanence": { + "locked": { + "lastModified": 1675359654, + "narHash": "sha256-FPxzuvJkcO49g4zkWLSeuZkln54bLoTtrggZDJBH90I=", + "owner": "nix-community", + "repo": "impermanence", + "rev": "6138eb8e737bffabd4c8fc78ae015d4fd6a7e2fd", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "impermanence", + "rev": "6138eb8e737bffabd4c8fc78ae015d4fd6a7e2fd", + "type": "github" + } + }, + "jujutsu": { + "inputs": { + "flake-utils": "flake-utils_6", + "nixpkgs": [ + "nixpkgs" + ], + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1768781827, + "narHash": "sha256-IbWOHI/IlGC43Mg7AZUu6jCHjIEzFIPAoSlFDJG43A4=", + "owner": "martinvonz", + "repo": "jj", + "rev": "de8531b018a08fd1e2ee67b5c8848146c62be5f4", + "type": "github" + }, + "original": { + "owner": "martinvonz", + "repo": "jj", + "type": "github" + } + }, + "kitty-search": { + "flake": false, + "locked": { + "lastModified": 1749065041, + "narHash": "sha256-Xy4dH2fzEQmKfqhmotVDEszuTqoISONGNfC1yfcdevs=", + "owner": "trygveaa", + "repo": "kitty-kitten-search", + "rev": "992c1f3d220dc3e1ae18a24b15fcaf47f4e61ff8", + "type": "github" + }, + "original": { + "owner": "trygveaa", + "repo": "kitty-kitten-search", + "type": "github" + } + }, "mapf": { "inputs": { - "flake-utils": "flake-utils_5", - "nixpkgs": "nixpkgs_5" + "flake-utils": "flake-utils_7", + "nixpkgs": "nixpkgs_6" }, "locked": { "lastModified": 1757529600, @@ -300,19 +787,41 @@ "url": "ssh://git@github.com/jdonszelmann/mapf-server" } }, + "matugen": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems_7" + }, + "locked": { + "lastModified": 1768585282, + "narHash": "sha256-JTH+wQTt8pyS5iPb7+r/70pYfLgi/OFTzimcRmMcs2g=", + "owner": "InioX", + "repo": "matugen", + "rev": "5905cae968e02d3c1d23ee556e9a0719e5231227", + "type": "github" + }, + "original": { + "owner": "InioX", + "ref": "main", + "repo": "matugen", + "type": "github" + } + }, "mifg": { "inputs": { - "flake-utils": "flake-utils_6", + "flake-utils": "flake-utils_8", "naersk": "naersk", - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_8", "nixpkgs-mozilla": "nixpkgs-mozilla" }, "locked": { - "lastModified": 1767464600, - "narHash": "sha256-Bk4ZNrh3EYTTxioO3MhR6k8g7yBvnGX7/VZKndB6Wz4=", + "lastModified": 1768757523, + "narHash": "sha256-S5hYmrxZUSgyZ8609tPK00dkmd9yjTHtIMz7GHllQ+U=", "ref": "refs/heads/main", - "rev": "05c3d7e4564696dd7d6ea5d9e4737872190d9268", - "revCount": 67, + "rev": "4df0eff3871a61df547bcb1fecd657dc77dc24c7", + "revCount": 69, "type": "git", "url": "ssh://forgejo@git.donsz.nl/jana/money.is.fckn.gay.git" }, @@ -324,7 +833,7 @@ "naersk": { "inputs": { "fenix": "fenix", - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1763384566, @@ -343,7 +852,7 @@ "naersk_2": { "inputs": { "fenix": "fenix_2", - "nixpkgs": "nixpkgs_9" + "nixpkgs": "nixpkgs_16" }, "locked": { "lastModified": 1752689277, @@ -359,6 +868,67 @@ "type": "github" } }, + "niri": { + "inputs": { + "niri-stable": "niri-stable", + "niri-unstable": [ + "niri-unstable" + ], + "nixpkgs": "nixpkgs_9", + "nixpkgs-stable": "nixpkgs-stable", + "xwayland-satellite-stable": "xwayland-satellite-stable", + "xwayland-satellite-unstable": "xwayland-satellite-unstable" + }, + "locked": { + "lastModified": 1768767453, + "narHash": "sha256-Omq1UHEJ1oxkTo2j8l6qQtmyPR7Uj+k7HC5Khd3jVVA=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "8eab7c21ef4edc97cc56ddb8e76a842e0818d6d7", + "type": "github" + }, + "original": { + "owner": "sodiboo", + "repo": "niri-flake", + "type": "github" + } + }, + "niri-stable": { + "flake": false, + "locked": { + "lastModified": 1756556321, + "narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "ref": "v25.08", + "repo": "niri", + "type": "github" + } + }, + "niri-unstable": { + "inputs": { + "nixpkgs": "nixpkgs_10", + "rust-overlay": "rust-overlay_2" + }, + "locked": { + "lastModified": 1768678265, + "narHash": "sha256-Ub8eed4DsfIDWyg30xEe+8bSxL/z5Af/gCjmvJ0V/Hs=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "d7184a04b904e07113f4623610775ae78d32394c", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, "nix-github-actions": { "inputs": { "nixpkgs": [ @@ -380,6 +950,80 @@ "type": "github" } }, + "nix-index-database": { + "inputs": { + "nixpkgs": [ + "p1n3appl3", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1765267181, + "narHash": "sha256-d3NBA9zEtBu2JFMnTBqWj7Tmi7R5OikoU2ycrdhQEws=", + "owner": "Mic92", + "repo": "nix-index-database", + "rev": "82befcf7dc77c909b0f2a09f5da910ec95c5b78f", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "nix-index-database", + "type": "github" + } + }, + "nix-index-database_2": { + "inputs": { + "nixpkgs": [ + "rahul-config", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722136042, + "narHash": "sha256-x3FmT4QSyK28itMiR5zfYhUrG5nY+2dv+AIcKfmSp5A=", + "owner": "Mic92", + "repo": "nix-index-database", + "rev": "c0ca47e8523b578464014961059999d8eddd4aae", + "type": "github" + }, + "original": { + "owner": "Mic92", + "ref": "main", + "repo": "nix-index-database", + "type": "github" + } + }, + "nixos-hardware": { + "locked": { + "lastModified": 1768499669, + "narHash": "sha256-jJr/zDxu5evfQxlXtMrFFF68/RNj1UrctS/eIsay4k0=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "7297dfc69ae9b06e984a6f69900ce25e67c76f46", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixos-hardware", + "type": "github" + } + }, + "nixos-hardware_2": { + "locked": { + "lastModified": 1662587984, + "narHash": "sha256-fcfx8hEeAfQLzIQFy94/qADIHAhvDxk8t/QNJPXosy8=", + "owner": "rrbutani", + "repo": "nixos-hardware", + "rev": "0ac5732b0e4c8ca8287c3451f272c3c4b1bea8b0", + "type": "github" + }, + "original": { + "owner": "rrbutani", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1750134718, @@ -428,7 +1072,150 @@ "type": "github" } }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1768621446, + "narHash": "sha256-6YwHV1cjv6arXdF/PQc365h1j+Qje3Pydk501Rm4Q+4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "72ac591e737060deab2b86d6952babd1f896d7c5", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable_2": { + "locked": { + "lastModified": 1767313136, + "narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.05", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_10": { + "locked": { + "lastModified": 1757967192, + "narHash": "sha256-/aA9A/OBmnuOMgwfzdsXRusqzUpd8rQnQY8jtrHK+To=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0d7c15863b251a7a50265e57c1dca1a7add2e291", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_11": { + "locked": { + "lastModified": 1768845192, + "narHash": "sha256-TQH6ERJGCGEoYBALwU8hP0IhghsOoTtp+xFC9E54S3M=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2e606f2c977dd1f6b607eccfdb57fc249ddedc23", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_12": { + "locked": { + "lastModified": 1768305791, + "narHash": "sha256-AIdl6WAn9aymeaH/NvBj0H9qM+XuAuYbGMZaP0zcXAQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1412caf7bf9e660f2f962917c14b1ea1c3bc695e", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_13": { + "locked": { + "lastModified": 1767379071, + "narHash": "sha256-EgE0pxsrW9jp9YFMkHL9JMXxcqi/OoumPJYwf+Okucw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fb7944c166a3b630f177938e478f0378e64ce108", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_14": { + "locked": { + "lastModified": 1722062969, + "narHash": "sha256-QOS0ykELUmPbrrUGmegAUlpmUFznDQeR4q7rFhl8eQg=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "b73c2221a46c13557b1b3be9c2070cc42cf01eb3", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_15": { + "locked": { + "lastModified": 1767379071, + "narHash": "sha256-EgE0pxsrW9jp9YFMkHL9JMXxcqi/OoumPJYwf+Okucw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fb7944c166a3b630f177938e478f0378e64ce108", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_16": { + "locked": { + "lastModified": 1752077645, + "narHash": "sha256-HM791ZQtXV93xtCY+ZxG1REzhQenSQO020cu6rHtAPk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "be9e214982e20b8310878ac2baa063a961c1bdf6", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_17": { "locked": { "lastModified": 1755020227, "narHash": "sha256-gGmm+h0t6rY88RPTaIm3su95QvQIVjAJx558YUG4Id8=", @@ -442,13 +1229,13 @@ "type": "indirect" } }, - "nixpkgs_11": { + "nixpkgs_18": { "locked": { - "lastModified": 1767653099, - "narHash": "sha256-1lZvN3Lg7NjuXVHXdKgKSnVPnOH6KugGFTTGKLKLu/4=", + "lastModified": 1768843991, + "narHash": "sha256-PVeXWVDWOuBB7ZmcxZxaXztvqV33ChfojMR3sczLnFg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6f34e6c7a48c7aac4a26a388430f8a9f480a6d0e", + "rev": "7f0857c5a1bffd38d5694d0979f708fec368577a", "type": "github" }, "original": { @@ -458,13 +1245,13 @@ "type": "github" } }, - "nixpkgs_12": { + "nixpkgs_19": { "locked": { - "lastModified": 1766840161, - "narHash": "sha256-Ss/LHpJJsng8vz1Pe33RSGIWUOcqM1fjrehjUkdrWio=", + "lastModified": 1768569498, + "narHash": "sha256-bB6Nt99Cj8Nu5nIUq0GLmpiErIT5KFshMQJGMZwgqUo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3edc4a30ed3903fdf6f90c837f961fa6b49582d1", + "rev": "be5afa0fcb31f0a96bf9ecba05a516c66fcd8114", "type": "github" }, "original": { @@ -474,22 +1261,6 @@ "type": "github" } }, - "nixpkgs_13": { - "locked": { - "lastModified": 1732014248, - "narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "23e89b7da85c3640bbc2173fe04f4bd114342367", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_2": { "locked": { "lastModified": 1759036355, @@ -506,7 +1277,53 @@ "type": "github" } }, + "nixpkgs_20": { + "locked": { + "lastModified": 1710377395, + "narHash": "sha256-KMubsUWtVr7L55pXMBibBDBdmk3xrjbBPduc0E8z28c=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "db001797591bf76f7b8d4c4ed3b49233391e0c97", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_21": { + "locked": { + "lastModified": 1732014248, + "narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "23e89b7da85c3640bbc2173fe04f4bd114342367", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_3": { + "locked": { + "lastModified": 1732521221, + "narHash": "sha256-2ThgXBUXAE1oFsVATK1ZX9IjPcS4nKFOAjhPNKuiMn0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4633a7c72337ea8fd23a4f2ba3972865e3ec685d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1738680400, "narHash": "sha256-ooLh+XW8jfa+91F1nhf9OF7qhuA/y1ChLx6lXDNeY5U=", @@ -522,7 +1339,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1716137900, "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=", @@ -538,7 +1355,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1721379653, "narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=", @@ -554,7 +1371,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1752077645, "narHash": "sha256-HM791ZQtXV93xtCY+ZxG1REzhQenSQO020cu6rHtAPk=", @@ -570,7 +1387,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_8": { "locked": { "lastModified": 1766070988, "narHash": "sha256-G/WVghka6c4bAzMhTwT2vjLccg/awmHkdKSd2JrycLc=", @@ -586,43 +1403,244 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_9": { "locked": { - "lastModified": 1767370960, - "narHash": "sha256-tfhuZkpzWMh/db2rwy0Ehr+57YMO3chFPkFE/n0/yNM=", + "lastModified": 1768564909, + "narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cd49ffafb0e185a0e29cdeacc8aa0391d9a1b669", + "rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f", "type": "github" }, "original": { "owner": "NixOS", - "ref": "release-25.11", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, - "nixpkgs_9": { + "nixvim": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems_9" + }, "locked": { - "lastModified": 1752077645, - "narHash": "sha256-HM791ZQtXV93xtCY+ZxG1REzhQenSQO020cu6rHtAPk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "be9e214982e20b8310878ac2baa063a961c1bdf6", + "lastModified": 1768795384, + "narHash": "sha256-gZIXLzhupxAwRMMRTFgrl669ciYiiPmnA3PwocJ+6jQ=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "57d393deb53af1b28b14973d3e3885c3d17e7bbe", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", + "owner": "nix-community", + "repo": "nixvim", "type": "github" } }, + "noctalia": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1768845494, + "narHash": "sha256-PKlKrQMhk+ygsVPny9iOcttZRic870ZbFLTpZEz3MUg=", + "owner": "noctalia-dev", + "repo": "noctalia-shell", + "rev": "77aaf6923d19ec824ea142ce02018bfe9a967da4", + "type": "github" + }, + "original": { + "owner": "noctalia-dev", + "repo": "noctalia-shell", + "type": "github" + } + }, + "obs-gamepad": { + "inputs": { + "nixpkgs": [ + "p1n3appl3", + "nixpkgs" + ], + "utils": "utils" + }, + "locked": { + "lastModified": 1760151712, + "narHash": "sha256-Xod+hqFnhok9rrSH42/2ON74S2Kp/EzgHDmffIbY6TQ=", + "owner": "p1n3appl3", + "repo": "obs-gamepad", + "rev": "42026f9c1496b7b263086468a3334bc72795ad56", + "type": "github" + }, + "original": { + "owner": "p1n3appl3", + "repo": "obs-gamepad", + "type": "github" + } + }, + "p1n3appl3": { + "inputs": { + "catppuccin": "catppuccin", + "flake-utils": "flake-utils_9", + "home-manager": "home-manager_2", + "nix-index-database": "nix-index-database", + "nixos-hardware": "nixos-hardware", + "nixpkgs": "nixpkgs_12", + "nixpkgs-stable": "nixpkgs-stable_2", + "obs-gamepad": "obs-gamepad", + "ragenix": "ragenix", + "rahul-config": [ + "rahul-config" + ], + "slippi": "slippi" + }, + "locked": { + "lastModified": 1768515258, + "narHash": "sha256-MBDxLHOIIminP+BPP74UQ3WBDnkbFguoW6MV6WXaepE=", + "owner": "p1n3appl3", + "repo": "config", + "rev": "e6de5bc3c0a67c2a0ed51231df0cd9e0adcfac60", + "type": "github" + }, + "original": { + "owner": "p1n3appl3", + "repo": "config", + "type": "github" + } + }, + "pipethon": { + "inputs": { + "flake-utils": "flake-utils_10", + "nixpkgs": "nixpkgs_13" + }, + "locked": { + "lastModified": 1767634075, + "narHash": "sha256-dusZCtuQ0rlu0gKD+zknHRnd74OoyX6KWAMYGYDTxkE=", + "ref": "refs/heads/main", + "rev": "1c9882a2cb6e9cbd4ba2ec0f47866c6117641c63", + "revCount": 7, + "type": "git", + "url": "ssh://forgejo@git.donsz.nl/jana/pipethon.git" + }, + "original": { + "type": "git", + "url": "ssh://forgejo@git.donsz.nl/jana/pipethon.git" + } + }, + "ragenix": { + "inputs": { + "agenix": "agenix", + "crane": "crane", + "flake-utils": [ + "p1n3appl3", + "flake-utils" + ], + "nixpkgs": [ + "p1n3appl3", + "nixpkgs-stable" + ], + "rust-overlay": "rust-overlay_3" + }, + "locked": { + "lastModified": 1761832913, + "narHash": "sha256-VCNVjjuRvrKPiYYwqhE3BAKIaReiKXGpxGp27lZ0MFM=", + "owner": "yaxitech", + "repo": "ragenix", + "rev": "83bccfdea758241999f32869fb6b36f7ac72f1ac", + "type": "github" + }, + "original": { + "owner": "yaxitech", + "repo": "ragenix", + "type": "github" + } + }, + "ragenix_2": { + "inputs": { + "agenix": [ + "rahul-config", + "agenix" + ], + "crane": "crane_2", + "flake-utils": [ + "rahul-config", + "flake-utils" + ], + "nixpkgs": [ + "rahul-config", + "nixpkgs" + ], + "rust-overlay": "rust-overlay_4" + }, + "locked": { + "lastModified": 1718869541, + "narHash": "sha256-smhpGh1x/8mNl+sFL8SbeWnx0bK4HWjmdRA3mIwGjPU=", + "owner": "yaxitech", + "repo": "ragenix", + "rev": "8a254bbaa93fbd38e16f70fa81af6782794e046e", + "type": "github" + }, + "original": { + "owner": "yaxitech", + "repo": "ragenix", + "type": "github" + } + }, + "rahul-config": { + "inputs": { + "agenix": "agenix_2", + "darwin": "darwin_2", + "flake-utils": "flake-utils_11", + "home-manager": "home-manager_3", + "impermanence": "impermanence", + "nix-index-database": "nix-index-database_2", + "nixos-hardware": "nixos-hardware_2", + "nixpkgs": "nixpkgs_14", + "ragenix": "ragenix_2" + }, + "locked": { + "lastModified": 1739102974, + "narHash": "sha256-0ab3H7ODqB4CaZxRaWPRn9SA2Fq1NPTxQJ/fd12deuM=", + "owner": "jdonszelmann", + "repo": "nix-config", + "rev": "b43d53141becd33181672a7a355c4b195a9aeff1", + "type": "github" + }, + "original": { + "owner": "jdonszelmann", + "repo": "nix-config", + "type": "github" + } + }, + "raw-data": { + "inputs": { + "flake-utils": "flake-utils_12", + "nixpkgs": "nixpkgs_15" + }, + "locked": { + "lastModified": 1768919451, + "narHash": "sha256-AxIoJlIh3J8MgsMyJDeLSD76jJhenEdMN6EEi2G2Oew=", + "ref": "refs/heads/main", + "rev": "f5031750d33ea588cfa64a50bf4e15a8d373afe4", + "revCount": 1, + "type": "git", + "url": "ssh://forgejo@git.donsz.nl/jana/raw-data.git" + }, + "original": { + "type": "git", + "url": "ssh://forgejo@git.donsz.nl/jana/raw-data.git" + } + }, "reviewqueue": { "inputs": { - "flake-utils": "flake-utils_7", + "flake-utils": "flake-utils_13", "naersk": "naersk_2", - "nixpkgs": "nixpkgs_10", + "nixpkgs": "nixpkgs_17", "nixpkgs-mozilla": "nixpkgs-mozilla_2" }, "locked": { @@ -643,15 +1661,31 @@ "inputs": { "colmena": "colmena", "compiler-construction-2021": "compiler-construction-2021", - "flake-utils": "flake-utils_3", + "dumpasm": "dumpasm", + "firefox-addons": "firefox-addons", + "firefox-sidebar-css": "firefox-sidebar-css", + "flake-utils": "flake-utils_4", "harmonica": "harmonica", + "home-manager": "home-manager", "homepage": "homepage", + "jujutsu": "jujutsu", + "kitty-search": "kitty-search", "mapf": "mapf", + "matugen": "matugen", "mifg": "mifg", - "nixpkgs": "nixpkgs_8", + "niri": "niri", + "niri-unstable": "niri-unstable", + "nixpkgs": "nixpkgs_11", + "nixvim": "nixvim", + "noctalia": "noctalia", + "p1n3appl3": "p1n3appl3", + "pipethon": "pipethon", + "rahul-config": "rahul-config", + "raw-data": "raw-data", "reviewqueue": "reviewqueue", "secrets": "secrets", "sops-nix": "sops-nix", + "t": "t", "totpal": "totpal", "vpn-confinement": "vpn-confinement" } @@ -690,10 +1724,101 @@ "type": "github" } }, + "rust-overlay": { + "inputs": { + "nixpkgs": [ + "jujutsu", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1762915112, + "narHash": "sha256-d9j1g8nKmYDHy+/bIOPQTh9IwjRliqaTM0QLHMV92Ic=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "aa1e85921cfa04de7b6914982a94621fbec5cc02", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_2": { + "inputs": { + "nixpkgs": [ + "niri-unstable", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1757989933, + "narHash": "sha256-9cpKYWWPCFhgwQTww8S94rTXgg8Q8ydFv9fXM6I8xQM=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "8249aa3442fb9b45e615a35f39eca2fe5510d7c3", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_3": { + "inputs": { + "nixpkgs": [ + "p1n3appl3", + "ragenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1761791894, + "narHash": "sha256-myRIDh+PxaREz+z9LzbqBJF+SnTFJwkthKDX9zMyddY=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "59c45eb69d9222a4362673141e00ff77842cd219", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_4": { + "inputs": { + "flake-utils": [ + "rahul-config", + "ragenix", + "flake-utils" + ], + "nixpkgs": [ + "rahul-config", + "ragenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1708740535, + "narHash": "sha256-NCTw235XwSDbeTAtAwg/hOeNOgwYhVq7JjDdbkOgBeA=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "9b24383d77f598716fa0cbb8b48c97249f5ee1af", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, "secrets": { "inputs": { - "flake-utils": "flake-utils_8", - "nixpkgs": "nixpkgs_11" + "flake-utils": "flake-utils_14", + "nixpkgs": "nixpkgs_18" }, "locked": { "lastModified": 1767655057, @@ -709,16 +1834,44 @@ "url": "ssh://forgejo@git.donsz.nl/jana/server-secrets.git" } }, - "sops-nix": { + "slippi": { "inputs": { - "nixpkgs": "nixpkgs_12" + "git-hooks": [ + "p1n3appl3" + ], + "home-manager": [ + "p1n3appl3", + "home-manager" + ], + "nixpkgs": [ + "p1n3appl3", + "nixpkgs" + ] }, "locked": { - "lastModified": 1766894905, - "narHash": "sha256-pn8AxxfajqyR/Dmr1wnZYdUXHgM3u6z9x0Z1Ijmz2UQ=", + "lastModified": 1760294822, + "narHash": "sha256-VSzDcCkS/kGrALPv81x5yjqjt5o7n4lVjE/gknlz+1w=", + "owner": "lytedev", + "repo": "slippi-nix", + "rev": "abee78f6ad931c2a2f18dae102f51abcaf1a26c6", + "type": "github" + }, + "original": { + "owner": "lytedev", + "repo": "slippi-nix", + "type": "github" + } + }, + "sops-nix": { + "inputs": { + "nixpkgs": "nixpkgs_19" + }, + "locked": { + "lastModified": 1768709255, + "narHash": "sha256-aigyBfxI20FRtqajVMYXHtj5gHXENY2gLAXEhfJ8/WM=", "owner": "Mic92", "repo": "sops-nix", - "rev": "61b39c7b657081c2adc91b75dd3ad8a91d6f07a7", + "rev": "5e8fae80726b66e9fec023d21cd3b3e638597aa9", "type": "github" }, "original": { @@ -758,6 +1911,141 @@ "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_13": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_14": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_15": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_16": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_17": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_18": { + "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, @@ -834,6 +2122,21 @@ } }, "systems_7": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_8": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -848,9 +2151,43 @@ "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_15", + "nixpkgs": "nixpkgs_20" + }, + "locked": { + "lastModified": 1710410762, + "narHash": "sha256-pCCCdoW4+ipCOwzJCYZJ8CNINDsQvACCaxh2xT6uqmw=", + "owner": "jdonszelmann", + "repo": "t-rs", + "rev": "1178091650351fc8372e4c84c786433f9bce69d5", + "type": "github" + }, + "original": { + "owner": "jdonszelmann", + "repo": "t-rs", + "type": "github" + } + }, "totpal": { "inputs": { - "nixpkgs": "nixpkgs_13" + "nixpkgs": "nixpkgs_21" }, "locked": { "lastModified": 1737322813, @@ -866,13 +2203,31 @@ "type": "github" } }, + "utils": { + "inputs": { + "systems": "systems_11" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "vpn-confinement": { "locked": { - "lastModified": 1765634578, - "narHash": "sha256-Fujb9sn1cj+u/bzfo2RbQkcAvJ7Ch1pimJzFie4ptb4=", + "lastModified": 1767604552, + "narHash": "sha256-FddhMxnc99KYOZ/S3YNqtDSoxisIhVtJ7L4s8XD2u0A=", "owner": "Maroka-chan", "repo": "VPN-Confinement", - "rev": "f2989e1e3cb06c7185939e9ddc368f88b998616a", + "rev": "a6b2da727853886876fd1081d6bb2880752937f3", "type": "github" }, "original": { @@ -880,6 +2235,39 @@ "repo": "VPN-Confinement", "type": "github" } + }, + "xwayland-satellite-stable": { + "flake": false, + "locked": { + "lastModified": 1755491097, + "narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "388d291e82ffbc73be18169d39470f340707edaa", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "ref": "v0.7", + "repo": "xwayland-satellite", + "type": "github" + } + }, + "xwayland-satellite-unstable": { + "flake": false, + "locked": { + "lastModified": 1768765571, + "narHash": "sha256-C1JbyJ3ftogmN3vmLNfyPtnJw2wY64TiUTIhFtk1Leg=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "ed1cef792b4def3321ff9ab5479df09609f17a69", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index a2a79b2..273bbbd 100644 --- a/flake.nix +++ b/flake.nix @@ -1,11 +1,19 @@ { description = "jana's server infrastructure"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/release-25.11"; + nixpkgs.url = "github:NixOS/nixpkgs"; colmena.url = "github:zhaofengli/colmena"; flake-utils.url = "github:numtide/flake-utils"; sops-nix.url = "github:Mic92/sops-nix"; vpn-confinement.url = "github:Maroka-chan/VPN-Confinement"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + firefox-addons = { + url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; + inputs.nixpkgs.follows = "nixpkgs"; + }; # websites @@ -18,6 +26,50 @@ mifg.url = "git+ssh://forgejo@git.donsz.nl/jana/money.is.fckn.gay.git"; secrets.url = "git+ssh://forgejo@git.donsz.nl/jana/server-secrets.git"; + + nixvim = { + url = "github:nix-community/nixvim"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + t.url = "github:jdonszelmann/t-rs"; + dumpasm.url = "github:jdonszelmann/dumpasm"; + + kitty-search = { + url = "github:trygveaa/kitty-kitten-search"; + flake = false; + }; + + jujutsu = { + url = "github:martinvonz/jj"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + p1n3appl3 = { + url = "github:p1n3appl3/config"; + inputs.rahul-config.follows = "rahul-config"; + }; + rahul-config.url = "github:jdonszelmann/nix-config"; + + niri-unstable.url = "github:YaLTeR/niri"; + niri = { + url = "github:sodiboo/niri-flake"; + inputs.niri-unstable.follows = "niri-unstable"; + }; + matugen = { + url = "github:/InioX/matugen/main"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + noctalia = { + url = "github:noctalia-dev/noctalia-shell"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + pipethon.url = "git+ssh://forgejo@git.donsz.nl/jana/pipethon.git"; + firefox-sidebar-css = { + url = "github:drannex/FirefoxSidebar"; + flake = false; + }; + raw-data.url = "git+ssh://forgejo@git.donsz.nl/jana/raw-data.git"; }; outputs = { @@ -27,7 +79,19 @@ flake-utils, sops-nix, vpn-confinement, + home-manager, mapf, + nixvim, + t, + dumpasm, + jujutsu, + pipethon, + niri, + niri-unstable, + matugen, + noctalia, + firefox-addons, + raw-data, ... }@inputs: let @@ -36,7 +100,19 @@ import nixpkgs { inherit system; config.allowUnfree = true; - overlays = [ ]; + overlays = [ + (_: _: { + custom = { + t = t.packages.${system}.default; + inherit (dumpasm.packages.${system}) dumpasm; + inherit (jujutsu.packages.${system}) jujutsu; + pipethon = pipethon.packages.${system}.python; + niri = niri-unstable.packages.${system}.niri; + raw-data = raw-data.packages.${system}.default; + }; + p1n3appl3 = inputs.p1n3appl3.packages.${system}; + }) + ]; }; in { @@ -51,6 +127,7 @@ nixpkgs = pkgsForSystem system; specialArgs.flakes = inputs; + specialArgs.inputs = inputs; specialArgs.secrets = inputs.secrets.packages.${system}.secrets; }; @@ -72,6 +149,22 @@ vpn-confinement.nixosModules.default ]; }; + + kili = { + deployment = { + allowLocalDeployment = true; + targetHost = null; + replaceUnknownProfiles = false; + tags = [ "laptop" ]; + # buildOnTarget = true; + targetUser = "jana"; + }; + imports = [ + home-manager.nixosModules.home-manager + ./kili/configuration.nix + ./users/users.nix + ]; + }; }; } // flake-utils.lib.eachDefaultSystem ( @@ -87,6 +180,9 @@ (pkgs.writeShellScriptBin "apply" '' colmena apply --no-substitute '') + (pkgs.writeShellScriptBin "apply-local" '' + colmena apply-local --sudo + '') ]; shellHook = "exec $NIX_BUILD_SHELL"; }; diff --git a/kili/configuration.nix b/kili/configuration.nix new file mode 100644 index 0000000..8f201c9 --- /dev/null +++ b/kili/configuration.nix @@ -0,0 +1,167 @@ +{ + pkgs, + flakes, + config, + ... +}: +{ + imports = [ + ./hardware-configuration.nix + ../default-machine-config.nix + ../programs/kanata/system.nix + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "kili"; + networking.networkmanager.enable = true; + + # Set your time zone. + time.timeZone = "Europe/Amsterdam"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "nl_NL.UTF-8"; + LC_IDENTIFICATION = "nl_NL.UTF-8"; + LC_MEASUREMENT = "nl_NL.UTF-8"; + LC_MONETARY = "nl_NL.UTF-8"; + LC_NAME = "nl_NL.UTF-8"; + LC_NUMERIC = "nl_NL.UTF-8"; + LC_PAPER = "nl_NL.UTF-8"; + LC_TELEPHONE = "nl_NL.UTF-8"; + LC_TIME = "nl_NL.UTF-8"; + }; + + services.xserver.xkb = { + layout = "us"; + variant = ""; + }; + + users.users.jana = { + isNormalUser = true; + description = "jana"; + extraGroups = [ + "networkmanager" + "wheel" + ]; + packages = with pkgs; [ ]; + }; + + nixpkgs.config.allowUnfree = true; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + + firefox + kitty + pkgs.custom.niri + zed-editor + signal-desktop + discord + nautilus + + adwaita-icon-theme + (pkgs.callPackage ( + { stdenv }: + stdenv.mkDerivation { + name = "global-cursor-theme"; + unpackPhase = "true"; + outputs = [ "out" ]; + installPhase = '' + mkdir -p $out/share/icons/default + cat << EOF > $out/share/icons/default/index.theme + [Icon Theme] + Name=Default + Comment=Default Cursor Theme + Inherits=Adwaita + EOF + ''; + } + ) { }) + ]; + + services.xserver.enable = true; + services.displayManager.gdm.enable = true; + services.desktopManager.gnome.enable = true; + + services.gnome.gnome-keyring.enable = true; + services.gvfs.enable = true; + services.displayManager.sessionPackages = [ pkgs.custom.niri ]; + programs.dconf.enable = true; + + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + + services.xserver.videoDrivers = [ + "modesetting" + "nvidia" + ]; + + hardware.graphics.enable = true; + hardware.graphics.extraPackages = [ pkgs.libva-vdpau-driver ]; + hardware.nvidia = { + modesetting.enable = true; + powerManagement.enable = true; + powerManagement.finegrained = false; + + # use nvidia opensource driver (not nouveau!!) + open = true; + nvidiaSettings = true; + + prime = { + offload = { + enable = true; + enableOffloadCmd = true; + }; + + intelBusId = "PCI:0@00:02:0"; + nvidiaBusId = "PCI:0@01:00:0"; + }; + + package = config.boot.kernelPackages.nvidiaPackages.mkDriver { + version = "580.95.05"; + sha256_64bit = "sha256-hJ7w746EK5gGss3p8RwTA9VPGpp2lGfk5dlhsv4Rgqc="; + sha256_aarch64 = "sha256-zLRCbpiik2fGDa+d80wqV3ZV1U1b4lRjzNQJsLLlICk="; + openSha256 = "sha256-RFwDGQOi9jVngVONCOB5m/IYKZIeGEle7h0+0yGnBEI="; + settingsSha256 = "sha256-F2wmUEaRrpR1Vz0TQSwVK4Fv13f3J9NJLtBe4UP2f14="; + persistencedSha256 = "sha256-QCwxXQfG/Pa7jSTBB0xD3lsIofcerAWWAHKvWjWGQtg="; + patchesOpen = [ + (pkgs.fetchpatch { + name = "get_dev_pagemap.patch"; + url = "https://github.com/NVIDIA/open-gpu-kernel-modules/commit/3e230516034d29e84ca023fe95e284af5cd5a065.patch"; + hash = "sha256-BhL4mtuY5W+eLofwhHVnZnVf0msDj7XBxskZi8e6/k8="; + }) + ]; + }; + }; + + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; + + nix.settings = { + # users that can interact with nix + trusted-users = [ + "jana" + "root" + ]; + }; + + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.jana = ./home.nix; + + extraSpecialArgs = { + inherit flakes; + }; + }; +} diff --git a/kili/hardware-configuration.nix b/kili/hardware-configuration.nix new file mode 100644 index 0000000..a64dd08 --- /dev/null +++ b/kili/hardware-configuration.nix @@ -0,0 +1,31 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/4919727e-d114-4d57-b206-522b5df5fccc"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/26CD-373C"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/kili/home.nix b/kili/home.nix new file mode 100644 index 0000000..6a5e7c0 --- /dev/null +++ b/kili/home.nix @@ -0,0 +1,58 @@ +{ + config, + pkgs, + flakes, + ... +}: +{ + imports = [ + flakes.nixvim.homeModules.nixvim + flakes.niri.homeModules.niri + flakes.matugen.nixosModules.default + flakes.noctalia.homeModules.default + + # ../programs/nvim + ../programs/fish + ../programs/kanata + ../programs/kitty + ../programs/tmux + ../programs/git + ../programs/jj + ../programs/niri + ../programs/zed + ../programs/firefox + ]; + + home = { + stateVersion = "26.05"; + username = "jana"; + homeDirectory = "/home/jana"; + + packages = with pkgs; [ + p1n3appl3.tab + ]; + + }; + + home.file = { + "dl".source = config.lib.file.mkOutOfStoreSymlink "${config.xdg.userDirs.download}"; + "doc".source = config.lib.file.mkOutOfStoreSymlink "${config.xdg.userDirs.documents}"; + }; + + xdg = { + enable = true; + + configHome = "${config.home.homeDirectory}/.config"; + userDirs = { + enable = true; + documents = "${config.home.homeDirectory}/Documents"; + desktop = "${config.home.homeDirectory}/Documents"; + download = "${config.home.homeDirectory}/Downloads"; + music = "${config.home.homeDirectory}/Documents/personal/music"; + pictures = "${config.home.homeDirectory}/Documents/personal/pictures"; + }; + + mime.enable = true; + }; + +} diff --git a/programs/cosmic/default.nix b/programs/cosmic/default.nix new file mode 100644 index 0000000..9d7bf9c --- /dev/null +++ b/programs/cosmic/default.nix @@ -0,0 +1,25 @@ +{ pkgs +, lib +, cosmicLib +, ... +}: +let + ron = cosmicLib.cosmic.mkRON; +in + +{ + wayland.desktopManager.cosmic = { + enable = true; + + # shortcuts = [ + # { + # action = ron "enum" "Close"; + # key = "Super+Q"; + # } + # { + # action = ron "enum" "maximize"; + # key = "Super+d"; + # } + # ]; + }; +} diff --git a/programs/firefox/default.nix b/programs/firefox/default.nix new file mode 100644 index 0000000..9724ef0 --- /dev/null +++ b/programs/firefox/default.nix @@ -0,0 +1,153 @@ +{ + config, + flakes, + pkgs, + ... +}: +let + ff-pkgs = flakes.firefox-addons.packages.${pkgs.system}; + lock-false = { + Value = false; + Status = "locked"; + }; + # lock-true = { + # Value = true; + # Status = "locked"; + # }; +in +{ + + home.file."${config.programs.firefox.profilesPath}/main/chrome".source = + "${flakes.firefox-sidebar-css}"; + programs.firefox = { + enable = true; + package = pkgs.wrapFirefox pkgs.firefox-unwrapped { + extraPolicies = { + DisableFormHistory = true; + OfferToSaveLogins = false; + PasswordManagerEnabled = false; + AppAutoUpdate = false; + DisableFirefoxStudies = true; + DisablePocket = true; + DisableTelemetry = true; + UserMessaging = { + WhatsNew = true; + ExtensionRecommendations = false; + FeatureRecommendations = false; + UrlbarInterventions = false; + SkipOnboarding = true; + MoreFromMozilla = false; + Locked = true; + }; + FirefoxHome = { + Search = true; + TopSites = false; + SponsoredTopSites = false; + Highlights = false; + Pocket = false; + SponsoredPocket = false; + Snippets = false; + Locked = false; + }; + FirefoxSuggest = { + WebSuggestions = false; + SponsoredSuggestions = false; + ImproveSuggest = false; + Locked = true; + }; + # TODO: https://github.com/TheRealGramdalf/nixos/blob/83f4339b121175f47940314bf5811080ac42c316/users/games/firefox/privacy.nix + }; + + }; + + profiles.default = { + id = 0; + name = "profile_0"; + isDefault = true; + settings = { + # specify profile-specific preferences here; check about:config for options + "browser.newtabpage.activity-stream.feeds.section.highlights" = false; + "browser.startup.page" = 3; # Restore previous tabs + "extensions.autoDisableScopes" = 0; + "extensions.pocket.enabled" = lock-false; + "browser.tabs.closeWindowWithLastTab" = lock-false; + "sidebar.position_start" = false; # sidebar on the right + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + }; + + userChrome = builtins.readFile ./userChrome.css; + userContent = builtins.readFile ./userChrome.css; + + extensions.packages = with ff-pkgs; [ + bitwarden + ublock-origin + sidebery + sponsorblock + # vimium + ]; + + bookmarks = { + force = true; + settings = [ + { + keyword = "!w"; + url = "https://www.wikipedia.org/w/index.php?title=Special:Search&search=%s"; + } + { + keyword = "!m"; + url = "https://www.google.com/maps?q=%s"; + } + { + keyword = "!git"; + url = "https://github.com/search?q=%s&type=code"; + } + { + keyword = "!std"; + url = "https://std.rs%s"; + } + { + keyword = "!rust"; + url = "https://docs.rs/releases/search?query=%s"; + } + { + keyword = "!np"; + url = "https://search.nixos.org/packages?query=%s"; + } + { + keyword = "!nf"; + url = "https://search.nixos.org/flakes?query=%s"; + } + ]; + }; + + # extensions.settings = { + # "${ff-pkgs.sidebery.addonId}".settings = { + # sidebar = { + # # panels = with builtins; with lib; listToAttrs (map ffContainerToSideberryPanel (attrsToList containers)); + # # nav = [ "Personal" "Programming"]; + # }; + # # https://github.com/Dash-L/nixconfig/blob/c30f6d1486a3fe2b3793ab0cb13a88edefe83b7a/home/firefox.nix#L82 + # settings = { + # pinnedTabsPosition = "top"; + # hideEmptyPanels = false; + # activateAfterClosing = "prev"; + # activateAfterClosingStayInPanel = true; + # newTabCtxReopen = true; + # }; + # }; + # }; + }; + }; + + xdg.mimeApps = { + defaultApplications."x-scheme-handler/http" = [ + "firefox.desktop" + ]; + defaultApplications."x-scheme-handler/https" = [ + "firefox.desktop" + ]; + defaultApplications."text/html" = [ "firefox.desktop" ]; + defaultApplications."x-scheme-handler/about" = [ "firefox.desktop" ]; + defaultApplications."x-scheme-handler/unknown" = [ "firefox.desktop" ]; + }; +} diff --git a/programs/firefox/userChrome.css b/programs/firefox/userChrome.css new file mode 100644 index 0000000..244f1f7 --- /dev/null +++ b/programs/firefox/userChrome.css @@ -0,0 +1,3 @@ +#TabsToolbar { + visibility: collapse; +} diff --git a/programs/fish/default.nix b/programs/fish/default.nix new file mode 100644 index 0000000..40f315a --- /dev/null +++ b/programs/fish/default.nix @@ -0,0 +1,236 @@ +{ config +, pkgs +, lib +, ... +}: +with builtins; +with lib.attrsets; +let + scripts = (import ./scripts.nix) pkgs; + aliases = with scripts; { + "cp-mov" = cp-media "mov" "movies"; + "cp-ser" = cp-media "ser" "shows"; + "cp-ani" = cp-media "ani" "anime"; + "dumpasm" = "${pkgs.custom.dumpasm}/bin/dumpasm"; + "p" = builtins.trace calc calc; + "s" = "systemctl"; + "j" = "journalctl"; + "ju" = "journalctl -u"; + "jfu" = "journalctl -fu"; + "ls" = "${pkgs.eza}/bin/eza --git"; + "ll" = "${pkgs.eza}/bin/eza --git"; + "lt" = "${pkgs.eza}/bin/eza --long --tree -L 3"; + "open" = "${pkgs.xdg-utils}/bin/xdg-open"; + "cb" = "${pkgs.wl-clipboard-rs}/bin/wl-copy"; + "cat" = "${pkgs.bat}/bin/bat"; + + # "pull" = "${pkgs.git}/bin/git pull"; + # "push" = "${pkgs.git}/bin/git push"; + # "commit" = "${pkgs.git}/bin/git commit"; + # "add" = "${pkgs.git}/bin/git add"; + # "patch" = "${pkgs.git}/bin/git add -p"; + # "amend" = "${pkgs.git}/bin/git commit --amend"; + # "log" = "${pkgs.git}/bin/git log --all --graph --decorate"; + # "st" = "${pkgs.git}/bin/git status"; + # "checkout" = "${pkgs.git}/bin/git checkout"; + # "rebase" = "${pkgs.git}/bin/git rebase"; + # "stash" = "${pkgs.git}/bin/git stash"; + + "edit" = "jj edit"; + "old" = "jj edit @-"; + "new" = "jj edit @+"; + "rebase" = "jj rebase"; + "pull" = "jj git fetch; jj catchup"; + "msg" = "jj describe -m"; + "branch" = "jj bookmark set"; + "stat" = "jj status"; + "push" = "jj git push"; + + "tidy" = "x test tidy --bless"; + "ui" = "x test tests/ui/"; + + "f" = "nautilus --no-desktop . &"; + }; + # extracting any compressed format + extract = '' + function extract -a file -d "decompress a file" + if not test -f $file + echo "'$file' is not a valid file" + return 1 + end + switch $file + # tar can automatically figure out how to decompress + case '*.{tar,tar.{bz2,zst,gz,xz},tbz2,tgz'; ${pkgs.gnutar}/bin/tar xf $file; end + case '*.bz2'; bunzip2 $file; end + case '*.rar'; unrar e $file; end + case '*.gz'; gunzip $file; end + case '*.zip'; ${pkgs.unzip}/bin/unzip $file; end + case '*.Z'; uncompress $file; end + case '*.7z'; 7z x $file; end + case '*'; + echo "'$file' cannot be extracted" + return 1 + end + end + ''; +in +{ + programs = { + atuin = { + enable = true; + enableFishIntegration = true; + + settings = { + filter_mode_shell_up_key_binding = "directory"; + exit_mode = "return-original"; + + workspaces = true; + }; + }; + + zoxide = { + enable = true; + enableFishIntegration = true; + }; + + direnv = { + enable = true; + # enableFishIntegration = lib.mkDefault true; + }; + + fzf = { + enable = true; + enableFishIntegration = true; + }; + + fish = { + 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; + } + { + name = "sponge"; + inherit (sponge) src; + } + { + name = "autopair"; + inherit (autopair) src; + } + ]; + + functions = { + fish_jj_prompt = { + body = '' + if not ${config.programs.jujutsu.package}/bin/jj root --quiet &>/dev/null + return 1 + end + + ${config.programs.jujutsu.package}/bin/jj log --ignore-working-copy --no-graph --color always -r @ -T ' + separate( + " ", + bookmarks.join(", "), + change_id.shortest(), + commit_id.shortest(), + if(conflict, "conflict"), + if(empty, "empty"), + if(divergent, "divergent"), + if(hidden, "hidden"), + ) + ' + ''; + }; + + _tide_item_jj = { + body = '' + set -l _tide_item_jj_color $_tide_location_color + echo -ns $_tide_item_jj_color" ("(fish_jj_prompt)$_tide_item_jj_color")" + ''; + }; + + _tide_item_git = { + body = '' + if not test -d .jj + fish_git_prompt '%s' + end + ''; + }; + }; + + interactiveShellInit = '' + fish_vi_key_bindings + + set -g sponge_successful_exit_codes 0 + set -g sponge_allow_previously_successful false + set -g sponge_delay 10 + + ${config.programs.jujutsu.package}/bin/jj util completion fish | source + + # if set -q tide_left_prompt_items; and not contains "jj" $tide_left_prompt_items + # set -l tide_item_jj_idx (contains -i "pwd" $tide_left_prompt_items) + # if test $tide_item_jj_idx + # set tide_left_prompt_items \ + # $tide_left_prompt_items[1..$tide_item_jj_idx] \ + # jj \ + # $tide_left_prompt_items[(math $tide_item_jj_idx + 1)..-1] + # end + # end + + function t + cd "$(${pkgs.custom.t}/bin/t-rs $argv | tail -n 1)" + end + + function temp + t $argv + end + + function rs + cd "$(${pkgs.custom.t}/bin/t-rs $argv | tail -n 1)" + cargo init . --bin --name $(basename "$PWD") + vim src/main.rs + end + + fish_add_path "$HOME/.cargo/bin" + fish_add_path "$HOME/.local/bin" + fish_add_path "$HOME/Documents/scripts" + fish_add_path "$HOME/.nix-profile/bin" + + function fish_greeting + ${pkgs.blahaj}/bin/blahaj -s + end + ''; + }; + }; + + home.activation = { + setupTide = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + setupTide() { + ${pkgs.fish}/bin/fish -c ${lib.escapeShellArg "tide configure ${ + lib.cli.toGNUCommandLineShell { } { + auto = true; + style = "Lean"; + prompt_colors = "True color"; + show_time = "No"; + lean_prompt_height = "Two lines"; + prompt_connection = "Disconnected"; + prompt_spacing = "Compact"; + icons = "Few icons"; + transient = "Yes"; + } + }"} >/dev/null 2>&1 + } + setupTide + ''; + }; +} diff --git a/programs/fish/scripts.nix b/programs/fish/scripts.nix new file mode 100644 index 0000000..465b3ea --- /dev/null +++ b/programs/fish/scripts.nix @@ -0,0 +1,25 @@ +{ pkgs, ... }: +{ + calc = "${pkgs.custom.pipethon}/bin/python -i ${pkgs.writeText "init.py" '' + import sys + sys.path.append("${../../scriptlib}") + + from scriptlib import * + ''} "; + + # sys.path.append("${pkgs.python314Packages.numpy}/lib/python3.14/site-packages/") + cp-media = + name: media: + let + s = pkgs.writeScriptBin "cp-${name}" '' + echo "copying to library ${media}" + echo "calculating hash" + find "$1" - type f - print0 | sort - z | xargs - 0 sha1sum | awk '{ + print $1}' | sha1sum | awk '{print $1}' > "$1.hash" + + rsync -azP "$1" fili:/media/${media} + rsync -azP "$1.hash" fili:/media/${media} + ''; + in + "${s}/bin/cp-${name}"; +} diff --git a/programs/git/default.nix b/programs/git/default.nix new file mode 100644 index 0000000..9ceab5b --- /dev/null +++ b/programs/git/default.nix @@ -0,0 +1,36 @@ +_: { + programs.git = { + enable = true; + signing.key = "/home/jana/.ssh/id_ed25519.pub"; + signing.signByDefault = true; + + settings = { + user.email = "jana@donsz.nl"; + user.name = "Jana Dönszelmann"; + + push.autoSetupRemote = true; + pull.rebase = true; + init.defaultBranch = "main"; + gpg.format = "ssh"; + diff.colorMoved = "default"; + rerere.enabled = true; + + alias.conflicts = "diff --check"; + }; + + }; + + programs.delta = { + enable = true; + options = { + navigate = true; + light = false; + side-by-side = true; + features = "decorations interactive"; + interactive = { + keep-plus-minus-markers = false; + }; + }; + enableGitIntegration = true; + }; +} diff --git a/programs/gnome/default.nix b/programs/gnome/default.nix new file mode 100644 index 0000000..65baabc --- /dev/null +++ b/programs/gnome/default.nix @@ -0,0 +1,255 @@ +{ pkgs, lib, ... }: +let + unbound = [ "@as []" ]; + custom-keys = [ + { + binding = "Return"; + command = "gnome-terminal"; + name = "Launch terminal"; + } + { + binding = "z"; + command = "gnome-system-monitor"; + name = "launch system monitor"; + } + { + binding = "Return"; + command = "${pkgs.custom.ghostty}/bin/ghostty"; + name = "focus-terminal"; + } + { + binding = "F12"; + command = "${pkgs.custom.ghostty}/bin/ghostty -- ${((import ../fish/scripts.nix) pkgs).calc}"; + name = "calculator"; + } + ]; +in +{ + dconf = { + enable = true; + + settings = + { + "org/gnome/shell" = { + # pinned app bar + favorite-apps = [ + "firefox.desktop" + "org.gnome.Nautilus.desktop" + "org.gnome.Settings.desktop" + "org.gnome.Terminal.desktop" + "jetbrains-clion-ec2b1366-55e3-4ecc-8780-ab6c7542eb56.desktop" + "discord-canary.desktop" + "io.element.Element.desktop" + "mattermost-desktop.desktop" + "org.mozilla.Thunderbird.desktop" + "spotify.desktop" + ]; + disable-user-extensions = false; + enabled-extensions = [ + "horizontal-workspaces@gnome-shell-extensions.gcampax.github.com" + "org.gnome-shell.desktop-icons" + "auto-move-windows@gnome-shell-extensions.gcampax.github.com" + ]; + }; + + "org/gnome/desktop/background" = rec { + # picture-uri ="file:///${home.homeDirectory}/Pictures/backgrounds/2023-09-01-14-56-45-Road-saturated.png"; + # picture-uri-dark = picture-uri; + }; + + "org/gnome/desktop/input-sources" = { + per-window = false; + show-all-sources = false; + sources = [ "('xkb', 'us')" ]; + xkb-options = [ + "lv3:switch" + "caps:escape" + "eurosign:4" + "compose:ralt" + ]; + }; + + "org/gnome/desktop/interface" = { + clock-show-seconds = true; + clock-show-weekday = true; + color-scheme = "prefer-dark"; + cursor-theme = "Adwaita"; + enable-animations = true; + enable-hot-corners = true; + font-name = "Noto Sans, 10"; + }; + + "org/gnome/desktop/peripherals/mouse" = { + accel-profile = "adaptive"; + natural-scroll = false; + }; + + "org/gnome/desktop/peripherals/touchpad" = { + click-method = "fingers"; + disable-while-typing = false; + edge-scrolling-enabled = false; + natural-scroll = false; + send-events = "enabled"; + speed = 0.5; + tap-to-click = true; + two-finger-scrolling-enabled = true; + }; + "org/gnome/desktop/sound" = { + allow-volume-above-100-percent = true; + event-sounds = true; + }; + + "org/gnome/desktop/wm/keybindings" = { + always-on-top = [ "t" ]; + begin-move = unbound; + begin-resize = unbound; + close = [ "q" ]; + lower = unbound; + maximize = unbound; + minimize = [ "w" ]; + move-to-monitor-down = [ "Down" ]; + move-to-monitor-left = [ "Left" ]; + move-to-monitor-right = [ "Right" ]; + move-to-monitor-up = [ "Up" ]; + move-to-workspace-1 = [ "exclam" ]; + move-to-workspace-2 = [ "at" ]; + move-to-workspace-3 = [ "numbersign" ]; + move-to-workspace-4 = [ "dollar" ]; + move-to-workspace-5 = [ "percent" ]; + move-to-workspace-6 = [ "asciicircum" ]; + panel-main-menu = [ "" ]; + raise-or-lower = [ "s" ]; + switch-applications = [ "Tab" ]; + switch-applications-backward = [ "Tab" ]; + switch-input-source = unbound; + switch-input-source-backward = unbound; + switch-to-workspace-1 = [ "1" ]; + switch-to-workspace-2 = [ "2" ]; + switch-to-workspace-3 = [ "3" ]; + switch-to-workspace-4 = [ "4" ]; + switch-to-workspace-5 = [ "5" ]; + switch-to-workspace-6 = [ "6" ]; + switch-to-workspace-down = [ "j" ]; + switch-to-workspace-last = [ "0" ]; + switch-to-workspace-up = [ "k" ]; + switch-windows = unbound; + switch-windows-backward = unbound; + toggle-fullscreen = [ "f" ]; + toggle-maximized = [ "d" ]; + unmaximize = unbound; + }; + + "org/gnome/desktop/wm/preferences" = { + auto-raise = false; + button-layout = ":,maximize,minimize,close"; + focus-mode = "click"; + mouse-button-modifier = ""; + num-workspaces = 6; + resize-with-right-button = false; + visual-bell = false; + }; + + "org/gnome/mutter" = { + center-new-windows = true; + dynamic-workspaces = false; + edge-tiling = true; + experimental-features = [ "scale-monitor-framebuffer" ]; + overlay-key = "Super_L"; + workspaces-only-on-primary = true; + }; + + "org/gnome/mutter/keybindings" = { + switch-monitor = [ "o" ]; + toggle-tiled-left = [ "bracketleft" ]; + toggle-tiled-right = [ "bracketright" ]; + }; + + "org/gnome/settings-daemon/plugins/media-keys" = { + area-screenshot = unbound; + area-screenshot-clip = [ "s" ]; + custom-keybindings = + with builtins; + (map ( + i: "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom${toString (i - 1)}/" + ) (genList (x: x + 1) (length custom-keys))); + email = [ "Display" ]; + home = [ "e" ]; + mic-mute = [ "AudioMicMute" ]; + next = [ "period" ]; + on-screen-keyboard = unbound; + pause = unbound; + play = [ "slash" ]; + previous = [ "comma" ]; + screensaver = [ "l" ]; + screenshot = unbound; + screenshot-clip = unbound; + stop = unbound; + volume-down = [ "AudioLowerVolume" ]; + volume-mute = [ "AudioMute" ]; + volume-up = [ "AudioRaiseVolume" ]; + window-screenshot = unbound; + window-screenshot-clip = unbound; + }; + + "org/gnome/settings-daemon/plugins/power" = { + ambient-enabled = false; + idle-dim = false; + power-button-action = "nothing"; + power-saver-profile-on-low-battery = true; + sleep-inactive-ac-timeout = 7200; + sleep-inactive-ac-type = "nothing"; + sleep-inactive-battery-timeout = 7200; + sleep-inactive-battery-type = "suspend"; + }; + "org/gnome/shell/extensions/auto-move-windows" = { + application-list = [ + "firefox.desktop:1" + "discord.desktop:3" + "jetbrains-clion.desktop:2" + "jetbrains-goland.desktop:2" + "jetbrains-pycharm.desktop:2" + "jetbrains-idea.desktop:2" + "spotify.desktop:5" + ]; + }; + + "org/gnome/shell/keybindings" = { + open-application-menu = [ "Menu" ]; + show-screenshot-ui = [ "s" ]; + switch-to-application-1 = unbound; + switch-to-application-2 = unbound; + switch-to-application-3 = unbound; + switch-to-application-4 = unbound; + switch-to-application-5 = unbound; + switch-to-application-6 = unbound; + switch-to-application-7 = unbound; + switch-to-application-8 = unbound; + switch-to-application-9 = unbound; + toggle-message-tray = unbound; + toggle-overview = [ "p" ]; + }; + + "org/gnome/terminal/legacy" = { + menu-accelerator-enabled = false; + mnemonics-enabled = true; + new-terminal-mode = "window"; + shortcuts-enabled = true; + theme-variant = "dark"; + }; + + "org/gnome/terminal/legacy/keybindings" = { + zoom-in = "equal"; + }; + } + // ( + with builtins; + foldl' (a: b: a // b) { } ( + map (i: { + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom${toString (i - 1)}" = + elemAt custom-keys + (i - 1); + }) (genList (x: x + 1) (length custom-keys)) + ) + ); + }; +} diff --git a/programs/jj/default.nix b/programs/jj/default.nix new file mode 100644 index 0000000..5c874f8 --- /dev/null +++ b/programs/jj/default.nix @@ -0,0 +1,180 @@ +{ config, pkgs, ... }: +{ + programs.jujutsu = { + enable = true; + # package = pkgs.custom.jujutsu; + + settings = { + user = { + email = config.programs.git.settings.user.email; + name = config.programs.git.settings.user.name; + }; + + ui = { + paginate = "never"; + # pager = "${pkgs.delta}/bin/delta"; + # for delta + # diff-formatter = ":git"; + diff-formatter = [ + "${pkgs.difftastic}/bin/difft" + "--color=always" + "$left" + "$right" + ]; + + default-command = [ + "log" + "--reversed" + "--no-pager" + ]; + merge-editor = [ + "${pkgs.meld}/bin/meld" + "$left" + "$base" + "$right" + "-o" + "$output" + "--auto-merge" + ]; + # diff-editor = "${pkgs.meld}/bin/meld"; + }; + + fsmonitor.backend = "watchman"; + fsmonitor.watchman.register-snapshot-trigger = true; + + # revsets.log = "@ | ancestors(trunk()..(visible_heads() & mine()), 2) | trunk()"; + # revsets.log = "trunk()..@ | @..trunk() | trunk() | @:: | fork_point(trunk() | @)"; + revsets.log = "trunk() | ancestors(trunk()..heads(((trunk()..visible_heads()) & my() | @)::), 2)"; + + revset-aliases = { + "my()" = "user(\"${config.programs.jujutsu.settings.user.email}\")"; + "user(x)" = "author(x) | committer(x)"; + current = "bookmarks() & my() & ~immutable()"; + "closest_bookmark(to)" = "heads(::to & bookmarks())"; + }; + + template-aliases = { + "format_timestamp(timestamp)" = "timestamp.ago()"; + log_oneline = '' + if(root, + format_root_commit(self), + label(if(current_working_copy, "working_copy"), + concat( + separate(" ", + format_short_change_id_with_change_offset(self), + if(empty, label("empty", "(empty)")), + if(description, + description.first_line(), + label(if(empty, "empty"), description_placeholder), + ), + bookmarks, + tags, + working_copies, + if(conflict, label("conflict", "conflict")), + if(config("ui.show-cryptographic-signatures").as_boolean(), + format_short_cryptographic_signature(signature)), + ) ++ "\n", + ), + ) + ) + ''; + # if(.contained_in('first_parent(@)'), label("git_head", "HEAD")), + status_summary = "'\n' ++ self.diff().summary() ++ '\n'"; + log_oneline_with_status_summary = "log_oneline ++ if(self.current_working_copy() && self.diff().files().len() > 0, status_summary)"; + }; + + aliases = + let + util = script: [ + "util" + "exec" + "--" + "bash" + "-c" + script + ]; + in + { + tug = [ + "bookmark" + "move" + "--from" + "heads(::@- & bookmarks())" + "--to" + "coalesce(@ & ~empty(), @-)" + ]; + catchup = [ + "rebase" + "-b" + "bookmarks() & mine() & ~immutable()" + "-d" + "trunk()" + "--skip-emptied" + ]; + pull = util '' + jj git fetch + jj catchup + ''; + ch = [ + "show" + "--stat" + ]; + move = [ + "rebase" + "-r" + ]; + push = [ + "git" + "push" + ]; + ll = [ + "log" + "-T" + "builtin_log_compact" + ]; + mdiff = [ + "diff" + "--from" + "trunk()" + ]; + }; + + templates = { + log_node = '' + label("node", + coalesce( + if(!self, label("elided", "~")), + if(current_working_copy, label("working_copy", "@")), + if(conflict, label("conflict", "×")), + if(immutable, label("immutable", "*")), + label("normal", "·") + ) + ) + ''; + log = "log_oneline_with_status_summary"; + git_push_bookmark = ''"jdonszelmann/" ++ change_id.short()''; + }; + + signing = { + # sign-all = true; + behavior = "own"; + backend = "ssh"; + key = "~/.ssh/id_ed25519.pub"; + }; + + # remotes.origin.auto-track-bookmarks = true; + # remotes.upstream.auto-track-bookmarks = true; + + git = { + private-commits = "description(glob:'wip:*') | description(glob:'trial:*')"; + write-change-id-header = true; + + fetch = [ + "upstream" + "origin" + ]; + push = "origin"; + }; + }; + }; +} diff --git a/programs/kanata/cfg.kbd b/programs/kanata/cfg.kbd new file mode 100644 index 0000000..e69de29 diff --git a/programs/kanata/default.nix b/programs/kanata/default.nix new file mode 100644 index 0000000..49d129e --- /dev/null +++ b/programs/kanata/default.nix @@ -0,0 +1,104 @@ +{ pkgs, config, ... }: +let + kanata-config = '' + (defcfg + process-unmapped-keys yes + danger-enable-cmd yes + ) + + (defsrc + esc + grv 1 2 3 4 5 6 7 8 9 0 - = bspc + tab q w e r t y u i o p [ ] \ + caps a s d f g h j k l ; ' ret + lsft z x c v b n m , . / rsft + lctl lmet lalt spc ralt rctl + ) + + (deflayer qwerty + @esc + grv 1 2 3 4 5 6 7 8 9 0 - = bspc + tab q w e r t y u i o p [ ] \ + @cap a s d f g h j k l ; ' ret + lsft z x c v b n m , . / rsft + lctl @lmet lalt spc ralt @rctl + ) + + (deflayer control + @esc + grv 1 2 3 4 5 6 7 8 9 0 - = bspc + tab q w e @replay t y u i o p @wup @wdown \ + @cap a s d f g left down up right ; ' bspc + lsft z x C-c v bspc n @macro , . C-f rsft + lctl lmet lalt spc ralt @rctl + ) + + (deflayermap (programming) + f (macro f n spc) + w (macro w h e r e spc) + l (macro l o o p { ret) + u (macro u s e spc) + i (macro i m p o r t spc) + s (macro s e l f spc) + ) + + (defalias + ;; hold esc + esc (tap-hold 800 800 esc caps) + + ;; control + cap (tap-hold-release 200 200 + (multi dynamic-macro-record-stop esc) + (layer-while-held control) + ) + + lmet ( + tap-hold-press 200 200 + (cmd ${pkgs.lib.getExe' pkgs.custom.niri "niri"} msg action toggle-overview) + lmet + ) + + macro (dynamic-macro-record 0) + replay (dynamic-macro-play 0) + + wup (mwheel-up 50 120) + wdown (mwheel-down 50 120) + + ;; programming + rctl ( + tap-hold-release + 200 200 + C-k (layer-while-held programming) + ) + ) + ''; +in +{ + # sudo groupadd uinput + # sudo usermod -aG input $USER + # sudo usermod -aG uinput $USER + # echo "KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput"" >> /etc/udev/rules.d/99-input.rules + # reboot or sudo udevadm control --reload-rules && sudo udevadm trigger + # sudo modprobe uinput + systemd.user.services.kanata = { + Unit = { + Description = "kanata"; + }; + + Service = { + Restart = "always"; + RestartSec = "3"; + ExecStart = "${pkgs.kanata-with-cmd}/bin/kanata --cfg ${pkgs.writeText "kanata.kbd" kanata-config}"; + Nice = "-20"; + }; + + Install = { + WantedBy = [ "default.target" ]; + }; + }; + + home.file.kanata = { + target = ".config/kanata/kanata.kbd"; + text = builtins.readFile ./cfg.kbd; + }; +} diff --git a/programs/kanata/system.nix b/programs/kanata/system.nix new file mode 100644 index 0000000..33837a2 --- /dev/null +++ b/programs/kanata/system.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: +{ + # sudo groupadd uinput + # sudo usermod -aG input $USER + # sudo usermod -aG uinput $USER + # echo "KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput"" >> /etc/udev/rules.d/99-input.rules + # reboot or sudo udevadm control --reload-rules && sudo udevadm trigger + # sudo modprobe uinput + + users.groups.uinput = { }; + users.extraUsers.jana.extraGroups = [ + "uinput" + "input" + ]; + environment.systemPackages = [ pkgs.kanata-with-cmd ]; + services.udev.extraRules = '' + KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput" + ''; +} diff --git a/programs/kitty/default.nix b/programs/kitty/default.nix new file mode 100644 index 0000000..9590d90 --- /dev/null +++ b/programs/kitty/default.nix @@ -0,0 +1,53 @@ +{ pkgs, flakes, ... }: +{ + programs.kitty = { + enable = true; + font = { + name = "Jetbrains Mono"; + size = 13.0; + package = pkgs.jetbrains-mono; + }; + + settings = { + scrollback_lines = 20000; + allow_hyperlinks = true; + + repaint_delay = 10; + input_delay = 3; + + enable_audio_bell = false; + update_check_interval = 0; + + initial_window_width = "95c"; + initial_window_height = "30c"; + remember_window_size = "no"; + + draw_minimal_borders = false; + hide_window_decorations = true; + + shell = "${pkgs.tmux}/bin/tmux"; + clipboard_control = "write-clipboard write-primary read-clipboard read-primary"; + + foreground = "#fcfcfc"; + background = "#232627"; + linux_display_server = "auto"; + }; + + keybindings = { + "ctrl+f" = + "launch --location=hsplit --allow-remote-control kitty +kitten ${flakes.kitty-search}/search.py @active-kitty-window-id"; + "ctrl+alt+r" = "load_config_file"; + "ctrl+shift+r" = "no_op"; + "super+`" = "no_op"; + "ctrl+EQUAL" = "change_font_size all +2.0"; + "ctrl+minus" = "change_font_size all -2.0"; + "ctrl+0" = "change_font_size all 0"; + # "ctrl+/" = "send_text all "; + "super+~" = "no_op"; + }; + + extraConfig = '' + mouse_map left click ungrabbed no-op + ''; + }; +} diff --git a/programs/niri/default.nix b/programs/niri/default.nix new file mode 100644 index 0000000..76ea9e0 --- /dev/null +++ b/programs/niri/default.nix @@ -0,0 +1,558 @@ +{ + config, + pkgs, + flakes, + lib, + ... +}: +let + noctalia = + cmd: + [ + "${pkgs.lib.getExe' flakes.noctalia.packages.${pkgs.system}.default "noctalia-shell"}" + "ipc" + "call" + ] + ++ (pkgs.lib.splitString " " cmd); + + wallpaper = ("${pkgs.custom.raw-data}/pacific.png"); + matugenSchemeType = "scheme-tonal-spot"; +in +{ + home.packages = with pkgs; [ + matugen + glib + dconf + gsettings-desktop-schemas + xwayland-satellite + # gtk + nwg-look + # qt config tool + kdePackages.qt6ct + + fira + jetbrains-mono + fira-mono + noto-fonts + ]; + + home.sessionVariables = { + QT_QPA_PLATFORMTHEME = "qt6ct"; + XCURSOR_THEME = "Adwaita"; + XCURSOR_SIZE = "10"; + }; + + programs.niri.settings = { + input = { + keyboard = { + xkb = { + layout = "us"; + options = "grp:win_space_toggle,compose:ralt"; + }; + numlock = true; + }; + + mouse = { + accel-speed = 0.5; + }; + + touchpad = { + dwt = true; + tap = true; + tap-button-map = "left-right-middle"; + click-method = "clickfinger"; + natural-scroll = false; + }; + }; + + debug = { + render-drm-device = "/dev/dri/renderD128"; + }; + + cursor = { + theme = "Adwaita"; + size = 10; + }; + + gestures.hot-corners.enable = false; + + layout = { + gaps = 5; + center-focused-column = "never"; + + preset-column-widths = [ + { proportion = 0.33333; } + { proportion = 0.5; } + { proportion = 0.66667; } + { proportion = 1.0; } + ]; + + default-column-width = { + proportion = 0.5; + }; + + shadow = { + softness = 20; + spread = 5; + offset = { + x = 0; + y = 5; + }; + }; + + focus-ring = { + width = 1; + active.color = "#${config.programs.matugen.theme.colors.primary.default}"; + inactive.color = "#${config.programs.matugen.theme.colors.surface.default}"; + urgent.color = "#${config.programs.matugen.theme.colors.error.default}"; + }; + + border = { + active.color = "#${config.programs.matugen.theme.colors.primary.default}"; + inactive.color = "#${config.programs.matugen.theme.colors.surface.default}"; + urgent.color = "#${config.programs.matugen.theme.colors.error.default}"; + }; + + shadow = { + color = "#${config.programs.matugen.theme.colors.shadow.default}70"; + }; + + tab-indicator = { + active.color = "#${config.programs.matugen.theme.colors.primary.default}"; + inactive.color = "#${config.programs.matugen.theme.colors.primary_container.default}"; + urgent.color = "#${config.programs.matugen.theme.colors.error.default}"; + }; + + insert-hint = { + display.color = "#${config.programs.matugen.theme.colors.primary.default}80"; + }; + }; + + hotkey-overlay.skip-at-startup = true; + + screenshot-path = "~/Documents/personal/pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"; + + workspaces."01-browser" = { + name = "browser"; + }; + workspaces."02-programming" = { + name = "programming"; + }; + workspaces."03-chat" = { + name = "chat"; + }; + + window-rules = [ + { + matches = [ { title = "Extension: (Bitwarden Password Manager).*"; } ]; + open-floating = true; + open-focused = true; + block-out-from = "screen-capture"; + } + + { + matches = [ { app-id = "firefox"; } ]; + open-on-workspace = "browser"; + } + + { + matches = [ + { + app-id = "org.gnome.Nautilus"; + title = "Open Files"; + } + { + app-id = "steam"; + title = "Steam Settings"; + } + ]; + open-floating = true; + } + + { + matches = [ + { app-id = "discord"; } + { app-id = "org.element.desktop"; } # TODO + { app-id = "signal"; } # TODO + ]; + open-on-workspace = "chat"; + } + + { + matches = [ + { app-id = "dev.zed.Zed"; } + ]; + open-on-workspace = "programming"; + } + + { + geometry-corner-radius = { + top-left = 8.0; + top-right = 8.0; + bottom-right = 8.0; + bottom-left = 8.0; + }; + clip-to-geometry = true; + } + ]; + + spawn-at-startup = [ + { argv = [ "firefox" ]; } + { argv = [ "discord" ]; } + { argv = [ "signal-desktop" ]; } + { argv = [ "zeditor" ]; } + { + argv = [ "${pkgs.lib.getExe' flakes.noctalia.packages.${pkgs.system}.default "noctalia-shell"}" ]; + } + ]; + + animations = { }; + + binds = { + "Ctrl+Alt+Delete" = { + hotkey-overlay.title = "Power menu"; + action.spawn = noctalia "sessionMenu toggle"; + }; + + "Mod+O" = { + hotkey-overlay.title = "Run an Application"; + action.spawn = noctalia "launcher toggle"; + }; + + "Mod+L" = { + hotkey-overlay.title = "Lock the Screen"; + action.spawn = noctalia "lockScreen lock"; + }; + + "Mod+Shift+Slash".action.show-hotkey-overlay = { }; + + "Mod+Return" = { + hotkey-overlay.title = "Open a Terminal"; + action.spawn = "kitty"; + }; + + "XF86AudioRaiseVolume" = { + allow-when-locked = true; + action.spawn-sh = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+"; + }; + "XF86AudioLowerVolume" = { + allow-when-locked = true; + action.spawn-sh = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; + }; + "XF86AudioMute" = { + allow-when-locked = true; + action.spawn-sh = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; + }; + "XF86AudioMicMute" = { + allow-when-locked = true; + action.spawn-sh = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; + }; + "XF86AudioPlay" = { + allow-when-locked = true; + action.spawn-sh = "playerctl play-pause"; + }; + "XF86AudioStop" = { + allow-when-locked = true; + action.spawn-sh = "playerctl stop"; + }; + "XF86AudioPrev" = { + allow-when-locked = true; + action.spawn-sh = "playerctl previous"; + }; + "XF86AudioNext" = { + allow-when-locked = true; + action.spawn-sh = "playerctl next"; + }; + "Mod+Period" = { + allow-when-locked = true; + action.spawn-sh = "playerctl previous"; + }; + "Mod+Comma" = { + allow-when-locked = true; + action.spawn-sh = "playerctl next"; + }; + "Mod+Slash" = { + allow-when-locked = true; + action.spawn-sh = "playerctl next"; + }; + + # TODO + "XF86MonBrightnessUp" = { + allow-when-locked = true; + action.spawn = [ + "brightnessctl" + "--device=amdgpu_bl1" + "--class=backlight" + "set" + "+10%" + ]; + }; + "XF86MonBrightnessDown" = { + allow-when-locked = true; + action.spawn = [ + "brightnessctl" + "--device=amdgpu_bl1" + "--class=backlight" + "set" + "10%-" + ]; + }; + + "Mod+Q" = { + repeat = false; + action.close-window = { }; + }; + + "Mod+Left".action.focus-column-left = { }; + "Mod+Down".action.focus-window-or-workspace-down = { }; + "Mod+Up".action.focus-window-or-workspace-up = { }; + "Mod+Right".action.focus-column-right = { }; + + "Mod+Shift+Left".action.move-column-left = { }; + "Mod+Shift+Down".action.move-window-down-or-to-workspace-down = { }; + "Mod+Shift+Up".action.move-window-up-or-to-workspace-up = { }; + "Mod+Shift+Right".action.move-column-right = { }; + + "Mod+Home".action.focus-column-first = { }; + "Mod+End".action.focus-column-last = { }; + "Mod+Shift+Home".action.move-column-to-first = { }; + "Mod+Shift+End".action.move-column-to-last = { }; + + "Mod+Ctrl+Left".action.focus-monitor-left = { }; + "Mod+Ctrl+Down".action.focus-monitor-down = { }; + "Mod+Ctrl+Up".action.focus-monitor-up = { }; + "Mod+Ctrl+Right".action.focus-monitor-right = { }; + + "Mod+Shift+Ctrl+Left".action.move-column-to-monitor-left = { }; + "Mod+Shift+Ctrl+Down".action.move-column-to-monitor-down = { }; + "Mod+Shift+Ctrl+Up".action.move-column-to-monitor-up = { }; + "Mod+Shift+Ctrl+Right".action.move-column-to-monitor-right = { }; + + "Mod+1".action.focus-workspace = 1; + "Mod+2".action.focus-workspace = 2; + "Mod+3".action.focus-workspace = 3; + "Mod+4".action.focus-workspace = 4; + "Mod+5".action.focus-workspace = 5; + "Mod+6".action.focus-workspace = 6; + "Mod+7".action.focus-workspace = 7; + "Mod+8".action.focus-workspace = 8; + "Mod+9".action.focus-workspace = 9; + "Mod+Shift+1".action.move-column-to-workspace = 1; + "Mod+Shift+2".action.move-column-to-workspace = 2; + "Mod+Shift+3".action.move-column-to-workspace = 3; + "Mod+Shift+4".action.move-column-to-workspace = 4; + "Mod+Shift+5".action.move-column-to-workspace = 5; + "Mod+Shift+6".action.move-column-to-workspace = 6; + "Mod+Shift+7".action.move-column-to-workspace = 7; + "Mod+Shift+8".action.move-column-to-workspace = 8; + "Mod+Shift+9".action.move-column-to-workspace = 9; + + "Mod+WheelScrollDown" = { + cooldown-ms = 150; + action.focus-workspace-down = { }; + }; + "Mod+WheelScrollUp" = { + cooldown-ms = 150; + action.focus-workspace-up = { }; + }; + "Mod+Shift+WheelScrollDown" = { + cooldown-ms = 150; + action.move-column-to-workspace-down = { }; + }; + "Mod+Shift+WheelScrollUp" = { + cooldown-ms = 150; + action.move-column-to-workspace-up = { }; + }; + + "Mod+WheelScrollRight".action.focus-column-right = { }; + "Mod+WheelScrollLeft".action.focus-column-left = { }; + "Mod+Shift+WheelScrollRight".action.move-column-right = { }; + "Mod+Shift+WheelScrollLeft".action.move-column-left = { }; + + "Mod+BracketLeft".action.consume-or-expel-window-left = { }; + "Mod+BracketRight".action.consume-or-expel-window-right = { }; + + "Mod+Shift+BracketLeft".action.consume-window-into-column = { }; + "Mod+Shift+BracketRight".action.expel-window-from-column = { }; + + "Mod+R".action.switch-preset-column-width = { }; + "Mod+Shift+R".action.switch-preset-window-height = { }; + "Mod+Ctrl+R".action.reset-window-height = { }; + + "Mod+D".action.maximize-column = { }; + "Mod+F".action.fullscreen-window = { }; + "Mod+S".action.expand-column-to-available-width = { }; + "Mod+C".action.center-column = { }; + "Mod+Shift+C".action.center-visible-columns = { }; + + "Mod+Minus".action.set-column-width = "-10%"; + "Mod+Equal".action.set-column-width = "+10%"; + "Mod+Shift+Minus".action.set-window-height = "-10%"; + "Mod+Shift+Equal".action.set-window-height = "+10%"; + + "Mod+E".action.toggle-window-floating = { }; + "Mod+Shift+E".action.switch-focus-between-floating-and-tiling = { }; + + "Mod+W".action.toggle-column-tabbed-display = { }; + + "Mod+Shift+S".action.screenshot = { }; + + "Mod+Escape" = { + allow-inhibiting = false; + action.toggle-keyboard-shortcuts-inhibit = { }; + }; + + "Mod+Shift+P".action.power-off-monitors = { }; + }; + }; + + programs.noctalia-shell = { + enable = true; + systemd.enable = false; + settings = { + general = { + # avatarImage = cfg.pfp; + }; + colorSchemes = { + darkMode = true; + generateTemplatesForPredefined = true; + inherit matugenSchemeType; + predefinedScheme = "Noctalia (default)"; + useWallpaperColors = true; + }; + location = { + monthBeforeDay = false; + name = "Amsterdam"; + }; + wallpaper = { + enabled = true; + setWallpaperOnAllMonitors = true; + fillMode = "crop"; + }; + appLauncher = { + enableClipboardHistory = true; + terminalCommand = "kitty -e"; + }; + sessionMenu = { + enableCountdown = true; + countdownDuration = 5000; + }; + controlCenter = { + position = "close_to_bar_button"; + shortcuts = { + left = [ + { + id = "WiFi"; + } + { + id = "Bluetooth"; + } + { + id = "PowerProfile"; + } + { + id = "KeepAwake"; + } + ]; + right = [ ]; + }; + }; + bar = { + density = "compact"; + position = "right"; + backgroundOpacity = 0.5; + widgets = { + left = [ + { + id = "ControlCenter"; + useDistroLogo = true; + } + { + id = "NotificationHistory"; + } + { + id = "plugin:catwalk"; + } + ]; + center = [ + { + hideUnoccupied = false; + id = "Workspace"; + labelMode = "none"; + } + ]; + right = [ + { + id = "Tray"; + drawerEnabled = false; + } + { + id = "WiFi"; + } + { + id = "Bluetooth"; + } + ] + ++ [ { id = "Battery"; } ] + ++ [ + { + id = "KeyboardLayout"; + displayMode = "forceOpen"; + } + { + formatHorizontal = "HH:mm"; + formatVertical = "HH mm"; + id = "Clock"; + useMonospacedFont = true; + usePrimaryColor = true; + } + ]; + }; + }; + templates = { + gtk = true; + qt = true; + niri = true; + }; + }; + }; + + home.file.".cache/noctalia/wallpapers.json" = { + text = builtins.toJSON { + defaultWallpaper = wallpaper; + }; + }; + + home.activation.themeFiles = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + mkdir -p ${config.xdg.configHome}/gtk-4.0 + mkdir -p ${config.xdg.configHome}/gtk-3.0 + mkdir -p ${config.xdg.configHome}/qt5ct/colors + mkdir -p ${config.xdg.configHome}/qt6ct/colors + + touch ${config.xdg.configHome}/gtk-4.0/gtk.css + touch ${config.xdg.configHome}/gtk-3.0/gtk.css + touch ${config.xdg.configHome}/qt5ct/colors/noctalia.conf + touch ${config.xdg.configHome}/qt6ct/colors/noctalia.conf + ''; + + programs.matugen = { + enable = true; + wallpaper = wallpaper; + type = matugenSchemeType; + }; + + gtk.cursorTheme = { + package = pkgs.adwaita-icon-theme; + name = "Adwaita"; + size = 24; + }; + + dconf.settings = { + # appearance + "org/gnome/desktop/interface" = { + color-scheme = "prefer-dark"; + enable-hot-corners = false; + gtk-enable-primary-paste = false; + }; + }; +} diff --git a/programs/nvim/config.lua b/programs/nvim/config.lua new file mode 100644 index 0000000..0507bae --- /dev/null +++ b/programs/nvim/config.lua @@ -0,0 +1,248 @@ +vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions" + + +vim.filetype.add({ + extension = { + mdx = "markdown", + } +}) + + +-- key mapping +local keymap = vim.api.nvim_set_keymap +local opts = { noremap = true, silent = true } +local builtin = require('telescope.builtin') + +-- comment +local esc = vim.api.nvim_replace_termcodes( + '', true, false, true +) +local api = require('Comment.api') + +vim.keymap.set("n", "", ":lua require('Comment.api').toggle.linewise.current() j", { remap = true }) +vim.keymap.set("i", "", ":lua require('Comment.api').toggle.linewise.current()", { remap = true }) +vim.keymap.set("x", "", function() + vim.api.nvim_feedkeys(esc, 'nx', false) + api.toggle.linewise(vim.fn.visualmode()) +end, { remap = true }) + +vim.keymap.set('n', 'gr', (function() builtin.lsp_references({jump_type="vsplit"}) end), {}) +vim.keymap.set('n', 'gd', (function() builtin.lsp_definitions({jump_type="vsplit"}) end), {}) +vim.keymap.set('n', 'gt', (function() builtin.lsp_type_definitions({jump_type="vsplit"}) end), {}) + +local barbar_state = require("barbar.state") +function find_windows_with_buffer(bufnum) + windows = {} + + 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 + + return windows +end + +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 + + 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, }) + +local function close_floating() + for _, win in ipairs(vim.api.nvim_list_wins()) do + local config = vim.api.nvim_win_get_config(win) + if config.relative ~= "" then + vim.api.nvim_win_close(win, false) + end + end +end + +vim.keymap.set("n", "", close_floating, { desc = "Close floats, clear highlights" }) + +local builtin = require('telescope.builtin') + +vim.keymap.set("n", "x", require("telescope.builtin").resume, { + noremap = true, + silent = true, + desc = "Resume", +}) + +-- local gitsigns = require('gitsigns') +-- vim.keymap.set('n', 'gr', gitsigns.reset_hunk) +-- vim.keymap.set('n', 'gd', gitsigns.diffthis) +-- vim.keymap.set({'o', 'x'}, 'ig', ':Gitsigns select_hunk') + + +-- better search +vim.cmd([[ + " Better search + set incsearch + set ignorecase + set smartcase + set gdefault + + nnoremap n n:call BlinkNextMatch() + nnoremap N N:call BlinkNextMatch() + + function! BlinkNextMatch() abort + highlight JustMatched ctermfg=white ctermbg=magenta cterm=bold + + let pat = '\c\%#' . @/ + let id = matchadd('JustMatched', pat) + redraw + + exec 'sleep 150m' + call matchdelete(id) + redraw + endfunction + + nnoremap :silent nohecho + nnoremap :silent nohecho + + nnoremap n nzz + nnoremap N Nzz + nnoremap * *zz + nnoremap # #zz + nnoremap g* g*zz +]]) + +vim.cmd([[ + inoremap FloatermToggle + nnoremap FloatermToggle + tnoremap FloatermToggle +]]) + +vim.cmd([[ + let g:suda_smart_edit = 1 + filetype plugin indent on +]]) + + +-- multicursor +vim.g.VM_default_mappings = 1 +vim.g.VM_reselect_first = 1 +vim.g.VM_notify_previously_selected = 1 +vim.g.VM_theme = "iceblue" + + + +-- workaround for rust-analyzer server cancelled request +for _, method in ipairs { 'textDocument/diagnostic', 'workspace/diagnostic' } do + local default_diagnostic_handler = vim.lsp.handlers[method] + vim.lsp.handlers[method] = function(err, result, context, config) + if err ~= nil and err.code == -32802 then + return + end + return default_diagnostic_handler(err, result, context, config) + end +end + +require("hover").setup { + init = function() + require("hover.providers.lsp") + require('hover.providers.gh') + require('hover.providers.diagnostic') + end, + preview_opts = { + border = 'rounded' + }, + -- Whether the contents of a currently open hover window should be moved + -- to a :h preview-window when pressing the hover keymap. + preview_window = false, + title = true, +} + +-- Setup keymaps +vim.keymap.set("n", "K", require("hover").hover, {desc = "hover.nvim"}) +vim.keymap.set("n", "gK", require("hover").hover_select, {desc = "hover.nvim (select)"}) +-- vim.keymap.set("n", "", function() require("hover").hover_switch("previous") end, {desc = "hover.nvim (previous source)"}) +-- vim.keymap.set("n", "", function() require("hover").hover_switch("next") end, {desc = "hover.nvim (next source)"}) diff --git a/programs/nvim/default.nix b/programs/nvim/default.nix new file mode 100644 index 0000000..e3b1151 --- /dev/null +++ b/programs/nvim/default.nix @@ -0,0 +1,99 @@ +{ pkgs, inputs, ... }: +{ + home = { + sessionVariables = { + EDITOR = "nvim"; + }; + }; + + imports = [ + ./options.nix + ./plugins.nix + ./keys.nix + ]; + + programs.nixvim = { + enable = true; + globals.mapleader = " "; + globals.maplocalleader = " "; + + viAlias = true; + vimAlias = true; + + # Highlight and remove extra white spaces + # same color as cursorline as per + # https://github.com/joshdick/onedark.vim/blob/390b893d361c356ac1b00778d849815f2aa44ae4/autoload/onedark.vim + highlight.ExtraWhitespace.bg = "#2C323C"; + match.ExtraWhitespace = "\\s\\+$"; + + clipboard.providers.wl-copy.enable = true; + + performance = { + byteCompileLua.enable = true; + combinePlugins = { + enable = true; + + standalonePlugins = [ + # clashes with lualine + "onedark.nvim" + ]; + }; + }; + + extraLuaPackages = ps: [ ps.magick ]; + extraPackages = [ pkgs.imagemagick ]; + + # package = (import inputs.unstable { inherit (pkgs) system; }).neovim-unwrapped; + package = pkgs.neovim-unwrapped; + + colorschemes.onedark = { + enable = true; + settings = { + style = "deep"; + + highlights = { + # bright green doccomments + "@lsp.type.comment".fg = "#77B767"; + "@comment.documentation.rust".fg = "#77B767"; + "@comment.documentation".fg = "#77B767"; + "@comment".fg = "#426639"; + # "Visual".bg = "#2a2e36"; + # "Cursorline".bg = "#2a2e36"; + }; + + }; + }; + + extraConfigLuaPre = '' + require("neoconf").setup({}) + ''; + extraConfigLua = + '' + require("render-markdown").setup { + latex_converter = '${pkgs.python312Packages.pylatexenc}/bin/latex2text', + } + '' + + # local lspconfig = require 'lspconfig' + # local configs = require 'lspconfig.configs' + # if not configs.foo_lsp then + # configs.noteslsp = { + # default_config = { + # -- cmd = {'${pkgs.custom.noteslsp}/bin/noteslsp'}, + # cmd = {'./noteslsp/target/debug/noteslsp'}, + # filetypes = {'markdown'}, + # root_dir = function(fname) + # return lspconfig.util.find_git_ancestor(fname) + # end, + # settings = {} + # , + # }, + # } + # end + # + # lspconfig.noteslsp.setup{} + # '' + + (builtins.readFile ./config.lua); + + }; +} diff --git a/programs/nvim/keys.nix b/programs/nvim/keys.nix new file mode 100644 index 0000000..0080355 --- /dev/null +++ b/programs/nvim/keys.nix @@ -0,0 +1,103 @@ +_: +let + map = mode: key: action: { + inherit mode key action; + }; + luamap = + mode: key: action: + map mode key "lua ${action}"; + telescope = "require('telescope.builtin')"; +in +{ + programs.nixvim.keymaps = [ + (map "" "" "Lspsaga rename") + (map "" "o" "Lspsaga outline") + (map "" "." "Lspsaga code_action") + + # splitting + (map "n" "s" "vertical sb") + + # closing + (map "n" "w" "BufferClose") # single buffer + (map "n" "cb" "BufferClose") # single buffer + + (map "n" "ct" "CloseBuffer") # buffer or extra tab + (map "n" "q" "CloseBuffer") # buffer or extra tab + + (map "n" "co" "silent! BufferCloseAllButVisible") # other buffers + (map "n" "cl" "silent! BufferCloseBuffersLeft") # other buffers (left) + (map "n" "cr" "silent! BufferCloseBuffersRight") # other buffers (right) + + # moving + (map "n" "mL" "BufferMovePrevious") # left + (map "n" "mr" "BufferMoveNext") # right + (map "n" "m0" "BufferMoveStart") # start + (map "n" "m$" "BufferMoveEnd") # end + + (map "n" "jb" "BufferPick") # jump to tab + + # jumplist + # (map "n" "" "") + # (map "n" "" "") + (luamap "n" "r" "${telescope}.jumplist()") + + # pickers + (luamap "n" "" "${telescope}.find_files()") + (luamap "n" "f" "${telescope}.live_grep()") + (luamap "n" "t" "${telescope}.lsp_document_symbols()") + (luamap "n" "T" "${telescope}.lsp_dynamic_workspace_symbols()") + # last used pickers/searches + (luamap "n" "h" "${telescope}.pickers()") + # open buffers + (luamap "n" "b" "${telescope}.buffers({sort_mru = true})") + + # diagnostics + (map "n" "d" "Trouble diagnostics toggle filter.buf=0") + (map "n" "ad" "Trouble diagnostics toggle") + (luamap "n" "]d" + "vim.diagnostic.goto_next({ severity = vim.diagnostic.severity.ERROR, wrap=true })" + ) + (luamap "n" "[d" + "vim.diagnostic.goto_prev({ severity = vim.diagnostic.severity.ERROR, wrap=true })" + ) + (luamap "n" "]w" "vim.diagnostic.goto_next({ wrap=true })") + (luamap "n" "[w" "vim.diagnostic.goto_prev({ wrap=true })") + + # docs with control-d just like in autocomplete + (map "n" "" "K") + + # expand macro + (map "n" "em" "RustLsp expandMacro") + + # easier quitting etc + (map "ca" "W" "w") + (map "ca" "X" "x") + + (map "ca" "Q" "CloseBuffer") + (map "ca" "q" "CloseBuffer") + + # navigation + (map "" "" "") + (map "" "" "") + (map "" "" "") + (map "" "" "") + (map "" "" "") + + # { + # key = "/"; + # action = "lua require('spectre').open_file_search({select_word=true})"; + # } + + (map "n" "t" "Neotree toggle") + + # tab for indent/dedent + (map "n" "" ">>_") + (map "n" "" "<<_") + (map "i" "" "") + (map "v" "" ">gv") + (map "v" "" "