-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathconfiguration.nix
205 lines (164 loc) · 4.86 KB
/
configuration.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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# Configuration file for ahorn
{
config,
retiolum,
pkgs,
lib,
nixos-hardware,
# inovex-mdm,
...
}:
{
# nixpkgs.config.packageOverrides = pkgs: {
# vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
# };
# environment.systemPackages = with pkgs; [
# intel-gpu-tools
# vaapiIntel
# intel-media-driver
# vaapi-intel-hybrid
# xorg.xf86videointel
# ];
networking.hosts = {
"192.168.56.107" = [ "status.fernuni" ];
};
services.gnome.gnome-keyring.enable = true;
hardware.keyboard.qmk.enable = true;
# RTL-SDR
# hardware.rtl-sdr.enable = true;
# users.users.pinpox.extraGroups = [ "plugdev" ];
boot.initrd.services.udev.rules = ''
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="8037", MODE:="0666"
'';
# Enable driver for Focusrite Scarlett 2i2 Gen3.
# This can be removed when we reach Linux Kernel 6.7, as it includes the driver by default
# See: https://github.com/geoffreybennett/alsa-scarlett-gui/blob/master/INSTALL.md#enabling-the-driver
boot.extraModprobeConfig = ''
options snd_usb_audio vid=0x1235 pid=0x8210 device_setup=1
'';
boot.extraModulePackages = [
config.boot.kernelPackages.v4l2loopback
config.boot.kernelPackages.v4l2loopback.out
];
# Register a v4l2loopback device at boot
boot.kernelModules = [ "v4l2loopback" ];
# boot.extraModprobeConfig = ''
# options v4l2loopback exclusive_caps=1 video_nr=9 card_label=a7III
# '';
imports = [
nixos-hardware.nixosModules.lenovo-thinkpad-t480s
./hardware-configuration.nix
retiolum.nixosModules.retiolum
# inovex-mdm.nixosModules.default
#retiolum.nixosModules.ca
];
lollypops.secrets.files."inovex-mdm/mdm-create-token" = { };
# services.inovex-mdm = {
# enable = true;
# userhome = "/home/pinpox";
# tokenFile = "${config.lollypops.secrets.files."inovex-mdm/mdm-create-token".path}";
# screenLockTimeout = "300";
# };
programs.sway.enable = true;
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
];
};
environment.sessionVariables = {
LIBVA_DRIVER_NAME = "iHD";
NIXOS_OZONE_WL = "1";
};
# You can turn on native Wayland support in all chrome and most electron apps
# by setting an environment variable:
xdg.portal = {
enable = true;
wlr = {
enable = true;
settings = {
# See xdg-desktop-portal-wlr(5) for supported values.
screencast = {
# output_name = "HDMI-A-1";
max_fps = 30;
# exec_before = "disable_notifications.sh";
# exec_after = "enable_notifications.sh";
chooser_type = "simple";
chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or";
};
};
};
extraPortals = [
pkgs.xdg-desktop-portal-gtk
pkgs.xdg-desktop-portal-wlr
];
};
services.fwupd.enable = true;
services.acpid.enable = true;
# Often hangs
systemd.services = {
NetworkManager-wait-online.enable = lib.mkForce false;
systemd-networkd-wait-online.enable = lib.mkForce false;
};
services.udev.packages = [
pkgs.via
pkgs.qmk-udev-rules # For QMK/Via
pkgs.libsigrok # For pulseview
];
hardware.sane.enable = true;
users.users.pinpox.extraGroups = [
"scanner"
"lp"
];
# Enable audio producion for pinpox
home-manager.users.pinpox.pinpox.defaults.audio-recording.enable = true;
# To build raspi images
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
# Retiolum config
networking.retiolum = {
ipv4 = "10.243.100.100";
ipv6 = "42:0:3c46:519d:1696:f464:9756:8727";
};
lollypops.extraTasks = {
rebuild-nosecrets = {
desc = "Rebuild without deloying secrets";
cmds = [ ];
deps = [
"deploy-flake"
"rebuild"
];
};
};
lollypops.secrets.files = {
"retiolum/rsa_priv" = { };
"retiolum/ed25519_priv" = { };
};
services.tinc.networks.retiolum = {
rsaPrivateKeyFile = "${config.lollypops.secrets.files."retiolum/rsa_priv".path}";
ed25519PrivateKeyFile = "${config.lollypops.secrets.files."retiolum/ed25519_priv".path}";
};
boot.blacklistedKernelModules = [ "nouveau" ];
environment.systemPackages = [
pkgs.via
pkgs.libimobiledevice
pkgs.ifuse # optional, to mount using 'ifuse'
pkgs.xdg-desktop-portal
pkgs.xdg-desktop-portal-wlr
];
pinpox.desktop = {
enable = true;
wireguardIp = "192.168.7.2";
hostname = "ahorn";
};
# Encrypted drive to be mounted by the bootloader. Path of the device will
# have to be changed for each install.
boot.initrd.luks.devices = {
root = {
# Get UUID from blkid /dev/sda2
device = "/dev/disk/by-uuid/d4b70087-c965-40e8-9fca-fc3b2606a590";
preLVM = true;
allowDiscards = true;
};
};
}