-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.nix
269 lines (239 loc) · 9.23 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
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
{pkgs, ...}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
# ./timers.nix
# ./vimgolf.nix
./packages.nix
./qmk.nix
./ydootool.nix
./tailscale.nix
];
nix.extraOptions = ''
trusted-users = root dan
'';
nix = {
settings = {
experimental-features = ["nix-command" "flakes"];
bash-prompt-prefix = "(nix:$name)\\040";
substituters = [
"https://cache.thalheim.io"
"https://nix-community.cachix.org"
"https://neovim-nightly.cachix.org"
];
trusted-public-keys = [
"cache.thalheim.io-1:R7msbosLEZKrxk/lKxf9BTjOOH7Ax3H0Qj0/6wiHOgc="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"neovim-nightly.cachix.org-1:feIoInHRevVEplgdZvQDjhp11kYASYCE2NGY9hNrwxY="
];
};
optimise.automatic = true;
gc.automatic = true;
gc.dates = "weekly";
# channel.enable = false; # Remove channels entirely at some point, but this errors currently
};
documentation.doc.enable = true;
documentation.info.enable = true;
documentation.dev.enable = true;
# Bootloader
boot.loader.systemd-boot = {
enable = true;
editor = false;
configurationLimit = 18;
# consoleMode = "max";
};
system.nixos.label = "";
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "nixos"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Enable networking
networking.networkmanager.enable = true;
systemd.services.NetworkManager-wait-online.enable = false;
# Set your time zone.
time.timeZone = "America/Chicago";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
virtualisation.docker.enable = true;
virtualisation.podman.enable = true;
virtualisation.waydroid.enable = true;
virtualisation.libvirtd = {
enable = true;
qemu.runAsRoot = true;
};
# Enable the X11 windowing system.
services.xserver.enable = true;
services.resolved.enable = true;
# Video Card Drivers
services.xserver.videoDrivers = ["amdgpu"];
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [
libGL
amdvlk
driversi686Linux.amdvlk # For 32 bit applications
];
};
# Enable the GNOME Desktop Environment.
# services.displayManager.displayManager.gdm.enable = true;
# services.displayManager.desktopManager.gnome.enable = true;
# services.gnome.gnome-remote-desktop.enable = true;
# Enable the Plasma 6 Desktop Environment
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
services.displayManager.defaultSession = "plasma";
services.displayManager.sddm.wayland.enable = true;
environment.plasma6.excludePackages = with pkgs.kdePackages; [
plasma-browser-integration
konsole
];
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
# Enable CUPS to print documents.
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
publish = {
enable = true;
userServices = true;
};
};
services.printing = {
enable = true;
drivers = [pkgs.brlaser];
listenAddresses = ["*:631"];
allowFrom = ["all"];
browsing = true;
defaultShared = true;
openFirewall = true;
};
# services.samba = {
# enable = true;
# package = pkgs.sambaFull;
# openFirewall = true;
# settings = {
# "global" = {
# "load printers" = "yes";
# "printing" = "cups";
# "printcap name" = "cups";
# };
# "printers" = {
# "comment" = "All Printers";
# "path" = "/var/spool/samba";
# "public" = "yes";
# "browsable" = "yes";
# # to allow user 'guest account' to print.
# "guest ok" = "yes";
# "writable" = "no";
# "printable" = "yes";
# "create mode" = 0700;
# };
# };
# };
# systemd.tmpfiles.rules = [
# "d /var/spool/samba 1777 root root -"
# ];
hardware = {
bluetooth = {
enable = true;
settings.General.Experimental = true;
};
logitech.wireless = {
enable = true;
enableGraphical = true;
};
enableAllFirmware = true;
};
# Enable sound with pipewire.
# sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
users.users.dan = {
isNormalUser = true;
description = "dan";
extraGroups = ["networkmanager" "wheel" "adbusers" "wireshark" "docker" "libvirtd" "kvm" "qemu-libvirtd" "ydotool"];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHvItECWiUFIPuGd7uQJcVp/sQJ0RnYh39y8sOQYNMUJ JuiceSSH"
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDN1n0+tmadg/GJ/igJf31nsluyHMcn2J6zaycloqipAeU+fa5b4V9rXUWntkGrJNP8CWloMx788ssGI1C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46Gr6qWhan2FsR07PGOHNj04TrwENT+MMKkJmkG2ol51RoHnCbXAdW3+e5yHwgzoMDyKW4hqp34dDpvS+u+rAX4YwMrSWPkBRO1UvL88TNi9al47K8mtQI9/yhR96N76K9GbEC8T1oxVlKYaZyb/9nKwmthyA2x3wpI3DggseFQ7TwPGxHPDuI8oO7KvL2y1USFHUP4oETMbEHm+BKLjotV9nh6ibrSFjhosE09BVyA/0t5tx5K8qrrTWNmZJYdULMwtjeJtzOhFb4Yc2W3/aaxZmEwMFdPGGnTf5Yf7qDVMZ48VhyycsdzjFXN8CASCpf SamsungRDP"
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAyBFhfJ59CyjEDU0INkew8VTCmoD3RNGTNGITtI8QqMbsFVX2RITaivyiX2uR0PgQgesV+EkjFs0u4IBrEjN8ZXmL4DdbCTG7Y7ESZcaYlytxTqKXqpaCz5m2f28MHBCrTTH8H+sfJOv2XAjszaUJ15KWiaPNpcM4tvCosFk1J2c+ccSoTDS45SMa+N7h8UyKw4uJk34hmEvhNlmu3+fUQfDM9bUcPlnvsD8/1Iak7UClB/HRpTinAs+T1sO5F+/pN3qs48zlocCRUiTp2Fr1zbbQw66FdPPL2J6l2OG+01wwNsGBRmi14hhdx+MgyolpEy/dx1KwBRPaVh8pAo4R Samsungconnectbot"
];
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
fonts.packages = with pkgs; [
nerd-fonts.jetbrains-mono
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# programs.ssh.forwardX11 = true;
# programs.ssh.setXAuthLocation = true;
# Disable the GNOME3/GDM auto-suspend feature that cannot be disabled in GUI!
# If no user is logged in, the machine will power down after 20 minutes.
systemd.targets.sleep.enable = false;
systemd.targets.suspend.enable = false;
systemd.targets.hibernate.enable = false;
systemd.targets.hybrid-sleep.enable = false;
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
ports = [
631 # Printer
33221 # SSH
];
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
};
};
security.sudo.extraConfig = ''
Defaults timestamp_timeout=30, pwfeedback
'';
security.polkit.enable = true;
# Open RDP ports in the firewall.
networking.firewall.allowedTCPPorts = [3389];
networking.firewall.allowedUDPPorts = [3389];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# 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 = "23.05"; # Did you read the comment?
}