-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration.nix
205 lines (169 loc) · 4.65 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
# 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, lib, pkgs, hostname, wlan, grub, xkbopt, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./ibus.nix
];
nix.package = pkgs.nix_2_4;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
boot.loader.grub = grub;
networking.hostName = hostname;
networking.wireless = {
enable = true; # Enables wpa_supplicant.
interfaces = [wlan]; # https://github.com/NixOS/nixpkgs/issues/101963
};
networking.networkmanager.enable = false;
i18n.defaultLocale = "pl_PL.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "pl";
};
time.timeZone = "Europe/Warsaw";
environment.systemPackages = import ./envsyspackages.nix pkgs;
nixpkgs.config.allowUnfree = true;
hardware.opengl.driSupport32Bit = true;
# powerManagement.cpuFreqGovernor = "schedutil";
services.tlp = {
enable = true;
settings = {
USB_WHITELIST = lib.concatStringsSep " " [ # enable autosuspend
"046d:c52b" # my Logitech Unifying for T620
];
};
};
# To let TLP be:
# https://discourse.nixos.org/t/cant-enable-tlp-when-upgrading-to-21-05/13435/2
services.power-profiles-daemon.enable = false;
# 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.browserpass.enable = true;
services.gnome.gnome-keyring.enable = true;
services.openssh.enable = true; # enable OpenSSH daemon
# services.printing.enable = true; # enable CUPS
virtualisation.docker.enable = true;
# virtualisation.virtualbox.host = {
# enable = true;
# enableExtensionPack = true;
# };
virtualisation.libvirtd = {
enable = true;
};
services.lorri.enable = true;
services.gpm.enable = true;
hardware.acpilight.enable = true;
services.acpid.enable = true;
hardware.bluetooth = {
enable = true;
settings.General.Enable = "Source,Sink,Media,Socket";
};
services.blueman.enable = true;
# Enable sound.
sound.enable = true;
hardware.pulseaudio = {
enable = true;
package = pkgs.pulseaudioFull;
extraModules = [ pkgs.pulseaudio-modules-bt ];
};
nixpkgs.config.pulseaudio = true;
# Enable the X11 windowing system.
services.xserver = {
enable = true;
layout = "pl";
xkbOptions = lib.concatStringsSep "," xkbopt;
libinput.enable = true;
displayManager.lightdm.enable = true;
desktopManager = {
plasma5.enable = false;
# lxqt.enable = true;
enlightenment.enable = true;
cde.enable = true;
xfce.enable = true;
gnome.enable = true;
};
windowManager = {
cwm.enable = true;
fvwm.enable = true;
fluxbox.enable = true;
awesome.enable = true;
};
};
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.mf = {
isNormalUser = true;
uid = 1000;
extraGroups = [
"wheel"
"networkmanager"
"video"
"audio"
"docker"
"vboxusers"
"libvirtd"
];
};
users.users.riir = {
isNormalUser = true;
uid = 1138;
extraGroups = [
"video"
"audio"
"networkmanager"
"docker"
"wheel"
];
shell = pkgs.zsh;
};
programs.zsh.enable = true;
programs.fish.enable = true;
services.avahi = {
enable = true;
nssmdns = true;
publish = {
addresses = true;
domain = true;
enable = true;
userServices = true;
workstation = true;
hinfo = true;
};
extraServiceFiles.ssh = "${pkgs.avahi}/etc/avahi/services/ssh.service";
};
services.syncthing = {
enable = true;
openDefaultPorts = true;
user = "mf";
configDir = "/home/mf/.config/syncthing";
dataDir = "/home/mf/.local/share/syncthing";
};
programs.mosh.enable = true;
# ##### for honey:
#
# services.xserver.videoDrivers = [ "nvidia" ];
# hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_470;
# hardware.nvidia.prime = {
# sync.enable = true;
# nvidiaBusId = "PCI:1:0:0";
# intelBusId = "PCI:0:2:0";
# };
#
# boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
#
# boot = {
# extraModprobeConfig = "options nvidia-drm modeset=1";
#
# initrd.kernelModules = [
# "nvidia"
# "nvidia_modeset"
# "nvidia_uvm"
# "nvidia_drm"
# ];
# };
}