From 89c614818fa009959e755a7d0e40c0b84c3c986a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Jun 2024 04:31:37 +0000 Subject: [PATCH 1/2] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'devshell': 'github:numtide/devshell/12e914740a25ea1891ec619bb53cf5e6ca922e40?narHash=sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc%3D' (2024-04-19) → 'github:numtide/devshell/1ebbe68d57457c8cae98145410b164b5477761f4?narHash=sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY%3D' (2024-06-03) • Updated input 'home-manager': 'github:nix-community/home-manager/a631666f5ec18271e86a5cde998cba68c33d9ac6?narHash=sha256-rNObca6dm7Qs524O4st8VJH6pZ/Xe1gxl%2BRx6mcWYo0%3D' (2024-05-26) → 'github:nix-community/home-manager/845a5c4c073f74105022533907703441e0464bc3?narHash=sha256-vWSkg6AMok1UUQiSYVdGMOXKD2cDFnajITiSi0Zjd1A%3D' (2024-06-04) • Updated input 'lix': 'https://git.lix.systems/api/v1/repos/lix-project/lix/archive/3df013597d7a2b5e400839e6625c05bd47de4dca.tar.gz?narHash=sha256-3sOBY0cNLgIFNk0YhBw%2Bkz57JLVphHTSypAKnkYz01g%3D' (2024-05-30) → 'https://git.lix.systems/api/v1/repos/lix-project/lix/archive/4f94531209510c7d580e525a017ea01f18894ded.tar.gz?narHash=sha256-cxK0tBbUxXtIYKLbjHpH%2BswiIzEoj61c82I/pN/yBoE%3D' (2024-06-07) • Updated input 'lix-module': 'https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/b4b38e6b5fe18da9464f291ae5fbf2ea9acb9ccb.tar.gz?narHash=sha256-joKTxvywYlKspGGKOIXho6oRbggOPyayEqAyuZCavO0%3D' (2024-05-30) → 'https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/4e25f1ab68f2270f9cff59216056c21073db0164.tar.gz?narHash=sha256-m8XYt8NU2T4gvkien7H7LFGXHhSA5z4tHOeuXQ3DJi4%3D' (2024-06-06) • Updated input 'nixos-hardware': 'github:NixOS/nixos-hardware/8251761f93d6f5b91cee45ac09edb6e382641009?narHash=sha256-uuEkErFVsFdg2K0cKbNQ9JlFSAm/xYqPr4rbPLI91Y8%3D' (2024-05-29) → 'github:NixOS/nixos-hardware/d6c6cf6f5fead4057d8fb2d5f30aa8ac1727f177?narHash=sha256-cz3P5MZffAHwL2IQaNzsqUBsJS%2Bu0J/AAwArHMAcCa0%3D' (2024-06-05) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/805a384895c696f802a9bf5bf4720f37385df547?narHash=sha256-F/TKWETwB5RaR8owkPPi%2BSPJh83AQsm6KrQAlJ8v/uA%3D' (2024-05-31) → 'github:NixOS/nixpkgs/0b8e7a1ae5a94da2e1ee3f3030a32020f6254105?narHash=sha256-WZ1s48OODmRJ3DHC%2BI/DtM3tDRuRJlNqMvxvAPTD7ec%3D' (2024-06-05) • Updated input 'nixvim': 'github:nix-community/nixvim/6ff3493c9bc85063ae829f0c25c21be3bde5c5b3?narHash=sha256-cKEGHGLaZoiNroMd34RrDgVDB7xgfff7HBShMz7cEy8%3D' (2024-05-30) → 'github:nix-community/nixvim/36f2e51b28ee3389a67ed5e9ed5c4bd388b06918?narHash=sha256-0PhFvfc4wDjba1cus2ALsfn0wVizeKkcuF%2BaqvDJivg%3D' (2024-06-06) • Updated input 'nixvim/flake-parts': 'github:hercules-ci/flake-parts/8dc45382d5206bd292f9c2768b8058a8fd8311d9?narHash=sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78%3D' (2024-05-16) → 'github:hercules-ci/flake-parts/2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8?narHash=sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw%3D' (2024-06-01) • Removed input 'nixvim/flake-root' • Updated input 'nixvim/git-hooks': 'github:cachix/git-hooks.nix/0e8fcc54b842ad8428c9e705cb5994eaf05c26a0?narHash=sha256-xrsYFST8ij4QWaV6HEokCUNIZLjjLP1bYC60K8XiBVA%3D' (2024-05-20) → 'github:cachix/git-hooks.nix/cc4d466cb1254af050ff7bdf47f6d404a7c646d1?narHash=sha256-7XfBuLULizXjXfBYy/VV%2BSpYMHreNRHk9nKMsm1bgb4%3D' (2024-06-06) • Updated input 'nixvim/treefmt-nix': 'github:numtide/treefmt-nix/2fba33a182602b9d49f0b2440513e5ee091d838b?narHash=sha256-wJqHMg/K6X3JGAE9YLM0LsuKrKb4XiBeVaoeMNlReZg%3D' (2024-05-17) → 'github:numtide/treefmt-nix/3eb96ca1ae9edf792a8e0963cc92fddfa5a87706?narHash=sha256-u10aDdYrpiGOLoxzY/mJ9llST9yO8Q7K/UlROoNxzDw%3D' (2024-06-01) • Updated input 'unstable': 'github:NixOS/nixpkgs/ad57eef4ef0659193044870c731987a6df5cf56b?narHash=sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs%3D' (2024-05-29) → 'github:NixOS/nixpkgs/e8057b67ebf307f01bdcc8fba94d94f75039d1f6?narHash=sha256-pL9jeus5QpX5R%2B9rsp3hhZ%2BuplVHscNJh8n8VpqscM0%3D' (2024-06-05) --- flake.lock | 86 ++++++++++++++++++++---------------------------- nvim/plugins.nix | 2 +- 2 files changed, 36 insertions(+), 52 deletions(-) diff --git a/flake.lock b/flake.lock index bd8c9eb..2c02604 100644 --- a/flake.lock +++ b/flake.lock @@ -144,11 +144,11 @@ ] }, "locked": { - "lastModified": 1713532798, - "narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=", + "lastModified": 1717408969, + "narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=", "owner": "numtide", "repo": "devshell", - "rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40", + "rev": "1ebbe68d57457c8cae98145410b164b5477761f4", "type": "github" }, "original": { @@ -197,11 +197,11 @@ ] }, "locked": { - "lastModified": 1715865404, - "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=", + "lastModified": 1717285511, + "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9", + "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", "type": "github" }, "original": { @@ -210,21 +210,6 @@ "type": "github" } }, - "flake-root": { - "locked": { - "lastModified": 1713493429, - "narHash": "sha256-ztz8JQkI08tjKnsTpfLqzWoKFQF4JGu2LRz8bkdnYUk=", - "owner": "srid", - "repo": "flake-root", - "rev": "bc748b93b86ee76e2032eecda33440ceb2532fcd", - "type": "github" - }, - "original": { - "owner": "srid", - "repo": "flake-root", - "type": "github" - } - }, "flake-utils": { "inputs": { "systems": [ @@ -290,11 +275,11 @@ ] }, "locked": { - "lastModified": 1716213921, - "narHash": "sha256-xrsYFST8ij4QWaV6HEokCUNIZLjjLP1bYC60K8XiBVA=", + "lastModified": 1717664902, + "narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "0e8fcc54b842ad8428c9e705cb5994eaf05c26a0", + "rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1", "type": "github" }, "original": { @@ -349,11 +334,11 @@ ] }, "locked": { - "lastModified": 1716736833, - "narHash": "sha256-rNObca6dm7Qs524O4st8VJH6pZ/Xe1gxl+Rx6mcWYo0=", + "lastModified": 1717527182, + "narHash": "sha256-vWSkg6AMok1UUQiSYVdGMOXKD2cDFnajITiSi0Zjd1A=", "owner": "nix-community", "repo": "home-manager", - "rev": "a631666f5ec18271e86a5cde998cba68c33d9ac6", + "rev": "845a5c4c073f74105022533907703441e0464bc3", "type": "github" }, "original": { @@ -386,11 +371,11 @@ "lix": { "flake": false, "locked": { - "lastModified": 1717106031, - "narHash": "sha256-3sOBY0cNLgIFNk0YhBw+kz57JLVphHTSypAKnkYz01g=", - "rev": "3df013597d7a2b5e400839e6625c05bd47de4dca", + "lastModified": 1717732411, + "narHash": "sha256-cxK0tBbUxXtIYKLbjHpH+swiIzEoj61c82I/pN/yBoE=", + "rev": "4f94531209510c7d580e525a017ea01f18894ded", "type": "tarball", - "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/3df013597d7a2b5e400839e6625c05bd47de4dca.tar.gz" + "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/4f94531209510c7d580e525a017ea01f18894ded.tar.gz" }, "original": { "type": "tarball", @@ -411,11 +396,11 @@ ] }, "locked": { - "lastModified": 1717036776, - "narHash": "sha256-joKTxvywYlKspGGKOIXho6oRbggOPyayEqAyuZCavO0=", - "rev": "b4b38e6b5fe18da9464f291ae5fbf2ea9acb9ccb", + "lastModified": 1717647344, + "narHash": "sha256-m8XYt8NU2T4gvkien7H7LFGXHhSA5z4tHOeuXQ3DJi4=", + "rev": "4e25f1ab68f2270f9cff59216056c21073db0164", "type": "tarball", - "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/b4b38e6b5fe18da9464f291ae5fbf2ea9acb9ccb.tar.gz" + "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/4e25f1ab68f2270f9cff59216056c21073db0164.tar.gz" }, "original": { "type": "tarball", @@ -424,11 +409,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1716987116, - "narHash": "sha256-uuEkErFVsFdg2K0cKbNQ9JlFSAm/xYqPr4rbPLI91Y8=", + "lastModified": 1717574423, + "narHash": "sha256-cz3P5MZffAHwL2IQaNzsqUBsJS+u0J/AAwArHMAcCa0=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "8251761f93d6f5b91cee45ac09edb6e382641009", + "rev": "d6c6cf6f5fead4057d8fb2d5f30aa8ac1727f177", "type": "github" }, "original": { @@ -439,11 +424,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1717144377, - "narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=", + "lastModified": 1717555607, + "narHash": "sha256-WZ1s48OODmRJ3DHC+I/DtM3tDRuRJlNqMvxvAPTD7ec=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "805a384895c696f802a9bf5bf4720f37385df547", + "rev": "0b8e7a1ae5a94da2e1ee3f3030a32020f6254105", "type": "github" }, "original": { @@ -462,7 +447,6 @@ "flake-compat" ], "flake-parts": "flake-parts", - "flake-root": "flake-root", "git-hooks": "git-hooks", "home-manager": [ "home-manager" @@ -474,11 +458,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1717100844, - "narHash": "sha256-cKEGHGLaZoiNroMd34RrDgVDB7xgfff7HBShMz7cEy8=", + "lastModified": 1717681257, + "narHash": "sha256-0PhFvfc4wDjba1cus2ALsfn0wVizeKkcuF+aqvDJivg=", "owner": "nix-community", "repo": "nixvim", - "rev": "6ff3493c9bc85063ae829f0c25c21be3bde5c5b3", + "rev": "36f2e51b28ee3389a67ed5e9ed5c4bd388b06918", "type": "github" }, "original": { @@ -560,11 +544,11 @@ ] }, "locked": { - "lastModified": 1715940852, - "narHash": "sha256-wJqHMg/K6X3JGAE9YLM0LsuKrKb4XiBeVaoeMNlReZg=", + "lastModified": 1717278143, + "narHash": "sha256-u10aDdYrpiGOLoxzY/mJ9llST9yO8Q7K/UlROoNxzDw=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "2fba33a182602b9d49f0b2440513e5ee091d838b", + "rev": "3eb96ca1ae9edf792a8e0963cc92fddfa5a87706", "type": "github" }, "original": { @@ -575,11 +559,11 @@ }, "unstable": { "locked": { - "lastModified": 1716948383, - "narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=", + "lastModified": 1717602782, + "narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ad57eef4ef0659193044870c731987a6df5cf56b", + "rev": "e8057b67ebf307f01bdcc8fba94d94f75039d1f6", "type": "github" }, "original": { diff --git a/nvim/plugins.nix b/nvim/plugins.nix index 4600f5f..1732580 100644 --- a/nvim/plugins.nix +++ b/nvim/plugins.nix @@ -137,7 +137,7 @@ # clangd.enable = true; html.enable = true; jsonls.enable = true; - nil_ls.enable = true; + nil-ls.enable = true; ruff-lsp.enable = true; taplo.enable = true; texlab.enable = true; -- 2.47.0 From bb9e7b1139413dc481fe62f695444fffa7dee56f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jalil=20David=20Salam=C3=A9=20Messina?= Date: Sat, 8 Jun 2024 22:28:27 +0200 Subject: [PATCH 2/2] [feat] ci: add forgejo actions --- .forgejo/workflows/check.yml | 18 ++++++++++++++++++ flake.nix | 22 +++------------------- fmt.nix | 12 ++++++++++++ lint.nix | 12 ++++++++++++ typos.nix | 12 ++++++++++++ 5 files changed, 57 insertions(+), 19 deletions(-) create mode 100644 .forgejo/workflows/check.yml create mode 100644 fmt.nix create mode 100644 lint.nix create mode 100644 typos.nix diff --git a/.forgejo/workflows/check.yml b/.forgejo/workflows/check.yml new file mode 100644 index 0000000..8a6cedc --- /dev/null +++ b/.forgejo/workflows/check.yml @@ -0,0 +1,18 @@ +on: [push] +jobs: + check: + runs-on: nixos + steps: + - uses: https://code.forgejo.org/actions/checkout@v4 + - run: nix --version + - run: nix flake check --keep-going + build: + runs-on: nixos + strategy: + matrix: + machine: + - vm + steps: + - uses: https://code.forgejo.org/actions/checkout@v4 + - run: nix --version + - run: nix build --print-build-logs '.#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel' diff --git a/flake.nix b/flake.nix index 54c1226..6769b60 100644 --- a/flake.nix +++ b/flake.nix @@ -112,25 +112,9 @@ pkgs = import nixpkgs {inherit system overlays;}; module = ./nvim/nixvim.nix; }; - formatting = pkgs.stdenvNoCC.mkDerivation { - name = "nix-formatting-check"; - dontUnpack = true; - dontBuild = true; - doCheck = true; - checkPhase = "${pkgs.lib.getExe self.formatter.${system}} --check --quiet ${src}"; - installPhase = "mkdir $out"; - }; - typos = let - typos = pkgs.lib.getExe pkgs.typos; - in - pkgs.stdenvNoCC.mkDerivation { - name = "typos-check"; - dontUnpack = true; - dontBuild = true; - doCheck = true; - checkPhase = "${typos} --color=always ${src}"; - installPhase = "mkdir $out"; - }; + fmt = pkgs.callPackage ./fmt.nix {inherit src;}; + lint = pkgs.callPackage ./lint.nix {inherit src;}; + typos = pkgs.callPackage ./lint.nix {inherit src;}; } ); diff --git a/fmt.nix b/fmt.nix new file mode 100644 index 0000000..84b7369 --- /dev/null +++ b/fmt.nix @@ -0,0 +1,12 @@ +{ + lib, + stdenvNoCC, + alejandra, + src, +}: +stdenvNoCC.mkDerivation { + name = "fmt-src"; + inherit src; + buildPhase = "${lib.getExe alejandra} --check ."; + installPhase = "mkdir $out"; +} diff --git a/lint.nix b/lint.nix new file mode 100644 index 0000000..5c80e23 --- /dev/null +++ b/lint.nix @@ -0,0 +1,12 @@ +{ + lib, + stdenvNoCC, + statix, + src, +}: +stdenvNoCC.mkDerivation { + name = "lint-src"; + inherit src; + buildPhase = "${lib.getExe statix} check ."; + installPhase = "mkdir $out"; +} diff --git a/typos.nix b/typos.nix new file mode 100644 index 0000000..9a02768 --- /dev/null +++ b/typos.nix @@ -0,0 +1,12 @@ +{ + lib, + stdenvNoCC, + typos, + src, +}: +stdenvNoCC.mkDerivation { + name = "typos-src"; + inherit src; + buildPhase = "${lib.getExe typos} ."; + installPhase = "mkdir $out"; +} -- 2.47.0