Allow to specify the used nixpkgs for every host

This commit is contained in:
Andrea Ciceri 2023-12-16 16:52:05 +01:00
parent 359943bb4b
commit c7a0a57352
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg

View file

@ -26,6 +26,11 @@ in {
type = lib.types.str;
default = "x86_64-linux";
};
nixpkgs = lib.mkOption {
description = "Used nixpkgs";
type = lib.types.anything;
default = inputs.nixpkgsUnstable;
};
vpn = {
ip = lib.mkOption {
description = "Wireguard VPN ip";
@ -120,7 +125,7 @@ in {
type = lib.types.functionTo (lib.types.functionTo lib.types.attrs); # TODO improve this type
internal = true;
default = hostname: config:
inputs.nixpkgsUnstable.lib.nixosSystem {
config.nixpkgs.lib.nixosSystem {
inherit (config) system;
modules =
[