Last active
August 29, 2015 14:25
-
-
Save 4z3/d1236d3218d8e28aa2d1 to your computer and use it in GitHub Desktop.
NixOS module skeleton
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, lib, pkgs, ... }: | |
with builtins; | |
with lib; | |
let | |
modname = "whatever"; | |
cfg = config.${modname}; | |
out = { | |
options.${modname} = api // { enable = mkEnableOption modname; }; | |
config = mkIf cfg.enable imp; | |
}; | |
api = { | |
# ... | |
}; | |
imp = { | |
# ... | |
}; | |
in out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment