2014-02-07 00:37:17 +01:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
with pkgs.lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.services.xserver.desktopManager.gnome3;
|
|
|
|
gnome3 = pkgs.gnome3;
|
|
|
|
in {
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
services.xserver.desktopManager.gnome3.enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
example = true;
|
|
|
|
description = "Enable Gnome 3 desktop manager.";
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
|
|
|
# Enable helpful DBus services.
|
|
|
|
security.polkit.enable = true;
|
|
|
|
services.udisks2.enable = true;
|
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
services.upower.enable = config.powerManagement.enable;
|
|
|
|
|
|
|
|
fonts.extraFonts = [ pkgs.dejavu_fonts ];
|
|
|
|
|
|
|
|
services.xserver.desktopManager.session = singleton
|
|
|
|
{ name = "gnome3";
|
|
|
|
start = ''
|
|
|
|
# Set GTK_DATA_PREFIX so that GTK+ can find the themes
|
|
|
|
export GTK_DATA_PREFIX=${config.system.path}
|
|
|
|
|
|
|
|
# find theme engines
|
|
|
|
export GTK_PATH=${config.system.path}/lib/gtk-3.0:{config.system.path}/lib/gtk-2.0
|
|
|
|
|
|
|
|
export XDG_MENU_PREFIX=gnome
|
|
|
|
|
|
|
|
${gnome3.gnome_session}/bin/gnome-session&
|
|
|
|
waitPID=$!
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages =
|
|
|
|
[ gnome3.evince
|
|
|
|
gnome3.eog
|
2014-02-16 21:37:18 +01:00
|
|
|
gnome3.dconf
|
2014-02-07 00:37:17 +01:00
|
|
|
pkgs.ibus
|
|
|
|
gnome3.gnome_shell
|
|
|
|
gnome3.gnome_settings_daemon
|
|
|
|
gnome3.gnome_terminal
|
|
|
|
gnome3.gnome_icon_theme
|
|
|
|
gnome3.gnome_themes_standard
|
2014-02-08 12:30:10 +01:00
|
|
|
gnome3.gnome_control_center
|
2014-02-07 00:37:17 +01:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2014-02-16 21:37:18 +01:00
|
|
|
environment.variables.GIO_EXTRA_MODULES = "${gnome3.dconf}/lib/gio/modules";
|
|
|
|
|
2014-02-07 00:37:17 +01:00
|
|
|
}
|