update_flake_lock_action #1

Merged
jalil merged 2 commits from update_flake_lock_action into main 2024-06-08 22:42:15 +02:00
7 changed files with 93 additions and 71 deletions

View file

@ -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'

View file

@ -144,11 +144,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1713532798, "lastModified": 1717408969,
"narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=", "narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=",
"owner": "numtide", "owner": "numtide",
"repo": "devshell", "repo": "devshell",
"rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40", "rev": "1ebbe68d57457c8cae98145410b164b5477761f4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -197,11 +197,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1715865404, "lastModified": 1717285511,
"narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=", "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9", "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -210,21 +210,6 @@
"type": "github" "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": { "flake-utils": {
"inputs": { "inputs": {
"systems": [ "systems": [
@ -290,11 +275,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1716213921, "lastModified": 1717664902,
"narHash": "sha256-xrsYFST8ij4QWaV6HEokCUNIZLjjLP1bYC60K8XiBVA=", "narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "0e8fcc54b842ad8428c9e705cb5994eaf05c26a0", "rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -349,11 +334,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1716736833, "lastModified": 1717527182,
"narHash": "sha256-rNObca6dm7Qs524O4st8VJH6pZ/Xe1gxl+Rx6mcWYo0=", "narHash": "sha256-vWSkg6AMok1UUQiSYVdGMOXKD2cDFnajITiSi0Zjd1A=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "a631666f5ec18271e86a5cde998cba68c33d9ac6", "rev": "845a5c4c073f74105022533907703441e0464bc3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -386,11 +371,11 @@
"lix": { "lix": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1717106031, "lastModified": 1717732411,
"narHash": "sha256-3sOBY0cNLgIFNk0YhBw+kz57JLVphHTSypAKnkYz01g=", "narHash": "sha256-cxK0tBbUxXtIYKLbjHpH+swiIzEoj61c82I/pN/yBoE=",
"rev": "3df013597d7a2b5e400839e6625c05bd47de4dca", "rev": "4f94531209510c7d580e525a017ea01f18894ded",
"type": "tarball", "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": { "original": {
"type": "tarball", "type": "tarball",
@ -411,11 +396,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717036776, "lastModified": 1717647344,
"narHash": "sha256-joKTxvywYlKspGGKOIXho6oRbggOPyayEqAyuZCavO0=", "narHash": "sha256-m8XYt8NU2T4gvkien7H7LFGXHhSA5z4tHOeuXQ3DJi4=",
"rev": "b4b38e6b5fe18da9464f291ae5fbf2ea9acb9ccb", "rev": "4e25f1ab68f2270f9cff59216056c21073db0164",
"type": "tarball", "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": { "original": {
"type": "tarball", "type": "tarball",
@ -424,11 +409,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1716987116, "lastModified": 1717574423,
"narHash": "sha256-uuEkErFVsFdg2K0cKbNQ9JlFSAm/xYqPr4rbPLI91Y8=", "narHash": "sha256-cz3P5MZffAHwL2IQaNzsqUBsJS+u0J/AAwArHMAcCa0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "8251761f93d6f5b91cee45ac09edb6e382641009", "rev": "d6c6cf6f5fead4057d8fb2d5f30aa8ac1727f177",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -439,11 +424,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1717144377, "lastModified": 1717555607,
"narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=", "narHash": "sha256-WZ1s48OODmRJ3DHC+I/DtM3tDRuRJlNqMvxvAPTD7ec=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "805a384895c696f802a9bf5bf4720f37385df547", "rev": "0b8e7a1ae5a94da2e1ee3f3030a32020f6254105",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -462,7 +447,6 @@
"flake-compat" "flake-compat"
], ],
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"flake-root": "flake-root",
"git-hooks": "git-hooks", "git-hooks": "git-hooks",
"home-manager": [ "home-manager": [
"home-manager" "home-manager"
@ -474,11 +458,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1717100844, "lastModified": 1717681257,
"narHash": "sha256-cKEGHGLaZoiNroMd34RrDgVDB7xgfff7HBShMz7cEy8=", "narHash": "sha256-0PhFvfc4wDjba1cus2ALsfn0wVizeKkcuF+aqvDJivg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "6ff3493c9bc85063ae829f0c25c21be3bde5c5b3", "rev": "36f2e51b28ee3389a67ed5e9ed5c4bd388b06918",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -560,11 +544,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1715940852, "lastModified": 1717278143,
"narHash": "sha256-wJqHMg/K6X3JGAE9YLM0LsuKrKb4XiBeVaoeMNlReZg=", "narHash": "sha256-u10aDdYrpiGOLoxzY/mJ9llST9yO8Q7K/UlROoNxzDw=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "2fba33a182602b9d49f0b2440513e5ee091d838b", "rev": "3eb96ca1ae9edf792a8e0963cc92fddfa5a87706",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -575,11 +559,11 @@
}, },
"unstable": { "unstable": {
"locked": { "locked": {
"lastModified": 1716948383, "lastModified": 1717602782,
"narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=", "narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ad57eef4ef0659193044870c731987a6df5cf56b", "rev": "e8057b67ebf307f01bdcc8fba94d94f75039d1f6",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -112,25 +112,9 @@
pkgs = import nixpkgs {inherit system overlays;}; pkgs = import nixpkgs {inherit system overlays;};
module = ./nvim/nixvim.nix; module = ./nvim/nixvim.nix;
}; };
formatting = pkgs.stdenvNoCC.mkDerivation { fmt = pkgs.callPackage ./fmt.nix {inherit src;};
name = "nix-formatting-check"; lint = pkgs.callPackage ./lint.nix {inherit src;};
dontUnpack = true; typos = pkgs.callPackage ./lint.nix {inherit src;};
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";
};
} }
); );

12
fmt.nix Normal file
View file

@ -0,0 +1,12 @@
{
lib,
stdenvNoCC,
alejandra,
src,
}:
stdenvNoCC.mkDerivation {
name = "fmt-src";
inherit src;
buildPhase = "${lib.getExe alejandra} --check .";
installPhase = "mkdir $out";
}

12
lint.nix Normal file
View file

@ -0,0 +1,12 @@
{
lib,
stdenvNoCC,
statix,
src,
}:
stdenvNoCC.mkDerivation {
name = "lint-src";
inherit src;
buildPhase = "${lib.getExe statix} check .";
installPhase = "mkdir $out";
}

View file

@ -137,7 +137,7 @@
# clangd.enable = true; # clangd.enable = true;
html.enable = true; html.enable = true;
jsonls.enable = true; jsonls.enable = true;
nil_ls.enable = true; nil-ls.enable = true;
ruff-lsp.enable = true; ruff-lsp.enable = true;
taplo.enable = true; taplo.enable = true;
texlab.enable = true; texlab.enable = true;

12
typos.nix Normal file
View file

@ -0,0 +1,12 @@
{
lib,
stdenvNoCC,
typos,
src,
}:
stdenvNoCC.mkDerivation {
name = "typos-src";
inherit src;
buildPhase = "${lib.getExe typos} .";
installPhase = "mkdir $out";
}