2019-10-24 02:20:38 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.programs.custom.q;
|
|
|
|
|
|
|
|
in {
|
|
|
|
|
|
|
|
options.programs.custom.q = {
|
|
|
|
enable = mkEnableOption "custom.programs.q";
|
|
|
|
timeZones = mkOption {
|
|
|
|
default = [ "Europe/Berlin" ];
|
|
|
|
type = with types; listOf str;
|
|
|
|
example = [ "Europe/Berlin" "Asia/Kolkata" "Asia/Singapore" ];
|
|
|
|
};
|
|
|
|
enableIntelBacklight = mkOption {
|
|
|
|
default = true;
|
|
|
|
type = with types; bool;
|
|
|
|
};
|
|
|
|
enableBattery = mkOption {
|
|
|
|
default = true;
|
|
|
|
type = with types; bool;
|
|
|
|
};
|
2020-01-01 23:49:44 +01:00
|
|
|
userHighlight = mkOption {
|
|
|
|
default = [ config.users.users.mainUser.name ];
|
|
|
|
type = with types; listOf str;
|
|
|
|
};
|
2019-10-24 02:20:38 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = [
|
2019-12-20 05:54:26 +01:00
|
|
|
(pkgs.q.override {
|
2019-10-24 02:20:38 +02:00
|
|
|
timeZones = cfg.timeZones;
|
|
|
|
enableIntelBacklight = cfg.enableIntelBacklight;
|
|
|
|
enableBattery = cfg.enableBattery;
|
2020-01-01 23:49:44 +01:00
|
|
|
userHighlight = cfg.userHighlight;
|
2019-10-24 02:20:38 +02:00
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|