From 2b282ab8424fb383d31f64f8c8f24987b3f9fc23 Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Fri, 13 Sep 2024 16:52:42 -0700 Subject: [PATCH] nixos: nix-ld module init --- hosts/snowhawk/configuration.nix | 5 ---- modules/nix-ld.nix | 42 ++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 modules/nix-ld.nix diff --git a/hosts/snowhawk/configuration.nix b/hosts/snowhawk/configuration.nix index 9ff09af..6622d34 100644 --- a/hosts/snowhawk/configuration.nix +++ b/hosts/snowhawk/configuration.nix @@ -36,11 +36,6 @@ services.envfs.enable = true; - programs.nix-ld.enable = true; - # programs.nix-ld.libraries = with pkgs; [ - # - # ]; - # users sops setup sops.secrets."passwords/ravenshade".neededForUsers = true; users.mutableUsers = false; diff --git a/modules/nix-ld.nix b/modules/nix-ld.nix new file mode 100644 index 0000000..3ba1da2 --- /dev/null +++ b/modules/nix-ld.nix @@ -0,0 +1,42 @@ +{ config, lib, pkgs, ... }: + +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.snowhawk.nix-ld; +in +{ + options.snowhawk.nix-ld = { + enable = mkEnableOption "nix-ld nixos module"; + }; + + config = mkIf cfg.enable { + programs.nix-ld.enable = true; + programs.nix-ld.libraries = with pkgs; [ + glib + nss + nspr + atk + cups + dbus + libdrm + gtk3 + pango + cairo + gdk-pixbuf + mesa + expat + alsa-lib + + libxkbcommon + + xorg.libX11 + xorg.libXcomposite + xorg.libXdamage + xorg.libXext + xorg.libXfixes + xorg.libXrandr + xorg.libxcb + ]; + }; +}