forked from pub-solar/os
ref: cave out instances of userFLake dependencies and intject them as
if functions where contructors
This commit is contained in:
parent
40acfd13e3
commit
6f0392b55e
|
@ -1,6 +1,8 @@
|
||||||
{ lib }:
|
{ lib }:
|
||||||
|
|
||||||
{ dir, extern, suites, overrides, multiPkgs, userFlakeNixOS, userFlakeInputs, userFlakeSelf }:
|
{ userFlakeNixOS, userFlakeInputs, userFlakeSelf }:
|
||||||
|
|
||||||
|
{ dir, extern, suites, overrides, multiPkgs }:
|
||||||
let
|
let
|
||||||
defaultSystem = "x86_64-linux";
|
defaultSystem = "x86_64-linux";
|
||||||
|
|
||||||
|
@ -91,6 +93,8 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
lib.os.devosSystem {
|
lib.os.devosSystem {
|
||||||
|
inherit userFlakeNixOS userFlakeInputs userFlakeSelf;
|
||||||
|
} {
|
||||||
inherit specialArgs;
|
inherit specialArgs;
|
||||||
system = defaultSystem;
|
system = defaultSystem;
|
||||||
modules = modules // { inherit local lib; };
|
modules = modules // { inherit local lib; };
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{ lib, utils }:
|
{ lib, utils }:
|
||||||
|
|
||||||
{ extern, overrides, userFlakeNixOS, userFlakeSelf, userFlakeInputs }:
|
{ userFlakeNixOS, userFlakeSelf, userFlakeInputs }:
|
||||||
|
|
||||||
|
{ extern, overrides }:
|
||||||
(utils.lib.eachDefaultSystem
|
(utils.lib.eachDefaultSystem
|
||||||
(system:
|
(system:
|
||||||
let
|
let
|
||||||
|
|
|
@ -3,23 +3,30 @@ let
|
||||||
inherit (dev) os;
|
inherit (dev) os;
|
||||||
in
|
in
|
||||||
|
|
||||||
_: { self, ... } @ args:
|
_: { self, inputs, nixos, ... } @ args:
|
||||||
let
|
let
|
||||||
|
|
||||||
userFlakeSelf = self;
|
userFlakeSelf = self;
|
||||||
|
userFlakeInputs = inputs;
|
||||||
|
userFlakeNixOS = nixos;
|
||||||
|
|
||||||
cfg = (lib.mkFlake.evalOldArgs { inherit args; }).config;
|
cfg = (lib.mkFlake.evalOldArgs { inherit args; }).config;
|
||||||
|
|
||||||
multiPkgs = os.mkPkgs { inherit (cfg) extern overrides; };
|
multiPkgs = os.mkPkgs
|
||||||
|
{ inherit userFlakeSelf userFlakeInputs userFlakeNixOS; }
|
||||||
|
{ inherit (cfg) extern overrides; };
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
nixosConfigurations = os.mkHosts {
|
nixosConfigurations = os.mkHosts
|
||||||
inherit userFlakeSelf multiPkgs;
|
{ inherit userFlakeSelf userFlakeInputs userFlakeNixOS; }
|
||||||
|
{
|
||||||
|
inherit multiPkgs;
|
||||||
inherit (cfg) extern suites overrides;
|
inherit (cfg) extern suites overrides;
|
||||||
dir = cfg.hosts;
|
dir = cfg.hosts;
|
||||||
};
|
};
|
||||||
|
|
||||||
homeConfigurations = os.mkHomeConfigurations;
|
homeConfigurations = os.mkHomeConfigurations
|
||||||
|
{ inherit userFlakeSelf; };
|
||||||
|
|
||||||
nixosModules = cfg.modules;
|
nixosModules = cfg.modules;
|
||||||
|
|
||||||
|
@ -36,7 +43,9 @@ let
|
||||||
pkgs = multiPkgs.${system};
|
pkgs = multiPkgs.${system};
|
||||||
pkgs-lib = lib.pkgs-lib.${system};
|
pkgs-lib = lib.pkgs-lib.${system};
|
||||||
# all packages that are defined in ./pkgs
|
# all packages that are defined in ./pkgs
|
||||||
legacyPackages = os.mkPackages { inherit pkgs; };
|
legacyPackages = os.mkPackages
|
||||||
|
{ inherit userFlakeSelf; }
|
||||||
|
{ inherit pkgs; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
checks = pkgs-lib.tests.mkChecks {
|
checks = pkgs-lib.tests.mkChecks {
|
||||||
|
|
Loading…
Reference in a new issue