2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-09-25 04:45:31 +00:00
|
|
|
, runCommand
|
|
|
|
, nixos-artwork
|
|
|
|
, glib
|
|
|
|
, gtk3
|
|
|
|
, gsettings-desktop-schemas
|
|
|
|
, extraGSettingsOverrides ? ""
|
2021-12-06 16:07:01 +00:00
|
|
|
, extraGSettingsOverridePackages ? [ ]
|
2020-09-25 04:45:31 +00:00
|
|
|
, mint-artwork
|
|
|
|
|
|
|
|
, muffin
|
|
|
|
, nemo
|
2022-08-12 12:06:08 +00:00
|
|
|
, xapp
|
2020-09-25 04:45:31 +00:00
|
|
|
, cinnamon-desktop
|
|
|
|
, cinnamon-session
|
|
|
|
, cinnamon-settings-daemon
|
|
|
|
, cinnamon-common
|
2021-06-28 23:13:55 +00:00
|
|
|
, bulky
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
gsettingsOverridePackages = [
|
|
|
|
# from
|
|
|
|
mint-artwork
|
|
|
|
|
|
|
|
# on
|
2021-06-28 23:13:55 +00:00
|
|
|
bulky
|
2020-09-25 04:45:31 +00:00
|
|
|
muffin
|
|
|
|
nemo
|
2022-08-12 12:06:08 +00:00
|
|
|
xapp
|
2020-09-25 04:45:31 +00:00
|
|
|
cinnamon-desktop
|
|
|
|
cinnamon-session
|
|
|
|
cinnamon-settings-daemon
|
|
|
|
cinnamon-common
|
|
|
|
gtk3
|
|
|
|
] ++ extraGSettingsOverridePackages;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
2021-01-17 00:15:33 +00:00
|
|
|
with lib;
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
# TODO: Having https://github.com/NixOS/nixpkgs/issues/54150 would supersede this
|
2021-12-06 16:07:01 +00:00
|
|
|
runCommand "cinnamon-gsettings-overrides" { }
|
2020-09-25 04:45:31 +00:00
|
|
|
''
|
2021-12-06 16:07:01 +00:00
|
|
|
schema_dir=$out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
mkdir -p $schema_dir
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
${concatMapStrings (pkg: "cp -rf ${glib.getSchemaPath pkg}/*.xml ${glib.getSchemaPath pkg}/*.gschema.override $schema_dir\n") gsettingsOverridePackages}
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
chmod -R a+w $out/share/gsettings-schemas/nixos-gsettings-overrides
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
cat - > $schema_dir/nixos-defaults.gschema.override <<- EOF
|
|
|
|
${extraGSettingsOverrides}
|
|
|
|
EOF
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
${glib.dev}/bin/glib-compile-schemas $schema_dir
|
2020-09-25 04:45:31 +00:00
|
|
|
''
|