Hi,
I am trying to import a single module from nixos-unstable
channel to my system configuration (currently on 20.09
).
The following sequence works flawlessly:
nixos-channel --add https://nixos.org/channels/nixos-unstable nixos-unstable
then
{ config, pkgs, ... }:
imports = [
<nixos-unstable/nixos/modules/services/cluster/kubernetes/pki.nix>
];
disabledModules = [ ''services/cluster/kubernetes/pki.nix'' ];
and finally doing nixos-rebuild.
However, I would like to set the unstable channel declaratively:
{ config, pkgs, ... }:
let
unstable = import (
fetchTarball https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz
){ config = { allowUnfree = true; }; };
in
{
imports = [
# TODO: How to import it declaratively (?)
# <nixos-unstable/nixos/modules/services/cluster/kubernetes/pki.nix>
# This won't work
unstable.nixos.modules.services.cluster.kubernetes.pki
];
disabledModules = [ ''services/cluster/kubernetes/pki.nix'' ];
Unfortunately, I am unable to figure out how to import the module from the variable - any help would be very appreciated!