From 2e89e7f369804d032ebeef410a33410145b43833 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Fri, 20 May 2022 15:39:28 +0200 Subject: [PATCH] Configure GTK Add new gtk configuration. Use tmpfiles to provide the generated sources like themes to the system. Also use for desktop files and remove old no longer needed readme entry. --- home.nix | 34 ++++++++++++++++++++++++---------- home/gtk.nix | 36 ++++++++++++++++++++++++++++++++++++ readme.md | 9 --------- 3 files changed, 60 insertions(+), 19 deletions(-) create mode 100644 home/gtk.nix diff --git a/home.nix b/home.nix index 93917a3..527b656 100644 --- a/home.nix +++ b/home.nix @@ -84,6 +84,10 @@ inherit pkgs; }; + gtk = import ./home/gtk.nix { + inherit pkgs; + }; + services = { dunst = import ./home/services/dunst.nix; mailhog.enable = true; @@ -91,20 +95,30 @@ nextcloud-client.enable = true; }; - systemd = { + systemd.user = { - # Temporary fix to OpenGL issue by using GLX. - # Start nextcloud without GLX support which is fine for me for noe. - # I don't have a better way for now, then using `pkgs.lib.mkForce` and setting whole value (repeating from modules/services/nextcloud-client.nix). - user.services.nextcloud-client.Service.Environment = pkgs.lib.mkForce [ - "PATH=${config.home.profileDirectory}/bin" - "QT_XCB_GL_INTEGRATION=none" - ]; + services = { + + # Temporary fix to OpenGL issue by using GLX. + # Start nextcloud without GLX support which is fine for me for noe. + # I don't have a better way for now, then using `pkgs.lib.mkForce` and setting whole value (repeating from modules/services/nextcloud-client.nix). + nextcloud-client.Service.Environment = pkgs.lib.mkForce [ + "PATH=${config.home.profileDirectory}/bin" + "QT_XCB_GL_INTEGRATION=none" + ]; + + batteryicon = import ./home/services/batteryicon.nix { + inherit pkgs; + }; - user.services.batteryicon = import ./home/services/batteryicon.nix { - inherit pkgs; }; + tmpfiles.rules = [ + "L ${config.home.homeDirectory}/.themes - - - - ${config.home.homeDirectory}/.nix-profile/share/themes" + "L ${config.home.homeDirectory}/.icons - - - - ${config.home.homeDirectory}/.nix-profile/share/icons" + "L ${config.home.homeDirectory}/.local/share/applications - - - - ${config.home.homeDirectory}/.nix-profile/share/applications" + ]; + }; } diff --git a/home/gtk.nix b/home/gtk.nix new file mode 100644 index 0000000..1171725 --- /dev/null +++ b/home/gtk.nix @@ -0,0 +1,36 @@ +{ pkgs }: + +{ + enable = true; + + theme = { + package = pkgs.qogir-theme; + name = "Qogir-Ubuntu-Dark"; + }; + + iconTheme = { + package = pkgs.qogir-icon-theme; + name = "Qogir-ubuntu-dark"; + }; + + cursorTheme = { + package = pkgs.qogir-icon-theme; + name = "Qogir-ubuntu-dark"; + size = 16; + }; + + font = { + package = pkgs.roboto-mono; + name = "Roboto Mono"; + size = 14; + }; + + gtk3.extraConfig = { + gtk-application-prefer-dark-theme = 1; + }; + + gtk4.extraConfig = { + gtk-application-prefer-dark-theme = 1; + }; + +} diff --git a/readme.md b/readme.md index bc6b265..9f65cd2 100644 --- a/readme.md +++ b/readme.md @@ -75,15 +75,6 @@ Manual changes List of manual needed changes for various reasons. -* .desktop files seem not to be supported by home-manager yet. - They need to manually be linked, e.g.: - - cd ~/.local/share/applications && ln -s ~/.nix-profile/share/applications/* . - - Or link whole folder: - - cd ~/.local/share && ln -s ~/.nix-profile/share/applications - * Allow gdm3 to use xsessions as login. Add the following content as `/usr/share/xsessions/xsession.desktop`: