forked from DGNum/infrastructure
feat(hive.nix): Refactor mkNixpkgsConfig
This commit is contained in:
parent
3a325437b8
commit
4fa4d0bc21
1 changed files with 7 additions and 8 deletions
13
hive.nix
13
hive.nix
|
@ -55,13 +55,12 @@ let
|
|||
|
||||
# Build up the arguments to instantiate a nixpkgs given a system and a version.
|
||||
mkNixpkgsConfig =
|
||||
system: version:
|
||||
if system == "nixos" then
|
||||
{ }
|
||||
else if system == "zyxel-nwa50ax" then
|
||||
(mkLiminixConfig system version)
|
||||
else
|
||||
(throw "Unknown system: ${system} for nixpkgs configuration instantiation");
|
||||
system:
|
||||
{
|
||||
nixos = _: { };
|
||||
zyxel-nwa50ax = mkLiminixConfig system;
|
||||
}
|
||||
.${system} or (throw "Unknown system: ${system} for nixpkgs configuration instantiation");
|
||||
|
||||
# Instanciates the required nixpkgs version
|
||||
mkSystemNixpkgs = system: version: import (mkNixpkgs' version) (mkNixpkgsConfig system version);
|
||||
|
|
Loading…
Reference in a new issue