mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 10:58:02 +00:00
29 lines
747 B
Nix
Executable File
29 lines
747 B
Nix
Executable File
# My browsers are my buddies on surfing the web.
|
|
{ config, options, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let cfg = config.modules.desktop.browsers;
|
|
in {
|
|
options.modules.desktop.browsers = let
|
|
mkBoolDefault = bool:
|
|
mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
};
|
|
in {
|
|
brave.enable = mkBoolDefault false;
|
|
firefox.enable = mkBoolDefault false;
|
|
chromium.enable = mkBoolDefault false;
|
|
nyxt.enable = mkBoolDefault false;
|
|
};
|
|
|
|
config = {
|
|
my.packages = with pkgs;
|
|
(if cfg.brave.enable then [ brave ] else [ ])
|
|
++ (if cfg.firefox.enable then [ firefox-bin ] else [ ])
|
|
++ (if cfg.chromium.enable then [ chromium ] else [ ])
|
|
++ (if cfg.nyxt.enable then [ nyxt ] else [ ]);
|
|
};
|
|
}
|