flake: use filterPackages instead of flattenTreeSystem

This commit is contained in:
Pacman99 2021-03-26 16:33:27 -07:00
parent fb14e20249
commit 58814fe741
2 changed files with 11 additions and 8 deletions

View File

@ -260,16 +260,15 @@
}, },
"utils": { "utils": {
"locked": { "locked": {
"lastModified": 1608663846, "lastModified": 1614513358,
"narHash": "sha256-YOAXeoNLW0IubQ6AZLGuSj5kAD5n4DYXLYReLtyds1A=", "narHash": "sha256-LakhOx3S1dRjnh0b5Dg3mbZyH0ToC9I8Y2wKSkBaTzU=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "a68df93a37cd5137ac22ffeb2d8a03acf253cc24", "rev": "5466c5bbece17adaab2d82fae80b46e807611bf3",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "numtide", "owner": "numtide",
"ref": "flatten-tree-system",
"repo": "flake-utils", "repo": "flake-utils",
"type": "github" "type": "github"
} }

View File

@ -23,7 +23,7 @@
naersk.url = "github:nmattia/naersk"; naersk.url = "github:nmattia/naersk";
naersk.inputs.nixpkgs.follows = "override"; naersk.inputs.nixpkgs.follows = "override";
nixos-hardware.url = "github:nixos/nixos-hardware"; nixos-hardware.url = "github:nixos/nixos-hardware";
utils.url = "github:numtide/flake-utils/flatten-tree-system"; utils.url = "github:numtide/flake-utils";
pkgs.url = "path:./pkgs"; pkgs.url = "path:./pkgs";
pkgs.inputs.nixpkgs.follows = "nixos"; pkgs.inputs.nixpkgs.follows = "nixos";
}; };
@ -70,7 +70,11 @@
}; };
systemOutputs = utils.lib.eachDefaultSystem (system: systemOutputs = utils.lib.eachDefaultSystem (system:
let pkgs = multiPkgs.${system}; in let
pkgs = multiPkgs.${system};
# all packages that are defined in ./pkgs
legacyPackages = os.mkPackages { inherit pkgs; };
in
{ {
checks = checks =
let let
@ -82,8 +86,8 @@
in in
nixos.lib.recursiveUpdate tests deployChecks; nixos.lib.recursiveUpdate tests deployChecks;
packages = utils.lib.flattenTreeSystem system inherit legacyPackages;
(os.mkPackages { inherit pkgs; }); packages = lib.filterPackages system legacyPackages;
devShell = import ./shell { devShell = import ./shell {
inherit self system; inherit self system;