summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorMichael Hoang <enzime@users.noreply.github.com>2024-11-17 16:16:32 +1100
committerMichael Hoang <enzime@users.noreply.github.com>2024-11-21 11:07:47 +1100
commit9fe8a0a7387d24a4e5113587256e37d5f1294486 (patch)
tree2d0736ac2c5df65905341170f4874c1e74644f27 /.github
parenta4d4d12e3885f9fea3100c73d024664ea9572f94 (diff)
ci: check that switching to new configurations works after installation
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/test.yml36
1 files changed, 32 insertions, 4 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index b9eb32f..d26e051 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -61,10 +61,17 @@ jobs:
nix run .#darwin-rebuild \
-- switch \
-I darwin-config=$HOME/.config/nix-darwin/configuration.nix
- - name: Build and activate default derivation
+ - name: Switch to new configuration
run: |
. /etc/static/bashrc
+
+ /usr/bin/sed -i.bak \
+ "s/pkgs.vim/pkgs.hello/" \
+ ~/.config/nix-darwin/configuration.nix
+
darwin-rebuild switch -I darwin=.
+
+ hello
- name: Test uninstallation of nix-darwin
run: |
nix run .#darwin-uninstaller \
@@ -110,10 +117,17 @@ jobs:
nix run .#darwin-rebuild \
-- switch \
-I darwin-config=$HOME/.config/nix-darwin/configuration.nix
- - name: Build and activate default derivation
+ - name: Switch to new configuration
run: |
. /etc/static/bashrc
+
+ /usr/bin/sed -i.bak \
+ "s/pkgs.vim/pkgs.hello/" \
+ ~/.config/nix-darwin/configuration.nix
+
darwin-rebuild switch -I darwin=.
+
+ hello
- name: Test uninstallation of nix-darwin
run: |
# A regression in Nix 2.19 means we need to put `--extra-experimental-features` before `--override-input`
@@ -157,12 +171,19 @@ jobs:
switch --flake ~/.config/nix-darwin#simple \
--override-input nix-darwin . \
--override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }}
- - name: Rebuild and activate simple flake, but this time using nix-darwin's flake interface
+ - name: Switch to new configuration
run: |
. /etc/static/bashrc
+
+ /usr/bin/sed -i.bak \
+ "s/pkgs.vim/pkgs.hello/" \
+ ~/.config/nix-darwin/flake.nix
+
darwin-rebuild switch --flake ~/.config/nix-darwin#simple \
--override-input nix-darwin . \
--override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }}
+
+ hello
- name: Test uninstallation of nix-darwin
run: |
nix run .#darwin-uninstaller --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }}
@@ -195,12 +216,19 @@ jobs:
switch --flake ~/.config/nix-darwin#simple \
--override-input nix-darwin . \
--override-input nixpkgs nixpkgs/nixpkgs-unstable
- - name: Rebuild and activate simple flake, but this time using nix-darwin's flake interface
+ - name: Switch to new configuration
run: |
. /etc/static/bashrc
+
+ /usr/bin/sed -i.bak \
+ "s/pkgs.vim/pkgs.hello/" \
+ ~/.config/nix-darwin/flake.nix
+
darwin-rebuild switch --flake ~/.config/nix-darwin#simple \
--override-input nix-darwin . \
--override-input nixpkgs nixpkgs/nixpkgs-unstable
+
+ hello
- name: Test uninstallation of nix-darwin
run: |
nix run .#darwin-uninstaller --override-input nixpkgs nixpkgs/nixpkgs-unstable