1
1
mirror of https://github.com/divnix/digga.git synced 2025-01-03 22:08:36 +03:00

Switch to alejandra for formatting

This commit is contained in:
Parthiv Seetharaman 2022-04-20 21:13:28 -07:00
parent d60f27f697
commit 2867f0e8e2
6 changed files with 13 additions and 31 deletions

View File

@ -92,7 +92,7 @@ devshell.mkShell {
name = "digga";
packages = with pkgs; [
fd
nixpkgs-fmt
alejandra
nixUnstable
];
@ -130,7 +130,7 @@ devshell.mkShell {
(utils {
name = "fmt";
help = "Check Nix formatting";
command = "nixpkgs-fmt \${@} $PRJ_ROOT";
command = "alejandra \${@} $PRJ_ROOT";
})
(utils {
name = "evalnix";

View File

@ -8,8 +8,8 @@ channels: final: prev: {
discord
element-desktop
rage
nixpkgs-fmt
qutebrowser
alejandra
signal-desktop
starship
deploy-rs

View File

@ -39,7 +39,7 @@ in
help = pkgs.nvfetcher-bin.meta.description;
command = "cd $PRJ_ROOT/pkgs; ${pkgs.nvfetcher-bin}/bin/nvfetcher -c ./sources.toml $@";
}
(linter nixpkgs-fmt)
(linter alejandra)
(linter editorconfig-checker)
# (docs python3Packages.grip) too many deps
(docs mdbook)

View File

@ -15,7 +15,7 @@ all_files=($($diff))
# Format staged nix files.
if [[ -n "${nix_files[@]}" ]]; then
nixpkgs-fmt "${nix_files[@]}" \
alejandra "${nix_files[@]}" \
&& git add "${nix_files[@]}"
fi

View File

@ -19,7 +19,7 @@
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [
"latest"
"nixpkgs"
],
"utils": "utils"
},
@ -138,22 +138,6 @@
"type": "github"
}
},
"latest": {
"locked": {
"lastModified": 1638198142,
"narHash": "sha256-plU9b8r4St6q4U7VHtG9V7oF8k9fIpfXl/KDaZLuY9k=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "8a308775674e178495767df90c419425474582a1",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixlib": {
"locked": {
"lastModified": 1641688481,
@ -171,16 +155,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1648648646,
"narHash": "sha256-pHAq/GvsP7zRHkUTCs+4d31C0IEtTIuC6/TFASIA+zg=",
"lastModified": 1650161686,
"narHash": "sha256-70ZWAlOQ9nAZ08OU6WY7n4Ij2kOO199dLfNlvO/+pf8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "efea022d6fe0da84aa6613d4ddeafb80de713457",
"rev": "1ffba9f2f683063c2b14c9f4d12c55ad5f4ed887",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-21.11",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
@ -193,7 +177,6 @@
"flake-compat": "flake-compat_2",
"flake-utils-plus": "flake-utils-plus",
"home-manager": "home-manager",
"latest": "latest",
"nixlib": "nixlib",
"nixpkgs": "nixpkgs"
}

View File

@ -8,14 +8,13 @@
inputs =
{
# Track channels with commits tested and built by hydra
nixpkgs.url = "github:nixos/nixpkgs/nixos-21.11";
latest.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixlib.url = "github:nix-community/nixpkgs.lib";
blank.url = "github:divnix/blank";
deploy.url = "github:serokell/deploy-rs";
deploy.inputs.nixpkgs.follows = "latest";
deploy.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager/release-21.11";
home-manager.inputs.nixpkgs.follows = "nixlib";
@ -33,7 +32,6 @@
{ self
, nixlib
, nixpkgs
, latest
, deploy
, devshell
, flake-utils-plus
@ -125,6 +123,7 @@
'';
# digga-local use
formatter = nixlib.lib.genAttrs supportedSystems (s: nixpkgs.legacyPackages.${s}.alejandra);
# system-space and pass sytem and input to each file
jobs = polyfillOutput ./jobs;
checks = polyfillOutput ./checks;