diff --git a/.forgejo/workflows/main.yaml b/.forgejo/workflows/main.yaml deleted file mode 100644 index e561bd0..0000000 --- a/.forgejo/workflows/main.yaml +++ /dev/null @@ -1,7 +0,0 @@ -on: [push] -jobs: - check: - runs-on: nix-latest - steps: - - uses: actions/checkout@v4 - - run: nix flake check diff --git a/.forgejo/workflows/main.yml b/.forgejo/workflows/main.yml new file mode 100644 index 0000000..aadb6f1 --- /dev/null +++ b/.forgejo/workflows/main.yml @@ -0,0 +1,33 @@ +name: build + +on: + push: + branches: + - master +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + package_name: ["nvim"] + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@main + - name: check + run: nix flake check + - name: Run `nix bundle` + if: github.ref == 'refs/heads/master' + id: build + run: | + nix bundle \ + -o ${{ matrix.package_name }}.AppImage \ + --bundler github:ralismark/nix-appimage \ + --extra-experimental-features nix-command \ + --extra-experimental-features flakes .#${{ matrix.package_name }} + echo "Done building AppImage for ${{ matrix.package_name }}" + - name: Upload bundle to release + if: github.ref == 'refs/heads/master' + uses: https://data.forgejo.org/forgejo/upload-artifact@v4 + with: + path: "${{ matrix.package_name }}.AppImage" + name: "${{ matrix.package_name }}-x86_64-linux.AppImage" diff --git a/.gitignore b/.gitignore index 9b4177a..af68b45 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ result .pre-commit-config.yaml .direnv/ +*.AppImage +.luarc.json diff --git a/.sops.yaml b/.sops.yaml index ad3a5f9..bc8d29e 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -5,7 +5,7 @@ keys: - &oracle1 age12tz2r7clep9e450qhr5a6ctnx29ywmu0llq8uk9kcwhpp82zsa0sk9la9h - &zen age1nzlng9tw59rxnr86jw330s9z4x28hr394cl2qgktptf8swat23gqahgudw creation_rules: - - path_regex: secrets/[^/]+\.yaml$ + - path_regex: secrets/[^/]+\.*$ key_groups: - age: - *t14 diff --git a/flake.lock b/flake.lock index 12109f4..6eee496 100755 --- a/flake.lock +++ b/flake.lock @@ -6,7 +6,7 @@ "llm-agents", "nixpkgs" ], - "systems": "systems_2" + "systems": "systems_3" }, "locked": { "lastModified": 1771437256, @@ -25,7 +25,7 @@ "dart": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs" }, "locked": { "lastModified": 1771048667, @@ -69,7 +69,7 @@ "determinate-nixd-aarch64-linux": "determinate-nixd-aarch64-linux", "determinate-nixd-x86_64-linux": "determinate-nixd-x86_64-linux", "nix": "nix", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1771014593, @@ -152,38 +152,6 @@ "type": "github" } }, - "flake-compat_3": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_4": { - "flake": false, - "locked": { - "lastModified": 1767039857, - "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", - "owner": "NixOS", - "repo": "flake-compat", - "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -206,27 +174,8 @@ } }, "flake-parts_2": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1717285511, - "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_3": { "inputs": { "nixpkgs-lib": [ - "nvim", "neovim-nightly-overlay", "nixpkgs" ] @@ -247,7 +196,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems_3" + "systems": "systems" }, "locked": { "lastModified": 1731533236, @@ -262,73 +211,6 @@ "type": "github" } }, - "flake-utils_2": { - "inputs": { - "systems": "systems_4" - }, - "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" - } - }, - "gen-luarc": { - "inputs": { - "flake-parts": "flake-parts_2", - "git-hooks": "git-hooks", - "luvit-meta": "luvit-meta", - "nixpkgs": [ - "nvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1755304025, - "narHash": "sha256-xVKfjFwc0zMbLMjLTiHz+0llggkjs93SmHkhaa9S3M4=", - "owner": "mrcjkb", - "repo": "nix-gen-luarc-json", - "rev": "1865b0ebb753ae5324d7381b1fa8c98c04ec7509", - "type": "github" - }, - "original": { - "owner": "mrcjkb", - "repo": "nix-gen-luarc-json", - "type": "github" - } - }, - "git-hooks": { - "inputs": { - "flake-compat": "flake-compat_3", - "gitignore": "gitignore", - "nixpkgs": [ - "nvim", - "gen-luarc", - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable_2" - }, - "locked": { - "lastModified": 1723803910, - "narHash": "sha256-yezvUuFiEnCFbGuwj/bQcqg7RykIEqudOy/RBrId0pc=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "bfef0ada09e2c8ac55bbcd0831bd0c9d42e651ba", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, "git-hooks-nix": { "inputs": { "flake-compat": "flake-compat_2", @@ -355,50 +237,6 @@ "url": "https://flakehub.com/f/cachix/git-hooks.nix/0.1.941" } }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "nvim", - "gen-luarc", - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "gitignore_2": { - "inputs": { - "nixpkgs": [ - "pre-commit-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -423,11 +261,11 @@ "jj-nvim": { "flake": false, "locked": { - "lastModified": 1771004667, - "narHash": "sha256-G7ksxOJJmQeTbsdAYddSFWUs9kyW/nIL4mv0F3FiXAI=", + "lastModified": 1771953539, + "narHash": "sha256-nokftWcAmmHX6UcH6O79xkLwbUpq1W8N9lf1e+NyGqE=", "owner": "NicolasGB", "repo": "jj.nvim", - "rev": "3d78c28f7e26d5c87f53e66e05a1393e6ca9fec2", + "rev": "bbba4051c862473637e98277f284d12b050588ca", "type": "github" }, "original": { @@ -455,7 +293,7 @@ "llm-agents": { "inputs": { "blueprint": "blueprint", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "treefmt-nix": "treefmt-nix" }, "locked": { @@ -472,22 +310,6 @@ "type": "github" } }, - "luvit-meta": { - "flake": false, - "locked": { - "lastModified": 1705776742, - "narHash": "sha256-zAAptV/oLuLAAsa2zSB/6fxlElk4+jNZd/cPr9oxFig=", - "owner": "Bilal2453", - "repo": "luvit-meta", - "rev": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60", - "type": "github" - }, - "original": { - "owner": "Bilal2453", - "repo": "luvit-meta", - "type": "github" - } - }, "microvm": { "inputs": { "nixpkgs": [ @@ -511,19 +333,18 @@ }, "neovim-nightly-overlay": { "inputs": { - "flake-parts": "flake-parts_3", + "flake-parts": "flake-parts_2", "neovim-src": "neovim-src", "nixpkgs": [ - "nvim", "nixpkgs" ] }, "locked": { - "lastModified": 1771200309, - "narHash": "sha256-2UQHZ8BsRSwtzl2R1OqtYR80SQF+HG3kJdTxfiDZR9s=", + "lastModified": 1772150696, + "narHash": "sha256-0QNL7sbGgKipjr1uXr3KpaPgBWKZmM97l/T7zkWdVqI=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "c3e52f66f877cddce4167041546524abb76c0a70", + "rev": "de416cbd51404e64540ca4746393d1866b219bae", "type": "github" }, "original": { @@ -535,11 +356,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1771195863, - "narHash": "sha256-WB0xr61z2nHB3/u42xYilqDCA/x3tvVZ21/bx2pNmgc=", + "lastModified": 1772148728, + "narHash": "sha256-ot+6q4IoboWMfD4xW26pE8zT3e5ocfZ8XD/FzKxeEUo=", "owner": "neovim", "repo": "neovim", - "rev": "7d8653575f2a1170f0c7651f271c45a15a185d5e", + "rev": "18c5f06c9f6068b9a26a1ed4ab0f66b91db85cd9", "type": "github" }, "original": { @@ -552,7 +373,7 @@ "inputs": { "flake-parts": "flake-parts", "git-hooks-nix": "git-hooks-nix", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "nixpkgs-23-11": "nixpkgs-23-11", "nixpkgs-regression": "nixpkgs-regression" }, @@ -606,16 +427,17 @@ }, "nixpkgs": { "locked": { - "lastModified": 1761597516, - "narHash": "sha256-wxX7u6D2rpkJLWkZ2E932SIvDJW8+ON/0Yy8+a5vsDU=", - "rev": "daf6dc47aa4b44791372d6139ab7b25269184d55", - "revCount": 811874, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.811874%2Brev-daf6dc47aa4b44791372d6139ab7b25269184d55/019a3494-3498-707e-9086-1fb81badc7fe/source.tar.gz" + "lastModified": 1755660401, + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5788de501b965d7413f2beaac10aeeb56f9a19a8", + "type": "github" }, "original": { - "type": "tarball", - "url": "https://flakehub.com/f/NixOS/nixpkgs/0.2505" + "owner": "NixOS", + "ref": "master", + "repo": "nixpkgs", + "type": "github" } }, "nixpkgs-23-11": { @@ -634,18 +456,6 @@ "type": "github" } }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1717284937, - "narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=", - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" - } - }, "nixpkgs-regression": { "locked": { "lastModified": 1643052045, @@ -678,23 +488,21 @@ "type": "github" } }, - "nixpkgs-stable_2": { + "nixpkgs_2": { "locked": { - "lastModified": 1720386169, - "narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "194846768975b7ad2c4988bdb82572c00222c0d7", - "type": "github" + "lastModified": 1761597516, + "narHash": "sha256-wxX7u6D2rpkJLWkZ2E932SIvDJW8+ON/0Yy8+a5vsDU=", + "rev": "daf6dc47aa4b44791372d6139ab7b25269184d55", + "revCount": 811874, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.811874%2Brev-daf6dc47aa4b44791372d6139ab7b25269184d55/019a3494-3498-707e-9086-1fb81badc7fe/source.tar.gz" }, "original": { - "owner": "NixOS", - "ref": "nixos-24.05", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.2505" } }, - "nixpkgs_2": { + "nixpkgs_3": { "locked": { "lastModified": 1770537093, "narHash": "sha256-pF1quXG5wsgtyuPOHcLfYg/ft/QMr8NnX0i6tW2187s=", @@ -708,7 +516,7 @@ "url": "https://flakehub.com/f/DeterminateSystems/nixpkgs-weekly/0.1" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1771423170, "narHash": "sha256-K7Dg9TQ0mOcAtWTO/FX/FaprtWQ8BmEXTpLIaNRhEwU=", @@ -724,7 +532,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1771008912, "narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=", @@ -740,84 +548,22 @@ "type": "github" } }, - "nixpkgs_5": { - "locked": { - "lastModified": 1755660401, - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5788de501b965d7413f2beaac10aeeb56f9a19a8", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "master", - "repo": "nixpkgs", - "type": "github" - } - }, - "nvim": { - "inputs": { - "dart": "dart", - "flake-utils": "flake-utils_2", - "gen-luarc": "gen-luarc", - "jj-nvim": "jj-nvim", - "neovim-nightly-overlay": "neovim-nightly-overlay", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1771220173, - "narHash": "sha256-QWZPg+bTY7n0X21ehfx4gOEe8/RcjsWYPhKZOXzMpO8=", - "owner": "iofq", - "repo": "nvim.nix", - "rev": "e9d4373ddcce3f32ba1a36b9f566ab8dc4d2892c", - "type": "github" - }, - "original": { - "owner": "iofq", - "repo": "nvim.nix", - "type": "github" - } - }, - "pre-commit-hooks": { - "inputs": { - "flake-compat": "flake-compat_4", - "gitignore": "gitignore_2", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1770726378, - "narHash": "sha256-kck+vIbGOaM/dHea7aTBxdFYpeUl/jHOy5W3eyRvVx8=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "5eaaedde414f6eb1aea8b8525c466dc37bba95ae", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, "root": { "inputs": { + "dart": "dart", "deploy-rs": "deploy-rs", "determinate": "determinate", "home-manager": "home-manager", + "jj-nvim": "jj-nvim", "jj-vine": "jj-vine", "llm-agents": "llm-agents", "microvm": "microvm", + "neovim-nightly-overlay": "neovim-nightly-overlay", "nix-index-database": "nix-index-database", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "nixpkgs-stable": "nixpkgs-stable", - "nvim": "nvim", - "pre-commit-hooks": "pre-commit-hooks", "sops-nix": "sops-nix", - "systems": "systems_5", "treefmt-nix": "treefmt-nix_2" } }, @@ -902,36 +648,6 @@ "type": "github" } }, - "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_5": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -975,7 +691,7 @@ }, "utils": { "inputs": { - "systems": "systems" + "systems": "systems_2" }, "locked": { "lastModified": 1731533236, diff --git a/flake.nix b/flake.nix index 3405910..ffa64d4 100755 --- a/flake.nix +++ b/flake.nix @@ -4,10 +4,6 @@ nixos-hardware.url = "github:NixOS/nixos-hardware"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.11"; - pre-commit-hooks = { - url = "github:cachix/pre-commit-hooks.nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; @@ -24,14 +20,6 @@ url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; - # nvim = { - # url = "github:iofq/nvim.nix"; - # url = "path:/home/e/dev/nvim.nix"; - # }; - nvim = { - url = "github:iofq/nvim.nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; deploy-rs = { url = "github:serokell/deploy-rs"; inputs.nixpkgs.follows = "nixpkgs"; @@ -41,80 +29,69 @@ inputs.nixpkgs.follows = "nixpkgs"; }; determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/*"; - systems.url = "github:nix-systems/default"; jj-vine = { url = "github:abrenneke/jj-vine"; flake = false; }; + dart.url = "github:iofq/dart.nvim"; + neovim-nightly-overlay = { + url = "github:nix-community/neovim-nightly-overlay"; + inputs.nixpkgs.follows = "nixpkgs"; + }; llm-agents.url = "github:numtide/llm-agents.nix"; + jj-nvim = { + url = "github:NicolasGB/jj.nvim"; + flake = false; + }; }; outputs = { self, nixpkgs, - systems, ... }@inputs: let attrs = { username = "e"; }; - system = "x86_64-linux"; - pkgs = import nixpkgs { - inherit system; - config.allowUnfree = true; - overlays = [ - inputs.nvim.overlays.default - inputs.llm-agents.overlays.default - inputs.self.overlays.stable-packages - ]; - }; - eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system}); - treefmtEval = eachSystem (pkgs: inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix); + systems = [ + "aarch64-linux" + "x86_64-linux" + "aarch64-darwin" + "x86_64-darwin" + ]; + mkPkgs = + system: + import nixpkgs { + inherit system; + config.allowUnfree = true; + overlays = [ + inputs.neovim-nightly-overlay.overlays.default + inputs.llm-agents.overlays.default + inputs.self.overlays.stable-packages + ( + final: prev: + import ./pkgs { + inherit inputs; + pkgs = prev; + } + ) + ]; + }; + eachSystem = f: nixpkgs.lib.genAttrs systems (system: f (mkPkgs system)); + treefmtEval = eachSystem ( + pkgs: (inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix).config.build.wrapper + ); in { - packages = eachSystem (pkgs: import ./pkgs { inherit inputs pkgs; }); overlays = import ./overlays { inherit inputs; }; - formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper); - nixosConfigurations = import ./nixos { - inherit - inputs - pkgs - attrs - system - ; - }; - homeConfigurations = import ./home-manager { inherit inputs pkgs attrs; }; - checks = { - pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run { - src = inputs.self; - hooks = { - treefmt.enable = true; - treefmt.package = treefmtEval.${system}.config.build.wrapper; - }; - }; - }; - deploy.nodes = import ./fleet.nix { inherit inputs self system; }; - devShells.${system}.default = pkgs.mkShell { - inherit (self.checks.pre-commit-check) shellHook; - buildInputs = with pkgs; [ - age - deploy-rs - git - home-manager - k9s - kubectl - kubeseal - sops - ssh-to-age - treefmtEval.${system}.config.build.wrapper - velero - (pkgs.writeShellScriptBin "deploy-k8s" '' - cd $(git rev-parse --show-toplevel) - kubectl config use-context lab - kubectl apply -k ./clusters/lab - '') - ]; - }; + nixosConfigurations = import ./nixos { inherit inputs mkPkgs attrs; }; + homeConfigurations = import ./home-manager { inherit inputs mkPkgs attrs; }; + deploy.nodes = import ./fleet.nix { inherit inputs self; }; + formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}); + packages = eachSystem (pkgs: import ./pkgs { inherit inputs pkgs; }); + devShells = eachSystem (pkgs: { + default = import ./shell.nix { inherit pkgs; }; + }); }; } diff --git a/fleet.nix b/fleet.nix index 2bfeac7..2072486 100644 --- a/fleet.nix +++ b/fleet.nix @@ -1,11 +1,12 @@ -{inputs, system, self}: { +{ inputs, self }: +{ consensus = { hostname = "consensus"; sshUser = "root"; remoteBuild = false; profiles.system = { user = "root"; - path = inputs.deploy-rs.lib.${system}.activate.nixos self.nixosConfigurations.consensus; + path = inputs.deploy-rs.lib."x86_64-linux".activate.nixos self.nixosConfigurations.consensus; }; }; zen = { @@ -14,7 +15,7 @@ remoteBuild = false; profiles.system = { user = "root"; - path = inputs.deploy-rs.lib.${system}.activate.nixos self.nixosConfigurations.zen; + path = inputs.deploy-rs.lib."x86_64-linux".activate.nixos self.nixosConfigurations.zen; }; }; oracle1 = { @@ -27,7 +28,7 @@ remoteBuild = false; profiles.system = { user = "root"; - path = inputs.deploy-rs.lib.${system}.activate.nixos self.nixosConfigurations.oracle1; + path = inputs.deploy-rs.lib."x86_64-linux".activate.nixos self.nixosConfigurations.oracle1; }; }; } diff --git a/home-manager/default.nix b/home-manager/default.nix index 604f20f..47c7d50 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -1,11 +1,12 @@ { inputs, - pkgs, + mkPkgs, attrs, ... -}: { - "e" = inputs.home-manager.lib.homeManagerConfiguration { - inherit pkgs; +}: +{ + e = inputs.home-manager.lib.homeManagerConfiguration { + pkgs = mkPkgs "x86_64-linux"; extraSpecialArgs = { inherit inputs attrs; useGlobalPkgs = true; @@ -20,6 +21,7 @@ ]; }; "minimal" = inputs.home-manager.lib.homeManagerConfiguration { + pkgs = mkPkgs "x86_64-linux"; extraSpecialArgs = { inherit inputs attrs; targets.genericLinux.enable = true; @@ -29,6 +31,6 @@ inherit (attrs) username; }; }; - modules = [./home.nix]; + modules = [ ./home.nix ]; }; } diff --git a/home-manager/shared/programs/pi.nix b/home-manager/shared/programs/pi.nix deleted file mode 100644 index 8a2b8d5..0000000 --- a/home-manager/shared/programs/pi.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ config, pkgs, ... }: -{ - home.packages = with pkgs; [ - pi - ]; - - home.file."${config.xdg.configHome}/.pi" = { - source = ./config; - recursive = true; - }; -} diff --git a/home-manager/shared/programs/shell/default.nix b/home-manager/shared/programs/shell/default.nix index 53d1a9f..7ad80fd 100755 --- a/home-manager/shared/programs/shell/default.nix +++ b/home-manager/shared/programs/shell/default.nix @@ -4,6 +4,7 @@ ./tmux.nix ./git.nix ./fish + ./pi ]; home = { packages = with pkgs; [ @@ -12,7 +13,7 @@ ripgrep fd jq - nvim-pkg + nvim ]; }; programs.bash = { diff --git a/home-manager/shared/programs/shell/pi/config/agent/test b/home-manager/shared/programs/shell/pi/config/agent/test new file mode 100644 index 0000000..e69de29 diff --git a/home-manager/shared/programs/shell/pi/config/test b/home-manager/shared/programs/shell/pi/config/test new file mode 100644 index 0000000..e69de29 diff --git a/home-manager/shared/programs/shell/pi/default.nix b/home-manager/shared/programs/shell/pi/default.nix new file mode 100644 index 0000000..069da83 --- /dev/null +++ b/home-manager/shared/programs/shell/pi/default.nix @@ -0,0 +1,31 @@ +{ + inputs, + config, + pkgs, + ... +}: +{ + imports = [ inputs.sops-nix.homeManagerModules.sops ]; + + sops = { + age.keyFile = "/home/e/.config/sops/age/keys.txt"; + secrets = { + "pi.json" = { + key = ""; + format = "json"; + sopsFile = ../../../../../secrets/pi.json; + path = "${config.home.homeDirectory}/.pi/agent/auth.json"; + }; + }; + }; + + home.packages = with pkgs; [ + llm-agents.pi + ]; + + home.file.".pi" = { + source = ./config; + recursive = true; + }; + +} diff --git a/home-manager/shared/wayland/default.nix b/home-manager/shared/wayland/default.nix index 3f15fe0..f34c038 100644 --- a/home-manager/shared/wayland/default.nix +++ b/home-manager/shared/wayland/default.nix @@ -40,6 +40,7 @@ mako.settings = { default-timeout = 5; }; + udiskie.enable = true; }; programs = { wofi = { diff --git a/home-manager/shared/wayland/hyprland/default.nix b/home-manager/shared/wayland/hyprland/default.nix index 444ffab..f21922d 100644 --- a/home-manager/shared/wayland/hyprland/default.nix +++ b/home-manager/shared/wayland/hyprland/default.nix @@ -4,7 +4,7 @@ enable = true; systemd.enable = true; extraConfig = '' - monitor=,preferred,auto,1 + monitor=,preferred,auto-left,1 ''; settings = { "$mod" = "SUPER"; @@ -93,6 +93,9 @@ ",XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +1%" ",XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -1%" ",XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle" + "$mod SHIFT, m, exec, hyprctl keyword general:layout master" + "$mod SHIFT, d, exec, hyprctl keyword general:layout dwindle" + "$mod SHIFT, s, exec, hyprctl keyword general:layout scrolling" ## Movement "$mod, m, layoutmsg, swapwithmaster" @@ -135,21 +138,22 @@ ) 10 ) ); - windowrulev2 = [ - "workspace 9, class:^(Discord|discord)$" - "workspace 9, class:^(Signal|signal)$" - "tile, class:^(Minecraft|minecraft)$" - "opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$" - "noanim,class:^(xwaylandvideobridge)$" - "noinitialfocus,class:^(xwaylandvideobridge)$" - "maxsize 1 1,class:^(xwaylandvideobridge)$" - "noblur,class:^(xwaylandvideobridge)$" - "bordersize 0, floating:0, onworkspace:w[t1]" - "rounding 0, floating:0, onworkspace:w[t1]" - "bordersize 0, floating:0, onworkspace:w[tg1]" - "rounding 0, floating:0, onworkspace:w[tg1]" - "bordersize 0, floating:0, onworkspace:f[1]" - "rounding 0, floating:0, onworkspace:f[1]" + windowrule = [ + "workspace 9, match:class ^(Discord|discord)$" + "workspace 9, match:class ^(Signal|signal)$" + "tile on, match:class ^(Minecraft|minecraft)$" + "opacity 0.0 override 0.0 override, match:class ^(xwaylandvideobridge)$" + "no_initial_focus on , match:class ^(xwaylandvideobridge)$" + "no_focus on , match:class ^(xwaylandvideobridge)$" + "no_anim on , match:class ^(xwaylandvideobridge)$" + "max_size 1 1, match:class ^(xwaylandvideobridge)$" + "no_blur on, match:class ^(xwaylandvideobridge)$" + "border_size 0, match:float 0, match:workspace w[t1]" + "rounding 0, match:float 0, match:workspace w[t1]" + "border_size 0, match:float 0, match:workspace w[tg1]" + "rounding 0, match:float 0, match:workspace w[tg1]" + "border_size 0, match:float 0, match:workspace f[1]" + "rounding 0, match:float 0, match:workspace f[1]" ]; workspace = [ "w[t1], gapsout:0, gapsin:0" @@ -173,15 +177,15 @@ enable = true; settings = { general = { + before_sleep_cmd = "loginctl lock-session"; after_sleep_cmd = "hyprctl dispatch dpms on"; ignore_dbus_inhibit = false; - lock_cmd = "hyprlock"; + lock_cmd = "pidof hyprlock || hyprlock"; }; listener = [ { - timeout = 1500; - on-timeout = "hyprlock; hyprctl dispatch dpms off"; - on-resume = "hyprctl dispatch dpms on"; + timeout = 1800; + on-timeout = "systemctl suspend"; } ]; }; diff --git a/nixos/default.nix b/nixos/default.nix index a0b2910..999878a 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -1,11 +1,12 @@ { inputs, - pkgs, + mkPkgs, attrs, - system, ... }: let + system = "x86_64-linux"; + pkgs = mkPkgs system; defaultModules = [ ./configuration.nix inputs.sops-nix.nixosModules.sops @@ -34,7 +35,7 @@ in consensus = inputs.nixpkgs-stable.lib.nixosSystem { pkgs = pkgs.stable; specialArgs = { - pkgs-unstable = pkgs; + pkgs-unstable = mkPkgs system; inherit inputs system attrs; host = { hostName = "consensus"; diff --git a/pkgs/default.nix b/pkgs/default.nix index d610953..19572c1 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -5,5 +5,7 @@ src = inputs.jj-vine; cargoHash = "sha256-OU3WVLXGsMwpfzDM4sXa4KTGps63MTDvDAE/HREzPS8="; nativeBuildInputs = [ pkgs.jujutsu ]; + doCheck = false; }; } +// import ./nvim { inherit inputs pkgs; } diff --git a/pkgs/nvim/.stylua.toml b/pkgs/nvim/.stylua.toml new file mode 100644 index 0000000..4fe0607 --- /dev/null +++ b/pkgs/nvim/.stylua.toml @@ -0,0 +1,6 @@ +line_endings = "Unix" +indent_type = "Spaces" +indent_width = 2 +quote_style = "AutoPreferSingle" +call_parentheses = "NoSingleTable" +# collapse_simple_statement = "Never" diff --git a/pkgs/nvim/default.nix b/pkgs/nvim/default.nix new file mode 100644 index 0000000..6e1840f --- /dev/null +++ b/pkgs/nvim/default.nix @@ -0,0 +1,85 @@ +{ inputs, pkgs }: +let + mkNeovim = + { + plugins ? [ ], + packages ? [ ], + }: + let + finalPlugins = plugins ++ [ + (pkgs.vimUtils.buildVimPlugin { + pname = "iofq-nvim"; + src = pkgs.lib.cleanSource ./nvim; + version = "0.1"; + doCheck = false; + }) + ]; + wrapperArgs = ''--prefix PATH : "${pkgs.lib.makeBinPath packages}"''; + in + pkgs.wrapNeovimUnstable pkgs.neovim-unwrapped { + inherit wrapperArgs; + plugins = finalPlugins; + withPython3 = false; + withRuby = false; + vimAlias = true; + }; + mkPlugin = + src: pname: + pkgs.vimUtils.buildVimPlugin { + inherit pname src; + version = src.lastModifiedDate; + }; + + dart-nvim = inputs.dart.packages.x86_64-linux.default; + jj-nvim = mkPlugin inputs.jj-nvim "jj-nvim"; + + plugins = with pkgs.vimPlugins; [ + blink-cmp + blink-ripgrep-nvim + conform-nvim + dart-nvim + jj-nvim + mini-nvim + nvim-autopairs + nvim-lint + nvim-lspconfig + nvim-treesitter.withAllGrammars + nvim-treesitter-textobjects + nvim-treesitter-context + quicker-nvim + render-markdown-nvim + snacks-nvim + ]; + + basePackages = with pkgs; [ + ripgrep + fd + ]; + # Extra packages that should be included on nixos but don't need to be bundled + extraPackages = with pkgs; [ + # linters + yamllint + jq + hadolint + nixfmt + shellcheck + golangci-lint + + # LSPs + gopls + lua-language-server + nixd + basedpyright + ]; +in +{ + nvim = mkNeovim { + inherit plugins; + packages = basePackages ++ extraPackages; + }; + + nvim-min = mkNeovim { + inherit plugins; + packages = basePackages; + }; +} diff --git a/pkgs/nvim/nvim/after/colors/iofq.lua b/pkgs/nvim/nvim/after/colors/iofq.lua new file mode 100644 index 0000000..07fcc66 --- /dev/null +++ b/pkgs/nvim/nvim/after/colors/iofq.lua @@ -0,0 +1,453 @@ +-- Made with 'mini.colors' module of https://github.com/echasnovski/mini.nvim +if vim.g.colors_name ~= nil then + vim.cmd('highlight clear') +end +vim.g.colors_name = 'iofq' + +-- Highlight groups +local hi = vim.api.nvim_set_hl + +hi(0, '@attribute', { link = 'Constant' }) +hi(0, '@character.special', { link = 'SpecialChar' }) +hi(0, '@comment.error', { bg = '#e85c51', fg = '#152528' }) +hi(0, '@comment.note', { bg = '#5a93aa', fg = '#152528' }) +hi(0, '@comment.todo', { bg = '#7aa4a1', fg = '#152528' }) +hi(0, '@comment.warning', { bg = '#fda47f', fg = '#152528' }) +hi(0, '@conditional', { link = 'Conditional' }) +hi(0, '@constant.builtin', { fg = '#ff9664' }) +hi(0, '@constant.macro', { link = 'Macro' }) +hi(0, '@constructor', { fg = '#a1cdd8' }) +hi(0, '@constructor.lua', { fg = '#cbd9d8' }) +hi(0, '@exception', { link = 'Exception' }) +hi(0, '@field', { fg = '#5a93aa' }) +hi(0, '@field.rust', { fg = '#cbd9d8' }) +hi(0, '@float', { link = 'Float' }) +hi(0, '@function.builtin', { fg = '#e85c51' }) +hi(0, '@function.macro', { fg = '#e85c51' }) +hi(0, '@include', { link = 'Include' }) +hi(0, '@keyword.conditional', { link = 'Conditional' }) +hi(0, '@keyword.conditional.ternary', { link = 'Conditional' }) +hi(0, '@keyword.exception', { link = 'Exception' }) +hi(0, '@keyword.function', { fg = '#ad5c7c' }) +hi(0, '@keyword.import', { link = 'Include' }) +hi(0, '@keyword.operator', { fg = '#cbd9d8' }) +hi(0, '@keyword.repeat', { link = 'Repeat' }) +hi(0, '@keyword.return', { fg = '#e85c51' }) +hi(0, '@keyword.storage', { link = 'StorageClass' }) +hi(0, '@label.json', { fg = '#73a3b7' }) +hi(0, '@lsp.type.boolean', { link = '@boolean' }) +hi(0, '@lsp.type.builtinType', { link = '@type.builtin' }) +hi(0, '@lsp.type.comment', { link = '@comment' }) +hi(0, '@lsp.type.enum', { link = '@type' }) +hi(0, '@lsp.type.enumMember', { link = '@constant' }) +hi(0, '@lsp.type.escapeSequence', { link = '@string.escape' }) +hi(0, '@lsp.type.formatSpecifier', { link = '@punctuation.special' }) +hi(0, '@lsp.type.interface', { fg = '#eb746b' }) +hi(0, '@lsp.type.keyword', { link = '@keyword' }) +hi(0, '@lsp.type.namespace', { link = '@module' }) +hi(0, '@lsp.type.number', { link = '@number' }) +hi(0, '@lsp.type.operator', { link = '@operator' }) +hi(0, '@lsp.type.parameter', { link = '@parameter' }) +hi(0, '@lsp.type.property', { link = '@property' }) +hi(0, '@lsp.type.selfKeyword', { link = '@variable.builtin' }) +hi(0, '@lsp.type.typeAlias', { link = '@type.definition' }) +hi(0, '@lsp.type.unresolvedReference', { link = '@error' }) +hi(0, '@lsp.type.variable', {}) +hi(0, '@lsp.typemod.class.defaultLibrary', { link = '@type.builtin' }) +hi(0, '@lsp.typemod.enum.defaultLibrary', { link = '@type.builtin' }) +hi(0, '@lsp.typemod.enumMember.defaultLibrary', { link = '@constant.builtin' }) +hi(0, '@lsp.typemod.function.defaultLibrary', { link = '@function.builtin' }) +hi(0, '@lsp.typemod.keyword.async', { link = '@keyword.coroutine' }) +hi(0, '@lsp.typemod.macro.defaultLibrary', { link = '@function.builtin' }) +hi(0, '@lsp.typemod.method.defaultLibrary', { link = '@function.builtin' }) +hi(0, '@lsp.typemod.operator.injected', { link = '@operator' }) +hi(0, '@lsp.typemod.string.injected', { link = '@string' }) +hi(0, '@lsp.typemod.type.defaultLibrary', { link = '@type.builtin' }) +hi(0, '@lsp.typemod.variable.defaultLibrary', { link = '@variable.builtin' }) +hi(0, '@lsp.typemod.variable.injected', { link = '@variable' }) +hi(0, '@markup', { fg = '#e6eaea' }) +hi(0, '@markup.heading', { link = 'Title' }) +hi(0, '@markup.heading.1.delimiter.vimdoc', { nocombine = true, sp = '#e6eaea', underdouble = true }) +hi(0, '@markup.heading.2.delimiter.vimdoc', { nocombine = true, sp = '#e6eaea', underline = true }) +hi(0, '@markup.italic', { link = 'Italic' }) +hi(0, '@markup.link', { bold = true, fg = '#ad5c7c' }) +hi(0, '@markup.link.label', { link = 'Special' }) +hi(0, '@markup.link.url', { fg = '#ff9664', italic = true, underline = true }) +hi(0, '@markup.list', { fg = '#afd4de' }) +hi(0, '@markup.list.checked', { fg = '#7aa4a1' }) +hi(0, '@markup.list.unchecked', { fg = '#fda47f' }) +hi(0, '@markup.math', { fg = '#73a3b7' }) +hi(0, '@markup.quote', { fg = '#cbd9d8' }) +hi(0, '@markup.raw', { fg = '#a1cdd8', italic = true }) +hi(0, '@markup.raw.block', { fg = '#cb7985' }) +hi(0, '@markup.strikethrough', { fg = '#e6eaea', strikethrough = true }) +hi(0, '@markup.strong', { bold = true, fg = '#c54e45' }) +hi(0, '@markup.underline', { link = 'Underline' }) +hi(0, '@module', { fg = '#afd4de' }) +hi(0, '@namespace', { fg = '#afd4de' }) +hi(0, '@number.float', { link = 'Float' }) +hi(0, '@parameter', { fg = '#afd4de' }) +hi(0, '@property', { fg = '#5a93aa' }) +hi(0, '@punctuation.bracket', { fg = '#cbd9d8' }) +hi(0, '@punctuation.delimiter', { fg = '#cbd9d8' }) +hi(0, '@punctuation.special', { fg = '#afd4de' }) +hi(0, '@repeat', { link = 'Repeat' }) +hi(0, '@storageclass', { link = 'StorageClass' }) +hi(0, '@string.escape', { bold = true, fg = '#fdb292' }) +hi(0, '@string.regex', { fg = '#fdb292' }) +hi(0, '@string.regexp', { fg = '#fdb292' }) +hi(0, '@string.special', { link = 'Special' }) +hi(0, '@string.special.url', { fg = '#ff9664', italic = true, underline = true }) +hi(0, '@tag', { fg = '#ad5c7c' }) +hi(0, '@tag.attribute', { fg = '#73a3b7', italic = true }) +hi(0, '@tag.delimiter', { fg = '#afd4de' }) +hi(0, '@type.builtin', { fg = '#afd4de' }) +hi(0, '@variable', { fg = '#ebebeb' }) +hi(0, '@variable.builtin', { fg = '#e85c51' }) +hi(0, '@variable.member', { fg = '#5a93aa' }) +hi(0, '@variable.parameter', { fg = '#afd4de' }) +hi(0, 'BlinkCmpCursorLineDocumentationHack', { bg = '#254147' }) +hi(0, 'BlinkCmpCursorLineMenuHack', { bg = '#425e5e' }) +hi(0, 'BlinkCmpDoc', { bg = '#0f1c1e', fg = '#e6eaea' }) +hi(0, 'BlinkCmpDocBorder', { bg = '#0f1c1e', fg = '#293e40' }) +hi(0, 'BlinkCmpGhostText', { link = 'String' }) +hi(0, 'BlinkCmpKindClass', { link = 'Type' }) +hi(0, 'BlinkCmpKindConstant', { link = '@constant' }) +hi(0, 'BlinkCmpKindConstructor', { link = 'Function' }) +hi(0, 'BlinkCmpKindDefault', { fg = '#cbd9d8' }) +hi(0, 'BlinkCmpKindEnum', { link = 'Constant' }) +hi(0, 'BlinkCmpKindEnumMember', { link = '@field' }) +hi(0, 'BlinkCmpKindEvent', { link = 'Constant' }) +hi(0, 'BlinkCmpKindField', { link = '@field' }) +hi(0, 'BlinkCmpKindFunction', { link = 'Function' }) +hi(0, 'BlinkCmpKindInterface', { link = 'Constant' }) +hi(0, 'BlinkCmpKindKeyword', { link = 'Identifier' }) +hi(0, 'BlinkCmpKindMethod', { link = 'Function' }) +hi(0, 'BlinkCmpKindModule', { link = '@namespace' }) +hi(0, 'BlinkCmpKindOperator', { link = 'Operator' }) +hi(0, 'BlinkCmpKindProperty', { link = '@property' }) +hi(0, 'BlinkCmpKindReference', { link = 'Keyword' }) +hi(0, 'BlinkCmpKindSnippet', { fg = '#cbd9d8' }) +hi(0, 'BlinkCmpKindStruct', { link = 'Type' }) +hi(0, 'BlinkCmpKindTypeParameter', { link = '@field' }) +hi(0, 'BlinkCmpKindUnit', { link = 'Constant' }) +hi(0, 'BlinkCmpKindValue', { link = 'Keyword' }) +hi(0, 'BlinkCmpKindVariable', { link = '@variable' }) +hi(0, 'BlinkCmpLabel', { fg = '#e6eaea' }) +hi(0, 'BlinkCmpLabelDeprecated', { fg = '#587b7b', strikethrough = true }) +hi(0, 'BlinkCmpLabelDetail', { link = 'Comment' }) +hi(0, 'BlinkCmpLabelMatch', { fg = '#73a3b7' }) +hi(0, 'Bold', { bold = true }) +hi(0, 'Boolean', { link = 'Number' }) +hi(0, 'BufferCurrent', { bg = '#587b7b', fg = '#e6eaea' }) +hi(0, 'BufferCurrentIndex', { bg = '#587b7b', fg = '#5a93aa' }) +hi(0, 'BufferCurrentMod', { bg = '#587b7b', fg = '#fda47f' }) +hi(0, 'BufferCurrentSign', { bg = '#587b7b', fg = '#5a93aa' }) +hi(0, 'BufferCurrentTarget', { bg = '#587b7b', fg = '#e85c51' }) +hi(0, 'BufferInactive', { bg = '#0f1c1e', fg = '#6d7f8b' }) +hi(0, 'BufferInactiveIndex', { bg = '#0f1c1e', fg = '#6d7f8b' }) +hi(0, 'BufferInactiveMod', { bg = '#0f1c1e', fg = '#383835' }) +hi(0, 'BufferInactiveSign', { bg = '#0f1c1e', fg = '#254147' }) +hi(0, 'BufferInactiveTarget', { bg = '#0f1c1e', fg = '#e85c51' }) +hi(0, 'BufferTabpage', { bg = '#0f1c1e', fg = '#254147' }) +hi(0, 'BufferTabpages', { bg = '#0f1c1e' }) +hi(0, 'BufferVisible', { bg = '#0f1c1e', fg = '#e6eaea' }) +hi(0, 'BufferVisibleIndex', { bg = '#0f1c1e', fg = '#5a93aa' }) +hi(0, 'BufferVisibleMod', { bg = '#0f1c1e', fg = '#fda47f' }) +hi(0, 'BufferVisibleSign', { bg = '#0f1c1e', fg = '#5a93aa' }) +hi(0, 'BufferVisibleTarget', { bg = '#0f1c1e', fg = '#e85c51' }) +hi(0, 'Character', { link = 'String' }) +hi(0, 'ColorColumn', { bg = '#1d3337' }) +hi(0, 'Comment', { fg = '#6d7f8b' }) +hi(0, 'Conceal', { fg = '#2d4f56' }) +hi(0, 'Conditional', { fg = '#b97490' }) +hi(0, 'Constant', { fg = '#ff9664' }) +hi(0, 'CurSearch', { link = 'IncSearch' }) +hi(0, 'Cursor', { bg = '#e6eaea', fg = '#152528' }) +hi(0, 'CursorColumn', { link = 'CursorLine' }) +hi(0, 'CursorLine', { bg = '#254147' }) +hi(0, 'CursorLineNr', { bold = true, fg = '#fda47f' }) +hi(0, 'DashboardCenter', { link = 'String' }) +hi(0, 'DashboardFooter', { fg = '#ff9664', italic = true }) +hi(0, 'DashboardHeader', { link = 'Title' }) +hi(0, 'DashboardShortCut', { link = 'Identifier' }) +hi(0, 'Delimiter', { link = 'Special' }) +hi(0, 'DiagnosticError', { fg = '#e85c51' }) +hi(0, 'DiagnosticHint', { fg = '#7aa4a1' }) +hi(0, 'DiagnosticInfo', { fg = '#5a93aa' }) +hi(0, 'DiagnosticOk', { fg = '#7aa4a1' }) +hi(0, 'DiagnosticUnderlineError', { sp = '#e85c51', undercurl = true }) +hi(0, 'DiagnosticUnderlineHint', { sp = '#7aa4a1', undercurl = true }) +hi(0, 'DiagnosticUnderlineInfo', { sp = '#5a93aa', undercurl = true }) +hi(0, 'DiagnosticUnderlineOk', { sp = '#7aa4a1', undercurl = true }) +hi(0, 'DiagnosticUnderlineWarn', { sp = '#fda47f', undercurl = true }) +hi(0, 'DiagnosticVirtualTextError', { bg = '#352d2e', fg = '#e85c51' }) +hi(0, 'DiagnosticVirtualTextHint', { bg = '#24383a', fg = '#7aa4a1' }) +hi(0, 'DiagnosticVirtualTextInfo', { bg = '#1f353c', fg = '#5a93aa' }) +hi(0, 'DiagnosticVirtualTextOk', { bg = '#24383a', fg = '#7aa4a1' }) +hi(0, 'DiagnosticVirtualTextWarn', { bg = '#383835', fg = '#fda47f' }) +hi(0, 'DiagnosticWarn', { fg = '#fda47f' }) +hi(0, 'DiffAdd', { bg = '#002800' }) +hi(0, 'DiffChange', { bg = '#284b55' }) +hi(0, 'DiffDelete', { bg = '#300000' }) +hi(0, 'DiffText', { bg = '#366066' }) +hi(0, 'Directory', { fg = '#73a3b7' }) +hi(0, 'EndOfBuffer', { fg = '#152528' }) +hi(0, 'Error', { fg = '#e85c51' }) +hi(0, 'ErrorMsg', { fg = '#e85c51' }) +hi(0, 'Exception', { link = 'Keyword' }) +hi(0, 'FloatBorder', { fg = '#587b7b' }) +hi(0, 'FocusedSymbol', { link = 'Search' }) +hi(0, 'FoldColumn', { fg = '#587b7b' }) +hi(0, 'Folded', { bg = '#1d3337', fg = '#587b7b' }) +hi(0, 'Function', { fg = '#73a3b7' }) +hi(0, 'GlyphPalette0', { fg = '#2f3239' }) +hi(0, 'GlyphPalette1', { fg = '#e85c51' }) +hi(0, 'GlyphPalette10', { fg = '#8eb2af' }) +hi(0, 'GlyphPalette11', { fg = '#fdb292' }) +hi(0, 'GlyphPalette12', { fg = '#73a3b7' }) +hi(0, 'GlyphPalette13', { fg = '#b97490' }) +hi(0, 'GlyphPalette14', { fg = '#afd4de' }) +hi(0, 'GlyphPalette15', { fg = '#eeeeee' }) +hi(0, 'GlyphPalette2', { fg = '#7aa4a1' }) +hi(0, 'GlyphPalette3', { fg = '#fda47f' }) +hi(0, 'GlyphPalette4', { fg = '#5a93aa' }) +hi(0, 'GlyphPalette5', { fg = '#ad5c7c' }) +hi(0, 'GlyphPalette6', { fg = '#a1cdd8' }) +hi(0, 'GlyphPalette7', { fg = '#eeeeee' }) +hi(0, 'GlyphPalette8', { fg = '#4e5157' }) +hi(0, 'GlyphPalette9', { fg = '#eb746b' }) +hi(0, 'HopUnmatched', { fg = '#6d7f8b' }) +hi(0, 'Identifier', { fg = '#a1cdd8' }) +hi(0, 'IncSearch', { bg = '#7aa4a1', fg = '#152528' }) +hi(0, 'Italic', { italic = true }) +hi(0, 'Keyword', { fg = '#ad5c7c' }) +hi(0, 'Label', { link = 'Conditional' }) +hi(0, 'LineNr', { fg = '#587b7b' }) +hi(0, 'LspCodeLens', { fg = '#6d7f8b' }) +hi(0, 'LspCodeLensSeparator', { fg = '#587b7b' }) +hi(0, 'LspInlayHint', { bg = '#1d3337', fg = '#6d7f8b' }) +hi(0, 'LspReferenceRead', { bg = '#293e40' }) +hi(0, 'LspReferenceText', { bg = '#293e40' }) +hi(0, 'LspReferenceWrite', { bg = '#293e40' }) +hi(0, 'MatchParen', { bold = true, fg = '#fda47f' }) +hi(0, 'MiniAnimateCursor', { nocombine = true, reverse = true }) +hi(0, 'MiniAnimateNormalFloat', { link = 'NormalFloat' }) +hi(0, 'MiniClueBorder', { link = 'FloatBorder' }) +hi(0, 'MiniClueDescGroup', { link = 'DiagnosticFloatingWarn' }) +hi(0, 'MiniClueDescSingle', { link = 'NormalFloat' }) +hi(0, 'MiniClueNextKey', { link = 'DiagnosticFloatingHint' }) +hi(0, 'MiniClueNextKeyWithPostkeys', { link = 'DiagnosticFloatingError' }) +hi(0, 'MiniClueSeparator', { link = 'DiagnosticFloatingInfo' }) +hi(0, 'MiniClueTitle', { link = 'FloatTitle' }) +hi(0, 'MiniCompletionActiveParameter', { underline = true }) +hi(0, 'MiniCursorword', { link = 'LspReferenceText' }) +hi(0, 'MiniCursorwordCurrent', { link = 'LspReferenceText' }) +hi(0, 'MiniDepsHint', { link = 'DiagnosticHint' }) +hi(0, 'MiniDepsInfo', { link = 'DiagnosticInfo' }) +hi(0, 'MiniDepsMsgBreaking', { link = 'DiagnosticWarn' }) +hi(0, 'MiniDepsPlaceholder', { link = 'Comment' }) +hi(0, 'MiniDepsTitle', { link = 'Title' }) +hi(0, 'MiniDepsTitleError', { bg = '#e85c51', fg = '#0f1c1e' }) +hi(0, 'MiniDepsTitleSame', { link = 'DiffText' }) +hi(0, 'MiniDepsTitleUpdate', { bg = '#7aa4a1', fg = '#0f1c1e' }) +hi(0, 'MiniDiffOverAdd', { link = 'DiffAdd' }) +hi(0, 'MiniDiffOverChange', { link = 'DiffChange' }) +hi(0, 'MiniDiffOverChangeBuf', { link = 'DiffChange' }) +hi(0, 'MiniDiffOverContext', { link = 'DiffAdd' }) +hi(0, 'MiniDiffOverDelete', { link = 'DiffDelete' }) +hi(0, 'MiniDiffSignAdd', { fg = 'green', bold = true }) +hi(0, 'MiniDiffSignChange', { fg = '#284b55', bold = true }) +hi(0, 'MiniDiffSignDelete', { fg = 'red', bold = true }) +hi(0, 'MiniFilesBorder', { link = 'FloatBorder' }) +hi(0, 'MiniFilesBorderModified', { link = 'DiagnosticFloatingWarn' }) +hi(0, 'MiniFilesCursorLine', { link = 'CursorLine' }) +hi(0, 'MiniFilesDirectory', { link = 'Directory' }) +hi(0, 'MiniFilesFile', { fg = '#e6eaea' }) +hi(0, 'MiniFilesNormal', { link = 'NormalFloat' }) +hi(0, 'MiniFilesTitle', { link = 'FloatTitle' }) +hi(0, 'MiniFilesTitleFocused', { bold = true, fg = '#e6eaea' }) +hi(0, 'MiniHipatternsFixme', { bg = '#e85c51', bold = true, fg = '#0f1c1e' }) +hi(0, 'MiniHipatternsHack', { bg = '#fda47f', bold = true, fg = '#0f1c1e' }) +hi(0, 'MiniHipatternsNote', { bg = '#5a93aa', bold = true, fg = '#0f1c1e' }) +hi(0, 'MiniHipatternsTodo', { bg = '#7aa4a1', bold = true, fg = '#0f1c1e' }) +hi(0, 'MiniIconsAzure', { fg = '#73a3b7' }) +hi(0, 'MiniIconsBlue', { fg = '#5a93aa' }) +hi(0, 'MiniIconsCyan', { fg = '#a1cdd8' }) +hi(0, 'MiniIconsGreen', { fg = '#7aa4a1' }) +hi(0, 'MiniIconsGrey', { fg = '#eaeeee' }) +hi(0, 'MiniIconsOrange', { fg = '#ff8349' }) +hi(0, 'MiniIconsPurple', { fg = '#ad5c7c' }) +hi(0, 'MiniIconsRed', { fg = '#e85c51' }) +hi(0, 'MiniIconsYellow', { fg = '#fda47f' }) +hi(0, 'MiniIndentscopePrefix', { nocombine = true }) +hi(0, 'MiniIndentscopeSymbol', { link = 'Delimiter' }) +hi(0, 'MiniJump', { bg = '#ad5c7c', fg = '#0f1c1e' }) +hi(0, 'MiniJump2dDim', { link = 'Comment' }) +hi(0, 'MiniJump2dSpot', { bold = true, fg = '#a1cdd8' }) +hi(0, 'MiniJump2dSpotAhead', { bold = true, fg = '#a1cdd8' }) +hi(0, 'MiniJump2dSpotUnique', { bold = true, fg = '#fda47f' }) +hi(0, 'MiniMapNormal', { link = 'NormalFloat' }) +hi(0, 'MiniMapSymbolCount', { link = 'Special' }) +hi(0, 'MiniMapSymbolLine', { link = 'Title' }) +hi(0, 'MiniMapSymbolView', { link = 'Delimiter' }) +hi(0, 'MiniNotifyBorder', { link = 'FloatBorder' }) +hi(0, 'MiniNotifyNormal', { link = 'Normal' }) +hi(0, 'MiniNotifyTitle', { link = 'Title' }) +hi(0, 'MiniOperatorsExchangeFrom', { link = 'IncSearch' }) +hi(0, 'MiniPickBorder', { link = 'FloatBorder' }) +hi(0, 'MiniPickBorderBusy', { link = 'DiagnosticFloatingWarn' }) +hi(0, 'MiniPickBorderText', { link = 'FloatTitle' }) +hi(0, 'MiniPickHeader', { link = 'DiagnosticFloatingHint' }) +hi(0, 'MiniPickIconDirectory', { link = 'Directory' }) +hi(0, 'MiniPickIconFile', { link = 'MiniPickNormal' }) +hi(0, 'MiniPickMatchCurrent', { link = 'CursorLine' }) +hi(0, 'MiniPickMatchMarked', { link = 'Visual' }) +hi(0, 'MiniPickMatchRanges', { link = 'DiagnosticFloatingHint' }) +hi(0, 'MiniPickNormal', { link = 'NormalFloat' }) +hi(0, 'MiniPickPreviewLine', { link = 'CursorLine' }) +hi(0, 'MiniPickPreviewRegion', { link = 'IncSearch' }) +hi(0, 'MiniPickPrompt', { link = 'DiagnosticFloatingInfo' }) +hi(0, 'MiniStarterCurrent', { nocombine = true }) +hi(0, 'MiniStarterFooter', { fg = '#ff9664', italic = true }) +hi(0, 'MiniStarterHeader', { link = 'Title' }) +hi(0, 'MiniStarterInactive', { link = 'Comment' }) +hi(0, 'MiniStarterItem', { link = 'Normal' }) +hi(0, 'MiniStarterItemBullet', { fg = '#587b7b' }) +hi(0, 'MiniStarterItemPrefix', { fg = '#cb7985' }) +hi(0, 'MiniStarterQuery', { fg = '#7aa4a1' }) +hi(0, 'MiniStarterSection', { fg = '#e85c51' }) +hi(0, 'MiniStatuslineDevinfo', { bg = '#1d3337', fg = '#cbd9d8' }) +hi(0, 'MiniStatuslineFileinfo', { bg = '#1d3337', fg = '#cbd9d8' }) +hi(0, 'MiniStatuslineFilename', { link = 'StatusLine' }) +hi(0, 'MiniStatuslineInactive', { link = 'StatusLineNC' }) +hi(0, 'MiniStatuslineModeCommand', { bg = '#fda47f', bold = true, fg = '#0f1c1e' }) +hi(0, 'MiniStatuslineModeInsert', { bg = '#7aa4a1', bold = true, fg = '#0f1c1e' }) +hi(0, 'MiniStatuslineModeNormal', { bg = '#a1cdd8', bold = true, fg = '#0f1c1e' }) +hi(0, 'MiniStatuslineModeOther', { bg = '#5a93aa', bold = true, fg = '#0f1c1e' }) +hi(0, 'MiniStatuslineModeReplace', { bg = '#e85c51', bold = true, fg = '#0f1c1e' }) +hi(0, 'MiniStatuslineModeVisual', { bg = '#ad5c7c', bold = true, fg = '#0f1c1e' }) +hi(0, 'MiniSurround', { link = 'IncSearch' }) +hi(0, 'MiniTablineCurrent', { bg = '#2d4f56', bold = true, fg = '#cbd9d8' }) +hi(0, 'MiniTablineModifiedCurrent', { bg = '#688888', bold = true, fg = '#1d3337' }) +hi(0, 'MiniTablineVisible', { bg = '#1d3337', fg = '#cbd9d8' }) +hi(0, 'MiniTablineModifiedVisible', { bg = '#587b7b', fg = '#1d3337' }) +hi(0, 'MiniTablineTabpagesection', { bg = '#152528', bold = true, fg = '#e6eaea' }) +hi(0, 'MiniTablineFill', { link = 'TabLineFill' }) +hi(0, 'MiniTablineHidden', { bg = '#1d3337', fg = '#587b7b' }) +hi(0, 'MiniTablineModifiedHidden', { bg = '#587b7b', fg = '#1d3337' }) +hi(0, 'MiniTestEmphasis', { bold = true }) +hi(0, 'MiniTestFail', { bold = true, fg = '#e85c51' }) +hi(0, 'MiniTestPass', { bold = true, fg = '#7aa4a1' }) +hi(0, 'MiniTrailspace', { bg = '#e85c51' }) +hi(0, 'ModeMsg', { bold = true, fg = '#fda47f' }) +hi(0, 'ModesCopy', { bg = '#fda47f' }) +hi(0, 'ModesDelete', { bg = '#e85c51' }) +hi(0, 'ModesInsert', { bg = '#a1cdd8' }) +hi(0, 'ModesVisual', { bg = '#ad5c7c' }) +hi(0, 'MoreMsg', { bold = true, fg = '#5a93aa' }) +hi(0, 'NonText', { fg = '#2d4f56' }) +hi(0, 'Normal', { fg = '#e6eaea' }) +hi(0, 'NormalFloat', { bg = '#0f1c1e', fg = '#e6eaea' }) +hi(0, 'NormalNC', { fg = '#e6eaea' }) +hi(0, 'NotifyBackground', { link = 'NormalFloat' }) +hi(0, 'NotifyDEBUGBorder', { fg = '#486565' }) +hi(0, 'NotifyDEBUGIcon', { link = 'NotifyDEBUGTitle' }) +hi(0, 'NotifyDEBUGTitle', { fg = '#7aa4a1' }) +hi(0, 'NotifyERRORBorder', { fg = '#7e413d' }) +hi(0, 'NotifyERRORIcon', { link = 'NotifyERRORTitle' }) +hi(0, 'NotifyERRORTitle', { fg = '#e85c51' }) +hi(0, 'NotifyINFOBorder', { fg = '#385c69' }) +hi(0, 'NotifyINFOIcon', { link = 'NotifyINFOTitle' }) +hi(0, 'NotifyINFOTitle', { fg = '#5a93aa' }) +hi(0, 'NotifyTRACEBorder', { fg = '#2d4f56' }) +hi(0, 'NotifyTRACEIcon', { link = 'NotifyTRACETitle' }) +hi(0, 'NotifyTRACETitle', { fg = '#6d7f8b' }) +hi(0, 'NotifyWARNBorder', { fg = '#896554' }) +hi(0, 'NotifyWARNIcon', { link = 'NotifyWARNTitle' }) +hi(0, 'NotifyWARNTitle', { fg = '#fda47f' }) +hi(0, 'Number', { fg = '#ff8349' }) +hi(0, 'Operator', { fg = '#cbd9d8' }) +hi(0, 'Pmenu', { bg = '#293e40', fg = '#e6eaea' }) +hi(0, 'PmenuSel', { bg = '#425e5e' }) +hi(0, 'PmenuThumb', { bg = '#425e5e' }) +hi(0, 'PreProc', { fg = '#d38d97' }) +hi(0, 'Question', { link = 'MoreMsg' }) +hi(0, 'QuickFixLine', { link = 'CursorLine' }) +hi(0, 'RainbowDelimiterBlue', { fg = '#5a93aa' }) +hi(0, 'RainbowDelimiterCyan', { fg = '#a1cdd8' }) +hi(0, 'RainbowDelimiterGreen', { fg = '#7aa4a1' }) +hi(0, 'RainbowDelimiterOrange', { fg = '#ff8349' }) +hi(0, 'RainbowDelimiterPurple', { fg = '#ad5c7c' }) +hi(0, 'RainbowDelimiterRed', { fg = '#e85c51' }) +hi(0, 'RainbowDelimiterYellow', { fg = '#fda47f' }) +hi(0, 'Repeat', { link = 'Conditional' }) +hi(0, 'Search', { bg = '#425e5e', fg = '#e6eaea' }) +hi(0, 'SignColumn', { fg = '#587b7b' }) +hi(0, 'SignColumnSB', { link = 'SignColumn' }) +hi(0, 'SnacksBackdrop', { bg = '#000000' }) +hi(0, 'SnacksImageMath', { fg = '#73a3b7' }) +hi(0, 'SnacksPickerDir', { fg = '#cccccc' }) +hi(0, 'Sneak', { bg = '#ad5c7c', fg = '#0f1c1e' }) +hi(0, 'SneakScope', { bg = '#293e40' }) +hi(0, 'Special', { fg = '#73a3b7' }) +hi(0, 'SpecialKey', { link = 'NonText' }) +hi(0, 'SpellBad', { sp = '#e85c51', undercurl = true }) +hi(0, 'SpellCap', { sp = '#fda47f', undercurl = true }) +hi(0, 'SpellLocal', { sp = '#5a93aa', undercurl = true }) +hi(0, 'SpellRare', { sp = '#5a93aa', undercurl = true }) +hi(0, 'Statement', { fg = '#ad5c7c' }) +hi(0, 'StatusLine', { bg = 'none' }) +hi(0, 'StatusLineNC', { bg = 'none', fg = 'grey' }) +hi(0, 'String', { fg = '#7aa4a1' }) +hi(0, 'Substitute', { bg = '#e85c51', fg = '#152528' }) +hi(0, 'SymbolOutlineConnector', { link = 'Conceal' }) +hi(0, 'TabLine', { bg = '#1d3337', fg = '#cbd9d8' }) +hi(0, 'TablineFill', { bg = 'none' }) +hi(0, 'TabLineSel', { bg = '#587b7b', fg = '#152528' }) +hi(0, 'Title', { bold = true, fg = '#73a3b7' }) +hi(0, 'Todo', { bg = '#5a93aa', fg = '#152528' }) +hi(0, 'Type', { fg = '#fda47f' }) +hi(0, 'Visual', { bg = '#293e40' }) +hi(0, 'WarningMsg', { fg = '#fda47f' }) +hi(0, 'Whitespace', { fg = '#254147' }) +hi(0, 'WildMenu', { link = 'Pmenu' }) +hi(0, 'WinBar', { bold = true, fg = '#587b7b' }) +hi(0, 'WinBarNC', { bold = true, fg = '#587b7b' }) +hi(0, 'WinSeparator', { fg = '#0f1c1e' }) +hi(0, 'diffAdded', { bg = '#24383a', fg = '#7aa4a1' }) +hi(0, 'diffChanged', { bg = '#31474b', fg = '#73daca' }) +hi(0, 'diffFile', { fg = '#5a93aa' }) +hi(0, 'diffIndexLine', { fg = '#d38d97' }) +hi(0, 'diffLine', { fg = '#ff9664' }) +hi(0, 'diffNewFile', { fg = '#7aa4a1' }) +hi(0, 'diffOldFile', { fg = '#fda47f' }) +hi(0, 'diffRemoved', { bg = '#31474b', fg = '#e85c51' }) +hi(0, 'diffText', { bg = '#466066' }) +hi(0, 'illuminatedWordRead', { link = 'LspReferenceText' }) +hi(0, 'illuminatedWordText', { link = 'LspReferenceText' }) +hi(0, 'illuminatedWordWrite', { link = 'LspReferenceText' }) +hi(0, 'lCursor', { link = 'Cursor' }) +hi(0, 'qfFileName', { link = 'Directory' }) +hi(0, 'qfLineNr', { link = 'LineNr' }) +hi(0, 'typescriptParens', { fg = '#cbd9d8' }) + +-- Terminal colors +local g = vim.g + +g.terminal_color_0 = '#2f3239' +g.terminal_color_1 = '#e85c51' +g.terminal_color_2 = '#7aa4a1' +g.terminal_color_3 = '#fda47f' +g.terminal_color_4 = '#5a93aa' +g.terminal_color_5 = '#ad5c7c' +g.terminal_color_6 = '#a1cdd8' +g.terminal_color_7 = '#ebebeb' +g.terminal_color_8 = '#4e5157' +g.terminal_color_9 = '#eb746b' +g.terminal_color_10 = '#8eb2af' +g.terminal_color_11 = '#fdb292' +g.terminal_color_12 = '#73a3b7' +g.terminal_color_13 = '#b97490' +g.terminal_color_14 = '#afd4de' +g.terminal_color_15 = '#eeeeee' diff --git a/pkgs/nvim/nvim/after/ftplugin/go.lua b/pkgs/nvim/nvim/after/ftplugin/go.lua new file mode 100644 index 0000000..3436b9c --- /dev/null +++ b/pkgs/nvim/nvim/after/ftplugin/go.lua @@ -0,0 +1 @@ +vim.opt_local.expandtab = false diff --git a/pkgs/nvim/nvim/after/ftplugin/php.lua b/pkgs/nvim/nvim/after/ftplugin/php.lua new file mode 100644 index 0000000..3f3eef4 --- /dev/null +++ b/pkgs/nvim/nvim/after/ftplugin/php.lua @@ -0,0 +1 @@ +vim.opt.tabstop = 4 diff --git a/pkgs/nvim/nvim/after/lsp/gopls.lua b/pkgs/nvim/nvim/after/lsp/gopls.lua new file mode 100644 index 0000000..6b88b92 --- /dev/null +++ b/pkgs/nvim/nvim/after/lsp/gopls.lua @@ -0,0 +1,34 @@ +---@type vim.lsp.Config +return { + settings = { + gopls = { + gofumpt = true, + codelenses = { + gc_details = true, + test = true, + }, + analyses = { + unusedvariable = true, + unusedparams = true, + useany = true, + unusedwrite = true, + nilness = true, + shadow = true, + }, + hints = { + assignVariableTypes = true, + compositeLiteralFields = true, + compositeLiteralTypes = true, + constantValues = true, + functionTypeParameters = true, + ignoredError = true, + rangeVariableTypes = true, + parameterNames = true, + }, + usePlaceholders = true, + staticcheck = true, + completeUnimported = true, + semanticTokens = true, + }, + }, +} diff --git a/pkgs/nvim/nvim/after/lsp/lua_ls.lua b/pkgs/nvim/nvim/after/lsp/lua_ls.lua new file mode 100644 index 0000000..f71f2bd --- /dev/null +++ b/pkgs/nvim/nvim/after/lsp/lua_ls.lua @@ -0,0 +1,29 @@ +return { + on_init = function(client) + local path = client.workspace_folders[1].name + if vim.loop.fs_stat(path .. '/.luarc.json') or vim.loop.fs_stat(path .. '/.luarc.jsonc') then + return + end + + client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, { + runtime = { + version = 'LuaJIT', + }, + workspace = { + checkThirdParty = false, + library = { + vim.env.VIMRUNTIME, + }, + }, + }) + end, + settings = { + Lua = { + hint = { + enable = true, + arrayIndex = 'Enable', + setType = true, + }, + }, + }, +} diff --git a/pkgs/nvim/nvim/after/lua/iofq/jj.lua b/pkgs/nvim/nvim/after/lua/iofq/jj.lua new file mode 100644 index 0000000..1a25d13 --- /dev/null +++ b/pkgs/nvim/nvim/after/lua/iofq/jj.lua @@ -0,0 +1,22 @@ +local M = {} +M.is_jj_diffedit_open = function() + local entry = vim.fn.getqflist[1] + if not entry or not entry.user_data or not entry.user_data.diff then + for _, buf in ipairs(vim.api.nvim_list_bufs()) do -- close all /tmp buffers + if vim.fn.fnamemodify(vim.api.nvim_buf_get_name(buf), ':p'):match('/tmp/jj%-diff.*') then + vim.api.nvim_buf_delete(buf, { force = true }) + end + end + return 0 + else + return 1 + end +end + +M.diffedit = function(opts) + opts = opts or { args = '' } + vim.fn.jobstart('jj diffedit --tool difftool ' .. opts.args) +end + +vim.api.nvim_create_user_command('Diffedit', M.diffedit, { nargs = '*' }) +return M diff --git a/pkgs/nvim/nvim/after/lua/iofq/minidiff_jj.lua b/pkgs/nvim/nvim/after/lua/iofq/minidiff_jj.lua new file mode 100644 index 0000000..0294773 --- /dev/null +++ b/pkgs/nvim/nvim/after/lua/iofq/minidiff_jj.lua @@ -0,0 +1,103 @@ +local diff = require('mini.diff') +local M = { + cache = {}, +} + +M.get_buf_realpath = function(buf_id) + local path = vim.loop.fs_realpath(vim.api.nvim_buf_get_name(buf_id)) or '' + local cwd, basename = vim.fn.fnamemodify(path, ':h'), vim.fn.fnamemodify(path, ':t') + return path, cwd, basename +end + +M.jj_start_watching_tree_state = function(buf_id, path) + local on_not_in_jj = vim.schedule_wrap(function() + if not vim.api.nvim_buf_is_valid(buf_id) then + M.cache[buf_id] = nil + return false + end + diff.fail_attach(buf_id) + M.cache[buf_id] = {} + end) + + vim.system( + { 'jj', 'workspace', 'root', '--ignore-working-copy' }, + {cwd = vim.fn.fnamemodify(path, ':h')}, + function(obj) + if obj.code ~= 0 then + return on_not_in_jj() + end + + -- Set up index watching + local root = obj.stdout:gsub('\n+$', '') .. '/.jj/working_copy/tree_state' + local buf_fs_event = vim.loop.new_fs_event() + + buf_fs_event:start(root, { stat = true }, function() + M.jj_set_ref_text(buf_id) + end) + M.cache[buf_id] = { fs_event = buf_fs_event } + + -- Set reference text immediately + M.jj_set_ref_text(buf_id) + end + ) +end + +M.jj_set_ref_text = vim.schedule_wrap(function(buf_id) + if not vim.api.nvim_buf_is_valid(buf_id) then + return + end + + local buf_set_ref_text = function(text) + pcall(diff.set_ref_text, buf_id, text) + end + + -- react to possible rename + local path, cwd, basename = M.get_buf_realpath(buf_id) + if path == '' then + return buf_set_ref_text {} + end + + vim.system( + { 'jj', 'file', 'show', '--no-pager', '--ignore-working-copy', '-r', '@-', './' .. basename }, + { cwd = cwd }, + vim.schedule_wrap(function(obj) + if obj.code ~= 0 then return buf_set_ref_text {} end + buf_set_ref_text(obj.stdout:gsub('\r\n', '\n')) + end) + ) +end) + +M.jj_invalidate_cache = function(buf_id) + pcall(vim.loop.fs_event_stop, M.cache[buf_id].fs_event) + M.cache[buf_id] = nil +end + +M.gen_source = function() + local attach = function(buf_id) + -- Try attaching to a buffer only once + if M.cache[buf_id] ~= nil then + return false + end + -- - Possibly resolve symlinks to get data from the original repo + local path = M.get_buf_realpath(buf_id) + if path == '' then + return false + end + + M.cache[buf_id] = {} + M.jj_start_watching_tree_state(buf_id, path) + end + + local detach = function(buf_id) + M.jj_invalidate_cache(buf_id) + end + + + return { + name = 'jj', + attach = attach, + detach = detach, + apply_hunks = function(_, _) end -- staging does not apply for jj + } +end +return M diff --git a/pkgs/nvim/nvim/after/plugin/autocmd.lua b/pkgs/nvim/nvim/after/plugin/autocmd.lua new file mode 100644 index 0000000..3fc4d8b --- /dev/null +++ b/pkgs/nvim/nvim/after/plugin/autocmd.lua @@ -0,0 +1,158 @@ +local cmd = vim.api.nvim_create_autocmd +-- open :h in buffers +cmd('FileType', { + group = vim.api.nvim_create_augroup('help', { clear = true }), + pattern = 'help', + callback = function(_) + vim.cmd.only() + vim.keymap.set('n', 'q', vim.cmd.bdelete, { noremap = true }) + vim.bo.buflisted = false + end, +}) + +-- resize splits if window got resized +cmd({ 'VimResized' }, { + group = vim.api.nvim_create_augroup('resize_splits', { clear = true }), + callback = function() + vim.cmd('tabdo wincmd =') + vim.cmd('tabnext ' .. vim.fn.tabpagenr()) + end, +}) + +-- Check if we need to reload the file when it changed +cmd({ 'FocusGained', 'TermClose', 'TermLeave' }, { + group = vim.api.nvim_create_augroup('check_reload', { clear = true }), + callback = function() + if vim.o.buftype ~= 'nofile' then + vim.cmd('checktime') + end + end, +}) + +-- Configure difftool buffers +cmd('FileType', { + pattern = 'qf', + group = vim.api.nvim_create_augroup('difftool', { clear = true }), + callback = function(event) + local function exec(fmt, str) + return os.execute(string.format(fmt, str)) + end + local function refresh() + local qf = vim.fn.getqflist() + + local entry = qf[1] + if not entry or not entry.user_data or not entry.user_data.diff then + return nil + end + + local ns = vim.api.nvim_create_namespace('nvim.difftool.hl') + vim.api.nvim_buf_clear_namespace(event.buf, ns, 0, -1) + for i, item in ipairs(qf) do + local path = vim.fn.fnamemodify(item.user_data.right, ':t') + local hl = 'Added' + if + exec('git diff --quiet -- %s', path) ~= 0 + or exec('git ls-files --error-unmatch -- %s > /dev/null 2>&1', path) ~= 0 + then + hl = 'Removed' + end + vim.hl.range(event.buf, ns, hl, { i - 1, 0 }, { i - 1, -1 }) + end + end + vim.keymap.set('n', 'gh', function() + local idx = vim.api.nvim_win_get_cursor(0)[1] + local qf = vim.fn.getqflist() + local filename = qf[idx].user_data.rel + + if exec('git diff --quiet --cached -- %s', filename) ~= 0 then + exec('git restore --quiet --staged -- %s', filename) + else + exec('git add -- %s', filename) + end + refresh() + end) + vim.schedule(refresh) + end, +}) + +-- open conflicts in qflist +cmd('BufWinEnter', { + callback = function(event) + if not vim.wo.diff then + return + end + + local items = {} + while true do + local found = vim.fn.search('^<<<<<<<', 'W') + if found == 0 then + break + end + local line = vim.api.nvim_buf_get_lines(event.buf, found - 1, found, false)[1] + table.insert(items, { bufnr = event.buf, lnum = found, text = line }) + end + + if #items > 1 then + vim.fn.setqflist(items, 'r') + vim.schedule(function() + vim.cmd(string.format('%dcopen', math.min(10, #items))) + end) + end + end, +}) + +-- Init treesitter +cmd('FileType', { + group = vim.api.nvim_create_augroup('treesitter', { clear = true }), + callback = function(event) + local bufnr = event.buf + + vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" + pcall(vim.treesitter.start, bufnr) + + vim.keymap.set({ 'v', 'n' }, ']]', function() + require('nvim-treesitter-textobjects.move').goto_next_start('@function.outer', 'textobjects') + end, { buffer = bufnr }) + vim.keymap.set({ 'v', 'n' }, '[[', function() + require('nvim-treesitter-textobjects.move').goto_previous_start('@function.outer', 'textobjects') + end, { buffer = bufnr }) + vim.keymap.set({ 'v', 'n' }, ']a', function() + require('nvim-treesitter-textobjects.move').goto_next_start('@parameter.inner', 'textobjects') + end, { buffer = bufnr }) + vim.keymap.set({ 'v', 'n' }, '[a', function() + require('nvim-treesitter-textobjects.move').goto_previous_start('@parameter.inner', 'textobjects') + end, { buffer = bufnr }) + vim.keymap.set({ 'v', 'n' }, ']A', function() + require('nvim-treesitter-textobjects.swap').swap_next('@parameter.inner') + end, { buffer = bufnr }) + vim.keymap.set({ 'v', 'n' }, '[A', function() + require('nvim-treesitter-textobjects.swap').swap_previous('@parameter.inner') + end, { buffer = bufnr }) + end, +}) + +-- Init LSP +cmd('LspAttach', { + group = vim.api.nvim_create_augroup('UserLspConfig', {}), + callback = function(ev) + local client = vim.lsp.get_client_by_id(ev.data.client_id) + if not client then + return + end + vim.keymap.set('n', 'gO', function() + Snacks.picker.lsp_symbols { focus = 'list' } + end, { buffer = ev.buf }) + + vim.keymap.set('n', 'grh', function() + vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) + end, { buffer = ev.buf }) + vim.keymap.set('n', 'grl', vim.lsp.codelens.run, { buffer = ev.buf }) + + vim.keymap.set('n', 'gre', vim.diagnostic.setloclist, { buffer = ev.buf }) + vim.keymap.set('n', 'grE', vim.diagnostic.setqflist, { buffer = ev.buf }) + + if client:supports_method('textDocument/codeLens') or client.server_capabilities.codeLensProvider then + vim.lsp.codelens.enable(true, { bufnr = ev.buf }) + end + end, +}) diff --git a/pkgs/nvim/nvim/after/plugin/init.lua b/pkgs/nvim/nvim/after/plugin/init.lua new file mode 100644 index 0000000..d031ce8 --- /dev/null +++ b/pkgs/nvim/nvim/after/plugin/init.lua @@ -0,0 +1,66 @@ +vim.cmd('colorscheme iofq') + +vim.g.mapleader = ' ' +vim.opt.autowrite = true +vim.opt.backspace = 'indent,eol,start' +vim.opt.confirm = true +vim.opt.completeopt = 'menuone,popup,noselect,fuzzy' +vim.opt.diffopt = 'internal,filler,closeoff,inline:char' +vim.opt.expandtab = true -- insert tabs as spaces +vim.opt.inccommand = 'split' -- incremental live completion +vim.opt.laststatus = 1 -- statusline only if split +vim.opt.nrformats:append('alpha') -- let Ctrl-a do letters as well +vim.opt.path:append('**') -- enable fuzzy :find ing +vim.opt.relativenumber = true +vim.opt.shadafile = 'NONE' -- disable shada (unless session) +vim.opt.shiftwidth = 0 -- >> shifts by tabstop +vim.opt.showmatch = true -- highlight matching brackets +vim.opt.showmode = true +vim.opt.signcolumn = 'no' +vim.opt.softtabstop = -1 -- backspace removes tabstop +vim.opt.swapfile = false +vim.opt.tabstop = 2 -- 2 space tabs are based +vim.opt.updatetime = 250 -- decrease update time +vim.opt.virtualedit = 'onemore' +vim.opt.winborder = 'rounded' + +-- Configure Neovim diagnostic messages +vim.diagnostic.config { + virtual_text = true, + underline = true, + severity_sort = true, + float = { + focusable = false, + style = 'minimal', + source = 'if_many', + }, +} + +vim.lsp.enable { + 'nixd', + 'phpactor', + 'gopls', + 'lua_ls', + 'basedpyright', + 'csharp_ls', + 'ts_ls', +} + +local map = vim.keymap.set +map('n', '\\t', function() -- Switch tab length on the fly + vim.o.tabstop = vim.o.tabstop == 8 and 2 or 2 * vim.o.tabstop + vim.notify('tabstop: ' .. vim.o.tabstop) +end) +map({ 'v', 'i' }, 'wq', 'l') +map('v', '<', '', '>gv') +map('n', 'n', 'nzz', { noremap = true }) +map('n', 'N', 'Nzz', { noremap = true }) +map('n', '', 'zz', { noremap = true }) +map('n', '', 'zz', { noremap = true }) +map('n', 'gq', vim.cmd.bdelete, { noremap = true }) +map('n', 'gQ', function() + vim.cmd('bufdo bdelete') +end, { noremap = true }) + +vim.cmd.packadd('nvim.difftool') diff --git a/pkgs/nvim/nvim/after/plugin/mini.lua b/pkgs/nvim/nvim/after/plugin/mini.lua new file mode 100644 index 0000000..b54b92d --- /dev/null +++ b/pkgs/nvim/nvim/after/plugin/mini.lua @@ -0,0 +1,80 @@ +local map = vim.keymap.set + +vim.schedule(function() + require('mini.align').setup() + require('mini.surround').setup() + require('mini.splitjoin').setup { detect = { separator = '[,;\n]' } } + + local ai = require('mini.ai') + ai.setup { + n_lines = 300, + custom_textobjects = { + i = require('mini.extra').gen_ai_spec.indent(), + a = ai.gen_spec.treesitter { a = '@parameter.outer', i = '@parameter.inner' }, + f = ai.gen_spec.treesitter { a = '@function.outer', i = '@function.inner' }, + }, + } + + require('mini.git').setup() + map('n', 'gb', 'Git blame -- %') + map('n', 'go', function() + return MiniGit.show_at_cursor() + end) + + local jump = require('mini.jump2d') + jump.setup { + mappings = { + start_jumping = 's', + }, + view = { n_steps_ahead = 1, dim = true }, + spotter = jump.gen_spotter.vimpattern(), + } + + local diff = require('mini.diff') + diff.setup { + source = { + require('iofq.minidiff_jj').gen_source(), + diff.gen_source.git(), + }, + } + map('n', 'gp', MiniDiff.toggle_overlay) + + require('mini.files').setup { + mappings = { go_in_plus = '' }, + windows = { + preview = true, + width_preview = 50, + }, + } + map('n', 'nc', function() + MiniFiles.open(vim.api.nvim_buf_get_name(0), false) -- open current buffer's dir + end) + map('n', 'nn', function() + MiniFiles.open(MiniFiles.get_latest_path()) + end) + vim.api.nvim_create_autocmd('User', { + pattern = 'MiniFilesBufferCreate', + callback = function(args) + map('n', 'nc', function() + MiniFiles.synchronize() + MiniFiles.close() + end, { buffer = args.data.buf_id }) + map('n', '`', function() + local _, cur_entry_path = pcall(MiniFiles.get_fs_entry().path) + local cur_directory = vim.fs.dirname(cur_entry_path) + if cur_directory ~= '' then + vim.fn.chdir(cur_directory) + end + end, { buffer = args.data.buf_id }) + end, + }) + + -- pass file rename events to LSP + vim.api.nvim_create_autocmd('User', { + group = vim.api.nvim_create_augroup('snacks_rename', { clear = true }), + pattern = 'MiniFilesActionRename', + callback = function(event) + Snacks.rename.on_rename_file(event.data.from, event.data.to) + end, + }) +end) diff --git a/pkgs/nvim/nvim/after/plugin/plugins.lua b/pkgs/nvim/nvim/after/plugin/plugins.lua new file mode 100644 index 0000000..eec3c80 --- /dev/null +++ b/pkgs/nvim/nvim/after/plugin/plugins.lua @@ -0,0 +1,165 @@ +local map = vim.keymap.set + +require('mini.basics').setup { mappings = { windows = true } } +require('mini.icons').setup() + +require('dart').setup { + tabline = { + icons = false, + label_marked_fg = 'cyan', + }, +} + +require('snacks').setup { + bigfile = { enabled = true }, + terminal = { enabled = true }, + indent = { enabled = true }, + input = { enabled = true }, + notifier = { enabled = true }, + styles = { notification = { wo = { wrap = true } } }, + picker = { + enabled = true, + matcher = { + frecency = true, + cwd_bonus = true, + }, + layout = 'ivy_split', + sources = { + grep = { hidden = true }, + lsp_symbols = { + filter = { default = true }, + layout = { + preset = 'left', + layout = { width = 90, min_width = 90 }, + }, + }, + smart = { + multi = { + 'buffers', + { source = 'files', hidden = true }, + { source = 'git_files', untracked = true }, + }, + }, + }, + }, +} + +map({ 'n', 't' }, '', Snacks.terminal.toggle) +map('n', 'ff', Snacks.picker.smart) +map('n', '', Snacks.picker.smart) +map('n', 'fa', Snacks.picker.grep) +map('n', 'f8', Snacks.picker.grep_word) +map('n', 'f?', Snacks.picker.pickers) +map('n', 'fu', Snacks.picker.undo) +map('n', 'fj', Snacks.picker.jumps) +map('n', 'f.', Snacks.picker.resume) +map('n', 'fb', Snacks.picker.buffers) +map('n', 'fq', Snacks.picker.qflist) + +vim.schedule(function() + require('nvim-treesitter').setup() + require('nvim-treesitter-textobjects').setup() + require('treesitter-context').setup { + max_lines = 2, + } + vim.keymap.set('n', '[c', function() + require('treesitter-context').go_to_context(vim.v.count1) + end, { silent = true }) + require('nvim-autopairs').setup() + + require('jj').setup {} + map('n', 'ja', require('jj.annotate').file) + map('n', 'jf', require('jj.picker').status) + map('n', 'jj', require('jj.cmd').log) + map('n', 'jh', require('jj.picker').file_history) + map('n', 'je', require('iofq.jj').diffedit) + map('n', 'jd', function() + require('jj.diff').open_vdiff { rev = 'trunk()' } + end) + + require('quicker').setup() + map('n', 'qf', function() + require('quicker').toggle { max_height = 20 } + end) + + require('conform').setup { + notify_no_formatters = false, + formatters_by_ft = { + json = { 'jq' }, + lua = { 'stylua' }, + python = { 'ruff' }, + nix = { 'nixfmt' }, + fish = { 'fish_indent' }, + ['*'] = { 'trim_whitespace' }, + }, + format_on_save = function(bufnr) + -- Disable with a global or buffer-local variable + if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then + return + end + return { timeout_ms = 1500, lsp_format = 'fallback' } + end, + } + map('n', '\\f', function() + vim.b.disable_autoformat = not vim.b.disable_autoformat + vim.notify(string.format('Buffer formatting disabled: %s', vim.b.disable_autoformat)) + end) + map('n', '\\F', function() + vim.g.disable_autoformat = not vim.g.disable_autoformat + vim.notify(string.format('Global formatting disabled: %s', vim.g.disable_autoformat)) + end) + + require('lint').linters_by_ft = { + docker = { 'hadolint' }, + sh = { 'shellcheck' }, + go = { 'golangcilint' }, + fish = { 'fish' }, + bash = { 'bash' }, + nix = { 'nix' }, + } + vim.api.nvim_create_autocmd({ 'BufWritePost' }, { + callback = function() + require('lint').try_lint(nil, { ignore_errors = true }) + end, + }) + + vim.treesitter.language.register('markdown', 'blink-cmp-documentation') + require('blink.cmp').setup { + enabled = function() + return not vim.tbl_contains({ 'snacks_picker_input' }, vim.bo.filetype) + end, + sources = { + default = { 'lsp', 'path', 'snippets', 'ripgrep', 'buffer' }, + providers = { + lsp = { fallbacks = {} }, -- include buffer even when LSP is active + path = { async = true, opts = { get_cwd = vim.fn.getcwd } }, -- use nvim pwd instead of current file pwd + ripgrep = { + enabled = false, + module = 'blink-ripgrep', + name = 'rg', + score_offset = -10, + async = true, + opts = { + project_root_marker = { '.git', '.jj' }, + backend = { + use = 'gitgrep-or-ripgrep', + }, + }, + }, + }, + }, + cmdline = { completion = { menu = { auto_show = true } } }, + completion = { + documentation = { auto_show = true }, + menu = { + draw = { + columns = { + { 'label', 'label_description', gap = 1 }, + { 'source_name', 'kind', gap = 1 }, + }, + }, + }, + }, + signature = { enabled = true, trigger = { show_on_insert = true } }, + } +end) diff --git a/secrets/pi.json b/secrets/pi.json new file mode 100644 index 0000000..4a19892 --- /dev/null +++ b/secrets/pi.json @@ -0,0 +1,30 @@ +{ + "openrouter": { + "type": "ENC[AES256_GCM,data:VTFUVkWSOw==,iv:fVOuJBjXHjugjVUYQgT0Gl94MFQFuDWzc0n4xdceSBI=,tag:JnzRl07SWaO0GnFVPDN7Hw==,type:str]", + "key": "ENC[AES256_GCM,data:eECB/1dKahAnZKUwpGiUbntjjtnXMaRGlcXei+ctk9TAzLKJk+zwXlpFDONMVB2I6csHYZPFxllYn68qDW/fMOE0RGoncKKU6A==,iv:mSHT+fzSUlD4RV6mwGsIJ6GT245z0H362kXrw+3z5tA=,tag:5lYhDWUOnbMkm5TPk/RT8w==,type:str]" + }, + "sops": { + "age": [ + { + "recipient": "age14e2d2y8e2avzfrsyxg9dudxd36svm24t7skw6e969n0c42znlp3shffdtg", + "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBSNFhWZTRlQUZ6YXVNZzNE\nRFVrTW1NU2d2SXZHZTJVd3ZSb2hKcDd3RmdZCmR4WG83emVYa1QxSlJSYnJTVnYw\nSXhjV2ZIQVlIbWs3bDZRaXlaeXpqK1EKLS0tIHR5NkFFenJqK1ZQa0RBMWNuQi94\neVFMaGlwdlRDa0ZHbTZxeWZLSHY1SkEKazWsoA+aF3g3ZelooeuqeQA53/N1eu71\nYWo7Zmzv7KbrRJXzNUEiByjMV2sDsHJyELO8CAKr7193cyY4UzTViQ==\n-----END AGE ENCRYPTED FILE-----\n" + }, + { + "recipient": "age16pdhm238k63uye3rf4cwwe7ddyzds6xj9jv4wpsfggkghyarjqtsjzkxna", + "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBUN2RWUzczbk5NYzc5bXI2\nQU5YcFlMWU1UV0NoTzhla3hIakd6ZUlmamlvCmZDWG91dHhWNVRpaUJPeFlqcVFO\nRVgreEhwajZMVE9nNTZpN2NtVjhkaU0KLS0tIElxZGtNR3lXbmxORTN0TTBBRGsx\ndllmOE94NHM3b1kyUVpueUlrM1JMTE0Ku4gXUodVqqxf/joVQqjA5RmYPWwNNCsC\niXNJZdUJLzh9xpaTTHLkEXFyxWmZ6gKCjoavLxLf03ReuJOJ5iBnFQ==\n-----END AGE ENCRYPTED FILE-----\n" + }, + { + "recipient": "age12tz2r7clep9e450qhr5a6ctnx29ywmu0llq8uk9kcwhpp82zsa0sk9la9h", + "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA4M1FPaEoreE1yckhzZVpS\nVjJSNnlTQS9TNUVEWXIwaVJEWXNPYXFpV1RBCkhURHZ3dENGSXA4SU9LU3g1Y2cx\nWnhRRnpDSTZsYTJkNkpvNUpFZ2FhYWMKLS0tIHJma1ZhdHc4Qlhkbzl2VHFvcDE3\nQnlucHlmYWFhQmF4Sm1RaTk0WU91VmMKMlATZR0OXeJpvbVYBEsnOjq6hzr63MeM\n/esyDm57ZJ7Eqcuev+VjXaWNZZEuW+PQW9Ybct6NtEC6jH36m9za5w==\n-----END AGE ENCRYPTED FILE-----\n" + }, + { + "recipient": "age1nzlng9tw59rxnr86jw330s9z4x28hr394cl2qgktptf8swat23gqahgudw", + "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBlYXpxWmhqT3cySWx0ZDJv\nZUFkUzFmMjYwME9xb2UvMHBPNVZmZUVuc3hRCmFucldiMEJEelIvSVFZNmtERUVW\nOXBoK2VrcktzdytsTEZWTUkydXFkQzAKLS0tIFlQMmViSk1saUY3b3FScGRpYlFT\nTlg3Y2ovSTZMRkd6eXlTLzJYcmdMK2cKw6snshtmgbY3Inv4TCSYz28hwmG+W6qH\nPo6dl9h99tJRfG69VeOF+SMt/14N6I/fLqHn0e0mr3i34XV9EQx4DQ==\n-----END AGE ENCRYPTED FILE-----\n" + } + ], + "lastmodified": "2026-02-27T07:28:25Z", + "mac": "ENC[AES256_GCM,data:QQpZUzMpnZFsNevQuEf+r4FXlCLFVAoXBfkxOYT8aOhWFLYVFm4W1wvkBnOn4UBtYa/mVadXkejzjfS2kLLt59nPx2gOjePGWCOuxzaSuipAZDP45bNsZpuMT8/KG+BOBjgSbhR6yyRAk6EFglJ5G5i15m3vag493kXxtYNs89A=,iv:m1SeK2OO6c33vJm6a7hGYRLTbszDqaY2CpLdXuHDqx0=,tag:ngNn/36Zzn2omb/091ZxBw==,type:str]", + "unencrypted_suffix": "_unencrypted", + "version": "3.11.0" + } +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..8af4c58 --- /dev/null +++ b/shell.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: +pkgs.mkShell { + buildInputs = with pkgs; [ + age + deploy-rs + git + home-manager + k9s + kubectl + kubeseal + lua-language-server + nixd + sops + ssh-to-age + stylua + velero + (pkgs.writeShellScriptBin "deploy-k8s" '' + cd $(git rev-parse --show-toplevel) + kubectl config use-context lab + kubectl apply -k ./clusters/lab + '') + ]; +}