blob: 67a8416fe2e6fd0e677e1cc8f47c54d9e788ca0f (
plain)
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
|
{ config, pkgs, lib, ...}:
{
imports = [];
security = {
acme.acceptTerms = true;
protectKernelImage = true;
rtkit.enable = true;
chromiumSuidSandbox.enable = true;
sudo.wheelNeedsPassword = false;
};
boot.kernelPackages = pkgs.linuxPackages_xanmod;
boot.kernelParams = [
"nmi_watchdog=0"
"systemd.watchdog-device/dev/watchdog"
];
boot.kernel.sysctl = {
"net.ipv4.conf.default.log_martians" = 1;
"net.ipv4.conf.all.log_martians" = 1;
"net.ipv4.tcp_mtu_probing" = 1;
"net.ipv4.tcp_syncookies" = 1;
"net.ipv4.tcp_congestion_control" = "bbr2";
"net.ipv4.conf.default.rp_filter" = 1;
"net.ipv4.conf.all.rp_filter" = 1;
"net.ipv4.conf.all.accept_source_route" = 0;
"net.ipv4.conf.all.send_redirects" = 0;
"net.ipv4.conf.default.send_redirects" = 0;
"net.ipv4.conf.all.accept_redirects" = 0;
"net.ipv4.conf.default.accept_redirects" = 0;
"net.ipv4.conf.all.secure_redirects" = 0;
"net.ipv4.conf.default.secure_redirects" = 0;
"net.ipv6.conf.all.accept_source_route" = 0;
"net.ipv6.conf.all.accept_redirects" = 0;
"net.ipv6.conf.default.accept_redirects" = 0;
"net.ipv4.tcp_rfc1337" = 1;
};
# GRUB bootloader
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.grub = {
enable = true;
version = 2;
efiSupport = true;
configurationLimit = 10;
device = "nodev";
useOSProber = true;
# device = "/dev/disk/by-uuid/7905-2E41";
extraEntries = ''
menuentry "Reboot" {
reboot
}
menuentry "Shutdown" {
halt
}
'';
};
networking.networkmanager.enable = true;
networking.useDHCP = false;
networking.firewall.enable = true;
i18n.defaultLocale = "en_US.UTF-8";
i18n.inputMethod.enabled = "kime";
console.font = "Lat2-Terminus16";
console.keyMap = "us";
time.timeZone = "Asia/Seoul";
environment.systemPackages = with pkgs; [ ];
services.openssh.enable = true;
sound.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
hardware.bluetooth.enable = true;
services.greetd = {
enable = true;
settings.default_session.command = "${pkgs.greetd.tuigreet}/bin/tuigreet -t -c sway";
};
# https://github.com/apognu/tuigreet/issues/17
systemd.services.greetd.unitConfig.After = lib.mkOverride 0 [ "multi-user.target" ];
services.journald.extraConfig = lib.mkForce "";
systemd.extraConfig = "RebootWatchdogSec=5";
programs = {
sway = {
enable = true;
wrapperFeatures.gtk = true;
extraPackages = with pkgs; [
autotiling
alacritty
swaylock
swayidle
swaybg
wayland-utils
wl-clipboard
grim
slurp
sway-contrib.grimshot
waybar
bemenu
qt5.qtwayland
xdg_utils
];
};
zsh.enable = true;
zsh.enableCompletion = false;
};
hardware.opengl.enable = true;
hardware.opengl.driSupport32Bit = true;
hardware.opengl.extraPackages = with pkgs; [ vaapiVdpau libvdpau-va-gl ];
xdg.portal = {
enable = true;
gtkUsePortal = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
xdg-desktop-portal-wlr
];
};
virtualisation.libvirtd.enable = true;
users.users = {
boopy = {
isNormalUser = true;
shell = pkgs.zsh;
extraGroups = [
"wheel"
"audio"
"networkmanager"
"libvirtd"
];
};
};
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you
# should.
system.stateVersion = "22.05"; # Did you read the comment?
}
|