55 lines
2.1 KiB
Nix
55 lines
2.1 KiB
Nix
|
{ config, lib, pkgs, ... }:
|
||
|
|
||
|
with lib;
|
||
|
|
||
|
let
|
||
|
addToXDGDirs = p: ''
|
||
|
if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then
|
||
|
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name}
|
||
|
fi
|
||
|
if [ -d "${p}/lib/girepository-1.0" ]; then
|
||
|
export GI_TYPELIB_PATH=$GI_TYPELIB_PATH''${GI_TYPELIB_PATH:+:}${p}/lib/girepository-1.0
|
||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
|
||
|
fi
|
||
|
'';
|
||
|
in {
|
||
|
environment.systemPackages = with pkgs; [
|
||
|
orca
|
||
|
glib.bin
|
||
|
];
|
||
|
services.gnome3.at-spi2-core.enable = true;
|
||
|
services.xserver = {
|
||
|
desktopManager.mate.enable = true;
|
||
|
displayManager = {
|
||
|
gdm = {
|
||
|
enable = true;
|
||
|
autoSuspend = false;
|
||
|
autoLogin = {
|
||
|
enable = true;
|
||
|
user = "nixos";
|
||
|
};
|
||
|
};
|
||
|
sessionCommands = ''
|
||
|
if test "$XDG_CURRENT_DESKTOP" = "MATE"; then
|
||
|
export XDG_MENU_PREFIX=mate-
|
||
|
# Let caja find extensions
|
||
|
export CAJA_EXTENSION_DIRS=$CAJA_EXTENSION_DIRS''${CAJA_EXTENSION_DIRS:+:}${config.system.path}/lib/caja/extensions-2.0
|
||
|
# Let caja extensions find gsettings schemas
|
||
|
${concatMapStrings (p: ''
|
||
|
if [ -d "${p}/lib/caja/extensions-2.0" ]; then
|
||
|
${addToXDGDirs p}
|
||
|
fi
|
||
|
'') config.environment.systemPackages}
|
||
|
# Add mate-control-center paths to some XDG variables because its schemas are needed by mate-settings-daemon, and mate-settings-daemon is a dependency for mate-control-center (that is, they are mutually recursive)
|
||
|
${addToXDGDirs pkgs.mate.mate-control-center}
|
||
|
# Auto start orca screen-reader
|
||
|
GSETTINGS_BACKEND=dconf ${pkgs.glib.bin}/bin/gsettings set org.gnome.desktop.a11y.applications screen-reader-enabled true
|
||
|
GSETTINGS_BACKEND=dconf ${pkgs.glib.bin}/bin/gsettings set org.mate.interface accessibility true
|
||
|
GSETTINGS_BACKEND=dconf ${pkgs.glib.bin}/bin/gsettings set org.mate.applications-at-visual startup true
|
||
|
export GTK_MODULES=gail:atk-bridge
|
||
|
fi
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
}
|