-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfiguration.nix
More file actions
220 lines (184 loc) · 5.57 KB
/
Copy pathconfiguration.nix
File metadata and controls
220 lines (184 loc) · 5.57 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
# 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’).
{ config, pkgs, ... }:
{
# Grub, use latest kernel
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.extraModulePackages = with config.boot.kernelPackages; [
v4l2loopback
];
boot.extraModprobeConfig = ''
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam, Virt cam" exclusive_caps=1
'';
security.polkit.enable = true;
boot.loader.grub = {
enable = true;
useOSProber = true;
device = "nodev";
efiSupport = true;
};
# patch for VR
# boot.kernelPatches = [
# {
# name = "amdgpu-ignore-ctx-privileges";
# patch = pkgs.fetchpatch {
# name = "cap_sys_nice_begone.patch";
# url = "https://github.com/Frogging-Family/community-patches/raw/master/linux61-tkg/cap_sys_nice_begone.mypatch";
# hash = "sha256-Y3a0+x2xvHsfLax/uwycdJf3xLxvVfkfDVqjkxNaYEo=";
# };
# }
# ];
# lix
nixpkgs.overlays = [
(final: prev: {
inherit (prev.lixPackageSets.stable)
nixpkgs-review
nix-eval-jobs
nix-fast-build
colmena;
})
];
nix.package = pkgs.lixPackageSets.stable.lix;
# Fonts
fonts.packages = [
pkgs.departure-mono
];
# Define hostname
networking.hostName = "protogen-13";
# Enable networking.
networking.networkmanager.enable = true;
# Enable Nix-command & Flakes
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# Set your time zone.
time.timeZone = "America/Toronto";
# Select internationalisation properties.
i18n.defaultLocale = "en_CA.UTF-8";
# Define system services, enable syncthing, mullvad.
services = {
syncthing = {
enable = true;
user = "yuka";
dataDir = "/home/yuka/Documents"; # Default folder for new synced folders
configDir = "/home/yuka/Documents/.config/syncthing"; # Folder for Syncthing's settings and keys
};
mullvad-vpn.enable = true;
rpcbind.enable = true;
};
# Enable Plasma6 & SDDM.
services.displayManager.sddm.enable = true;
services.displayManager.sddm.wayland.enable = true;
services.desktopManager.plasma6.enable = true;
# Configure keymap in X11.
services.xserver = {
xkb.layout = "us";
xkb.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;
};
# Define user account.
users.users.yuka = {
shell = pkgs.zsh;
isNormalUser = true;
description = "yukaira";
extraGroups = [ "networkmanager" "wheel" "audio" "adbusers" ];
packages = with pkgs; [
];
};
# Enable ZSH.
programs.zsh.enable = true;
# Allow unfree packages.
nixpkgs.config.allowUnfree = true;
# Define system packages.
environment.systemPackages = with pkgs; [
appimage-run
android-tools
bat
corectrl
linuxKernel.packages.linux_7_1.rtw88
micro
tree
wget
gparted
piper
mullvad-vpn
rar
nfs-utils
pika-backup
pavucontrol
linux-wallpaperengine
(pkgs.wrapOBS {
plugins = with pkgs.obs-studio-plugins; [
wlrobs
obs-backgroundremoval
obs-pipewire-audio-capture
obs-vaapi #optional AMD hardware acceleration
obs-gstreamer
obs-vkcapture
droidcam-obs
];
})
];
# Enable Git.
programs.git = {
enable = true;
lfs.enable = true;
};
# Enable Steam.
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
extraCompatPackages = with pkgs; [
proton-ge-bin
];
};
# Enable Opentabletdriver
hardware.opentabletdriver.enable = true;
# Enable Bluetooth
hardware.bluetooth.enable = true; # enables support for Bluetooth
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
# Open ports
networking.firewall = {
enable = true;
allowedTCPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
allowedUDPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
};
networking.firewall.allowedTCPPorts = [ 111 2049 8384 8080 22000 ];
networking.firewall.allowedUDPPorts = [ 111 2049 8080 22000 21027 ];
# Enable KDE connect
programs.kdeconnect.enable = true;
# Enable AMDGPU
boot.initrd.kernelModules = [ "amdgpu" "nfs" ];
services.xserver.enable = true;
services.xserver.videoDrivers = [ "amdgpu" ];
# AMDGPU openCL support
hardware.graphics.extraPackages = with pkgs; [
rocmPackages.clr.icd
];
# Enable ratbagd for piper
services.ratbagd.enable = true;
# 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.11"; # Did you read the comment?
}