Skip to content

Instantly share code, notes, and snippets.

@grahamc
Last active February 25, 2018 16:24
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 grahamc/c3d35084fd58b4077b7338f1cb615b6c to your computer and use it in GitHub Desktop.
Save grahamc/c3d35084fd58b4077b7338f1cb615b6c to your computer and use it in GitHub Desktop.
{ config, lib, pkgs, ... }:
let
inherit (lib) mkIf mkOption types;
cfg = config.packet;
plans = {
none = {};
};
in {
options = {
packet = {
class = mkOption {
type = types.enum [ "none" ];
default = "none";
};
};
};
config = plans."${cfg.class}";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment