From a8c51c376c6d74b4ae22e48843c14b690bbc7c0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 16 Apr 2023 17:53:50 +0200 Subject: [PATCH] feat: add chromium module --- modules/programs/chromium.nix | 26 ++++++++++++++++++++++++++ modules/programs/default.nix | 1 + 2 files changed, 27 insertions(+) create mode 100644 modules/programs/chromium.nix diff --git a/modules/programs/chromium.nix b/modules/programs/chromium.nix new file mode 100644 index 0000000..3533ecb --- /dev/null +++ b/modules/programs/chromium.nix @@ -0,0 +1,26 @@ +{ config +, lib +, pkgs +, ... +}: + +with lib; +let + cfg = config.my.programs.chromium; +in +{ + options.my.programs.chromium = { + enable = mkEnableOption "chromium"; + package = mkOption { + type = types.package; + default = pkgs.stable.chromium; + defaultText = "pkgs.chromium"; + description = "Chromium package to install."; + }; + }; + + config = mkIf cfg.enable { + programs.chromium.enable = true; + environment.systemPackages = [ cfg.package ]; + }; +} diff --git a/modules/programs/default.nix b/modules/programs/default.nix index 337d90c..703dcba 100644 --- a/modules/programs/default.nix +++ b/modules/programs/default.nix @@ -2,6 +2,7 @@ imports = [ ./adb.nix ./bspwm + ./chromium.nix ./code.nix ./direnv.nix ./firefox.nix