diff options
| author | Preston Pan <ret2pop@gmail.com> | 2026-01-30 20:50:09 -0800 |
|---|---|---|
| committer | Preston Pan <ret2pop@gmail.com> | 2026-01-30 20:50:09 -0800 |
| commit | 6de29052077fa51ccaa452ad7432dd64dc806bd2 (patch) | |
| tree | 5650c92cc82262941c183d782e517c13d1c488d2 /nix | |
| parent | d43c1e768c0102387a7c1167b476bb0af2d21987 (diff) | |
add more stuff to my monorepo
Diffstat (limited to 'nix')
| -rw-r--r-- | nix/flake.lock | 283 | ||||
| -rw-r--r-- | nix/init.el | 16 | ||||
| -rw-r--r-- | nix/modules/configuration.nix | 35 | ||||
| -rw-r--r-- | nix/modules/home/default.nix | 8 | ||||
| -rw-r--r-- | nix/modules/home/emacs.nix | 1 | ||||
| -rw-r--r-- | nix/modules/home/fcitx.nix | 4 | ||||
| -rw-r--r-- | nix/modules/home/hyprland.nix | 22 | ||||
| -rw-r--r-- | nix/modules/home/user.nix | 4 | ||||
| -rw-r--r-- | nix/modules/home/waybar.nix | 468 | ||||
| -rw-r--r-- | nix/modules/home/zsh.nix | 2 | ||||
| -rw-r--r-- | nix/modules/ngircd.nix | 2 | ||||
| -rw-r--r-- | nix/modules/nvidia.nix | 4 | ||||
| -rw-r--r-- | nix/modules/ollama.nix | 5 | ||||
| -rw-r--r-- | nix/modules/pipewire.nix | 6 | ||||
| -rw-r--r-- | nix/modules/xserver.nix | 1 | ||||
| -rw-r--r-- | nix/systems/affinity/default.nix | 5 | ||||
| -rw-r--r-- | nix/systems/spontaneity/default.nix | 157 |
17 files changed, 501 insertions, 522 deletions
diff --git a/nix/flake.lock b/nix/flake.lock index 9f3aa76..579f864 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -39,27 +39,6 @@ "type": "github" } }, - "devshell": { - "inputs": { - "nixpkgs": [ - "nix-topology", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1728330715, - "narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=", - "owner": "numtide", - "repo": "devshell", - "rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, "disko": { "inputs": { "nixpkgs": [ @@ -67,11 +46,11 @@ ] }, "locked": { - "lastModified": 1758287904, - "narHash": "sha256-IGmaEf3Do8o5Cwp1kXBN1wQmZwQN3NLfq5t4nHtVtcU=", + "lastModified": 1769524058, + "narHash": "sha256-zygdD6X1PcVNR2PsyK4ptzrVEiAdbMqLos7utrMDEWE=", "owner": "nix-community", "repo": "disko", - "rev": "67ff9807dd148e704baadbd4fd783b54282ca627", + "rev": "71a3fc97d80881e91710fe721f1158d3b96ae14d", "type": "github" }, "original": { @@ -99,22 +78,6 @@ "flake-compat_2": { "flake": false, "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_3": { - "flake": false, - "locked": { "lastModified": 1733328505, "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", "owner": "edolstra", @@ -151,17 +114,35 @@ }, "flake-parts_2": { "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1765835352, + "narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "a34fae9c08a15ad73f295041fec82323541400a9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_3": { + "inputs": { "nixpkgs-lib": [ "nixpak", "nixpkgs" ] }, "locked": { - "lastModified": 1759362264, - "narHash": "sha256-wfG0S7pltlYyZTM+qqlhJ7GMw2fTF4mLKCIVhLii/4M=", + "lastModified": 1765835352, + "narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "758cf7296bee11f1706a574c77d072b8a7baa881", + "rev": "a34fae9c08a15ad73f295041fec82323541400a9", "type": "github" }, "original": { @@ -170,7 +151,7 @@ "type": "github" } }, - "flake-parts_3": { + "flake-parts_4": { "inputs": { "nixpkgs-lib": [ "nur", @@ -209,24 +190,6 @@ "type": "github" } }, - "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "gitignore": { "inputs": { "nixpkgs": [ @@ -249,81 +212,84 @@ "type": "github" } }, - "gitignore_2": { + "hercules-ci-effects": { "inputs": { + "flake-parts": [ + "nixpak", + "flake-parts" + ], "nixpkgs": [ - "nix-topology", - "pre-commit-hooks", + "nixpak", "nixpkgs" ] }, "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "lastModified": 1765774562, + "narHash": "sha256-UQhfCggNGDc7eam+EittlYmeW89CZVT1KkFIHZWBH7k=", "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "repo": "hercules-ci-effects", + "rev": "edcbb19948b6caf1700434e369fde6ff9e6a3c93", "type": "github" }, "original": { "owner": "hercules-ci", - "repo": "gitignore.nix", + "repo": "hercules-ci-effects", "type": "github" } }, - "hercules-ci-effects": { + "home-manager": { "inputs": { - "flake-parts": [ - "nixpak", - "flake-parts" - ], "nixpkgs": [ - "nixpak", "nixpkgs" ] }, "locked": { - "lastModified": 1758022363, - "narHash": "sha256-ENUhCRWgSX4ni751HieNuQoq06dJvApV/Nm89kh+/A0=", - "owner": "hercules-ci", - "repo": "hercules-ci-effects", - "rev": "1a3667d33e247ad35ca250698d63f49a5453d824", + "lastModified": 1763992789, + "narHash": "sha256-WHkdBlw6oyxXIra/vQPYLtqY+3G8dUVZM8bEXk0t8x4=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "44831a7eaba4360fb81f2acc5ea6de5fde90aaa3", "type": "github" }, "original": { - "owner": "hercules-ci", - "repo": "hercules-ci-effects", + "owner": "nix-community", + "ref": "release-25.05", + "repo": "home-manager", "type": "github" } }, - "home-manager": { + "home-manager_2": { "inputs": { "nixpkgs": [ + "impermanence", "nixpkgs" ] }, "locked": { - "lastModified": 1758463745, - "narHash": "sha256-uhzsV0Q0I9j2y/rfweWeGif5AWe0MGrgZ/3TjpDYdGA=", + "lastModified": 1768598210, + "narHash": "sha256-kkgA32s/f4jaa4UG+2f8C225Qvclxnqs76mf8zvTVPg=", "owner": "nix-community", "repo": "home-manager", - "rev": "3b955f5f0a942f9f60cdc9cacb7844335d0f21c3", + "rev": "c47b2cc64a629f8e075de52e4742de688f930dc6", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-25.05", "repo": "home-manager", "type": "github" } }, "impermanence": { + "inputs": { + "home-manager": "home-manager_2", + "nixpkgs": "nixpkgs_2" + }, "locked": { - "lastModified": 1737831083, - "narHash": "sha256-LJggUHbpyeDvNagTUrdhe/pRVp4pnS6wVKALS782gRI=", + "lastModified": 1769548169, + "narHash": "sha256-03+JxvzmfwRu+5JafM0DLbxgHttOQZkUtDWBmeUkN8Y=", "owner": "nix-community", "repo": "impermanence", - "rev": "4b3e914cdf97a5b536a889e939fb2fd2b043a170", + "rev": "7b1d382faf603b6d264f58627330f9faa5cba149", "type": "github" }, "original": { @@ -361,19 +327,17 @@ }, "nix-topology": { "inputs": { - "devshell": "devshell", - "flake-utils": "flake-utils_2", + "flake-parts": "flake-parts_2", "nixpkgs": [ "nixpkgs" - ], - "pre-commit-hooks": "pre-commit-hooks" + ] }, "locked": { - "lastModified": 1752093877, - "narHash": "sha256-P0TySh6sQl1EhfxjW9ZqGxEyUBSsEpdnchOe1QB0pLA=", + "lastModified": 1769018862, + "narHash": "sha256-x3eMpPQhZwEDunyaUos084Hx41XwYTi2uHY4Yc4YNlk=", "owner": "oddlama", "repo": "nix-topology", - "rev": "6a536c4b686ee4bcf07a7b0f8b823584560e2633", + "rev": "a15cac71d3399a4c2d1a3482ae62040a3a0aa07f", "type": "github" }, "original": { @@ -384,11 +348,11 @@ }, "nixos-dns": { "inputs": { - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_2", "nixpkgs": [ "nixpkgs" ], - "systems": "systems_3", + "systems": "systems_2", "treefmt-nix": "treefmt-nix" }, "locked": { @@ -407,18 +371,18 @@ }, "nixpak": { "inputs": { - "flake-parts": "flake-parts_2", + "flake-parts": "flake-parts_3", "hercules-ci-effects": "hercules-ci-effects", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1759373157, - "narHash": "sha256-AdQmn5AASt6nUYxIAo+/+we312zqA0moB/Cuj7TsIC4=", + "lastModified": 1769288622, + "narHash": "sha256-GaDPnzDQAx5WRi12XVttCHsVw0VkOMYNpniT7KHYNfk=", "owner": "nixpak", "repo": "nixpak", - "rev": "7cd8f919d173deeb1f6d01cfda22a84eeedba1ae", + "rev": "4276954ad4f877d79801fd8952af38a3370bcb65", "type": "github" }, "original": { @@ -443,6 +407,21 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1765674936, + "narHash": "sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "2075416fcb47225d9b68ac469a5c4801a9c4dd85", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1710695816, @@ -461,11 +440,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1759381078, - "narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=", + "lastModified": 1768564909, + "narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee", + "rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f", "type": "github" }, "original": { @@ -477,11 +456,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1759381078, - "narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=", + "lastModified": 1769461804, + "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee", + "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d", "type": "github" }, "original": { @@ -493,11 +472,27 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1759570798, - "narHash": "sha256-kbkzsUKYzKhuvMOuxt/aTwWU2mnrwoY964yN3Y4dE98=", + "lastModified": 1769461804, + "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1769268028, + "narHash": "sha256-mAdJpV0e5IGZjnE4f/8uf0E4hQR7ptRP00gnZKUOdMo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0d4f673a88f8405ae14484e6a1ea870e0ba4ca26", + "rev": "ab9fbbcf4858bd6d40ba2bbec37ceb4ab6e1f562", "type": "github" }, "original": { @@ -509,15 +504,15 @@ }, "nur": { "inputs": { - "flake-parts": "flake-parts_3", - "nixpkgs": "nixpkgs_3" + "flake-parts": "flake-parts_4", + "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1759790712, - "narHash": "sha256-3KIfzcohPARwIc7nVtvioELW62+rXY7O3FhAIryqn4Y=", + "lastModified": 1769834069, + "narHash": "sha256-GjeN/5TdWev/L/Izem3XScV6i/55Z+n+GfjKa1srBcU=", "owner": "nix-community", "repo": "NUR", - "rev": "9a6d13630a078d81d0a2d3500f3c00aa4b681c89", + "rev": "2db81de33100ef4d86ebc80dc4bc30df1fe97c5d", "type": "github" }, "original": { @@ -526,33 +521,6 @@ "type": "github" } }, - "pre-commit-hooks": { - "inputs": { - "flake-compat": "flake-compat_2", - "gitignore": "gitignore_2", - "nixpkgs": [ - "nix-topology", - "nixpkgs" - ], - "nixpkgs-stable": [ - "nix-topology", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1730797577, - "narHash": "sha256-SrID5yVpyUfknUTGWgYkTyvdr9J1LxUym4om3SVGPkg=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "1864030ed24a2b8b4e4d386a5eeaf0c5369e50a9", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, "pre-commit-hooks-nix": { "inputs": { "flake-compat": [ @@ -590,7 +558,7 @@ "nix-topology": "nix-topology", "nixos-dns": "nixos-dns", "nixpak": "nixpak", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "nur": "nur", "scripts": "scripts", "sops-nix": "sops-nix", @@ -640,14 +608,14 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1759635238, - "narHash": "sha256-UvzKi02LMFP74csFfwLPAZ0mrE7k6EiYaKecplyX9Qk=", + "lastModified": 1769469829, + "narHash": "sha256-wFcr32ZqspCxk4+FvIxIL0AZktRs6DuF8oOsLt59YBU=", "owner": "Mic92", "repo": "sops-nix", - "rev": "6e5a38e08a2c31ae687504196a230ae00ea95133", + "rev": "c5eebd4eb2e3372fe12a8d70a248a6ee9dd02eff", "type": "github" }, "original": { @@ -696,21 +664,6 @@ "type": "github" }, "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { "id": "systems", "type": "indirect" } diff --git a/nix/init.el b/nix/init.el index 7e88f49..56d7e4b 100644 --- a/nix/init.el +++ b/nix/init.el @@ -481,14 +481,14 @@ "h r r" '(lambda () (interactive) (org-babel-load-file (expand-file-name "~/monorepo/config/emacs.org"))))) -(use-package ellama - :custom - (ellama-sessions-directory "~/org/ellama/" "Set org directory for LLM sessions") - :init - (require 'llm-ollama) - (setopt ellama-provider (make-llm-ollama - :host "localhost" - :chat-model "qwen2.5:14b"))) +;; (use-package ellama +;; :custom +;; (ellama-sessions-directory "~/org/ellama/" "Set org directory for LLM sessions") +;; :init +;; (require 'llm-ollama) +;; (setopt ellama-provider (make-llm-ollama +;; :host "localhost" +;; :chat-model "qwen2.5:14b"))) (use-package minuet :bind diff --git a/nix/modules/configuration.nix b/nix/modules/configuration.nix index 7b862f9..c906529 100644 --- a/nix/modules/configuration.nix +++ b/nix/modules/configuration.nix @@ -99,17 +99,17 @@ kernelParams = [ "usbcore.autosuspend=-1" - "debugfs=off" + # "debugfs=off" "page_alloc.shuffle=1" "slab_nomerge" - "page_poison=1" + # "page_poison=1" # madaidan "pti=on" "randomize_kstack_offset=on" "vsyscall=none" "module.sig_enforce=1" - "lockdown=confidentiality" + # "lockdown=confidentiality" # cpu "spectre_v2=on" @@ -122,14 +122,10 @@ "extra_latent_entropy" # mineral - "init_on_alloc=1" + # "init_on_alloc=1" "random.trust_cpu=off" "random.trust_bootloader=off" - "intel_iommu=on" - "amd_iommu=force_isolation" - "iommu=force" - "iommu.strict=1" - "init_on_free=1" + # "init_on_free=1" "quiet" "loglevel=0" ]; @@ -240,8 +236,8 @@ graphics.enable = ! config.monorepo.profiles.ttyonly.enable; bluetooth = { - enable = true; - powerOnBoot = true; + enable = lib.mkDefault (! config.monorepo.profiles.ttyonly.enable); + powerOnBoot = lib.mkDefault (! config.monorepo.profiles.ttyonly.enable); }; }; @@ -264,15 +260,15 @@ # Misc. udev = { extraRules = ''''; - packages = with pkgs; [ + packages = if config.monorepo.profiles.workstation.enable then with pkgs; [ platformio-core platformio-core.udev openocd - ]; + ] else []; }; - printing.enable = true; - udisks2.enable = true; + printing.enable = lib.mkDefault config.monorepo.profiles.workstation.enable; + udisks2.enable = (! config.monorepo.profiles.ttyonly.enable); }; programs = { @@ -421,11 +417,20 @@ }; nixpkgs.config.permittedInsecurePackages = [ + "python3.13-ecdsa-0.19.1" "olm-3.2.16" ]; nix = { settings = { + max-jobs = 4; + cores = 0; + substituters = [ + "https://cache.nixos-cuda.org" + ]; + trusted-public-keys = [ + "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" + ]; experimental-features = "nix-command flakes ca-derivations"; trusted-users = [ "@wheel" ]; }; diff --git a/nix/modules/home/default.nix b/nix/modules/home/default.nix index c3bcfbf..f8a1ad5 100644 --- a/nix/modules/home/default.nix +++ b/nix/modules/home/default.nix @@ -109,7 +109,7 @@ (if config.monorepo.profiles.lang-python.enable then (with pkgs; [ poetry python3 - python312Packages.jedi + python314Packages.python-lsp-server ]) else []) ++ (if config.monorepo.profiles.lang-sol.enable then (with pkgs; [ @@ -151,13 +151,13 @@ (if config.monorepo.profiles.lang-nix.enable then (with pkgs; [ nil nixd - nixfmt-rfc-style + nixfmt nix-prefetch-scripts ]) else []) ++ (if config.monorepo.profiles.crypto.enable then (with pkgs; [ bitcoin - electrum + # electrum monero-cli monero-gui ]) else []) @@ -168,7 +168,7 @@ ]) else []) ++ (if config.monorepo.profiles.music.enable then (with pkgs; [ - mpc-cli + mpc sox ]) else []) ++ diff --git a/nix/modules/home/emacs.nix b/nix/modules/home/emacs.nix index 6e36837..2b7840d 100644 --- a/nix/modules/home/emacs.nix +++ b/nix/modules/home/emacs.nix @@ -28,7 +28,6 @@ epkgs.elfeed-org epkgs.elfeed-tube epkgs.elfeed-tube-mpv - epkgs.ellama epkgs.elpher epkgs.ement epkgs.emmet-mode diff --git a/nix/modules/home/fcitx.nix b/nix/modules/home/fcitx.nix index bedfdf2..b4bb965 100644 --- a/nix/modules/home/fcitx.nix +++ b/nix/modules/home/fcitx.nix @@ -5,8 +5,8 @@ enable = lib.mkDefault config.monorepo.profiles.graphics.enable; fcitx5.addons = with pkgs; [ fcitx5-gtk - fcitx5-chinese-addons - fcitx5-configtool + qt6Packages.fcitx5-chinese-addons + qt6Packages.fcitx5-configtool fcitx5-mozc fcitx5-rime ]; diff --git a/nix/modules/home/hyprland.nix b/nix/modules/home/hyprland.nix index 1d29b74..de343b5 100644 --- a/nix/modules/home/hyprland.nix +++ b/nix/modules/home/hyprland.nix @@ -8,10 +8,12 @@ settings = { "$mod" = "SUPER"; bezier = [ - "overshot,0,1,0,0.95" + "overshot, 0.05, 0.9, 0.1, 1.05" ]; animation = [ - "workspaces, 1, 10, overshot" + # "workspaces, 1, 10, overshot" + "windows, 1, 2, default" + "workspaces, 1, 2, default, slidefade 20%" ]; exec-once = [ "waybar" @@ -30,10 +32,11 @@ "__GLX_VENDOR_LIBRARY_NAME,nvidia" "ELECTRON_OZONE_PLATFORM_HINT,auto" ]; - layerrule = [ - "blur,waybar" - ]; + # layerrule = [ + # "blur:top,waybar" + # ]; monitor = [ + "DP-4,2560x1440@165.000000,0x0,1" "Unknown-1,disable" ]; windowrulev2 = [ @@ -134,15 +137,14 @@ }; rounding = 5; }; - device = { - name = "beken-usb-gaming-mouse-1"; - sensitivity = -0.5; - }; input = { + scroll_method = "on_button_down"; + scroll_button = 276; + sensitivity = -0.5; kb_options = "caps:swapescape"; repeat_delay = 300; repeat_rate = 50; - natural_scroll = true; + natural_scroll = false; touchpad = { natural_scroll = true; disable_while_typing = true; diff --git a/nix/modules/home/user.nix b/nix/modules/home/user.nix index 3cd4190..c97347e 100644 --- a/nix/modules/home/user.nix +++ b/nix/modules/home/user.nix @@ -60,12 +60,12 @@ magic-wormhole stow # fonts - nerd-fonts.iosevka noto-fonts noto-fonts-cjk-sans noto-fonts-emoji fira-code font-awesome_6 victor-mono + nerd-fonts.iosevka noto-fonts noto-fonts-cjk-sans noto-fonts-color-emoji fira-code font-awesome_6 victor-mono (aspellWithDicts (dicts: with dicts; [ en en-computers en-science ])) # Misc. - pinentry + pinentry-gnome3 x11_ssh_askpass xdg-utils acpilight diff --git a/nix/modules/home/waybar.nix b/nix/modules/home/waybar.nix index 8e797a5..31fe6c0 100644 --- a/nix/modules/home/waybar.nix +++ b/nix/modules/home/waybar.nix @@ -1,274 +1,276 @@ { lib, config, ... }: -{ - programs.waybar = { - enable = lib.mkDefault config.monorepo.profiles.hyprland.enable; - style = '' - * { - border: none; - border-radius: 0px; - font-family: Iosevka Nerd Font, FontAwesome, Noto Sans CJK; - font-size: 14px; - font-style: normal; - min-height: 0; - } + { + programs.waybar = { + enable = lib.mkDefault config.monorepo.profiles.hyprland.enable; + style = '' + * { + border: none; + border-radius: 0px; + font-family: Iosevka Nerd Font, FontAwesome, Noto Sans CJK; + font-size: 14px; + font-style: normal; + min-height: 0; + } - window#waybar { - background: rgba(30, 30, 46, 0.5); - border-bottom: 1px solid #45475a; - color: #cdd6f4; - } + window#waybar { + background: rgba(30, 30, 46, 0.5); + border-bottom: 1px solid #45475a; + color: #cdd6f4; + } - #workspaces { - background: #45475a; - margin: 5px 5px 5px 5px; - padding: 0px 5px 0px 5px; - border-radius: 16px; - border: solid 0px #f4d9e1; - font-weight: normal; - font-style: normal; - } - #workspaces button { - padding: 0px 5px; + #workspaces { + background: #45475a; + margin: 5px 5px 5px 5px; + padding: 0px 5px 0px 5px; border-radius: 16px; - color: #a6adc8; - } + border: solid 0px #f4d9e1; + font-weight: normal; + font-style: normal; + } + #workspaces button { + padding: 0px 5px; + border-radius: 16px; + color: #a6adc8; + } - #workspaces button.active { - color: #f4d9e1; - background-color: transparent; - border-radius: 16px; - } + #workspaces button.active { + color: #f4d9e1; + background-color: transparent; + border-radius: 16px; + } - #workspaces button:hover { - background-color: #cdd6f4; - color: black; - border-radius: 16px; - } + #workspaces button:hover { + background-color: #cdd6f4; + color: black; + border-radius: 16px; + } - #custom-date, #clock, #battery, #pulseaudio, #network, #custom-randwall, #custom-launcher { - background: transparent; - padding: 5px 5px 5px 5px; - margin: 5px 5px 5px 5px; - border-radius: 8px; - border: solid 0px #f4d9e1; - } + #custom-date, #clock, #battery, #pulseaudio, #network, #custom-randwall, #custom-launcher { + background: transparent; + padding: 5px 5px 5px 5px; + margin: 5px 5px 5px 5px; + border-radius: 8px; + border: solid 0px #f4d9e1; + } - #custom-date { - color: #D3869B; - } + #custom-date { + color: #D3869B; + } - #custom-power { - color: #24283b; - background-color: #db4b4b; - border-radius: 5px; - margin-right: 10px; - margin-top: 5px; - margin-bottom: 5px; - margin-left: 0px; - padding: 5px 10px; - } + #custom-power { + color: #24283b; + background-color: #db4b4b; + border-radius: 5px; + margin-right: 10px; + margin-top: 5px; + margin-bottom: 5px; + margin-left: 0px; + padding: 5px 10px; + } - #tray { - background: #45475a; - margin: 5px 5px 5px 5px; - border-radius: 16px; - padding: 0px 5px; - /*border-right: solid 1px #282738;*/ - } + #tray { + background: #45475a; + margin: 5px 5px 5px 5px; + border-radius: 16px; + padding: 0px 5px; + /*border-right: solid 1px #282738;*/ + } - #clock { - color: #cdd6f4; - background-color: #45475a; - border-radius: 0px 0px 0px 24px; - padding-left: 13px; - padding-right: 15px; - margin-right: 0px; - margin-left: 10px; - margin-top: 0px; - margin-bottom: 0px; - font-weight: bold; - /*border-left: solid 1px #282738;*/ - } + #clock { + color: #cdd6f4; + background-color: #45475a; + border-radius: 0px 0px 0px 24px; + padding-left: 13px; + padding-right: 15px; + margin-right: 0px; + margin-left: 10px; + margin-top: 0px; + margin-bottom: 0px; + font-weight: bold; + /*border-left: solid 1px #282738;*/ + } - #battery { - color: #89b4fa; - } + #battery { + color: #89b4fa; + } - #battery.charging { - color: #a6e3a1; - } + #battery.charging { + color: #a6e3a1; + } - #battery.warning:not(.charging) { - background-color: #f7768e; - color: #f38ba8; - border-radius: 5px 5px 5px 5px; - } + #battery.warning:not(.charging) { + background-color: #f7768e; + color: #f38ba8; + border-radius: 5px 5px 5px 5px; + } - #backlight { - background-color: #24283b; - color: #db4b4b; - border-radius: 0px 0px 0px 0px; - margin: 5px; - margin-left: 0px; - margin-right: 0px; - padding: 0px 0px; - } + #backlight { + background-color: #24283b; + color: #db4b4b; + border-radius: 0px 0px 0px 0px; + margin: 5px; + margin-left: 0px; + margin-right: 0px; + padding: 0px 0px; + } - #network { - color: #f4d9e1; - border-radius: 8px; - margin-right: 5px; - } + #network { + color: #f4d9e1; + border-radius: 8px; + margin-right: 5px; + } - #pulseaudio { - color: #f4d9e1; - border-radius: 8px; - margin-left: 0px; - } - - #pulseaudio.muted { - background: transparent; - color: #928374; - border-radius: 8px; - margin-left: 0px; - } + #pulseaudio { + color: #f4d9e1; + border-radius: 8px; + margin-left: 0px; + } - #custom-randwall { - color: #f4d9e1; - border-radius: 8px; - margin-right: 0px; - } + #pulseaudio.muted { + background: transparent; + color: #928374; + border-radius: 8px; + margin-left: 0px; + } - #custom-launcher { - color: #e5809e; - background-color: #45475a; - border-radius: 0px 24px 0px 0px; - margin: 0px 0px 0px 0px; - padding: 0 20px 0 13px; - /*border-right: solid 1px #282738;*/ - font-size: 20px; - } + #custom-randwall { + color: #f4d9e1; + border-radius: 8px; + margin-right: 0px; + } - #custom-launcher button:hover { - background-color: #FB4934; - color: transparent; - border-radius: 8px; - margin-right: -5px; - margin-left: 10px; - } + #custom-launcher { + color: #e5809e; + background-color: #45475a; + border-radius: 0px 24px 0px 0px; + margin: 0px 0px 0px 0px; + padding: 0 20px 0 13px; + /*border-right: solid 1px #282738;*/ + font-size: 20px; + } - #custom-playerctl { - background: #45475a; - padding-left: 15px; - padding-right: 14px; - border-radius: 16px; - /*border-left: solid 1px #282738;*/ - /*border-right: solid 1px #282738;*/ - margin-top: 5px; - margin-bottom: 5px; - margin-left: 0px; - font-weight: normal; - font-style: normal; - font-size: 16px; - } + #custom-launcher button:hover { + background-color: #FB4934; + color: transparent; + border-radius: 8px; + margin-right: -5px; + margin-left: 10px; + } - #custom-playerlabel { - background: transparent; - padding-left: 10px; - padding-right: 15px; - border-radius: 16px; + #custom-playerctl { + background: #45475a; + padding-left: 15px; + padding-right: 14px; + border-radius: 16px; /*border-left: solid 1px #282738;*/ /*border-right: solid 1px #282738;*/ margin-top: 5px; margin-bottom: 5px; + margin-left: 0px; font-weight: normal; font-style: normal; - } + font-size: 16px; + } - #window { - background: #45475a; - padding-left: 15px; - padding-right: 15px; - border-radius: 16px; - /*border-left: solid 1px #282738;*/ - /*border-right: solid 1px #282738;*/ - margin-top: 5px; - margin-bottom: 5px; - font-weight: normal; - font-style: normal; - } + #custom-playerlabel { + background: transparent; + padding-left: 10px; + padding-right: 15px; + border-radius: 16px; + /*border-left: solid 1px #282738;*/ + /*border-right: solid 1px #282738;*/ + margin-top: 5px; + margin-bottom: 5px; + font-weight: normal; + font-style: normal; + } - #custom-wf-recorder { - padding: 0 20px; - color: #e5809e; - background-color: #1E1E2E; - } + #window { + background: #45475a; + padding-left: 15px; + padding-right: 15px; + border-radius: 16px; + /*border-left: solid 1px #282738;*/ + /*border-right: solid 1px #282738;*/ + margin-top: 5px; + margin-bottom: 5px; + font-weight: normal; + font-style: normal; + } - #cpu { - background-color: #45475a; - /*color: #FABD2D;*/ - border-radius: 16px; - margin: 5px; - margin-left: 5px; - margin-right: 5px; - padding: 0px 10px 0px 10px; - font-weight: bold; - } + #custom-wf-recorder { + padding: 0 20px; + color: #e5809e; + background-color: #1E1E2E; + } - #memory { - background-color: #45475a; - /*color: #83A598;*/ - border-radius: 16px; - margin: 5px; - margin-left: 5px; - margin-right: 5px; - padding: 0px 10px 0px 10px; - font-weight: bold; - } + #cpu { + background-color: #45475a; + /*color: #FABD2D;*/ + border-radius: 16px; + margin: 5px; + margin-left: 5px; + margin-right: 5px; + padding: 0px 10px 0px 10px; + font-weight: bold; + } - #disk { - background-color: #45475a; - /*color: #8EC07C;*/ - border-radius: 16px; - margin: 5px; - margin-left: 5px; - margin-right: 5px; - padding: 0px 10px 0px 10px; - font-weight: bold; - } + #memory { + background-color: #45475a; + /*color: #83A598;*/ + border-radius: 16px; + margin: 5px; + margin-left: 5px; + margin-right: 5px; + padding: 0px 10px 0px 10px; + font-weight: bold; + } - #custom-hyprpicker { - background-color: #45475a; - /*color: #8EC07C;*/ - border-radius: 16px; - margin: 5px; - margin-left: 5px; - margin-right: 5px; - padding: 0px 11px 0px 9px; - font-weight: bold; - } - ''; - settings = { - mainBar = { - layer = "top"; - position = "top"; - height = 50; + #disk { + background-color: #45475a; + /*color: #8EC07C;*/ + border-radius: 16px; + margin: 5px; + margin-left: 5px; + margin-right: 5px; + padding: 0px 10px 0px 10px; + font-weight: bold; + } - output = config.monorepo.vars.monitors; + #custom-hyprpicker { + background-color: #45475a; + /*color: #8EC07C;*/ + border-radius: 16px; + margin: 5px; + margin-left: 5px; + margin-right: 5px; + padding: 0px 11px 0px 9px; + font-weight: bold; + } + ''; + settings = { + mainBar = { + layer = "top"; + position = "top"; + height = 50; - modules-left = [ "hyprland/workspaces" ]; - modules-center = [ "hyprland/window" ]; - modules-right = [ "battery" "clock" ]; + output = config.monorepo.vars.monitors; - battery = { - format = "{icon} {capacity}%"; - format-icons = ["" "" "" "" "" ]; - }; + modules-left = [ "hyprland/workspaces" ]; + modules-center = [ "hyprland/window" ]; + modules-right = [ "battery" "clock" ]; + + battery = { + format = "{icon} {capacity}%"; + format-icons = ["" "" "" "" "" ]; + }; - clock = { - format = "⏰ {:%a %d, %b %H:%M}"; + clock = { + format = "⏰ {:%a %d, %b %H:%M}"; + }; }; }; }; - }; -} + } +#+end_src +** diff --git a/nix/modules/home/zsh.nix b/nix/modules/home/zsh.nix index 6753547..31468e1 100644 --- a/nix/modules/home/zsh.nix +++ b/nix/modules/home/zsh.nix @@ -37,7 +37,7 @@ usite = "cd ~/src/publish-org-roam-ui && bash local.sh && rm -rf ~/website_html/graph_view; cp -r ~/src/publish-org-roam-ui/out ~/website_html/graph_view && rsync -azvP --chmod=\"Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r\" ~/website_html/ root@${config.monorepo.vars.remoteHost}:/var/www/${config.monorepo.vars.internetName}-website/"; sai = "eval \"$(ssh-agent -s)\" && ssh-add ~/.ssh/id_ed25519 && ssh-add -l"; - i3 = "exec ${pkgs.i3-gaps}/bin/i3"; + i3 = "exec ${pkgs.i3}/bin/i3"; }; loginExtra = '' if [[ "$(tty)" = "/dev/tty1" ]]; then diff --git a/nix/modules/ngircd.nix b/nix/modules/ngircd.nix index c8348bf..b6c6842 100644 --- a/nix/modules/ngircd.nix +++ b/nix/modules/ngircd.nix @@ -6,7 +6,7 @@ [Global] Name = ${config.monorepo.vars.orgHost} Info = NullRing IRC Instance - Listen = 0.0.0.0 + Listen = ::,0.0.0.0 MotdFile = /etc/motd.txt Network = NullRing Ports = 6667 diff --git a/nix/modules/nvidia.nix b/nix/modules/nvidia.nix index 2973386..f6a398a 100644 --- a/nix/modules/nvidia.nix +++ b/nix/modules/nvidia.nix @@ -3,7 +3,7 @@ hardware = { graphics.extraPackages = (if config.monorepo.profiles.cuda.enable then with pkgs; [ - vaapiVdpau + libva-vdpau-driver libvdpau-va-gl nvidia-vaapi-driver ] else []); @@ -15,7 +15,7 @@ finegrained = false; }; nvidiaSettings = lib.mkDefault config.monorepo.profiles.cuda.enable; - open = lib.mkDefault false; + open = config.monorepo.profiles.cuda.enable; package = config.boot.kernelPackages.nvidiaPackages.stable; }; }; diff --git a/nix/modules/ollama.nix b/nix/modules/ollama.nix index bfa0cf3..357f6a3 100644 --- a/nix/modules/ollama.nix +++ b/nix/modules/ollama.nix @@ -1,8 +1,9 @@ -{ config, lib, ... }: +{ config, lib, pkgs, ... }: { + # services.open-webui.enable = lib.mkDefault (!config.monorepo.profiles.server.enable); services.ollama = { enable = lib.mkDefault (!config.monorepo.profiles.server.enable); - acceleration = if (config.monorepo.profiles.workstation.enable) then "cuda" else null; + package = if (config.monorepo.profiles.workstation.enable) then pkgs.ollama-cuda else pkgs.ollama-vulkan; loadModels = if (config.monorepo.profiles.workstation.enable) then [ "qwen3:30b" "qwen3-coder:latest" diff --git a/nix/modules/pipewire.nix b/nix/modules/pipewire.nix index 1ed2082..4ca3610 100644 --- a/nix/modules/pipewire.nix +++ b/nix/modules/pipewire.nix @@ -13,9 +13,9 @@ pipewire."92-low-latency" = { "context.properties" = { "default.clock.rate" = 48000; - "default.clock.quantum" = 256; - "default.clock.min-quantum" = 32; - "default.clock.max-quantum" = 512; + "default.clock.quantum" = 512; + "default.clock.min-quantum" = 512; + "default.clock.max-quantum" = 1024; }; pipewire-pulse."92-low-latency" = { "context.properties" = [ diff --git a/nix/modules/xserver.nix b/nix/modules/xserver.nix index 0d5b29c..29aec23 100644 --- a/nix/modules/xserver.nix +++ b/nix/modules/xserver.nix @@ -9,7 +9,6 @@ windowManager = { i3 = { enable = ! config.monorepo.profiles.ttyonly.enable; - package = pkgs.i3-gaps; }; }; diff --git a/nix/systems/affinity/default.nix b/nix/systems/affinity/default.nix index 72057dd..9918089 100644 --- a/nix/systems/affinity/default.nix +++ b/nix/systems/affinity/default.nix @@ -5,6 +5,11 @@ ../../disko/drive-simple.nix ]; config = { + zramSwap = { + enable = true; + algorithm = "zstd"; + memoryPercent = 50; # Creates ~16GB of compressed swap space + }; monorepo = { vars.device = "/dev/nvme0n1"; profiles = { diff --git a/nix/systems/spontaneity/default.nix b/nix/systems/spontaneity/default.nix index 6a3c316..83851de 100644 --- a/nix/systems/spontaneity/default.nix +++ b/nix/systems/spontaneity/default.nix @@ -1,79 +1,92 @@ -{ config, lib, ... }: -let - ipv4addr = "66.42.84.130"; - ipv6addr = "2001:19f0:5401:10d0:5400:5ff:fe4a:7794"; -in -{ - imports = [ - ../common.nix - ../../disko/drive-bios.nix +lib, ... }: + let + ipv4addr = "66.42.84.130"; + ipv6addr = "2001:19f0:5401:10d0:5400:5ff:fe4a:7794"; + in + { + imports = [ + ../common.nix + ../../disko/drive-bios.nix - # nixos-anywhere generates this file - ./hardware-configuration.nix - ]; - config = { - monorepo = { - vars.device = "/dev/vda"; - profiles = { - server.enable = true; - ttyonly.enable = true; - grub.enable = true; - }; - }; - - boot.loader.grub.device = "nodev"; - networking = { - interfaces.ens3.ipv4.addresses = [ - { - address = ipv4addr; - prefixLength = 24; - } - ]; - interfaces.ens3.ipv6.addresses = [ - { - address = ipv6addr; - prefixLength = 64; - } - ]; - firewall.allowedTCPPorts = [ - 80 - 143 - 443 - 465 - 587 - 993 - 6697 - 6667 - 8448 + # nixos-anywhere generates this file + ./hardware-configuration.nix ]; - domains = { - enable = true; - baseDomains = { - "${config.monorepo.vars.remoteHost}" = { - a.data = ipv4addr; - aaaa.data = ipv6addr; - }; - "${config.monorepo.vars.orgHost}" = { - a.data = ipv4addr; - aaaa.data = ipv6addr; + config = { + monorepo = { + vars.device = "/dev/vda"; + profiles = { + server.enable = true; + ttyonly.enable = true; + grub.enable = true; + pipewire.enable = false; + tor.enable = false; + home.enable = false; }; }; - subDomains = { - "${config.monorepo.vars.remoteHost}" = {}; - "matrix.${config.monorepo.vars.remoteHost}" = {}; - "www.${config.monorepo.vars.remoteHost}" = {}; - "mail.${config.monorepo.vars.remoteHost}" = { - mx.data = "10 mail.${config.monorepo.vars.remoteHost}."; - }; - "${config.monorepo.vars.orgHost}" = {}; - "git.${config.monorepo.vars.orgHost}" = {}; - "matrix.${config.monorepo.vars.orgHost}" = {}; - "talk.${config.monorepo.vars.orgHost}" = {}; - "mail.${config.monorepo.vars.orgHost}" = {}; - "${config.monorepo.vars.internetName}.${config.monorepo.vars.orgHost}" = {}; + boot.loader.grub.device = "nodev"; + networking = { + interfaces.ens3.ipv4.addresses = [ + { + address = ipv4addr; + prefixLength = 24; + } + ]; + interfaces.ens3.ipv6.addresses = [ + { + address = ipv6addr; + prefixLength = 64; + } + ]; + firewall.allowedTCPPorts = [ + 80 + 143 + 443 + 465 + 587 + 993 + 6697 + 6667 + 8448 + ]; + domains = { + enable = true; + baseDomains = { + "${config.monorepo.vars.remoteHost}" = { + a.data = ipv4addr; + aaaa.data = ipv6addr; + }; + "${config.monorepo.vars.orgHost}" = { + a.data = ipv4addr; + aaaa.data = ipv6addr; + }; + }; + subDomains = { + "${config.monorepo.vars.remoteHost}" = {}; + "matrix.${config.monorepo.vars.remoteHost}" = {}; + "www.${config.monorepo.vars.remoteHost}" = {}; + "mail.${config.monorepo.vars.remoteHost}" = { + mx.data = "10 mail.${config.monorepo.vars.remoteHost}."; + }; + + "${config.monorepo.vars.orgHost}" = {}; + "git.${config.monorepo.vars.orgHost}" = {}; + "matrix.${config.monorepo.vars.orgHost}" = {}; + "talk.${config.monorepo.vars.orgHost}" = {}; + "mail.${config.monorepo.vars.orgHost}" = {}; + "${config.monorepo.vars.internetName}.${config.monorepo.vars.orgHost}" = {}; + }; + }; }; }; - }; - }; -} + } + #+end_src + ** +#+begin_src nix :tangle ../nix/systems/spontaneity/home.nix + { lib, config, pkgs, ... }: + { + imports = [ + ../home-common.nix + ]; + config.monorepo.profiles.enable = false; + } |
