2009-06-11 09:51:27 +00:00
|
|
|
# This module defines a NixOS installation CD that contains X11 and
|
|
|
|
# KDE 4.
|
|
|
|
|
2014-04-14 14:26:48 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
2009-06-11 09:51:27 +00:00
|
|
|
|
2014-04-14 14:26:48 +00:00
|
|
|
with lib;
|
2011-11-08 19:02:51 +00:00
|
|
|
|
2009-06-11 09:51:27 +00:00
|
|
|
{
|
2013-09-04 11:05:09 +00:00
|
|
|
imports = [ ./installation-cd-base.nix ../../profiles/graphical.nix ];
|
2011-01-21 13:38:30 +00:00
|
|
|
|
2011-02-23 19:11:32 +00:00
|
|
|
# Provide wicd for easy wireless configuration.
|
2012-04-10 13:09:56 +00:00
|
|
|
#networking.wicd.enable = true;
|
2011-10-31 21:08:22 +00:00
|
|
|
|
2015-06-04 08:33:52 +00:00
|
|
|
environment.systemPackages =
|
|
|
|
[ # Include gparted for partitioning disks.
|
|
|
|
pkgs.gparted
|
|
|
|
|
|
|
|
# Include some editors.
|
|
|
|
pkgs.vim
|
|
|
|
pkgs.bvi # binary editor
|
|
|
|
pkgs.joe
|
|
|
|
];
|
|
|
|
|
2014-10-23 11:23:40 +00:00
|
|
|
# Provide networkmanager for easy wireless configuration.
|
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
networking.wireless.enable = mkForce false;
|
|
|
|
|
2011-10-31 21:08:22 +00:00
|
|
|
# KDE complains if power management is disabled (to be precise, if
|
|
|
|
# there is no power management backend such as upower).
|
|
|
|
powerManagement.enable = true;
|
2011-11-08 16:17:37 +00:00
|
|
|
|
|
|
|
# Don't start the X server by default.
|
|
|
|
services.xserver.autorun = mkForce false;
|
2011-11-08 19:02:51 +00:00
|
|
|
|
|
|
|
# Auto-login as root.
|
|
|
|
services.xserver.displayManager.kdm.extraConfig =
|
|
|
|
''
|
|
|
|
[X-*-Core]
|
|
|
|
AllowRootLogin=true
|
|
|
|
AutoLoginEnable=true
|
|
|
|
AutoLoginUser=root
|
|
|
|
AutoLoginPass=""
|
|
|
|
'';
|
2014-10-23 16:14:41 +00:00
|
|
|
|
|
|
|
# Custom kde-workspace adding some icons on the desktop
|
|
|
|
|
|
|
|
system.activationScripts.installerDesktop = let
|
|
|
|
openManual = pkgs.writeScript "nixos-manual.sh" ''
|
|
|
|
#!${pkgs.stdenv.shell}
|
|
|
|
cd ${config.system.build.manual.manual}/share/doc/nixos/
|
|
|
|
konqueror ./index.html
|
|
|
|
'';
|
|
|
|
|
|
|
|
desktopFile = pkgs.writeText "nixos-manual.desktop" ''
|
|
|
|
[Desktop Entry]
|
|
|
|
Version=1.0
|
|
|
|
Type=Application
|
|
|
|
Name=NixOS Manual
|
|
|
|
Exec=${openManual}
|
|
|
|
Icon=konqueror
|
|
|
|
'';
|
|
|
|
|
|
|
|
in ''
|
|
|
|
mkdir -p /root/Desktop
|
|
|
|
ln -sfT ${desktopFile} /root/Desktop/nixos-manual.desktop
|
|
|
|
ln -sfT ${pkgs.kde4.konsole}/share/applications/kde4/konsole.desktop /root/Desktop/konsole.desktop
|
|
|
|
ln -sfT ${pkgs.gparted}/share/applications/gparted.desktop /root/Desktop/gparted.desktop
|
|
|
|
'';
|
|
|
|
|
|
|
|
services.xserver.desktopManager.kde4.kdeWorkspacePackage = let
|
|
|
|
pkg = pkgs.kde4.kde_workspace;
|
|
|
|
|
|
|
|
plasmaInit = pkgs.writeText "00-defaultLayout.js" ''
|
|
|
|
loadTemplate("org.kde.plasma-desktop.defaultPanel")
|
|
|
|
|
|
|
|
for (var i = 0; i < screenCount; ++i) {
|
2015-06-04 08:33:52 +00:00
|
|
|
var desktop = new Activity
|
2014-10-23 16:14:41 +00:00
|
|
|
desktop.name = i18n("Desktop")
|
|
|
|
desktop.screen = i
|
|
|
|
desktop.wallpaperPlugin = 'image'
|
|
|
|
desktop.wallpaperMode = 'SingleImage'
|
|
|
|
|
|
|
|
var folderview = desktop.addWidget("folderview");
|
|
|
|
folderview.writeConfig("url", "desktop:/");
|
2015-06-04 08:33:52 +00:00
|
|
|
|
2014-10-23 16:14:41 +00:00
|
|
|
//Create more panels for other screens
|
|
|
|
if (i > 0){
|
|
|
|
var panel = new Panel
|
|
|
|
panel.screen = i
|
|
|
|
panel.location = 'bottom'
|
|
|
|
panel.height = screenGeometry(i).height > 1024 ? 35 : 27
|
|
|
|
var tasks = panel.addWidget("tasks")
|
|
|
|
tasks.writeConfig("showOnlyCurrentScreen", true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
|
|
|
|
in
|
2016-09-27 13:26:37 +00:00
|
|
|
pkgs.runCommand pkg.name
|
|
|
|
{ inherit (pkg) meta; }
|
|
|
|
''
|
2014-10-23 16:14:41 +00:00
|
|
|
mkdir -p $out
|
|
|
|
cp -prf ${pkg}/* $out/
|
|
|
|
chmod a+w $out/share/apps/plasma-desktop/init
|
|
|
|
cp -f ${plasmaInit} $out/share/apps/plasma-desktop/init/00-defaultLayout.js
|
|
|
|
'';
|
|
|
|
|
2016-09-29 16:25:46 +00:00
|
|
|
# Disable large stuff that's not very useful on the installation CD.
|
|
|
|
services.xserver.desktopManager.kde4.enablePIM = false;
|
|
|
|
|
2009-06-11 09:51:27 +00:00
|
|
|
}
|