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
67
68
69
70
71
72
73
74
|
{ config, pkgs, lib, ... }:
{
imports = [ ./services_common.nix ];
services = {
tftpd.enable = true;
gnome3.gnome-keyring.enable = true;
printing.enable = false;
};
services.acpid = {
enable = true;
lidEventCommands = ''
LID="/proc/acpi/button/lid/LID/state"
state=`cat $LID | ${pkgs.gawk}/bin/awk '{print $2}'`
case "$state" in
*open*) ;;
*close*) ${pkgs.pmutils}/sbin/pm-suspend ;;
*) logger -t lid-handler "Failed to detect lid state ($state)" ;;
esac
'';
};
services.xserver = {
enable = true;
layout = "gb";
videoDrivers = [ "intel" ];
vaapiDrivers = [ pkgs.vaapiIntel ];
synaptics = {
enable = true;
twoFingerScroll = true;
palmDetect = true;
};
displayManager.sessionCommands = ''
${pkgs.xbindkeys}/bin/xbindkeys &
${pkgs.nitrogen}/bin/nitrogen --restore &
${pkgs.networkmanagerapplet}/bin/nm-applet &
#${pkgs.connmanui}/bin/connman-ui-gtk &
${pkgs.xscreensaver}/bin/xscreensaver -no-splash &
${pkgs.pasystray}/bin/pasystray &
${pkgs.compton}/bin/compton -f &
${pkgs.rofi}/bin/rofi &
${pkgs.xorg.xrdb}/bin/xrdb "${pkgs.writeText "xrdb.conf" ''
Xft.dpi: 96
Xft.antialias: true
Xft.hinting: full
Xft.hintstyle: hintslight
Xft.rgba: rgb
Xft.lcdfilter: lcddefault
Xft.autohint: 1
XTerm.termName: xterm-256color
XTerm*bellIsUrgent: true
XTerm*utf8: 1
XTerm*locale: true
XTerm*utf8Title: true
XTerm*utf8Fonts: 1
XTerm*utf8Latin1: true
XTerm*dynamicColors: true
XTerm*eightBitInput: true
Xcursor.theme: Vanilla-DMZ-AA
Xcursor.size: 22
*.charClass:33:48,35:48,37:48,43:48,45-47:48,61:48,63:48,64:48,95:48,126:48,35:48,58:48
XTerm*faceName: xft:DejaVu Sans Mono for Powerline:pixelsize=9:antialias=true:hinting=true
XTerm*faceNameDoublesize: xft:Unifont:pixelsize=12:antialias=true:hinting=true
XTerm*cursorColor: #545f65
*background: #121212
*foreground: #babdb6
''}"
'';
};
}
|