mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-06-04 22:00:52 +02:00
b5fc5cbc73
Flake lock file updates:
• Updated input 'home-manager':
'github:nix-community/home-manager/7f8bbc93d63401e41368d6ddc46a4f631610fa90?narHash=sha256-EC07KwADRE2LdIk7vEDyAaD3I0ZUq24T9jQF9L0iEPk%3D' (2026-04-27)
→ 'github:nix-community/home-manager/7d8127d308c3fb9664f7e643eec944be74ebb37d?narHash=sha256-efIPwVGtIWIjWcznhaop6XN6HxnOL8800hF6CBNvlqQ%3D' (2026-05-30)
• Updated input 'llm-agents':
'github:numtide/llm-agents.nix/a992a661b033d0ae19c9c16a7b4541ca537e17f7?narHash=sha256-qstSsXBNXE4IJabfcmKmZlOA7PyEUmYeZ131hRx8Z8I%3D' (2026-05-28)
→ 'github:numtide/llm-agents.nix/468bacd83af1b3bf36bceb0366967928b98c9e60?narHash=sha256-srcKWB7mBO%2BmNWsDUmODs5CDDdQ0XjP1NX4iUM45eZo%3D' (2026-06-01)
• Updated input 'llm-agents/nixpkgs':
'github:NixOS/nixpkgs/a2c6938835fca96e4a10c8561d461efd2f91d04f?narHash=sha256-31mhzm2HpzRr/rupWAFfWBmt9SUjzwr5%2Bgiv5Nmb/rA%3D' (2026-05-28)
→ 'github:NixOS/nixpkgs/e9a7635a57597d9754eccebdfc7045e6c8600e6b?narHash=sha256-u6WU/yd/o8iYQrHX3RAwO1hYa3LkoSL%2BWNQD0rJfJZQ%3D' (2026-05-29)
• Updated input 'llm-agents/treefmt-nix':
'github:numtide/treefmt-nix/790751ff7fd3801feeaf96d7dc416a8d581265ba?narHash=sha256-pc20NRoMdiar8oPQceQT47UUZMBTiMdUuWrYu2obUP0%3D' (2026-04-08)
→ 'github:numtide/treefmt-nix/db947814a175b7ca6ded66e21383d938df01c227?narHash=sha256-eynAfOmbmxJnkp7YewvCEbShNnnYJ9gLLqkzsYtBPeM%3D' (2026-05-31)
• Updated input 'nix-darwin':
'github:lnl7/nix-darwin/06648f4902343228ce2de79f291dd5a58ee12146?narHash=sha256-KM2WYj6EA7M/FVZVCl3rqWY%2BTFV5QzSyyGE2gQxeODU%3D' (2026-04-01)
→ 'github:lnl7/nix-darwin/56c666e108467d87d13508936aade6d567f2a501?narHash=sha256-zXcwYQGCT6pzinK%2B1dBB2ekTVtfxGZAapb3Evdcu4fY%3D' (2026-05-17)
• Updated input 'nix-gaming':
'github:fufexan/nix-gaming/41492a9baed273d0d005fe81f1b7730749809a40?narHash=sha256-b5y9/y5Crg%2BRQdev1H36s6M3Le4wenrIdKk%2BxaC07ZE%3D' (2026-04-27)
→ 'github:fufexan/nix-gaming/ec11c77819f9736dc9f5fd17b979df24f9bd3e94?narHash=sha256-YdfiXMkJki1hghjaPmK2epJQYUjsbvDFiecaqTUx09U%3D' (2026-05-31)
• Updated input 'nix-gaming/flake-parts':
'github:hercules-ci/flake-parts/3107b77cd68437b9a76194f0f7f9c55f2329ca5b?narHash=sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA%3D' (2026-04-01)
→ 'github:hercules-ci/flake-parts/f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb?narHash=sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4%3D' (2026-05-13)
• Updated input 'nix-gaming/flake-parts/nixpkgs-lib':
'github:nix-community/nixpkgs.lib/333c4e0545a6da976206c74db8773a1645b5870a?narHash=sha256-%2BU7gF3qxzwD5TZuANzZPeJTZRHS29OFQgkQ2kiTJBIQ%3D' (2026-03-29)
→ 'github:nix-community/nixpkgs.lib/f5901329dade4a6ea039af1433fb087bd9c1fe14?narHash=sha256-GOkGPcboWE9BmGCRMLX3worL4EMnsnG8MyKmXNeYuhQ%3D' (2026-04-26)
• Updated input 'nix-gaming/git-hooks':
'github:cachix/git-hooks.nix/3cfd774b0a530725a077e17354fbdb87ea1c4aad?narHash=sha256-PcRvlWayisPSjd0UcRQbhG8Oqw78AcPE6x872cPRHN8%3D' (2026-04-21)
→ 'github:cachix/git-hooks.nix/61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a?narHash=sha256-kTwur1wV%2B01SdqskVMSo6JMEpg71ps3HpbFY2GsflKs%3D' (2026-05-11)
• Updated input 'nixos-apple-silicon':
'github:nix-community/nixos-apple-silicon/e60109628c25ee80f04aed96785832f0e869e589?narHash=sha256-TQhSD7eEwJr4nfDzf3am7cypGb1TYUSmMEhwoMkTb1I%3D' (2026-04-24)
→ 'github:nix-community/nixos-apple-silicon/5723dd7b3d7132144287513a398442ae5b57397b?narHash=sha256-Qrgy2wSZ%2BOJ/qf7CKV5wfwFrgSXqBT5MR%2BBFQpyxCLM%3D' (2026-05-30)
• Updated input 'nixpak':
'github:nixpak/nixpak/b2bb4ab9d8e2457eeec3caa279b394525fbbe1a7?narHash=sha256-5Pqwqf4lEsZLZUcpefwMeq69d8hdirE83C5oWshBXo8%3D' (2026-04-16)
→ 'github:nixpak/nixpak/fea2dec31d7405cccbd6b4ce35bb30348108bd04?narHash=sha256-xY%2Bv%2BEnRMvROziet7d/qIC6rd/y219HsSoUZrRHhF%2B0%3D' (2026-05-31)
• Updated input 'nixpak/flake-parts':
'github:hercules-ci/flake-parts/3107b77cd68437b9a76194f0f7f9c55f2329ca5b?narHash=sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA%3D' (2026-04-01)
→ 'github:hercules-ci/flake-parts/f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb?narHash=sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4%3D' (2026-05-13)
• Updated input 'nixpak/hercules-ci-effects':
'github:hercules-ci/hercules-ci-effects/554f6ed448ca74c00aa2371cde901ae1e73005b9?narHash=sha256-neu7ixXHjV3LobVjOndkL97u%2B6UF6Yoh%2BCUnzX7kUBQ%3D' (2026-03-15)
→ 'github:hercules-ci/hercules-ci-effects/af4331c44f13977b6964745454eadcfee2d244d1?narHash=sha256-OOEWyt8ma7QAysDbiP65J7li7KIdtZfnbA11gFnwyEI%3D' (2026-05-16)
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/e9a7635a57597d9754eccebdfc7045e6c8600e6b?narHash=sha256-u6WU/yd/o8iYQrHX3RAwO1hYa3LkoSL%2BWNQD0rJfJZQ%3D' (2026-05-29)
→ 'github:nixos/nixpkgs/64c08a7ca051951c8eae34e3e3cb1e202fe36786?narHash=sha256-tpyBcxPpcQb8ukyNF7DoCwfSY3VPsxHoYwj00Cayv5o%3D' (2026-05-23)
• Updated input 'nixpkgs-darwin':
'github:nixos/nixpkgs/01fbdeef22b76df85ea168fbfe1bfd9e63681b30?narHash=sha256-GMSVw35Q%2B294GlrTUKlx087E31z7KurReQ1YHSKp5iw%3D' (2026-04-23)
→ 'github:nixos/nixpkgs/e9a7635a57597d9754eccebdfc7045e6c8600e6b?narHash=sha256-u6WU/yd/o8iYQrHX3RAwO1hYa3LkoSL%2BWNQD0rJfJZQ%3D' (2026-05-29)
• Updated input 'nixpkgs-master':
'github:nixos/nixpkgs/f3ca7545e06b5a6ac637388d5719da6437a2d4b6?narHash=sha256-/521UsHqQZieBw2yg%2BWtB7iGjuyxdQ4RnKDS77eHQVA%3D' (2026-05-29)
→ 'github:nixos/nixpkgs/c2a4e65eaf219d52ec3bf3a04e69a1e5631500d4?narHash=sha256-ZR9YfHXIBOCDYWEKvGaLdYqwm5lwQPSMVPjg7Hb7uHE%3D' (2026-06-01)
• Updated input 'nixpkgs-stable':
'github:nixos/nixpkgs/a4bf06618f0b5ee50f14ed8f0da77d34ecc19160?narHash=sha256-AIiMJiqvGrN4HyLEbKAoCSRRYn0rnlW5VbKNIMIYqm4%3D' (2026-04-25)
→ 'github:nixos/nixpkgs/25f538306313eae3927264466c70d7001dcea1df?narHash=sha256-ZsIrKmhp4vbBXoXXmR/tBXA/UCsAQiJL9vsgZEduhVY%3D' (2026-05-26)
• Updated input 'pre-commit-hooks':
'github:cachix/git-hooks.nix/3cfd774b0a530725a077e17354fbdb87ea1c4aad?narHash=sha256-PcRvlWayisPSjd0UcRQbhG8Oqw78AcPE6x872cPRHN8%3D' (2026-04-21)
→ 'github:cachix/git-hooks.nix/61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a?narHash=sha256-kTwur1wV%2B01SdqskVMSo6JMEpg71ps3HpbFY2GsflKs%3D' (2026-05-11)
Signed-off-by: Ryan Yin <xiaoyin_c@qq.com>
184 lines
6.2 KiB
Nix
184 lines
6.2 KiB
Nix
{
|
|
description = "Ryan Yin's nix configuration for both NixOS & macOS";
|
|
|
|
##################################################################################################################
|
|
#
|
|
# Want to know Nix in details? Looking for a beginner-friendly tutorial?
|
|
# Check out https://github.com/ryan4yin/nixos-and-flakes-book !
|
|
#
|
|
##################################################################################################################
|
|
|
|
outputs = inputs: import ./outputs inputs;
|
|
|
|
# the nixConfig here only affects the flake itself, not the system configuration!
|
|
# for more information, see:
|
|
# https://nixos-and-flakes.thiscute.world/nix-store/add-binary-cache-servers
|
|
nixConfig = {
|
|
# substituers will be appended to the default substituters when fetching packages
|
|
extra-substituters = [
|
|
"https://cache.numtide.com"
|
|
# "https://nix-gaming.cachix.org"
|
|
# "https://nixpkgs-wayland.cachix.org"
|
|
# "https://install.determinate.systems"
|
|
];
|
|
extra-trusted-public-keys = [
|
|
"niks3.numtide.com-1:DTx8wZduET09hRmMtKdQDxNNthLQETkc/yaX7M4qK0g="
|
|
# "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
|
# "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
|
|
# "cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM="
|
|
];
|
|
};
|
|
|
|
# This is the standard format for flake.nix. `inputs` are the dependencies of the flake,
|
|
# Each item in `inputs` will be passed as a parameter to the `outputs` function after being pulled and built.
|
|
inputs = {
|
|
# There are many ways to reference flake inputs. The most widely used is github:owner/name/reference,
|
|
# which represents the GitHub repository URL + branch/commit-id/tag.
|
|
|
|
# Official NixOS package source, using nixos's unstable branch by default
|
|
# Find git commit hash with build status here(3 jobs per day):
|
|
# https://hydra.nixos.org/jobset/nixpkgs/unstable
|
|
# update via nix flake update nixpkgs --override-input nixpkgs github:NixOS/nixpkgs/<commit-hash>
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-26.05";
|
|
nixpkgs-2505.url = "github:nixos/nixpkgs/nixos-25.05";
|
|
|
|
# nixpkgs with some custom patches
|
|
nixpkgs-patched.url = "github:ryan4yin/nixpkgs/nixos-unstable-patched";
|
|
# get some latest packages from the master branch
|
|
nixpkgs-master.url = "github:nixos/nixpkgs/master";
|
|
|
|
# for macos
|
|
# nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-26.05-darwin";
|
|
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
nix-darwin = {
|
|
url = "github:lnl7/nix-darwin";
|
|
inputs.nixpkgs.follows = "nixpkgs-darwin";
|
|
};
|
|
|
|
# home-manager, used for managing user configuration
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/master";
|
|
# url = "github:nix-community/home-manager/release-26.05";
|
|
|
|
# The `follows` keyword in inputs is used for inheritance.
|
|
# Here, `inputs.nixpkgs` of home-manager is kept consistent with the `inputs.nixpkgs` of the current flake,
|
|
# to avoid problems caused by different versions of nixpkgs dependencies.
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
nixvim = {
|
|
url = "github:nix-community/nixvim/nixos-26.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# https://github.com/catppuccin/nix
|
|
catppuccin = {
|
|
url = "github:catppuccin/nix/v26.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
lanzaboote = {
|
|
url = "github:nix-community/lanzaboote/v1.0.0";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
preservation = {
|
|
url = "github:nix-community/preservation";
|
|
};
|
|
|
|
# generate iso/qcow2/docker/... image from nixos configuration
|
|
nixos-generators = {
|
|
url = "github:nix-community/nixos-generators";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
# secrets management
|
|
agenix = {
|
|
# lock with git commit at May 18, 2025
|
|
url = "github:ryantm/agenix/4835b1dc898959d8547a871ef484930675cb47f1";
|
|
# replaced with a type-safe reimplementation to get a better error message and less bugs.
|
|
# url = "github:ryan4yin/ragenix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
disko = {
|
|
url = "github:nix-community/disko/v1.13.0";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# add git hooks to format nix code before commit
|
|
pre-commit-hooks = {
|
|
url = "github:cachix/git-hooks.nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
nuenv = {
|
|
url = "github:DeterminateSystems/nuenv";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
haumea = {
|
|
url = "github:nix-community/haumea/v0.2.2";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
nixpak = {
|
|
url = "github:nixpak/nixpak";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
blender-bin = {
|
|
url = "github:edolstra/nix-warez?dir=blender";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
nixos-apple-silicon = {
|
|
# asahi-6.18.9
|
|
url = "github:nix-community/nixos-apple-silicon";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# AI coding agents
|
|
llm-agents.url = "github:numtide/llm-agents.nix";
|
|
|
|
# -------------- Gaming ---------------------
|
|
|
|
nix-gaming = {
|
|
url = "github:fufexan/nix-gaming";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
######################## Some non-flake repositories #########################################
|
|
|
|
nu_scripts = {
|
|
url = "github:ryan4yin/nu_scripts";
|
|
flake = false;
|
|
};
|
|
|
|
######################## My own repositories #########################################
|
|
|
|
# my private secrets, it's a private repository, you need to replace it with your own.
|
|
# use ssh protocol to authenticate via ssh-agent/ssh-key, and shallow clone to save time
|
|
mysecrets = {
|
|
url = "git+ssh://git@github.com/ryan4yin/nix-secrets.git?shallow=1";
|
|
flake = false;
|
|
};
|
|
|
|
my-asahi-firmware = {
|
|
url = "git+ssh://git@github.com/ryan4yin/asahi-firmware.git?shallow=1";
|
|
flake = false;
|
|
};
|
|
|
|
# my wallpapers
|
|
wallpapers = {
|
|
url = "github:ryan4yin/wallpapers";
|
|
flake = false;
|
|
};
|
|
|
|
nur-ryan4yin = {
|
|
url = "github:ryan4yin/nur-packages";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
}
|