-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration.nix
200 lines (167 loc) · 4.2 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
{ config, lib, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
./home/programs/stylix/default.nix
];
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
timeout = 1;
};
kernelPackages = pkgs.linuxPackages_6_9; # Get latest linux kernel
};
networking.hostName = "nixos";
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
time.timeZone = "Europe/Berlin";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
console = {
earlySetup = true;
font = "${pkgs.terminus_font}/share/consolefonts/ter-k22n.psf.gz";
packages = with pkgs; [ terminus_font ];
keyMap = "us";
# useXkbConfig = true; # use xkb.options in tty.
};
services.gnome.gnome-keyring.enable = true; # necessary for Adwaita theme
services.dbus.enable = true; # necessary for gtk apps
qt.platformTheme = "qt5ct";
services.xserver = {
enable = true;
displayManager.gdm.enable = true;
displayManager.gdm.wayland = true;
layout = "us";
};
programs.hyprland = {
enable = true;
xwayland.enable = true;
};
zramSwap.enable = true;
zramSwap.memoryPercent = 25;
programs.light.enable = true;
# garbage collect
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
services.jenkins = {
enable = true;
};
# Experimental-Features
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# UnFree and UnSecure Software
nixpkgs.config.allowUnfree = true;
# NoNeedPassword
security.sudo.wheelNeedsPassword = false;
# Enable sound.
sound.enable = true;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
users.users.lxudrr = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" "video" "wireshark" "libvirtd" ];
};
environment.systemPackages = with pkgs; [
vim
zsh
btop
inetutils
waybar
dunst
libnotify
wofi
swww
hackgen-nf-font
jrnl
dmidecode
virtualbox
];
virtualisation.virtualbox.host.enable = false;
users.extraGroups.vboxusers.members = [ "lxudrr" ];
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# allow Docker
virtualisation.docker = {
enable = true;
rootless = {
enable = true;
setSocketVariable = true;
};
};
# Register AppImage files as a binary type to binfmt_misc
boot.binfmt.registrations.appimage = {
wrapInterpreterInShell = false;
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
recognitionType = "magic";
offset = 0;
mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
magicOrExtension = ''\x7fELF....AI\x02'';
};
services.nginx = {
enable = true;
virtualHosts = {
"localhost" = {
root = "/var/www/homePage";
listen = [
{
addr = "localhost";
port = 1234;
}
];
};
"192.168.0.148" = {
root = "/var/www/memnad_pwa";
listen = [
{
addr = "192.168.0.148";
port = 1234;
}
];
};
};
};
virtualisation.libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_kvm;
runAsRoot = true;
swtpm.enable = true;
ovmf = {
enable = true;
packages = [(pkgs.OVMF.override {
secureBoot = true;
tpmSupport = true;
}).fd];
};
};
};
programs.virt-manager.enable = true;
# Allow dumcap (wireshark) to use interface
security.wrappers.dumpcap = {
owner = "root";
group = "root";
capabilities = "cap_net_raw+ep";
source = "${pkgs.wireshark}/bin/dumpcap";
};
services.postgresql = {
enable = true;
ensureDatabases = [ "mydatabase" ];
authentication = pkgs.lib.mkOverride 10 ''
#type database DBuser auth-method
local all all trust
host all all 127.0.0.1/32 md5
'';
};
networking.firewall.enable = false;
system.stateVersion = "23.11";
}