File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed
Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -31,14 +31,21 @@ jobs:
3131 - name : Checkout
3232 uses : actions/checkout@v4
3333
34- - name : Set up Nix with Flakes support
35- uses : cachix/install-nix-action@v22
36- with :
37- nix_path : nixpkgs=channel:nixos-unstable
38- nix_version : " 3.8.5"
39- extra_nix_config : |
40- experimental-features = nix-command flakes
41- allow-import-from-derivation = true
34+ - name : Install Nix 3.8.5
35+ run : |
36+ # 安装 Determinate Nix 3.8.5
37+ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --version 3.8.5
38+ # 重新加载环境
39+ . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
40+
41+ - name : Configure Nix
42+ run : |
43+ # 配置 Nix 以支持 Flakes
44+ mkdir -p ~/.config/nix
45+ cat > ~/.config/nix/nix.conf << EOF
46+ experimental-features = nix-command flakes
47+ allow-import-from-derivation = true
48+ EOF
4249
4350 - name : Build Docker image with Nix Flakes
4451 run : |
You can’t perform that action at this time.
0 commit comments