fix some small bugs in mkFlake/evalArgs
This commit is contained in:
parent
8d0c036b6b
commit
2b70cd3ae6
3 changed files with 11 additions and 9 deletions
|
@ -17,7 +17,10 @@ lib.makeExtensible (final:
|
||||||
lists = callLibs ./lists.nix;
|
lists = callLibs ./lists.nix;
|
||||||
strings = callLibs ./strings.nix;
|
strings = callLibs ./strings.nix;
|
||||||
|
|
||||||
mkFlake = callLibs ./mkFlake;
|
mkFlake = {
|
||||||
|
__functor = callLibs ./mkFlake;
|
||||||
|
evalArgs = callLibs ./mkFlake/evalArgs.nix;
|
||||||
|
};
|
||||||
|
|
||||||
pkgs-lib = callLibs ./pkgs-lib;
|
pkgs-lib = callLibs ./pkgs-lib;
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,12 @@
|
||||||
let
|
let
|
||||||
inherit (dev) os;
|
inherit (dev) os;
|
||||||
inherit (inputs) utils deploy;
|
inherit (inputs) utils deploy;
|
||||||
evalFlakeArgs = dev.callLibs ./evalArgs.nix;
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{ self, ... } @ args:
|
_: { self, ... } @ args:
|
||||||
let
|
let
|
||||||
|
|
||||||
cfg = (evalFlakeArgs { inherit args; }).config;
|
cfg = (dev.mkFlake.evalArgs { inherit args; }).config;
|
||||||
|
|
||||||
multiPkgs = os.mkPkgs { inherit (cfg) extern overrides; };
|
multiPkgs = os.mkPkgs { inherit (cfg) extern overrides; };
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ let
|
||||||
check = builtins.isFunction;
|
check = builtins.isFunction;
|
||||||
description = "valid Nixpkgs overlay";
|
description = "valid Nixpkgs overlay";
|
||||||
};
|
};
|
||||||
systemType = types.enum (builtins.attrValues config.supportedSystems);
|
systemType = types.enum config.supportedSystems;
|
||||||
flakeType = with types; (addCheck attrs nixos.lib.isStorePath) // {
|
flakeType = with types; (addCheck attrs nixos.lib.isStorePath) // {
|
||||||
description = "nix flake";
|
description = "nix flake";
|
||||||
};
|
};
|
||||||
|
@ -85,7 +85,7 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
configModule = { name, ... }: {
|
configModule = {
|
||||||
options = with types; {
|
options = with types; {
|
||||||
system = mkOption {
|
system = mkOption {
|
||||||
type = systemType;
|
type = systemType;
|
||||||
|
@ -95,7 +95,7 @@ let
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
channelName = mkOption {
|
channelName = mkOption {
|
||||||
type = types.enum (builtins.attrValues self.channels);
|
type = types.enum (builtins.attrValues config.channels);
|
||||||
default = "nixpkgs";
|
default = "nixpkgs";
|
||||||
description = ''
|
description = ''
|
||||||
Channel this config should follow
|
Channel this config should follow
|
||||||
|
@ -108,7 +108,7 @@ let
|
||||||
The configuration for this config
|
The configuration for this config
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
externalmodules = mkOption {
|
externalModules = mkOption {
|
||||||
type = pathTo moduleType;
|
type = pathTo moduleType;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -121,7 +121,7 @@ let
|
||||||
# Home-manager's configs get exported automatically from nixos.hosts
|
# Home-manager's configs get exported automatically from nixos.hosts
|
||||||
# So there is no need for a config options in the home namespace
|
# So there is no need for a config options in the home namespace
|
||||||
# This is only needed for nixos
|
# This is only needed for nixos
|
||||||
includeConfigsModule = {
|
includeConfigsModule = { name, ... }: {
|
||||||
options = with types; {
|
options = with types; {
|
||||||
configDefaults = mkOption {
|
configDefaults = mkOption {
|
||||||
type = submodule configModule;
|
type = submodule configModule;
|
||||||
|
|
Loading…
Reference in a new issue