summary refs log tree commit diff
path: root/nixos/modules/installer/cd-dvd/installation-cd-graphical-base.nix
blob: 1578e1547bc1fc1b2deff01848b1c59e0eb7a811 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# This module contains the basic configuration for building a graphical NixOS
# installation CD.

{ lib, pkgs, ... }:

with lib;

{
  imports = [ ./installation-cd-base.nix ];

  # Whitelist wheel users to do anything
  # This is useful for things like pkexec
  #
  # WARNING: this is dangerous for systems
  # outside the installation-cd and shouldn't
  # be used anywhere else.
  security.polkit.extraConfig = ''
    polkit.addRule(function(action, subject) {
      if (subject.isInGroup("wheel")) {
        return polkit.Result.YES;
      }
    });
  '';

  services.xserver = {
    enable = true;

    # Don't start the X server by default.
    autorun = mkForce false;

    # Automatically login as nixos.
    displayManager.slim = {
      enable = true;
      defaultUser = "nixos";
      autoLogin = true;
    };

  };

  # Provide networkmanager for easy wireless configuration.
  networking.networkmanager.enable = true;
  networking.wireless.enable = mkForce false;

  # KDE complains if power management is disabled (to be precise, if
  # there is no power management backend such as upower).
  powerManagement.enable = true;

  # Enable sound in graphical iso's.
  hardware.pulseaudio.enable = true;

  environment.systemPackages = [
    # Include gparted for partitioning disks.
    pkgs.gparted

    # Include some editors.
    pkgs.vim
    pkgs.bvi # binary editor
    pkgs.joe

    # Firefox for reading the manual.
    pkgs.firefox

    pkgs.glxinfo
  ];

}