Started migration towards flake-parts

Plus shit ton many changes I still had to commit
This commit is contained in:
Andrea Ciceri 2023-03-12 17:05:03 +01:00
parent 261b763848
commit f05ee0a658
No known key found for this signature in database
GPG key ID: A1FC89532D1C5654
18 changed files with 752 additions and 460 deletions

37
packages/default.nix Normal file
View file

@ -0,0 +1,37 @@
{
inputs,
lib,
config,
...
}: {
options.fleet.overlays = let
overlayType = lib.mkOptionType {
name = "nixpkgs-overlay";
description = "nixpkgs overlay";
check = lib.isFunction;
merge = lib.mergeOneOption;
};
in
lib.mkOption {
description = "Nixpkgs overlays to apply at flake level (not in hosts)";
type = lib.types.listOf overlayType;
default = with inputs; [
agenix.overlays.default
comma.overlays.default
nur.overlay
nil.overlays.default
];
};
config.perSystem = {
system,
lib,
...
}: {
_module.args.pkgs =
lib.foldl
(legacyPackages: overlay: legacyPackages.extend overlay)
inputs.nixpkgsUnstable.legacyPackages.${system}
config.fleet.overlays;
};
}