2021-04-18 03:46:20 +02:00
|
|
|
{ lib, utils, deploy, ... }:
|
2021-03-30 20:10:58 +02:00
|
|
|
let
|
|
|
|
inherit (dev) os;
|
|
|
|
in
|
|
|
|
|
2021-04-12 07:25:37 +02:00
|
|
|
_: { self, ... } @ args:
|
2021-03-30 20:10:58 +02:00
|
|
|
let
|
|
|
|
|
2021-04-19 01:30:07 +02:00
|
|
|
userSelf = self;
|
|
|
|
|
2021-04-18 03:35:05 +02:00
|
|
|
cfg = (lib.mkFlake.evalOldArgs { inherit args; }).config;
|
2021-03-30 20:10:58 +02:00
|
|
|
|
|
|
|
multiPkgs = os.mkPkgs { inherit (cfg) extern overrides; };
|
|
|
|
|
|
|
|
outputs = {
|
|
|
|
nixosConfigurations = os.mkHosts {
|
2021-04-19 01:30:07 +02:00
|
|
|
inherit userSelf multiPkgs;
|
2021-03-30 20:10:58 +02:00
|
|
|
inherit (cfg) extern suites overrides;
|
|
|
|
dir = cfg.hosts;
|
|
|
|
};
|
|
|
|
|
|
|
|
homeConfigurations = os.mkHomeConfigurations;
|
|
|
|
|
|
|
|
nixosModules = cfg.modules;
|
|
|
|
|
|
|
|
homeModules = cfg.userModules;
|
|
|
|
|
|
|
|
overlay = cfg.packages;
|
|
|
|
inherit (cfg) overlays;
|
|
|
|
|
2021-04-19 01:30:07 +02:00
|
|
|
deploy.nodes = os.mkNodes deploy userSelf.nixosConfigurations;
|
2021-03-30 20:10:58 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
systemOutputs = utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
pkgs = multiPkgs.${system};
|
2021-04-18 03:35:05 +02:00
|
|
|
pkgs-lib = lib.pkgs-lib.${system};
|
2021-03-30 20:10:58 +02:00
|
|
|
# all packages that are defined in ./pkgs
|
|
|
|
legacyPackages = os.mkPackages { inherit pkgs; };
|
|
|
|
in
|
|
|
|
{
|
2021-04-10 19:59:10 +02:00
|
|
|
checks = pkgs-lib.tests.mkChecks {
|
2021-04-19 01:30:07 +02:00
|
|
|
inherit (userSelf.deploy) nodes;
|
|
|
|
hosts = userSelf.nixosConfigurations;
|
|
|
|
homes = userSelf.homeConfigurations;
|
2021-04-10 19:59:10 +02:00
|
|
|
};
|
2021-03-30 20:10:58 +02:00
|
|
|
|
|
|
|
inherit legacyPackages;
|
2021-04-18 03:35:05 +02:00
|
|
|
packages = lib.filterPackages system legacyPackages;
|
2021-03-30 20:10:58 +02:00
|
|
|
|
2021-04-10 19:59:10 +02:00
|
|
|
devShell = pkgs-lib.shell;
|
2021-03-30 20:10:58 +02:00
|
|
|
});
|
|
|
|
in
|
2021-04-10 03:22:08 +02:00
|
|
|
outputs // systemOutputs
|
2021-03-30 20:10:58 +02:00
|
|
|
|