Repository navigation
Expand file tree
/
Copy pathconfiguration.nix
More file actions
337 lines (299 loc) · 8.12 KB
/
Copy pathconfiguration.nix
File metadata and controls
337 lines (299 loc) · 8.12 KB
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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ pkgs, inputs, ... }:
{
imports = [
./modules/firefox.nix
./modules/quietboot.nix
./modules/printing.nix
./modules/gnome.nix
./modules/cosmic.nix
./modules/ptyxis-generic-icon.nix
./modules/virt.nix
./modules/jdk-fx.nix
./modules/celeste.nix
./modules/vault.nix
./modules/android-studio.nix
./modules/unfree.nix
];
printing-module.enable = true;
gnome-module.enable = true;
cosmic-module.enable = false;
ptyxis-generic-icon-module.enable = false;
virt-module.enable = true;
jdk-fx-module.enable = false;
celeste-game.enable = true;
vault.enable = true;
android-studio-module.enable = false;
nix = {
settings = {
auto-optimise-store = true;
warn-dirty = false;
# download-buffer-size = 1073741824; # 1 GiB in bytes
experimental-features = [
"flakes"
"nix-command"
];
};
gc = {
automatic = true;
# options = "--delete-older-than-5d";
};
optimise.automatic = true;
};
system.autoUpgrade = {
enable = true;
flake = inputs.self.outPath;
dates = "12:30";
};
# Bootloader.
boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
kernelPackages = pkgs.linuxPackages_latest;
};
networking.hostName = "lonepine";
# Enable networking
networking.networkmanager.enable = true;
networking.networkmanager.plugins = with pkgs; [
networkmanager-openvpn
];
# Set your time zone.
time.timeZone = "Europe/Amsterdam";
# Select internationalisation properties.
i18n.defaultLocale = "nl_NL.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "nl_NL.UTF-8";
LC_IDENTIFICATION = "nl_NL.UTF-8";
LC_MEASUREMENT = "nl_NL.UTF-8";
LC_MONETARY = "nl_NL.UTF-8";
LC_NAME = "nl_NL.UTF-8";
LC_NUMERIC = "nl_NL.UTF-8";
LC_PAPER = "nl_NL.UTF-8";
LC_TELEPHONE = "nl_NL.UTF-8";
LC_TIME = "nl_NL.UTF-8";
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable Ozone Wayland support in Chromium and Electron based applications.
environment.sessionVariables.NIXOS_OZONE_WL = "1";
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "altgr-intl";
};
# Configure console keymap
console.keyMap = "us-acentos";
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
security.sudo-rs.enable = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.marijnk = {
isNormalUser = true;
description = "Marijn Kok";
extraGroups = [
"networkmanager"
"wheel"
"docker"
"i2c"
];
};
programs.bash = {
shellAliases = {
ls = "ls --color --group-directories-first";
c = "wl-copy --trim-newline";
o = "xdg-open .";
e = "zeditor $HOME/nix";
emake = "(cd $HOME/nix; make update)";
vl = "vault-login";
};
promptInit = ''
# Provide a nice prompt if the terminal supports it.
if [ "$TERM" != "dumb" ] || [ -n "$INSIDE_EMACS" ]; then
PROMPT_COLOR="1;31m"
((UID)) && PROMPT_COLOR="1;32m"
if [ -n "$INSIDE_EMACS" ]; then
# Emacs term mode doesn't support xterm title escape sequence (\e]0;)
PS1="\[\033[$PROMPT_COLOR\][\u@\h:\w]\\$\[\033[0m\] "
else
PS1="\[\033[$PROMPT_COLOR\][\[\e]0;\u@\h: \w\a\]\u@\h:\w]\\$\[\033[0m\] "
fi
if test "$TERM" = "xterm"; then
PS1="\[\033]2;\h:\u:\w\007\]$PS1"
fi
fi
'';
};
programs.neovim = {
enable = true;
defaultEditor = true;
vimAlias = true;
};
# Enable fingerprint.
services.fprintd.enable = true;
systemd.services.fprintd = {
wantedBy = [ "multi-user.target" ];
serviceConfig.Type = "simple";
};
# Hardware acceleration
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
#vpl-gpu-rt
intel-media-driver
];
};
environment.sessionVariables.LIBVA_DRIVER_NAME = "iHD";
environment.sessionVariables.GST_PLUGIN_SYSTEM_PATH_1_0 =
pkgs.lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0"
(
with pkgs.gst_all_1;
[
gst-plugins-good
gst-libav
]
);
# Enable dynamic linker to execute dynamic binaries.
# Needed for Zed to download and execute language servers.
# Needed for pre-commit to execute downloaded git hooks.
programs.nix-ld.enable = true;
programs.git.config.init.defaultBranch = "main";
virtualisation.docker.enable = true;
services.flatpak.enable = true;
# Allow Docker containers to reach host services
# https://github.com/NixOS/nixpkgs/issues/417641#issuecomment-3403484920
networking.firewall = {
enable = true;
allowedTCPPorts = [
53317 # localsend
];
allowedUDPPorts = [
53317
];
trustedInterfaces = [ "br+" ];
};
# Fix for certificates not being loaded when using uv
# https://discourse.nixos.org/t/fix-ssl-sslcertverificationerror-with-uvs-standalone-python/71138
environment.etc.certfile = {
source = "/etc/ssl/certs/ca-bundle.crt";
target = "ssl/cert.pem";
};
services.xserver.excludePackages = [ pkgs.xterm ];
hardware.i2c.enable = true;
nixpkgs.overlays = [
(final: prev: {
gradia = prev.gradia.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [
(prev.fetchpatch {
url = "https://github.com/sonicnkt/Gradia/commit/f51f0fdeff9272fef77936dbe3c769bb4667d365.patch";
hash = "sha256-06FGFGpdPtlxEgK457pIrG6+ziNe7KJtPBEnCmJD2TU=";
})
];
});
})
];
environment.systemPackages = with pkgs; [
tree
android-tools
wl-clipboard
neovim
chezmoi
ddcutil
ffmpeg
yt-dlp
adw-gtk3
rclone
filen-cli
fuse3
killall
zip
unzip
jq
scrcpy
# fonts
lora
# apps
localsend
vlc
mitmproxy
p11-kit # For certificates
rustdesk-flutter
gradia
pixelorama
inkscape
popsicle
libreoffice
eyedropper
upscayl
showtime
gnome-obfuscate
gnome-sound-recorder
clapgrep
thunderbird
brave
pinta
papers
buffer
shortwave
identity
prismlauncher
signal-desktop
picard
jmc2obj
unstable.simplenote
# (callPackage ./derivations/avvie.nix { })
# (callPackage ./derivations/codd.nix {
# rustc = unstable.rustc;
# cargo = unstable.cargo;
# })
# (callPackage ./derivations/dynamic-wallpaper.nix { })
(callPackage ./derivations/touchhle.nix { })
# (callPackage ./derivations/swagger-preview.nix { })
# (callPackage ./derivations/apk-mitm.nix { })
(callPackage ./derivations/voipgrid-install-deps.nix { uv = unstable.uv; })
(callPackage ./derivations/vault-login.nix { })
(callPackage ./derivations/madbfs.nix { })
# development
glab
open-policy-agent
javaPackages.compiler.temurin-bin.jdk-25
# unstable.rustc
# unstable.cargo
git
delta # beautiful git diffs
gcc
kubectl
kubelogin-oidc
gnupg
gnumake
just
just-lsp
natscli
unstable.uv
postgresql
go
nodejs_26
unstable.python314
unstable.zed-editor
bubblewrap # For Zed agent sandboxing
nixd # nix LSP
nixfmt
basedpyright
# unstable.vscodium
];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "25.05"; # Did you read the comment?
}