-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.nix
230 lines (209 loc) · 6.78 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
# 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, lib, ... }:
# Install DroidCam and needed v4l2loopback
# let v4l2loopback-dc = config.boot.kernelPackages.callPackage ./v4l2loopback-dc.nix { };
# droidcam = pkgs.callPackage ./droidcam.nix {};
# in {
# boot.extraModulePackages = [ v4l2loopback-dc ];
# environment.systemPackages = [ droidcam ];
# }
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
# Enable the KDE Desktop Environment.
./users-configuration.nix
./local-configuration.nix
./wjjunyor-configuration.nix
./x-configuration.nix
./networking-configuration.nix
# Sets-up the Home Manager
# "${home-manager}/nixos"
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = false;
# Uses the most recent packages.
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelParams = [ "amd_iommu=on" "iommu=1" "rd.driver.pre=vfio-pci" ]; #If host = T101 or T800
boot.kernelModules = [ "kvm-amd" "tap" "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" "v4l2loopback" "snd-aloop" "amdgpu" "dm-snapchot" ]; # "hid-nintendo" #If host = T101 or T800
boot.extraModprobeConfig = ''#If host = T101 or T800
options vfio-pci ids=vendorid:deviceid,vendorid:deviceid
options v4l2loopback nr_devices=2 exclusive_caps=1,1,1,1,1,1,1,1 video_nr=0,1 card_label=v4l2lo0,v4l2lo1
'';
# Teste ZFS
# boot.initrd.supportedFilesystems = [ "zfs" ];
# boot.supportedFilesystems = [ "zfs" ];
# boot.zfs.enableUnstable = false;
# services.zfs.autoScrub.enable = true;
# services.zfs.autoSnapshot.enable = true;
# services.zfs.autoSnapshot.frequent = 8;
# services.zfs.autoSnapshot.monthly = 1;
# services.zfs.trim.enable = true;
# Supposedly better for the SSD.
fileSystems."/".options = [ "noatime" "nodiratime" "discard" ];
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
# boot.loader.grub.version = 2; %%% DEPRECATED %%%
# boot.loader.grub.backgroundColor = "#7EBAE4";
boot.loader.grub.device = "nodev";
boot.loader.grub.efiSupport = true;
boot.loader.efi.canTouchEfiVariables = true;
# Grub menu is painted really slowly on HiDPI, so we lower the
# resolution. Unfortunately, scaling to 1280x720 (keeping aspect
# ratio) doesn't seem to work, so we just pick another low one.
boot.loader.grub.gfxmodeEfi = "1024x768";
boot.loader.grub.enableCryptodisk = true;
boot.initrd.luks.devices = {
"root" = {
device = "/dev/disk/by-uuid/209d5369-c671-4d18-adc2-a97e58c5bb69";
preLVM = true;
allowDiscards = true;
};
};
# Select internationalisation properties.
console.earlySetup = true;
console.font = "Lat2-Terminus16";
console.keyMap = "br-abnt2";
i18n.defaultLocale = "pt_BR.UTF-8";
# i18n.supportedLocales = [
# "all"
# "pt_BR.UTF-8/UTF-8"
# "en_GB.UTF-8/UTF-8"
# "es_ES.UTF-8/UTF-8"
# "fr_FR.UTF-8/UTF-8"
# "zh_CN.UTF-8/UTF-8"
# "C.UTF-8/UTF-8"
# ];
# i18n.extraLocaleSettings = {
# LANGUAGE = "pt_BR";
# LC_ALL = "";
# LC_ADDRESS = "pt_BR.UTF-8";
# LC_IDENTIFICATION = "pt_BR.UTF-8";
# LC_MEASUREMENT = "pt_BR.UTF-8";
# LC_MONETARY = "pt_BR.UTF-8";
# LC_NAME = "pt_BR.UTF-8";
# LC_NUMERIC = "pt_BR.UTF-8";
# LC_PAPER = "pt_BR.UTF-8";
# LC_TELEPHONE = "pt_BR.UTF-8";
# LC_TIME = "pt_BR.UTF-8";
# };
i18n.inputMethod.fcitx5.plasma6Support = true;
# Set your time zone.
time.timeZone = "America/Campo_Grande";
# 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.bash.enableCompletion = true;
programs.nix-index.enableBashIntegration = true;
programs.zsh.enableBashCompletion = true;
# List services that you want to enable:
# Enable CUPS to print documents.
services.printing.enable = true;
# Team Viewer Listener
services.teamviewer.enable = false;
# Teste Hardware ZFS
# HARDWARE
hardware.bluetooth.enable = true;
hardware.cpu.amd.updateMicrocode = true;
# hardware.opengl.driSupport = true;
hardware.opengl.driSupport32Bit = true;
hardware.opengl.enable = true;
hardware.opengl.extraPackages = with pkgs; [ vaapiVdpau libvdpau-va-gl ];
hardware.pulseaudio.support32Bit = true;
hardware.pulseaudio.zeroconf.discovery.enable = true;
hardware.pulseaudio.zeroconf.publish.enable = true;
hardware.sane.enable = true;
# Enable sound.
# sound.enable = true;
hardware.pulseaudio.enable = false;
powerManagement.enable = true;
# 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 = "24.05"; # Did you read the comment?
# Auto upgrade Always ON.
system.autoUpgrade.enable = true;
# Garbage Collection Automation and Disk Usage Otimization
nix.gc.automatic = true;
nix.gc.dates = "weekly";
nix.gc.options = "--delete-older-than 30d";
nix.settings.auto-optimise-store = true;
nix.extraOptions = ''
min-free = ${toString (100 * 1024 * 1024)}
max-free = ${toString (1024 * 1024 * 1024)}
'';
services.journald.extraConfig = ''
SystemMaxUse=2G
'';
# Fundamental core packages
environment.systemPackages = with pkgs;
[ # Basic command line tools
bash
zsh
wget
file
# gksu
glibcLocalesUtf8
git
hdf5
zip
unzip
htop
yle-dl
youtube-dl
# Tool for searching files/binaries from Nix packages
nix-index
dnsutils
whois
coreutils
vbetool
killall
nethogs
unrar
# Gamin: a file and directory monitoring system
# fam - DEPRECATED
# Basic image manipulation and handling stuff
imagemagick
ghostscript
# Text editors
vim
# system clipboard support for vim
xclip
# VPN
pptp
openvpn
# File format conversions
pandoc
pdf2svg
# Screen brightness and temperature
redshift
# SSH filesystem
sshfs-fuse
# Yet another dotfile manager
yadm
# Password hash generator
mkpasswd
# Android
jmtpfs
gphoto2
libmtp
mtpfs
nix-prefetch-git
# Make NTFS filesystems (e.g., USB drives)
ntfs3g
# GUI for sound control
pavucontrol
# Bluetooth Support
bluez
# bluezFull # 20230213 Deprecated
bluez-tools
# Precisamos dele
pinentry-qt
fontconfig
glibcLocales
];
}