btw i use nix
1{
2 pkgs,
3 lib,
4 config,
5 ...
6}:
7
8{
9 imports = [
10 ./hardware-configuration.nix
11 ./backups.nix
12 ];
13
14 custom = {
15 enable = true;
16 tailscale = true;
17 laptop = true;
18 printing = true;
19 gui.i3 = true;
20 gui.sway = true;
21 workstation = true;
22 autoUpgrade.enable = true;
23 homeManager.enable = true;
24 zsa = true;
25 };
26
27 home-manager.users.${config.custom.username} = {
28 services.kdeconnect.enable = true;
29 services.spotifyd = {
30 enable = true;
31 settings.global = {
32 username = "ryangibb321@gmail.com";
33 password_cmd = "pass show spotify/ryangibb321@gmail.com";
34 };
35 };
36 custom = {
37 machineColour = "blue";
38 mail.enable = true;
39 calendar.enable = true;
40 battery.enable = true;
41 emacs.enable = true;
42 };
43 home.sessionVariables = {
44 LEDGER_FILE = "$HOME/vault/finances.ledger";
45 CALENDAR_DIR = "$HOME/calendar";
46 };
47 programs.git.extraConfig.commit.gpgSign = true;
48 programs.direnv = {
49 enable = true;
50 enableZshIntegration = true;
51 enableBashIntegration = true;
52 };
53 };
54
55 boot.loader.grub = {
56 enable = true;
57 default = "saved";
58 device = "nodev";
59 efiSupport = true;
60 useOSProber = true;
61 };
62
63 environment.systemPackages = with pkgs; [
64 gcc
65 dell-command-configure
66 file-roller
67 unzip
68 cheese
69 gparted
70 chromium
71 calibre
72 zotero
73 element-desktop
74 nheko
75 iamb
76 spotify
77 gimp
78 (python3.withPackages (
79 p: with p; [
80 numpy
81 matplotlib
82 pandas
83 ]
84 ))
85 lsof
86 gthumb
87 restic
88 mosquitto
89 texlive.combined.scheme-full
90 typst
91 evince
92 pdfpc
93 krop
94 transmission_4
95 transmission_4-gtk
96 libreoffice
97 obs-studio
98 xournalpp
99 inkscape
100 kdenlive
101 tor-browser-bundle-bin
102 ffmpeg
103 audio-recorder
104 speechd
105 deploy-rs
106 nix-prefetch-git
107 tcpdump
108 pandoc
109 powertop
110 toot
111 ledger
112 llm
113 (writeShellScriptBin "q" ''
114 llm -m 4 "$*"
115 '')
116 (writeShellScriptBin "qc" ''
117 llm -m 4 "$*" -c
118 '')
119 ddcutil
120 anki
121 (aspellWithDicts (
122 ps: with ps; [
123 en
124 en-computers
125 en-science
126 ]
127 ))
128 moreutils
129 gnome-calendar
130
131 # nix
132 nixd
133 nixfmt-rfc-style
134 # ocaml
135 opam
136 pkg-config
137 ocamlPackages.ocaml-lsp
138 ocamlPackages.ocamlformat
139 # rust
140 overlay-unstable.cargo
141 overlay-unstable.rustc
142 overlay-unstable.rust-analyzer
143 overlay-unstable.rustfmt
144 # haskell
145 cabal-install
146 ghc
147 haskell-language-server
148 # python
149 pyright
150 black
151 # jave
152 jdt-language-server
153 nodejs_18
154 # c
155 clang-tools
156 # lua
157 lua-language-server
158 # other
159 ltex-ls
160 typst-lsp
161
162 overlay-unstable.claude-code
163 ];
164
165 services.gnome.gnome-keyring.enable = true;
166 programs.seahorse.enable = true;
167
168 programs.dconf.enable = true;
169 services.gnome.evolution-data-server.enable = true;
170 services.gnome.gnome-online-accounts.enable = true;
171
172 virtualisation.docker.enable = true;
173 users.users.ryan.extraGroups = [ "docker" ];
174
175 virtualisation.virtualbox.host.enable = true;
176 users.extraGroups.vboxusers.members = [ "ryan" ];
177
178 systemd.extraConfig = ''
179 DefaultTimeoutStopSec=30s
180 '';
181
182 programs.steam.enable = true;
183
184 security.sudo.extraConfig = ''
185 Defaults !tty_tickets
186 '';
187
188 # sometimes I want to keep the cache for operating without internet
189 nix.gc.automatic = lib.mkForce false;
190
191 # for CL VPN
192 networking.networkmanager.enableStrongSwan = true;
193
194 services = {
195 syncthing = {
196 enable = true;
197 user = config.custom.username;
198 dataDir = "/home/ryan/syncthing";
199 configDir = "/home/ryan/.config/syncthing";
200 };
201 };
202
203 networking.hostId = "e768032f";
204
205 #system.includeBuildDependencies = true;
206 nix = {
207 distributedBuilds = true;
208 extraOptions = ''
209 builders-use-substitutes = true
210 '';
211 };
212
213 # https://github.com/NixOS/nixpkgs/issues/180175
214 systemd.services.NetworkManager-wait-online.enable = false;
215
216 # https://github.com/NixOS/nixpkgs/issues/330685
217 boot.extraModprobeConfig = ''
218 options snd-hda-intel dmic_detect=0
219 '';
220
221 # ddcutil
222 hardware.i2c.enable = true;
223
224 hardware.graphics = {
225 enable = true;
226 extraPackages = with pkgs; [
227 # Video Acceleration API (VA-API) user mode driver
228 intel-media-driver
229 # Intel Video Processing Library (VPL) API runtime implementation
230 vpl-gpu-rt
231 ];
232 };
233}