From 307ae1bac9a52d4c56e3651fa9b51fb73902f92e Mon Sep 17 00:00:00 2001 From: Jacob Bachmann Date: Sun, 21 Jan 2024 01:07:07 +0100 Subject: [PATCH] feat(gtk): prefer dark mode --- users/gandalf/modules/dconf.nix | 7 +++++-- users/gandalf/modules/gui/default.nix | 1 + users/gandalf/modules/gui/gtk.nix | 13 +++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 users/gandalf/modules/gui/gtk.nix diff --git a/users/gandalf/modules/dconf.nix b/users/gandalf/modules/dconf.nix index 742c36f..f052f87 100644 --- a/users/gandalf/modules/dconf.nix +++ b/users/gandalf/modules/dconf.nix @@ -1,10 +1,13 @@ { lib, nixosConfig, ... }: { - dconf.settings = lib.mkIf nixosConfig.bchmnn.virtualisation.enable { - "org/virt-manager/virt-manager/connections" = { + dconf.settings = { + "org/virt-manager/virt-manager/connections" = lib.mkIf nixosConfig.bchmnn.virtualisation.enable { autoconnect = [ "qemu:///system" ]; uris = [ "qemu:///system" ]; }; + "org/gnome/desktop/interface" = { + "color-scheme" = "prefer-dark"; + }; }; } diff --git a/users/gandalf/modules/gui/default.nix b/users/gandalf/modules/gui/default.nix index fb03162..085120d 100644 --- a/users/gandalf/modules/gui/default.nix +++ b/users/gandalf/modules/gui/default.nix @@ -2,6 +2,7 @@ imports = with lib; with nixosConfig.bchmnn; optionals gui.enable [ + ./gtk.nix ./programs ] ++ optionals (gui.enable && elem "sway" gui.flavour) [ ./sway diff --git a/users/gandalf/modules/gui/gtk.nix b/users/gandalf/modules/gui/gtk.nix new file mode 100644 index 0000000..7edf22d --- /dev/null +++ b/users/gandalf/modules/gui/gtk.nix @@ -0,0 +1,13 @@ +{ ... }: { + + gtk = { + enable = true; + gtk3.extraConfig = { + gtk-application-prefer-dark-theme = 1; + }; + gtk4.extraConfig = { + gtk-application-prefer-dark-theme = 1; + }; + }; + +}