From 4da5e381b2ec303a07d893f7b270a4d7e26d9756 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Thu, 28 Apr 2022 23:04:48 -0400 Subject: [PATCH] move gtk theme to firefox --- flake.nix | 3 ++- modules/applications/firefox.nix | 11 +++++++++-- modules/desktop/xorg.nix | 11 +---------- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/flake.nix b/flake.nix index 0910ab2..5ecb3d8 100644 --- a/flake.nix +++ b/flake.nix @@ -28,6 +28,7 @@ name = "Victor Mono"; }; hostname = "nixos"; + gtkTheme = "Adwaita-dark"; in { nixosConfigurations = { @@ -35,7 +36,7 @@ inherit system; specialArgs = { gui = true; - inherit user fullName font hostname; + inherit user fullName font hostname gtkTheme; }; modules = [ home-manager.nixosModules.home-manager diff --git a/modules/applications/firefox.nix b/modules/applications/firefox.nix index e5a606e..aed05aa 100644 --- a/modules/applications/firefox.nix +++ b/modules/applications/firefox.nix @@ -1,12 +1,19 @@ -{ pkgs, lib, user, gui, ... }: +{ pkgs, lib, user, gui, gtkTheme, ... }: { config = lib.mkIf gui { - home-manager.users.${user}.home.packages = [ pkgs.firefox ]; + home-manager.users.${user} = { + home.packages = [ pkgs.firefox ]; + gtk = { + enable = true; + theme = { name = gtkTheme; }; + }; + }; # Required for setting GTK theme (for preferred-color-scheme in browser) services.dbus.packages = [ pkgs.dconf ]; programs.dconf.enable = true; + }; } diff --git a/modules/desktop/xorg.nix b/modules/desktop/xorg.nix index 0a49b86..62f0843 100644 --- a/modules/desktop/xorg.nix +++ b/modules/desktop/xorg.nix @@ -1,8 +1,4 @@ -{ pkgs, user, gui, ... }: - -let gtkTheme = "Adwaita-dark"; - -in { +{ pkgs, user, gui, gtkTheme, ... }: { # Enable the X11 windowing system. services.xserver = { @@ -29,10 +25,5 @@ in { xclip # Clipboard ]; - home-manager.users.${user}.gtk = { - enable = true; - theme = { name = gtkTheme; }; - }; - }