stravaweblib: use nix-update-script (#358503)
[NixPkgs.git] / pkgs / by-name / bu / budgie-gsettings-overrides / package.nix
blob02bd605ee3cfba56b000c8c6e596290990f3a079
2   lib,
3   runCommand,
4   budgie-desktop,
5   budgie-desktop-view,
6   glib,
7   gsettings-desktop-schemas,
8   mutter,
9   nixos-artwork,
10   nixos-background-light ? nixos-artwork.wallpapers.nineish,
11   nixos-background-dark ? nixos-artwork.wallpapers.nineish-dark-gray,
12   extraGSettingsOverrides ? "",
13   extraGSettingsOverridePackages ? [ ],
16 let
17   inherit (lib) concatMapStringsSep;
19   gsettingsOverrides = ''
20     [org.gnome.desktop.background:Budgie]
21     picture-uri="file://${nixos-background-light.gnomeFilePath}"
22     picture-uri-dark="file://${nixos-background-dark.gnomeFilePath}"
24     [org.gnome.desktop.screensaver:Budgie]
25     picture-uri="file://${nixos-background-dark.gnomeFilePath}"
27     [org.gnome.desktop.interface:Budgie]
28     gtk-theme="Qogir"
29     icon-theme="Qogir"
30     cursor-theme="Qogir"
31     font-name="Noto Sans 10"
32     document-font-name="Noto Sans 10"
33     monospace-font-name="Hack 10"
35     [org.gnome.desktop.wm.preferences:Budgie]
36     titlebar-font="Noto Sans Bold 10"
38     [org.gnome.mutter:Budgie]
39     edge-tiling=true
41     [com.solus-project.budgie-menu:Budgie]
42     use-default-menu-icon=true
44     [com.solus-project.budgie-panel:Budgie]
45     dark-theme=false
46     builtin-theme=false
48     [com.solus-project.icon-tasklist:Budgie]
49     pinned-launchers=["nemo.desktop", "firefox.desktop", "vlc.desktop"]
51     [org.buddiesofbudgie.budgie-desktop-view:Budgie]
52     show=true
53     show-active-mounts=true
55     ${extraGSettingsOverrides}
56   '';
58   gsettingsOverridePackages = [
59     budgie-desktop
60     budgie-desktop-view
61     gsettings-desktop-schemas
62     mutter
63   ] ++ extraGSettingsOverridePackages;
66 runCommand "budgie-gsettings-overrides" { preferLocalBuild = true; } ''
67   data_dir="$out/share/gsettings-schemas/nixos-gsettings-overrides"
68   schema_dir="$data_dir/glib-2.0/schemas"
69   mkdir -p "$schema_dir"
71   ${concatMapStringsSep "\n" (
72     pkg:
73     "cp -rf \"${glib.getSchemaPath pkg}\"/*.xml \"${glib.getSchemaPath pkg}\"/*.gschema.override \"$schema_dir\""
74   ) gsettingsOverridePackages}
76   chmod -R a+w "$data_dir"
77   cat - > "$schema_dir/zz-nixos-defaults.gschema.override" <<- EOF
78   ${gsettingsOverrides}
79   EOF
81   ${glib.dev}/bin/glib-compile-schemas --strict "$schema_dir"