1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-26 21:19:45 +01:00

qt: add module

This commit is contained in:
Robert Helgesson 2018-05-17 19:39:26 +02:00
parent bbcef2fd33
commit b6da6569c4
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
3 changed files with 50 additions and 0 deletions

View file

@ -647,6 +647,16 @@ in
A new module is available: 'services.flameshot'.
'';
}
{
time = "2018-05-18T18:34:15+00:00";
message = ''
A new module is available: 'qt'
At the moment this module allows you to set up Qt to use the
GTK+ theme, and not much else.
'';
}
];
};
}

39
modules/misc/qt.nix Normal file
View file

@ -0,0 +1,39 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.qt;
dag = config.lib.dag;
in
{
meta.maintainers = [ maintainers.rycee ];
options = {
qt = {
enable = mkEnableOption "Qt 4 and 5 configuration";
useGtkTheme = mkOption {
type = types.bool;
default = false;
description = ''
Whether Qt 4 and 5 should be set up to use the GTK theme
settings.
'';
};
};
};
config = mkIf (cfg.enable && cfg.useGtkTheme) {
home.sessionVariables.QT_QPA_PLATFORMTHEME = "gtk2";
home.packages = [ pkgs.libsForQt5.qtstyleplugins ];
home.activation.useGtkThemeInQt4 = dag.entryAfter ["writeBoundary"] ''
$DRY_RUN_CMD ${pkgs.crudini}/bin/crudini $VERBOSE_ARG \
--set $HOME/.config/Trolltech.conf Qt style GTK+
'';
};
}

View file

@ -21,6 +21,7 @@ let
./misc/news.nix
./misc/nixpkgs.nix
./misc/pam.nix
./misc/qt.nix
./misc/xdg.nix
./programs/autorandr.nix
./programs/bash.nix