-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprism.nix
executable file
·187 lines (169 loc) · 3.93 KB
/
prism.nix
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
187
{ config, pkgs, ... }:
{
imports = [
./hw/asrock-e350m1-fusion.nix
./pkgs
./sets/svenglish.nix
./user/admin.nix
./user/edwtjo.nix
./user/htpc.nix
];
remote.admin.enable = true;
remote.admin.users = [ "edwtjo" ];
fileSystems."/" =
{ device = "/dev/mapper/cryptfs";
fsType = "btrfs";
};
fileSystems."/boot" =
{ device = "/dev/sda1";
fsType = "ext2";
};
fileSystems."/mnt/nfs/series" =
{ device = "nexus.q:/series";
fsType = "nfs4";
options = "ro";
};
fileSystems."/mnt/nfs/movies" =
{ device = "nexus.q:/movies";
fsType = "nfs4";
options = "ro";
};
fileSystems."/mnt/nfs/emu" =
{ device = "nexus.q:/emu";
fsType = "nfs4";
options = "ro";
};
fileSystems."/var/db/emu" =
{ device = "${pkgs.unionfs-fuse}/bin/unionfs#/home/htpc/emulator-saves=rw:/mnt/nfs/emu=ro";
fsType = "fuse";
options = "noauto,rw,uid=${toString config.users.extraUsers.htpc.uid},gid=${toString config.users.extraGroups.htpc.gid},use_ino,cow,allow_other";
};
swapDevices =[
{ device = "/dev/sda4"; }
];
nix.gc.automatic = true;
nix.gc.dates = "03:45";
environment.variables.NIXPKGS_REPO = "/root/nixpkgs";
environment.systemPackages = with pkgs; [
acpi
curl
emulationstation
git
glxinfo
gnupg
links2
lshw
nfsUtils
nixin
openvpn
p7zip
retroarch
screen
sshfsFuse
sudo
wine
vim
unionfs-fuse
wget
kodi
kodi-retroarch-advanced-launchers
xsel
zsnes
];
services = {
xserver = {
enable = true;
autorun = true;
exportConfiguration = true;
videoDrivers = [ "ati" ];
useGlamor = true;
resolutions = [ { x = 1280; y = 1024; } { x = 1280; y = 768; } { x = 1280; y = 720; } { x = 1024; y = 768; }];
displayManager.slim = {
enable = true;
defaultUser = "htpc";
autoLogin = true;
};
desktopManager = {
kodi.enable = true;
};
layout = "se";
xkbModel = "pc105";
synaptics = {
enable = true;
twoFingerScroll = true;
};
};
gpm.enable = true;
printing.enable = true;
openssh.enable = true;
dbus.packages = with pkgs; [ gnome.GConf ];
locate.enable = true;
acpid.enable = true;
openvpn.servers = {
hypercube = {
config = ''
client
proto udp
dev tap
remote nexus.cube2.se 2194
comp-lzo
verb 3
cipher AES-256-CBC
cert /root/.vpn/hypercube/prism.crt
key /root/.vpn/hypercube/prism.key
ca /root/.vpn/hypercube/ca.crt
dh /root/.vpn/hypercube/dh4096.pem
persist-key
persist-tun
status /root/.vpn/hypercube/openvpn-status.log
'';
autoStart = false;
};
};
};
powerManagement.enable = true;
hardware.pulseaudio.enable = true;
time.timeZone = "Europe/Stockholm";
services.nixosManual.showManual = true;
networking = {
hostName = "prism";
firewall.enable = false;
useDHCP = true;
};
nixpkgs.config = {
allowUnfree = true;
retroarch = {
enable4do = true;
enableBsnesMercury = true;
enableDesmume = true;
enableFBA = true;
enableFceumm = true;
enableGambatte = true;
enableGenesisPlusGX = true;
enableMupen64Plus = true;
enableNestopia = true;
enablePicodrive = true;
enablePrboom = true;
enablePPSSPP = true;
enableQuickNES = true;
enableScummVM = true;
enableSnes9x = true;
enableSnes9xNext = true;
enableStella = true;
enableVbaM = true;
enableVbaNext = true;
};
kodi = {
enableAdvancedLauncher = true;
enableSVTPlay = true;
enableGenesis = true;
};
};
fonts.fonts = with pkgs; [
dejavu_fonts
corefonts
vistafonts
inconsolata
anonymousPro
];
}