38 lines
785 B
Nix
38 lines
785 B
Nix
|
{ 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;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
config = mkIf cfg.enable {
|
||
|
environment.systemPackages = [
|
||
|
(pkgs.q.override{
|
||
|
timeZones = cfg.timeZones;
|
||
|
enableIntelBacklight = cfg.enableIntelBacklight;
|
||
|
enableBattery = cfg.enableBattery;
|
||
|
})
|
||
|
];
|
||
|
};
|
||
|
}
|