-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.nix
More file actions
245 lines (209 loc) · 5.73 KB
/
common.nix
File metadata and controls
245 lines (209 loc) · 5.73 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
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
nixpkgs = {
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
config = {
allowUnfree = true;
};
};
nix = {
# This will add each flake input as a registry
# To make nix3 commands consistent with your flake
channel.enable = false;
# This will additionally add your inputs to the system's legacy channels
# Making legacy nix commands consistent as well
registry.nixpkgs.flake = inputs.nixpkgs;
nixPath = [ "nixpkgs=flake:nixpkgs" ];
# Enable flakes and automatically clean up the nix store
settings = {
auto-optimise-store = true;
experimental-features = "nix-command flakes";
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 14d";
};
};
# Bootloader
boot.loader.systemd-boot = {
enable = true;
configurationLimit = 8;
consoleMode = "auto";
};
boot.kernelPackages = pkgs.linuxPackages_latest;
# Firmware
services.fwupd.enable = true;
hardware.enableAllFirmware = true;
# Enable networking
networking.networkmanager.enable = true;
systemd.services.NetworkManager-wait-online.enable = false;
# Automatically set the timezone
services.automatic-timezoned.enable = true;
# 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";
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the KDE Plasma Desktop Environment.
services.displayManager = {
sddm = {
enable = true;
wayland.enable = true;
};
autoLogin.enable = false;
};
services.desktopManager.plasma6.enable = true;
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
# 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;
jack.enable = true;
};
# User Settings
programs.fish.enable = true;
users.users.ciferkey = {
isNormalUser = true;
description = "ciferkey";
extraGroups = [
"adbusers"
"camera"
"docker"
"lp"
"networkmanager"
"scanner"
"wheel"
];
packages = with pkgs; [
android-tools
git
home-manager
neovim
];
shell = pkgs.fish;
};
security.pam.services = {
ciferkey.enableKwallet = true;
sddm.kwallet = {
enable = true; # Fix to allow SDDM to start KWallet properly
forceRun = true;
};
kde.kwallet = {
enable = true; # Allow lockscreen password to also start KWallet
forceRun = true;
};
login.u2fAuth = true;
sudo.u2fAuth = true;
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
kdePackages.ark
kdePackages.breeze-gtk
kdePackages.discover
kdePackages.kamera
kdePackages.kio-gdrive
kdePackages.plasma-integration
kdePackages.plasma-nm
tailscale-systray
#kdePackages.spectacle.override { tesseractLanguages = [ "eng" ]; } # For OCR in spectacle
];
services.tailscale.enable = true;
programs.partition-manager.enable = true;
services.flatpak.enable = true;
services.packagekit.enable = true;
programs.kdeconnect.enable = true;
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "23.05";
# Game Support
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
gamescopeSession.enable = true;
};
hardware.graphics.enable = true;
hardware.graphics.enable32Bit = true;
hardware.steam-hardware.enable = true;
programs.gamemode.enable = true;
programs.gamescope.enable = true;
services = {
udev = {
packages = with pkgs; [
game-devices-udev-rules # Controller stuff https://codeberg.org/fabiscafe/game-devices-udev#nixos
yubikey-personalization
probe-rs-tools # For esp32
];
};
};
hardware.uinput.enable = true;
zramSwap.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
# Virtualization
virtualisation = {
docker = {
enable = true;
#autoEnable = false; this mysteriously stopped working
enableOnBoot = false;
};
};
services.fstrim.enable = true;
programs.gphoto2.enable = true;
hardware.bluetooth = {
enable = true; # enables support for Bluetooth
powerOnBoot = true; # powers up the default Bluetooth controller on boot
};
systemd.tmpfiles.rules = [
"e /home/ciferkey/Downloads - - - 60d"
];
# Enable mdns for .local domains
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
services.printing.enable = true;
}