Skip to content

Commit

Permalink
fix nix version again
Browse files Browse the repository at this point in the history
  • Loading branch information
fspv committed Dec 20, 2024
1 parent 3b38d11 commit d543129
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 17 deletions.
3 changes: 1 addition & 2 deletions .config/nix/dev.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
{ pkgs ? import <nixpkgs> {} }:

let
# Also change .github/workflows/*.yml and ~/.local/share/bin/init-user-env.sh
# when changing this
# Also change ~/.local/share/bin/init-nix.sh
stablePkgs = import (fetchTarball "https://github.com/nixos/nixpkgs/archive/nixos-24.11.tar.gz") {
# You can include overlays here https://nixos.wiki/wiki/Overlays
overlays = [
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/nix-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ jobs:
uses: cachix/install-nix-action@v27
- name: Build Docker image
run: |
# Also change .config/nix/*.nix and
# ~/.local/share/bin/init-user-env.sh when changing the channel
nix-channel --add https://nixos.org/channels/nixos-24.11 nixpkgs
nix-channel --update
./.local/share/bin/init-nix.sh
nix-build .config/nix/docker.nix
- name: Load Docker image
run: |
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/nix-shell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ jobs:
run: nix-collect-garbage -d
- name: Init user env
run: |
nix-channel --add https://nixos.org/channels/nixos-24.05 nixpkgs
nix-channel --update
./.local/share/bin/init-nix.sh
./.local/share/bin/init-user-env.sh
- name: Install dependencies
run: |
Expand All @@ -49,8 +48,7 @@ jobs:
run: nix-collect-garbage -d
- name: Init user env
run: |
nix-channel --add https://nixos.org/channels/nixos-24.05 nixpkgs
nix-channel --update
./.local/share/bin/init-nix.sh
./.local/share/bin/init-user-env.sh
- name: Install dependencies
run: |
Expand All @@ -76,8 +74,7 @@ jobs:
run: nix-collect-garbage -d
- name: Init user env
run: |
nix-channel --add https://nixos.org/channels/nixos-24.05 nixpkgs
nix-channel --update
./.local/share/bin/init-nix.sh
./.local/share/bin/init-user-env.sh
- name: Install dependencies
run: |
Expand All @@ -101,8 +98,7 @@ jobs:
# uses: cachix/install-nix-action@v27
# - name: Init user env
# run: |
# nix-channel --add https://nixos.org/channels/nixos-24.05 nixpkgs
# nix-channel --update
# ./.local/share/bin/init-nix.sh
# nix-shell .config/nix/dev.nix --run ./.local/share/bin/init-user-env.sh
# - name: Install dependencies
# run: |
Expand Down
7 changes: 7 additions & 0 deletions .local/share/bin/init-nix.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -uex

# Also change .config/nix/*.nix when changing the version
nix-channel --add https://nixos.org/channels/nixos-24.11 nixpkgs
nix-channel --update
4 changes: 1 addition & 3 deletions .local/share/bin/init-user-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ then
flatpak install -y --user flathub org.wezfurlong.wezterm
fi

# Also change .github/workflows/*.yml and .config/nix/*.nix when changing the version
nix-channel --add https://nixos.org/channels/nixos-24.11 nixpkgs
nix-channel --update
${HOME}/.local/share/bin/init-nix.sh

if [ "$(uname -m)" = "x86_64" ]; then
# Not all plugins are available on aarch64 and kubectl is not really needed there now
Expand Down

0 comments on commit d543129

Please sign in to comment.