-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcommon.nix
175 lines (142 loc) · 3.5 KB
/
common.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
# vim: sw=2 ts=2 expandtab
# 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, ...}: {
imports = [
./cachix
];
boot = {
consoleLogLevel = 0;
initrd.verbose = false;
kernel.sysctl = {
"fs.inotify.max_user_watches" = 524288;
"kernel.sysrq" = "0xf0";
"kernel.task_delayacct" = 1;
};
kernelParams = ["quiet" "fbcon=nodefer" "udev.log_level=3"];
loader = {
efi.canTouchEfiVariables = true;
grub = {
enable = false;
enableCryptodisk = true;
configurationLimit = 5;
devices = ["nodev"];
efiSupport = true;
splashMode = "normal";
};
systemd-boot = {
enable = true;
editor = false;
};
};
};
environment = {
defaultPackages = with pkgs; [
cachix
];
systemPackages = with pkgs; [
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# for creating bootable usbs
ntfs3g
# misc
clinfo
powertop
psmisc
rsync
vulkan-tools
];
};
hardware = {
# Bluetooth
bluetooth = {
enable = true;
settings.General.Experimental = true;
};
enableRedistributableFirmware = true;
};
location.provider = "geoclue2";
nix = {
package = pkgs.nixVersions.latest;
# enables flakes
extraOptions = ''
experimental-features = nix-command flakes
'';
optimise = {
automatic = true;
dates = ["weekly"];
};
settings = {
auto-optimise-store = true;
allowed-users = ["muni"];
substituters = ["https://cache.nixos.org"];
trusted-users = ["root" "muni"];
};
};
# allow unfree packages to be installed
nixpkgs.config.allowUnfree = true;
programs = {
fish.enable = true;
git.enable = true;
gnupg.agent = {
enable = true;
enableBrowserSocket = true;
enableSSHSupport = true;
pinentryPackage = pkgs.pinentry-gtk2;
};
nh = {
enable = true;
clean = {
enable = true;
dates = "monthly";
extraArgs = "--keep 5 --keep-since 30d";
};
flake = "/home/muni/dotfiles";
};
npm.enable = true;
ssh = {
knownHosts = {
spiritcrypt = {
hostNames = ["192.168.68.70"];
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBCyWusqqwfvUJHBhrpI9qPGFJpg4vHvU/QDrsL9hCu6";
};
};
setXAuthLocation = true;
};
};
security = {
polkit.enable = true;
# for pipewire. optional, but recommended
rtkit.enable = true;
# for secure boot (i hope)
tpm2.enable = true;
# for hyprlock to use password
pam.services.hyprlock.text = ''
auth include login
'';
};
services = {
automatic-timezoned.enable = true;
fwupd.enable = true;
geoclue2 = {
enable = true;
appConfig = {
gammastep = {
isSystem = false;
isAllowed = true;
};
};
};
getty.greetingLine = "Welcome!";
# enable touchpad support
libinput.enable = true;
logind.extraConfig = ''
RuntimeDirectorySize=2G
'';
sshguard.enable = true;
upower.enable = true;
};
users.users.muni.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMpFoYAj02WzgnBokgr2ZzFKOaffOVRK5Ru7Ngh53sjr (none)"
];
}