6e802e5d75
-> No longer install graphical packages if the xserver is disabled. -> avoid duplication of "mkIf config.services.xserver.enable". svn path=/nixos/branches/modular-nixos/; revision=16044
48 lines
810 B
Nix
48 lines
810 B
Nix
{pkgs, config, ...}:
|
|
|
|
let
|
|
inherit (pkgs.lib) mkOption mkIf;
|
|
cfg = config.services.xserver.desktopManager.gnome;
|
|
gnome = pkgs.gnome;
|
|
|
|
options = { services = { xserver = { desktopManager = {
|
|
|
|
gnome = {
|
|
enable = mkOption {
|
|
default = false;
|
|
example = true;
|
|
description = "Enable a gnome terminal as a desktop manager.";
|
|
};
|
|
};
|
|
|
|
}; }; }; };
|
|
in
|
|
|
|
mkIf cfg.enable {
|
|
require = options;
|
|
|
|
services = {
|
|
xserver = {
|
|
|
|
desktopManager = {
|
|
session = [{
|
|
name = "gnome";
|
|
start = ''
|
|
${gnome.gnometerminal}/bin/gnome-terminal -ls &
|
|
waitPID=$!
|
|
'';
|
|
}];
|
|
};
|
|
|
|
};
|
|
};
|
|
|
|
environment = {
|
|
x11Packages = [
|
|
gnome.gnometerminal
|
|
gnome.GConf
|
|
gnome.gconfeditor
|
|
];
|
|
};
|
|
}
|