chore(flake): cleaner flake.nix file, update flake.lock
This commit is contained in:
38
flake.nix
38
flake.nix
@@ -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
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user