chore(flake): cleaner flake.nix file, update flake.lock

This commit is contained in:
2025-06-03 22:38:40 +02:00
parent 235863cd9e
commit bb4c4b6375
2 changed files with 58 additions and 26 deletions

View File

@@ -2,37 +2,35 @@
description = "System information in JSON format for eww";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
nixpkgs,
rust-overlay,
flake-utils,
...
}: let
supportedSystems = ["x86_64-linux" "aarch64-linux"];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
pkgsFor = nixpkgs.legacyPackages;
in {
packages = forAllSystems (system: {
default = pkgsFor.${system}.callPackage ./. {};
});
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
devShells = forAllSystems (
}:
flake-utils.lib.eachSystem ["x86_64-linux" "aarch64-linux"] (
system: let
overlays = [(import rust-overlay)];
pkgs = import nixpkgs {inherit system overlays;};
pkgs = import nixpkgs { inherit system overlays; };
rustVersion = pkgs.rust-bin.fromRustupToolchainFile ./rustup-toolchain.toml;
in
pkgs.mkShell {
buildInputs = with pkgs; [
bacon
cargo
rustVersion
];
}
pkgsFor = nixpkgs.legacyPackages;
in {
formatter = pkgs.alejandra;
packages.default = pkgsFor.${system}.callPackage ./. {};
devShells.default = with pkgs;
mkShell {
buildInputs = [
bacon
rustVersion
];
};
}
);
};
}