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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
{ pkgs, config, lib, ... }:
let
cfg = config.vuizvui.user.aszlig.profiles.workstation;
randrHeads = config.services.xserver.xrandrHeads;
in {
options.vuizvui.user.aszlig.profiles.workstation = {
enable = lib.mkEnableOption "Workstation profile for aszlig";
};
config = lib.mkIf cfg.enable {
vuizvui.user.aszlig.profiles.base.enable = true;
boot.kernelParams = [ "zswap.enabled=1" "panic=1800" ];
boot.cleanTmpDir = true;
environment.systemPackages = with lib; let
mkRandrConf = acc: name: acc ++ singleton {
inherit name;
value = "--output '${name}' --preferred"
+ optionalString (acc != []) " --right-of '${(head acc).name}'";
};
randrConf = map (getAttr "value") (foldl mkRandrConf [] randrHeads);
in singleton (pkgs.writeScriptBin "xreset" ''
#!${pkgs.stdenv.shell}
${pkgs.xorg.xrandr}/bin/xrandr ${concatStringsSep " " randrConf}
'') ++ import ./packages.nix pkgs;
hardware = {
pulseaudio.enable = true;
opengl = {
driSupport32Bit = true;
s3tcSupport = true;
};
};
fonts = {
enableCoreFonts = true;
enableFontDir = true;
enableGhostscriptFonts = true;
fonts = [
pkgs.dosemu_fonts
pkgs.liberation_ttf
];
};
vuizvui.user.aszlig.services.i3.enable = true;
vuizvui.user.aszlig.services.slim.enable = true;
vuizvui.user.aszlig.services.vlock.enable = true;
vuizvui.user.aszlig.programs.gajim.enable = true;
vuizvui.user.aszlig.programs.mpv.enable = true;
vuizvui.user.aszlig.programs.taskwarrior.enable = true;
vuizvui.user.aszlig.programs.xpdf.enable = true;
vuizvui.user.aszlig.programs.git.enable = true;
vuizvui.user.aszlig.programs.git.config = {
color.ui = "auto";
merge.tool = "vimdiff3";
user.email = "aszlig@redmoonstudios.org";
user.name = "aszlig";
user.signkey = "4DFD43EC834B6901BDA2BAAC1DE8E48E57DB5436";
gpg.program = "${pkgs.gnupg}/bin/gpg2";
push.default = "current";
tar."tar.xz".command = "${pkgs.xz}/bin/xz -c";
rebase.autosquash = true;
rerere.enabled = true;
rerere.autoupdate = true;
commit.gpgsign = true;
alias.backport = let
release = "14.04";
message = "Merge release ${release} into backports.";
in "!git fetch upstream release-${release} &&"
+ " git merge -m \"${message}\" --log FETCH_HEAD";
};
vuizvui.hardware.gameController."03000000ff1100004133000010010000" = {
name = "PS2 Controller";
mapping = {
a = "b2";
b = "b1";
x = "b3";
y = "b0";
back = "b8";
start = "b9";
leftshoulder = "b6";
rightshoulder = "b7";
leftstick = "b10";
rightstick = "b11";
leftx = "a0";
lefty = "a1";
rightx = "a3";
righty = "a2";
lefttrigger = "b4";
righttrigger = "b5";
dpup = "h0.1";
dpleft = "h0.8";
dpdown = "h0.4";
dpright = "h0.2";
};
};
vuizvui.programs.gnupg.enable = true;
vuizvui.programs.gnupg.agent.enable = true;
vuizvui.programs.gnupg.agent.sshSupport = true;
vuizvui.programs.gnupg.agent.scdaemon.enable = true;
services = {
openssh = {
enable = true;
permitRootLogin = "without-password";
};
xfs.enable = false;
gpm = {
enable = true;
protocol = "exps2";
};
printing.enable = true;
printing.drivers = [ pkgs.gutenprint pkgs.hplip ];
pcscd.enable = true;
pcscd.plugins = [ pkgs.ccid pkgs.pcsc-cyberjack ];
udev.extraRules = ''
# aXbo S.P.A.C.
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", \
ATTRS{serial}=="0001", OWNER="aszlig", SYMLINK+="axbo"
# Enttec DMX device
SUBSYSTEM=="usb*|tty", ACTION=="add|change", ATTRS{idVendor}=="0403", \
ATTRS{idProduct}=="6001", OWNER="aszlig"
'';
redshift = {
enable = true;
latitude = "48.428404";
longitude = "10.866007";
temperature.day = 5500;
temperature.night = 3500;
};
xserver = {
enable = true;
layout = "dvorak";
displayManager.sessionCommands = ''
${pkgs.xorg.xrdb}/bin/xrdb "${pkgs.writeText "xrdb.config" ''
Rxvt*font: vga
Rxvt*background: black
Rxvt*foreground: grey
Rxvt*scrollBar: false
Rxvt*saveLines: 2000
Rxvt*keysym.Home: \033[1~
Rxvt*keysym.End: \033[4~
Rxvt*urgentOnBell: true
XTerm*font: vga
XTerm*saveLines: 10000
XTerm*bellIsUrgent: true
XTerm*background: black
XTerm*foreground: grey
XTerm*backarrowKeyIsErase: true
XTerm*ptyInitialErase: true
''}"
'';
desktopManager.default = "none";
desktopManager.xterm.enable = false;
};
};
users.users.aszlig = {
uid = 1000;
isNormalUser = true;
description = "aszlig";
extraGroups = [ "wheel" "video" ];
};
};
}
|