Skip to content

Instantly share code, notes, and snippets.

@cleverca22
Last active November 24, 2016 10:21
Show Gist options
  • Save cleverca22/b38d3fab623c0288fbdea0d77999cc39 to your computer and use it in GitHub Desktop.
Save cleverca22/b38d3fab623c0288fbdea0d77999cc39 to your computer and use it in GitHub Desktop.
{ pkgs, lib, config, ... }:
with lib;
let
cfg = config.stuff;
in {
options.stuff = {
chromium = mkEnableOption "chromium";
firefox = mkEnableOption "firefox";
flash = mkEnableOption "flash";
};
config = {
environment.systemPackages = (optional cfg.chromium pkgs.chromium) ++ (optional cfg.firefox pkgs.firefox);
nixpkgs.config = {
chromium = {
enablePepperFlash = cfg.flash;
};
firefox = {
enableAdobeFlash = cfg.flash;
};
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment