{
  config,
  pkgs,
  lib,
  namespace,
  ...
}:
let
  hasDestopEnvironment =
    config.${namespace}.desktop.cosmic.enable
    || config.${namespace}.desktop.gnome.enable
    || config.${namespace}.desktop.hyprland.enable;
in
{
  programs = {
    nix-index-database.comma.enable = true;
    zsh.enable = lib.mkForce true;
    gnupg.agent = {
      enable = lib.mkDefault true;
      enableSSHSupport = lib.mkDefault true;
    };
    nix-index = {
      enable = lib.mkDefault true;
      enableBashIntegration = lib.mkDefault false;
      enableZshIntegration = lib.mkDefault true;
    };

    nix-ld = {
      enable = lib.mkDefault hasDestopEnvironment;
      libraries = with pkgs; [
        alsa-lib
        at-spi2-atk
        atkmm
        bash
        cairo
        cups.lib
        curl
        dbus
        expat
        fontconfig
        freetype
        glib
        gtk3
        icu
        libdrm
        libgbm
        libgcc
        libgdiplus
        libGL
        libpulseaudio
        libsecret
        libssh2
        libunwind
        libuuid
        libva
        libxkbcommon
        mesa
        nss
        openssl
        pango
        pciutils
        SDL2
        util-linux
        vulkan-loader
        xorg.libX11
        xorg.libICE
        xorg.libSM
        xorg.libXcursor
        xorg.libXrandr
        xorg.libXi
        xorg.libXcomposite
        xorg.libXdamage
        xorg.libXext
        xorg.libXfixes
        xorg.libX11
        xorg.libxcb
        zlib
      ];
    };
    seahorse.enable = lib.mkDefault hasDestopEnvironment;
  };
  environment = {
    systemPackages = with pkgs; [
      attic-client
      dislocker
      uutils-coreutils-noprefix
      uutils-diffutils
      uutils-findutils
      coreutils
      nixd
    ];
  };
}
