flake: use flake-utils

This commit is contained in:
Guanran Wang 2023-12-17 20:06:05 +08:00
parent 635c1d97a6
commit 4cfedbf884
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8

View file

@ -17,6 +17,10 @@
url = "github:nix-community/disko"; url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
flake-utils = {
url = "github:numtide/flake-utils";
inputs.systems.follows = "systems";
};
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -90,10 +94,6 @@
url = "github:hercules-ci/flake-parts"; url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs"; inputs.nixpkgs-lib.follows = "nixpkgs";
}; };
flake-utils = {
url = "github:numtide/flake-utils";
inputs.systems.follows = "systems";
};
gitignore = { gitignore = {
url = "github:hercules-ci/gitignore.nix"; url = "github:hercules-ci/gitignore.nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -154,10 +154,10 @@
}; };
outputs = inputs: let outputs = inputs: let
eachSystem = inputs.nixpkgs.lib.genAttrs (import inputs.systems); inherit (inputs.flake-utils.lib) eachDefaultSystemMap;
in { in {
formatter = eachSystem (system: inputs.nixpkgs.legacyPackages.${system}.alejandra); formatter = eachDefaultSystemMap (system: inputs.nixpkgs.legacyPackages.${system}.alejandra);
packages = eachSystem (system: import ./pkgs inputs.nixpkgs.legacyPackages.${system}); packages = eachDefaultSystemMap (system: import ./pkgs inputs.nixpkgs.legacyPackages.${system});
nixosModules.default = ./nixos/modules; nixosModules.default = ./nixos/modules;
### NixOS ### NixOS