From df2abeac3e38103b4e80d116f5e8bb5c31fae2f5 Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Fri, 20 Sep 2024 11:58:48 -0700 Subject: [PATCH] glib-schemas-fix: module init --- modules/glib-schemas-fix.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 modules/glib-schemas-fix.nix diff --git a/modules/glib-schemas-fix.nix b/modules/glib-schemas-fix.nix new file mode 100644 index 0000000..5249ea6 --- /dev/null +++ b/modules/glib-schemas-fix.nix @@ -0,0 +1,25 @@ +# Yoink https://github.com/thomX75/nixos-modules/blob/56fd73011f022e7c85bd7a40812663c5933106f9/Glib-Schemas-Fix/glib-schemas-fix.nix + +# Glib Schemas Fix +# https://github.com/thomX75/nixos-modules + +{ config, pkgs, lib, ... }: + +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.snowhawk.glib-schemas-fix; +in +{ + options.snowhawk.glib-schemas-fix = { + enable = mkEnableOption "glib-schemas-fix nixos module"; + }; + + config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [ gtk3 ]; + + environment.variables = { + GSETTINGS_SCHEMA_DIR = "${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}/glib-2.0/schemas"; + }; + }; +}