-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcharon.nix
213 lines (190 loc) · 5.06 KB
/
charon.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
{
pkgs,
fetchpatch,
...
}: {
imports = [
./_shared/common.nix
./hardware/charon.nix
./mounts/orpheus-nfs.nix
./services/audio-pulseaudio.nix
./services/chipcards.nix
./services/printing.nix
./services/scanning.nix
./users/maik.nix
];
# Set hostname
networking.hostName = "charon";
# Enable X13S support
nixos-x13s = {
enable = true;
# wifiMac = true;
# bluetoothMac = true;
kernel = "jhovold";
};
# Enable bluetooth
hardware.bluetooth.enable = true;
# Allow unfree software
nixpkgs.config.allowUnfree = true;
# Use zram as swap
zramSwap = {
enable = true;
algorithm = "zstd";
};
# Enable plymouth
boot.plymouth = {
enable = true;
font = "${pkgs.inter}/share/fonts/truetype/InterVariable.ttf";
};
# Disable ttys
services.logind.extraConfig = ''
NAutoVTs=0
ReserveVT=0
'';
# Use german keyboard layout
services.xserver = {
enable = true;
# set keymap
xkb.layout = "de";
};
# Use plasma as desktop environment
services.desktopManager.plasma6.enable = true;
# Use SDDM as displayManager
services.displayManager.sddm = {
enable = true;
wayland = {
enable = true;
compositor = "kwin";
};
};
# customize the desktop
# FIXME: this compiles plasma-workspace just to patch qml script
# nixpkgs.overlays = [
# (final: prev: {
# # use smaller icons with more spacing in plasma-workspace
# kdePackages = prev.kdePackages.overrideScope (sfinal: sprev: {
# plasma-workspace = sprev.plasma-workspace.overrideAttrs (oldAttrs: {
# patches =
# oldAttrs.patches
# ++ [
# ./patches/0001-plasma-workspaces-systemtray-icon-sizes.patch
# ./patches/0002-plasma-workspaces-lockout-icon-sizes.patch
# ];
# });
# });
# })
# ];
# https://invent.kde.org/plasma/ksshaskpass/-/merge_requests/24
nixpkgs.overlays = [
(final: prev: {
kdePackages = prev.kdePackages.overrideScope (sfinal: sprev: {
ksshaskpass = sprev.ksshaskpass.overrideAttrs (oldAttrs: {
patches = builtins.fetchurl {
url = "https://invent.kde.org/plasma/ksshaskpass/-/merge_requests/24.patch";
sha256 = "sha256:00rqh4bkwy8hhh2fl3pqddilprilanp78zi2l84ggfik4arm52ig";
};
});
});
})
];
# Use NetworkManager
networking.networkmanager.enable = true;
# https://github.com/jhovold/linux/wiki/X13s#modem
networking.networkmanager.fccUnlockScripts = [
{
id = "105b:e0c3";
path = "${pkgs.modemmanager}/share/ModemManager/fcc-unlock.available.d/105b";
}
];
# Disable NetworkManager wait online
systemd.services."NetworkManager-wait-online".enable = false;
# Enable mDNS
services.avahi.enable = true;
# Add inter, jetbrains-mono and noto fonts
fonts.packages = with pkgs; [
inter
jetbrains-mono
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
];
# List of system-wide packages
environment.systemPackages = with pkgs; [
pkgs.widevine-overlay.widevine-cdm
aspell
aspellDicts.de
aspellDicts.en
calibre
digikam
ffmpegthumbs
firefox
fooyin
gitMinimal
kdePackages.akonadi
kdePackages.akonadi-calendar
kdePackages.akonadi-contacts
kdePackages.akonadi-mime
kdePackages.akonadi-search
kdePackages.akregator
kdePackages.alligator
kdePackages.elisa
kdePackages.kdepim-addons
kdePackages.kdepim-runtime
kdePackages.kio-extras
kdePackages.kleopatra
kdePackages.kmail
kdePackages.kmail-account-wizard
kdePackages.ksshaskpass
kdePackages.merkuro
kdePackages.neochat
kdePackages.qtlocation
kdePackages.skanpage
kdePackages.tokodon
kmymoney
libcamera
libreoffice-qt
mpv
nfs-utils
pinentry-qt
syncthing
transmission_4-qt
unar
zed-editor
];
# Insecure dependency of neochat
nixpkgs.config.permittedInsecurePackages = [
"olm-3.2.16"
];
# Enable TLP (and disable ppd)
services.power-profiles-daemon.enable = false;
services.tlp.enable = true;
services.tlp.settings = {
PCIE_ASPM_ON_BAT = "powersupersave";
RUNTIME_PM_ON_AC = "auto";
RUNTIME_PM_ON_BAT = "on";
# Operation mode when no power supply can be detected: AC, BAT.
TLP_DEFAULT_MODE = "BAT";
# Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE
TLP_PERSISTENT_DEFAULT = "1";
DEVICES_TO_DISABLE_ON_LAN_CONNECT = "wifi wwan";
DEVICES_TO_DISABLE_ON_WIFI_CONNECT = "wwan";
DEVICES_TO_DISABLE_ON_WWAN_CONNECT = "wifi";
#
START_CHARGE_THRESH_BAT0 = "75";
STOP_CHARGE_THRESH_BAT0 = "80";
#
USB_AUTOSUSPEND = "1";
};
# Enable kdeconnect
programs.kdeconnect = {
enable = true;
};
# Enable ssh-agent
programs.ssh = {
startAgent = true;
enableAskPassword = true;
askPassword = "${pkgs.kdePackages.ksshaskpass}/bin/ksshaskpass";
};
environment.sessionVariables.SSH_ASKPASS_REQUIRE = "prefer";
system.stateVersion = "24.05";
}