Skip to content

Instantly share code, notes, and snippets.

@4z3
Last active August 29, 2015 14:25
Show Gist options
  • Save 4z3/d1236d3218d8e28aa2d1 to your computer and use it in GitHub Desktop.
Save 4z3/d1236d3218d8e28aa2d1 to your computer and use it in GitHub Desktop.
NixOS module skeleton
{ 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