commit ad73bb0e309f3aafe9eb36b46e02f9766ddd1386
parent a9b146853a52ec0a3004a992ba209af6b01d78d8
Author: Toni Brown <me@tb148.net>
Date: Fri, 10 Apr 2026 16:27:45 +0800
save progress
Diffstat:
11 files changed, 175 insertions(+), 142 deletions(-)
diff --git a/configuration.nix b/configuration.nix
@@ -3,7 +3,6 @@
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{
config,
- lib,
pkgs,
inputs,
...
@@ -29,7 +28,7 @@
swapDevices = [
{
device = "/swap/swapfile";
- size = 24 * 1024;
+ size = 48 * 1024;
}
];
@@ -56,6 +55,18 @@
hardware.bluetooth.enable = true;
hardware.graphics.enable = true;
+ services.xserver.videoDrivers = ["modesetting" "nvidia"];
+ hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta;
+ hardware.nvidia.modesetting.enable = true;
+ hardware.nvidia.open = true;
+ hardware.nvidia.powerManagement.enable = true;
+ hardware.nvidia.prime = {
+ offload.enable = true;
+ intelBusId = "PCI:0@0:2:0";
+ nvidiaBusId = "PCI:1@0:0:0";
+ };
+
+ powerManagement.enable = true;
networking.hostName = "nixosion";
networking.networkmanager.enable = true;
@@ -129,6 +140,9 @@
"d /var/lib/btrbk/backups 0750 btrbk btrbk"
];
+ services.boinc.enable = true;
+ services.boinc.extraEnvPackages = [pkgs.gmp pkgs.ocl-icd config.hardware.nvidia.package];
+
services.desktopManager.plasma6.enable = true;
services.displayManager.sddm = {
enable = true;
@@ -161,7 +175,7 @@
home = "/home/tb148";
shell = pkgs.zsh;
description = "Toni Brown";
- extraGroups = ["wheel" "docker"];
+ extraGroups = ["wheel" "boinc" "docker"];
};
sops.defaultSopsFile = ./secrets.yaml;
@@ -195,7 +209,13 @@
"nix-command"
"flakes"
];
- substituters = ["https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store?priority=30"];
+ substituters = [
+ "https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store?priority=30"
+ "https://cache.nixos-cuda.org"
+ ];
+ trusted-public-keys = [
+ "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M="
+ ];
};
# Copy the NixOS configuration file and link it from the resulting system
diff --git a/flake.lock b/flake.lock
@@ -30,11 +30,11 @@
]
},
"locked": {
- "lastModified": 1775213373,
- "narHash": "sha256-wJHsijC2l/E+ovmlpPGha8pXA6RHSwHWmBV97gvkmyI=",
+ "lastModified": 1776681486,
+ "narHash": "sha256-akO/L6Jt4341uBnf3CIpJOTTYyCBQsSvP2hnikV2oMY=",
"owner": "catppuccin",
"repo": "nix",
- "rev": "ba73719e673e7c2d89ac2f8df0bc0d48983e4907",
+ "rev": "b85b328ecc9874f4e7424db2820333c148e8dd66",
"type": "github"
},
"original": {
@@ -125,11 +125,11 @@
]
},
"locked": {
- "lastModified": 1775683737,
- "narHash": "sha256-oBYyowo6yfgb95Z78s3uTnAd9KkpJpwzjJbfnpLaM2Y=",
+ "lastModified": 1776777932,
+ "narHash": "sha256-0R3Yow/NzSeVGUke5tL7CCkqmss4Vmi6BbV6idHzq/8=",
"owner": "nix-community",
"repo": "home-manager",
- "rev": "7ba4ee4228ed36123c7cb75d50524b43514ef992",
+ "rev": "5d5640599a0050b994330328b9fd45709c909720",
"type": "github"
},
"original": {
@@ -156,11 +156,11 @@
"lix": {
"flake": false,
"locked": {
- "lastModified": 1775619372,
- "narHash": "sha256-bONRPjhk5OZdnkQZexZNJzlvwIPg31Gy7fNiwGoX3BQ=",
- "rev": "bc9fb560ac2d36cd317a856ee96785ea2055fbff",
+ "lastModified": 1776701302,
+ "narHash": "sha256-4HJtk+dDvfW8ZXsMTbptNJwj2UUDTgixuIMIBgvgXQA=",
+ "rev": "0a09782cc8205397b3ff9d3787136394d77f19a7",
"type": "tarball",
- "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/bc9fb560ac2d36cd317a856ee96785ea2055fbff.tar.gz?rev=bc9fb560ac2d36cd317a856ee96785ea2055fbff"
+ "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/0a09782cc8205397b3ff9d3787136394d77f19a7.tar.gz?rev=0a09782cc8205397b3ff9d3787136394d77f19a7"
},
"original": {
"type": "tarball",
@@ -213,11 +213,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1775423009,
- "narHash": "sha256-vPKLpjhIVWdDrfiUM8atW6YkIggCEKdSAlJPzzhkQlw=",
+ "lastModified": 1776548001,
+ "narHash": "sha256-ZSK0NL4a1BwVbbTBoSnWgbJy9HeZFXLYQizjb2DPF24=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "68d8aa3d661f0e6bd5862291b5bb263b2a6595c9",
+ "rev": "b12141ef619e0a9c1c84dc8c684040326f27cdcc",
"type": "github"
},
"original": {
@@ -235,11 +235,11 @@
]
},
"locked": {
- "lastModified": 1775712653,
- "narHash": "sha256-AX8AJBVPtgiYUTNh5jEiI0Y0QNB+myQ45NDWFQLvQ0A=",
+ "lastModified": 1776787773,
+ "narHash": "sha256-nyRFMbor7a8m6Ybds1s4V/Wi2PCAjhch0nvn1UHyAHI=",
"owner": "nix-community",
"repo": "NUR",
- "rev": "2c61fba1a0b6eb23c54de96b83142ce5d637432a",
+ "rev": "292525d90a56d1049df4a25e3b57cdf0e6af73dc",
"type": "github"
},
"original": {
@@ -290,11 +290,11 @@
]
},
"locked": {
- "lastModified": 1775682595,
- "narHash": "sha256-0E9PohY/VuESLq0LR4doaH7hTag513sDDW5n5qmHd1Q=",
+ "lastModified": 1776771786,
+ "narHash": "sha256-DRFGPfFV6hbrfO9a1PH1FkCi7qR5FgjSqsQGGvk1rdI=",
"owner": "Mic92",
"repo": "sops-nix",
- "rev": "d2e8438d5886e92bc5e7c40c035ab6cae0c41f76",
+ "rev": "bef289e2248991f7afeb95965c82fbcd8ff72598",
"type": "github"
},
"original": {
diff --git a/home.nix b/home.nix
@@ -4,7 +4,13 @@
...
}: {
imports = [
- ./zed-editor.nix
+ ./home/alacritty.nix
+ ./home/catppuccin.nix
+ ./home/firefox.nix
+ ./home/gpg.nix
+ ./home/ime.nix
+ ./home/jujutsu.nix
+ ./home/zed-editor.nix
];
# Home Manager needs a bit of information about you and the
@@ -39,31 +45,26 @@
accent = "mauve";
})
ffmpeg
+ fontforge-gtk
inkscape
jetbrains.idea
- jupyter
krita
libreoffice-qt-fresh
+ (python314.withPackages (python-pkgs:
+ with python-pkgs; [
+ ipython
+ virtualenv
+ ]))
onlyoffice-desktopeditors
osu-lazer-bin
ponysay
- proton-pass
- protonmail-bridge
qalculate-qt
sequoia-sq
+ ungoogled-chromium
unrar
vlc
];
- programs.alacritty.enable = true;
- programs.alacritty.settings = {
- font.normal.family = "Sarasa Term SC";
- font.size = 12;
- terminal.shell = "nu";
- window.dimensions.columns = 128;
- window.dimensions.lines = 32;
- };
-
programs.bat.enable = true;
programs.direnv.enable = true;
@@ -72,86 +73,12 @@
programs.fd.enable = true;
- programs.firefox = {
- enable = true;
- betterfox = {
- enable = true;
- profiles.default = {
- enableAllSections = true;
- };
- };
- nativeMessagingHosts = [pkgs.kdePackages.plasma-browser-integration];
- profiles.default = {
- extensions = {
- force = true;
- packages = with pkgs.nur.repos.rycee.firefox-addons; [
- bitwarden
- firefox-color
- plasma-integration
- stylus
- ublock-origin
- ];
- };
- settings = {
- "signon.rememberSignons" = false;
- "extensions.formautofill.addresses.enabled" = false;
- "extensions.formautofill.creditCards.enabled" = false;
- };
- };
- };
-
programs.fish.enable = true;
- programs.git = {
- enable = true;
- settings = {
- init.defaultBranch = "trunk";
- user.name = "Toni Brown";
- user.email = "me@tb148.net";
- };
- signing.signByDefault = true;
- signing.key = "53187AD414FDFBCC";
- };
-
- programs.gpg.enable = true;
- programs.gpg.package = with pkgs;
- symlinkJoin {
- name = "gnupg-from-sequoia";
- paths = [
- gnupg
- sequoia-chameleon-gnupg
- ];
- postBuild = ''
- mv $out/bin/gpg $out/bin/gpg-g10code
- mv $out/bin/gpgv $out/bin/gpgv-g10code
- cp -P $out/bin/gpg-sq $out/bin/gpg
- cp -P $out/bin/gpgv-sq $out/bin/gpgv
- '';
- };
- services.gpg-agent = {
- enable = true;
- enableSshSupport = true;
- pinentry.package = pkgs.pinentry-qt;
- sshKeys = ["F2F9CB00ABA433C59C7AF87A67A8D5F74D235760"];
- };
-
programs.helix.enable = true;
programs.hyfetch.enable = true;
- programs.jujutsu.enable = true;
- programs.jujutsu.settings = {
- git.sign-on-push = true;
- signing.behavior = "drop";
- signing.backend = "gpg";
- snapshot.max-new-file-size = 33554432;
- ui.show-cryptographic-signatures = true;
- ui.editor = "hx";
- ui.diff-editor = ":builtin";
- user.name = "Toni Brown";
- user.email = "me@tb148.net";
- };
-
programs.nushell.enable = true;
programs.nushell.configFile.source = ./config.nu;
@@ -160,6 +87,8 @@
programs.thunderbird.enable = true;
programs.thunderbird.profiles.default.isDefault = true;
+ programs.uv.enable = true;
+
programs.zoxide.enable = true;
programs.zsh.enable = true;
@@ -170,40 +99,15 @@
home.shell.enableNushellIntegration = true;
home.shell.enableZshIntegration = true;
- services.protonmail-bridge.enable = true;
- services.protonmail-bridge.extraPackages = [pkgs.kdePackages.kwallet];
-
- i18n.inputMethod = {
- enable = true;
- type = "fcitx5";
- fcitx5 = {
- fcitx5-with-addons = pkgs.kdePackages.fcitx5-with-addons;
- addons = with pkgs; [
- (fcitx5-rime.override {
- rimeDataPkgs = [
- pkgs.rime-ice
- ];
- })
- ];
- settings.addons.classicui.globalSection.Font = "等距更纱黑体 SC 10";
- waylandFrontend = true;
- };
+ services.ollama.enable = true;
+ services.ollama.acceleration = "cuda";
+ services.ollama.environmentVariables = {
+ OLLAMA_FLASH_ATTENTION = "1";
+ OLLAMA_KV_CACHE_TYPE = "q4_0";
};
- xdg.dataFile."fcitx5/rime/default.custom.yaml".source = ./rime.yaml;
- catppuccin = {
- enable = true;
- flavor = "mocha";
- accent = "mauve";
- };
- catppuccin.cursors.enable = true;
- catppuccin.fcitx5.enableRounded = true;
- qt = {
- enable = true;
- style.name = "kvantum";
- platformTheme.name = "kvantum";
- };
- catppuccin.vesktop.enable = false;
+ services.protonmail-bridge.enable = true;
+ services.protonmail-bridge.extraPackages = [pkgs.kdePackages.kwallet];
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
diff --git a/home/alacritty.nix b/home/alacritty.nix
@@ -0,0 +1,10 @@
+{...}: {
+ programs.alacritty.enable = true;
+ programs.alacritty.settings = {
+ font.normal.family = "Sarasa Term SC";
+ font.size = 12;
+ terminal.shell = "nu";
+ window.dimensions.columns = 128;
+ window.dimensions.lines = 32;
+ };
+}
diff --git a/home/catppuccin.nix b/home/catppuccin.nix
@@ -0,0 +1,14 @@
+{...}: {
+ catppuccin = {
+ enable = true;
+ flavor = "mocha";
+ accent = "mauve";
+ };
+ catppuccin.cursors.enable = true;
+ catppuccin.fcitx5.enableRounded = true;
+ qt = {
+ enable = true;
+ style.name = "kvantum";
+ platformTheme.name = "kvantum";
+ };
+}
diff --git a/home/firefox.nix b/home/firefox.nix
@@ -0,0 +1,29 @@
+{pkgs, ...}: {
+ programs.firefox = {
+ enable = true;
+ betterfox = {
+ enable = true;
+ profiles.default = {
+ enableAllSections = true;
+ };
+ };
+ nativeMessagingHosts = [pkgs.kdePackages.plasma-browser-integration];
+ profiles.default = {
+ extensions = {
+ force = true;
+ packages = with pkgs.nur.repos.rycee.firefox-addons; [
+ bitwarden
+ firefox-color
+ plasma-integration
+ stylus
+ ublock-origin
+ ];
+ };
+ settings = {
+ "signon.rememberSignons" = false;
+ "extensions.formautofill.addresses.enabled" = false;
+ "extensions.formautofill.creditCards.enabled" = false;
+ };
+ };
+ };
+}
diff --git a/home/gpg.nix b/home/gpg.nix
@@ -0,0 +1,23 @@
+{pkgs, ...}: {
+ programs.gpg.enable = true;
+ programs.gpg.package = with pkgs;
+ symlinkJoin {
+ name = "gnupg-from-sequoia";
+ paths = [
+ gnupg
+ sequoia-chameleon-gnupg
+ ];
+ postBuild = ''
+ mv $out/bin/gpg $out/bin/gpg-g10code
+ mv $out/bin/gpgv $out/bin/gpgv-g10code
+ cp -P $out/bin/gpg-sq $out/bin/gpg
+ cp -P $out/bin/gpgv-sq $out/bin/gpgv
+ '';
+ };
+ services.gpg-agent = {
+ enable = true;
+ enableSshSupport = true;
+ pinentry.package = pkgs.pinentry-qt;
+ sshKeys = ["F2F9CB00ABA433C59C7AF87A67A8D5F74D235760"];
+ };
+}
diff --git a/home/ime.nix b/home/ime.nix
@@ -0,0 +1,19 @@
+{pkgs, ...}: {
+ i18n.inputMethod = {
+ enable = true;
+ type = "fcitx5";
+ fcitx5 = {
+ fcitx5-with-addons = pkgs.kdePackages.fcitx5-with-addons;
+ addons = with pkgs; [
+ (fcitx5-rime.override {
+ rimeDataPkgs = [
+ pkgs.rime-ice
+ ];
+ })
+ ];
+ settings.addons.classicui.globalSection.Font = "等距更纱黑体 SC 10";
+ waylandFrontend = true;
+ };
+ };
+ xdg.dataFile."fcitx5/rime/default.custom.yaml".source = ./rime.yaml;
+}
diff --git a/home/jujutsu.nix b/home/jujutsu.nix
@@ -0,0 +1,14 @@
+{...}: {
+ programs.jujutsu.enable = true;
+ programs.jujutsu.settings = {
+ git.sign-on-push = true;
+ signing.behavior = "drop";
+ signing.backend = "gpg";
+ snapshot.max-new-file-size = 33554432;
+ ui.show-cryptographic-signatures = true;
+ ui.editor = "hx";
+ ui.diff-editor = ":builtin";
+ user.name = "Toni Brown";
+ user.email = "me@tb148.net";
+ };
+}
diff --git a/rime.yaml b/home/rime.yaml
diff --git a/zed-editor.nix b/home/zed-editor.nix