main
1{den, ...}: {
2 den.aspects.desktop.aesthetic.gtk.includes = [den.aspects.desktop.aesthetic.gtk.dconf];
3 den.aspects.desktop.aesthetic.gtk.dconf = {
4 nixos = {
5 programs.dconf.enable = true;
6 };
7
8 provides.to-users = {
9 hjem = {
10 pkgs,
11 lib,
12 config,
13 ...
14 }: {
15 options.dconf.settings = lib.mkOption {
16 type = lib.types.attrsOf (lib.types.attrsOf lib.types.anything);
17 default = {};
18 };
19
20 config = lib.mkIf (config.dconf.settings != {}) {
21 xdg.config.files."dconf/user" = {
22 source =
23 pkgs.runCommand "dconf-user-db" {
24 nativeBuildInputs = [(lib.getBin pkgs.dconf)];
25 } ''
26 dconf compile $out ${
27 pkgs.writeTextDir "dconf-keyfiles" (lib.generators.toDconfINI config.dconf.settings)
28 }
29 '';
30 type = "copy";
31 clobber = true;
32 };
33 };
34 };
35 };
36 };
37}