mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 22:11:33 +01:00
Change de.theme type from str to enum
This commit is contained in:
parent
a2bd7dd92f
commit
99bd6dc7c7
1 changed files with 8 additions and 3 deletions
|
|
@ -8,10 +8,15 @@ let
|
||||||
cfg = config.myConfig.de;
|
cfg = config.myConfig.de;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.myConfig.de.theme = lib.mkOption { type = lib.types.str; };
|
options.myConfig.de.theme = lib.mkOption {
|
||||||
|
type = lib.types.enum [
|
||||||
|
"dark"
|
||||||
|
"light"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
(lib.mkIf ((cfg.theme == "dark") || (cfg.theme == "light")) {
|
{
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||||
|
|
@ -30,7 +35,7 @@ in
|
||||||
package = pkgs.bibata-cursors;
|
package = pkgs.bibata-cursors;
|
||||||
size = 24;
|
size = 24;
|
||||||
};
|
};
|
||||||
})
|
}
|
||||||
|
|
||||||
(lib.mkIf (cfg.theme == "dark") {
|
(lib.mkIf (cfg.theme == "dark") {
|
||||||
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
|
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue