Skip to content

Instantly share code, notes, and snippets.

@johanot
Created October 3, 2020 08:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johanot/ec2e314e01d54951753b057f75f65f5b to your computer and use it in GitHub Desktop.
Save johanot/ec2e314e01d54951753b057f75f65f5b to your computer and use it in GitHub Desktop.
let
p = builtins.fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-20.09.tar.gz";
common = { pkgs, ... }: {
fileSystems."/" = { device = "/dev/null"; fsType = "ext4"; };
boot.loader.grub.devices = ["/dev/null"];
environment.systemPackages = [pkgs.ngrok];
};
in
{
host1 = { ... }: { # this host will refuse to eval, because ngrok
imports = [ common ];
nixpkgs.pkgs = import p { # overrides "network.pkgs"
config.allowUnfree = false;
};
};
host2 = { ... }: {
imports = [ common ];
};
host3 = { ... }: {
imports = [ common ];
};
network.pkgs = import p {
config.allowUnfree = true;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment