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