cleverca22
8/18/2016 - 3:22 PM

base.nix

{ ... }:

let
  rawpkgs = import <nixpkgs> { config = {}; };
  repo = rawpkgs.fetchFromGitHub { owner = "foo"; repo = "bar"; rev = "1234"; sha256 = "xxxxx"; };
in {
  imports = [ (repo + "/base.nix") ];
}
{ config, pkgs, lib, ... }:

{
  options = {
    custom.foo.enable = lib.mkOption {
      description = "enable some stuff";
      type = lib.types.bool;
    };
  };
  config = mkIf custom.foo.enabled {
    environment.systemPackages = with pkgs; [ vim ];
  };
}