flake: use nixfmt-rfc-style

This commit is contained in:
Artur Manuel 2025-04-02 21:06:44 +01:00
commit 3307e8259d
Signed by: amadaluzia
SSH key fingerprint: SHA256:ubvwT66gNUKSsgSzEb2UQnX8pzTq5N+r8eRVYGJJm4Q
13 changed files with 398 additions and 167 deletions

View file

@ -1,34 +1,53 @@
{
description = "Alqages, packages from alqueva to here.";
inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; };
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = inputs@{ self, nixpkgs, }:
outputs =
inputs@{ self, nixpkgs }:
let
inherit (nixpkgs) lib;
eachSystem = f:
nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system:
eachSystem =
f:
nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (
system:
f {
inherit system;
pkgs = nixpkgs.legacyPackages.${system};
});
in {
overlays.default = _: prev:
}
);
in
{
overlays.default =
_: prev:
lib.pipe (builtins.readDir ./packages) [
(lib.filterAttrs (_: v: v == "directory"))
(lib.concatMapAttrs (name: _: {
${name} = prev.callPackage ./packages/${name} { inherit inputs; };
}))
(lib.concatMapAttrs (
name: _: {
${name} = prev.callPackage ./packages/${name} { inherit inputs; };
}
))
];
packages = eachSystem ({ pkgs, ... }: self.overlays.default pkgs pkgs);
devShells = eachSystem ({ pkgs, ... }: {
default = pkgs.mkShell {
name = "alqages-dev";
packages =
builtins.attrValues { inherit (pkgs) nil nixfmt deadnix statix; };
};
});
formatter = eachSystem ({ pkgs, ... }: pkgs.nixfmt);
devShells = eachSystem (
{ pkgs, ... }:
{
default = pkgs.mkShell {
name = "alqages-dev";
packages = builtins.attrValues {
inherit (pkgs)
nil
nixfmt
deadnix
statix
;
};
};
}
);
formatter = eachSystem ({ pkgs, ... }: pkgs.nixfmt-rfc-style);
};
}