如何让 nixpkgs 更快地更新

NixOS 的声明式安装 pkgs 确实很爽,但是随之而来的问题是 pkgs 的更新会比较慢,在 Repology 可以看到1,即使是 nixpkgs-unstable 的更新百分比也只有 87.71%,远低于 Homebrew 的 94%。

Continue Reading »

如何让 NixOS 显示一次更新的具体内容

当 NixOS 配置好了 flake、home-manager 等等,后续的更新我们只需要运行:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
❯ nix flake update

❯ sudo nixos-rebuild switch
building the system configuration...
activating the configuration...
setting up /etc...
reloading user units for davinci42...
restarting sysinit-reactivation.target
the following new units were started: NetworkManager-dispatcher.service
Done. The new configuration is /nix/store/mp17nhbadmffs9ah961ldj0y1l38a73m-nixos-system-azure-25.05.20250424.f771eb4

除了 kernel 的更新需要重启,某些环境变量需要新开 session 之外,其它 pkg 和对应的 systemd-service 应该都是最新的状态了。

Continue Reading »

如何修复一台无法启动的 Azure NixOS

Continue Reading »