clan: Remove pkgsForSystem
This commit is contained in:
@@ -3,6 +3,7 @@ let
|
|||||||
types = lib.types;
|
types = lib.types;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
# Required options
|
# Required options
|
||||||
directory = lib.mkOption {
|
directory = lib.mkOption {
|
||||||
@@ -69,18 +70,6 @@ in
|
|||||||
default = { };
|
default = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
pkgsForSystem = lib.mkOption {
|
|
||||||
type = types.functionTo (types.nullOr types.attrs);
|
|
||||||
default = _: null;
|
|
||||||
defaultText = "Lambda :: String -> { ... } | null";
|
|
||||||
description = ''
|
|
||||||
A function that maps from architecture to pkg. `( string -> pkgs )`
|
|
||||||
|
|
||||||
If specified this nixpkgs will be only imported once for each system.
|
|
||||||
This improves performance, but all nipxkgs.* options will be ignored.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Outputs
|
# Outputs
|
||||||
nixosConfigurations = lib.mkOption {
|
nixosConfigurations = lib.mkOption {
|
||||||
# Hide from documentation.
|
# Hide from documentation.
|
||||||
@@ -112,4 +101,5 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ let
|
|||||||
inherit (config)
|
inherit (config)
|
||||||
directory
|
directory
|
||||||
machines
|
machines
|
||||||
pkgsForSystem
|
|
||||||
specialArgs
|
specialArgs
|
||||||
;
|
;
|
||||||
|
|
||||||
@@ -58,7 +57,7 @@ let
|
|||||||
# Settings
|
# Settings
|
||||||
clan.core.clanDir = directory;
|
clan.core.clanDir = directory;
|
||||||
# Inherited from clan wide settings
|
# Inherited from clan wide settings
|
||||||
# TODO: remove these
|
# TODO: remove these`
|
||||||
clan.core.name = config.inventory.meta.name;
|
clan.core.name = config.inventory.meta.name;
|
||||||
clan.core.icon = config.inventory.meta.icon;
|
clan.core.icon = config.inventory.meta.icon;
|
||||||
|
|
||||||
@@ -105,7 +104,11 @@ let
|
|||||||
name: _:
|
name: _:
|
||||||
nixosConfiguration {
|
nixosConfiguration {
|
||||||
inherit name system;
|
inherit name system;
|
||||||
pkgs = pkgsForSystem system;
|
|
||||||
|
# We removed pkgsForSystems because we have the problem that nixpkgs.* options are then ignored
|
||||||
|
# However our current model is to have the hardware config read and then set nixpkgs.hostPlatform automatically
|
||||||
|
# which gets ignored if we set pkgsForSystems
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
}
|
}
|
||||||
) allMachines
|
) allMachines
|
||||||
)
|
)
|
||||||
@@ -122,7 +125,7 @@ let
|
|||||||
args
|
args
|
||||||
// {
|
// {
|
||||||
inherit name system;
|
inherit name system;
|
||||||
pkgs = pkgsForSystem system;
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
) allMachines
|
) allMachines
|
||||||
|
|||||||
Reference in New Issue
Block a user