mirror of
https://github.com/divnix/digga.git
synced 2024-12-22 23:51:39 +03:00
Switch to alejandra for formatting
This commit is contained in:
parent
a1c669b431
commit
c187286ddc
@ -67,7 +67,7 @@ devshell.mkShell {
|
||||
name = "digga";
|
||||
packages = with pkgs; [
|
||||
fd
|
||||
nixpkgs-fmt
|
||||
alejandra
|
||||
# Use the latest stable version of nix
|
||||
unstablePkgs.nix
|
||||
];
|
||||
@ -106,7 +106,7 @@ devshell.mkShell {
|
||||
(utils {
|
||||
name = "fmt";
|
||||
help = "Check Nix formatting";
|
||||
command = "nixpkgs-fmt \${@} $PRJ_ROOT";
|
||||
command = "alejandra \${@} $PRJ_ROOT";
|
||||
})
|
||||
(utils {
|
||||
name = "evalnix";
|
||||
|
@ -8,9 +8,8 @@ channels: final: prev: {
|
||||
discord
|
||||
element-desktop
|
||||
rage
|
||||
nix-index
|
||||
nixpkgs-fmt
|
||||
qutebrowser
|
||||
alejandra
|
||||
signal-desktop
|
||||
starship
|
||||
deploy-rs
|
||||
|
@ -35,8 +35,7 @@ in
|
||||
help = nvfetcher-bin.meta.description;
|
||||
command = "cd $PRJ_ROOT/pkgs; ${nvfetcher-bin}/bin/nvfetcher -c ./sources.toml $@";
|
||||
}
|
||||
|
||||
(linter nixpkgs-fmt)
|
||||
(linter alejandra)
|
||||
(linter editorconfig-checker)
|
||||
|
||||
(docs mdbook)
|
||||
|
@ -14,7 +14,7 @@ all_files=($($diff))
|
||||
|
||||
# Format staged nix files.
|
||||
if ((${#nix_files[@]} != 0)); then
|
||||
nixpkgs-fmt "${nix_files[@]}" &&
|
||||
alejandra "${nix_files[@]}" &&
|
||||
git add "${nix_files[@]}"
|
||||
fi
|
||||
|
||||
|
25
flake.lock
25
flake.lock
@ -180,22 +180,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"latest": {
|
||||
"locked": {
|
||||
"lastModified": 1657265485,
|
||||
"narHash": "sha256-PUQ9C7mfi0/BnaAUX2R/PIkoNCb/Jtx9EpnhMBNrO/o=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b39924fc7764c08ae3b51beef9a3518c414cdb7d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixlib": {
|
||||
"locked": {
|
||||
"lastModified": 1656809537,
|
||||
@ -229,16 +213,16 @@
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1657292830,
|
||||
"narHash": "sha256-ldfVSTveWceDCmW6gf3B4kR6vwmz/XS80y5wsLLHFJU=",
|
||||
"lastModified": 1667629849,
|
||||
"narHash": "sha256-P+v+nDOFWicM4wziFK9S/ajF2lc0N2Rg9p6Y35uMoZI=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "334ec8b503c3981e37a04b817a70e8d026ea9e84",
|
||||
"rev": "3bacde6273b09a21a8ccfba15586fb165078fb62",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
@ -252,7 +236,6 @@
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-utils-plus": "flake-utils-plus",
|
||||
"home-manager": "home-manager",
|
||||
"latest": "latest",
|
||||
"nixlib": "nixlib",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||
|
@ -9,8 +9,8 @@
|
||||
{
|
||||
# Track channels with commits tested and built by hydra
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05";
|
||||
latest.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
nixlib.url = "github:nix-community/nixpkgs.lib";
|
||||
|
||||
# TODO: remove -- no references
|
||||
@ -40,7 +40,6 @@
|
||||
{ self
|
||||
, nixlib
|
||||
, nixpkgs
|
||||
, latest
|
||||
, deploy
|
||||
, devshell
|
||||
, flake-utils-plus
|
||||
@ -148,6 +147,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;
|
||||
|
Loading…
Reference in New Issue
Block a user