{ pkgs, config, lib, ... }: with lib; let cfg = config.erwin.applications; in { options.erwin.applications = { enable = mkEnableOption { description = "Enable a set of common applications"; }; work = mkOption { description = "Is this a work config?"; type = types.bool; default = false; }; }; config = mkIf (cfg.enable) { home.sessionVariables = { EDITOR = "vim"; }; home.packages = with pkgs; [ neovim (nerdfonts.override { fonts = [ "CascadiaCode" "FantasqueSansMono" "FiraCode" "JetBrainsMono" "Meslo" "Noto" "SourceCodePro" ]; }) ]; fonts.fontconfig.enable = true; xdg = { enable = true; }; programs = { alacritty = import ./alacritty.nix; firefox = import ./firefox.nix { work = cfg.work; }; }; }; }