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

dconf: format file

This commit is contained in:
Robert Helgesson 2020-12-21 23:22:22 +01:00
parent 2b1892e646
commit 8b3fca4ec5
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
2 changed files with 19 additions and 27 deletions

2
format
View file

@ -26,7 +26,6 @@ find . -name '*.nix' \
! -path ./modules/lib/default.nix \
! -path ./modules/lib/file-type.nix \
! -path ./modules/manual.nix \
! -path ./modules/misc/dconf.nix \
! -path ./modules/misc/news.nix \
! -path ./modules/misc/nixpkgs.nix \
! -path ./modules/misc/xdg.nix \
@ -51,7 +50,6 @@ find . -name '*.nix' \
! -path ./tests/modules/home-environment/default.nix \
! -path ./tests/modules/home-environment/session-variables.nix \
! -path ./tests/modules/programs/gpg/override-defaults.nix \
! -path ./tests/modules/programs/tmux/default.nix \
! -path ./tests/modules/programs/zsh/session-variables.nix \
! -path ./tests/modules/services/sxhkd/service.nix \
! -path ./tests/modules/systemd/services.nix \

View file

@ -8,12 +8,9 @@ let
toDconfIni = generators.toINI { mkKeyValue = mkIniKeyValue; };
mkIniKeyValue = key: value:
"${key}=${toString (hm.gvariant.mkValue value)}";
mkIniKeyValue = key: value: "${key}=${toString (hm.gvariant.mkValue value)}";
in
{
in {
meta.maintainers = [ maintainers.gnidorah maintainers.rycee ];
options = {
@ -49,11 +46,9 @@ in
};
config = mkIf (cfg.enable && cfg.settings != { }) {
home.activation.dconfSettings = hm.dag.entryAfter ["installPackages"] (
let
iniFile = pkgs.writeText "hm-dconf.ini" (toDconfIni cfg.settings);
in
''
home.activation.dconfSettings = hm.dag.entryAfter [ "installPackages" ]
(let iniFile = pkgs.writeText "hm-dconf.ini" (toDconfIni cfg.settings);
in ''
if [[ -v DBUS_SESSION_BUS_ADDRESS ]]; then
DCONF_DBUS_RUN_SESSION=""
else
@ -67,7 +62,6 @@ in
fi
unset DCONF_DBUS_RUN_SESSION
''
);
'');
};
}