glib-schemas-fix: module init

sh-initrd-on-root
Zynh Ludwig 2024-09-20 11:58:48 -07:00
parent a87f8feb1a
commit df2abeac3e
1 changed files with 25 additions and 0 deletions

View File

@ -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";
};
};
}