rofi: make theme option

This commit is contained in:
Andrew Scott 2018-01-29 14:30:25 +00:00
parent 8b77f1db2c
commit 2438eb77ea

View file

@ -225,6 +225,13 @@ in
'';
};
theme = mkOption {
default = null;
type = types.nullOr types.string;
description = "Name of theme to use";
example = "Arc";
};
configPath = mkOption {
default = ".config/rofi/config";
type = types.string;
@ -240,6 +247,7 @@ in
};
config = mkIf cfg.enable {
warnings = optional (cfg.theme != null && cfg.colors != null) "rofi: colors shouldn't be set when using themes";
home.packages = [ pkgs.rofi ];
home.file."${cfg.configPath}".text = ''
@ -260,6 +268,7 @@ in
${setOption "fullscreen" cfg.fullscreen}
${setColorScheme cfg.colors}
${setOption "theme" cfg.theme}
${cfg.extraConfig}
'';