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