From 1098e60e92afc5e30611a3933ad783d99e198734 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Thu, 18 Apr 2024 18:29:24 +0200 Subject: ci, readme: update stable nixpkgs to 23.11 --- .github/workflows/test.yml | 2 +- .github/workflows/update-manual.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 05eecbe..a494fd6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ on: push: env: - CURRENT_STABLE_CHANNEL: nixpkgs-23.05-darwin + CURRENT_STABLE_CHANNEL: nixpkgs-23.11-darwin jobs: test-stable: diff --git a/.github/workflows/update-manual.yml b/.github/workflows/update-manual.yml index 60cb362..ef9d52f 100644 --- a/.github/workflows/update-manual.yml +++ b/.github/workflows/update-manual.yml @@ -21,7 +21,7 @@ jobs: - name: Build manual run: | - nix-build ./release.nix -I nixpkgs=channel:nixpkgs-23.05-darwin -I darwin=. -A manualHTML + nix-build ./release.nix -I nixpkgs=channel:nixpkgs-23.11-darwin -I darwin=. -A manualHTML - name: Push update to manual run: | -- cgit v1.2.3 From 8ef57d17a46e385c187813a8383ef3d6b45777ec Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Wed, 21 Aug 2024 10:32:59 +1000 Subject: .github: add sponsorship details --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/FUNDING.yml (limited to '.github') diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..f3ab9e3 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: [emilazy, Enzime] -- cgit v1.2.3 From bda49fe089795d8d387419cd2ad877b345f3f840 Mon Sep 17 00:00:00 2001 From: Emily Date: Tue, 10 Sep 2024 16:17:57 +0100 Subject: ci: update stable Nixpkgs to 24.05 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a494fd6..fee1ca1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ on: push: env: - CURRENT_STABLE_CHANNEL: nixpkgs-23.11-darwin + CURRENT_STABLE_CHANNEL: nixpkgs-24.05-darwin jobs: test-stable: -- cgit v1.2.3 From f29c6fc015f3cf2b7fb8b6fc98e2471a2acc53d6 Mon Sep 17 00:00:00 2001 From: Emily Date: Tue, 10 Sep 2024 21:14:05 +0100 Subject: ci: use Nix 2.24.6 for unstable jobs Includes the Sequoia installer fixes. --- .github/workflows/test.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fee1ca1..38afeb6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,9 @@ jobs: steps: - uses: actions/checkout@v3 - name: Install nix from current unstable channel - uses: cachix/install-nix-action@v23 + uses: cachix/install-nix-action@v27 + with: + install_url: https://releases.nixos.org/nix/nix-2.24.6/install - run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A tests - run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A manpages - run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A examples.simple @@ -82,8 +84,9 @@ jobs: steps: - uses: actions/checkout@v3 - name: Install nix from current unstable channel - uses: cachix/install-nix-action@v23 + uses: cachix/install-nix-action@v27 with: + install_url: https://releases.nixos.org/nix/nix-2.24.6/install nix_path: nixpkgs=channel:nixpkgs-unstable - name: Install nixpkgs-unstable channel run: | @@ -209,7 +212,9 @@ jobs: steps: - uses: actions/checkout@v3 - name: Install nix from current unstable channel - uses: cachix/install-nix-action@v23 + uses: cachix/install-nix-action@v27 + with: + install_url: https://releases.nixos.org/nix/nix-2.24.6/install - name: Install nix-darwin run: | mkdir -p ~/.config/nix-darwin -- cgit v1.2.3 From 98189683a4674d26fab2b5a7134bcfb5aa05cdf1 Mon Sep 17 00:00:00 2001 From: Emily Date: Tue, 10 Sep 2024 20:40:43 +0100 Subject: ci: use Determinate Systems installer for stable Nix --- .github/workflows/test.yml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 38afeb6..6583817 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,10 +12,13 @@ jobs: timeout-minutes: 30 steps: - uses: actions/checkout@v3 + # We use the Determinate Systems installer for 2.18 because the + # Sequoia UID/GID changes have not yet been backported to the + # official installer for that version. - name: Install nix corresponding to latest stable channel - uses: cachix/install-nix-action@v23 + uses: DeterminateSystems/nix-installer-action@main with: - install_url: https://releases.nixos.org/nix/nix-2.13.6/install + nix-package-url: https://releases.nixos.org/nix/nix-2.18.5/nix-2.18.5-x86_64-darwin.tar.xz - run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A tests - run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A manpages - run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A examples.simple @@ -38,18 +41,20 @@ jobs: timeout-minutes: 30 steps: - uses: actions/checkout@v3 + # We use the Determinate Systems installer for 2.18 because the + # Sequoia UID/GID changes have not yet been backported to the + # official installer for that version. - name: Install nix corresponding to latest stable channel - uses: cachix/install-nix-action@v23 + uses: DeterminateSystems/nix-installer-action@main with: - install_url: https://releases.nixos.org/nix/nix-2.13.6/install - nix_path: nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} + nix-package-url: https://releases.nixos.org/nix/nix-2.18.5/nix-2.18.5-x86_64-darwin.tar.xz - name: Install ${{ env.CURRENT_STABLE_CHANNEL }} channel run: | nix-channel --add https://nixos.org/channels/${{ env.CURRENT_STABLE_CHANNEL }} nixpkgs nix-channel --update - name: Install nix-darwin and test run: | - export NIX_PATH=$HOME/.nix-defexpr/channels + export NIX_PATH=nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} # We run nix-darwin twice to test that it can create darwin-configuration correctly for us # but we expect it to fail setting up /etc/nix/nix.conf @@ -128,10 +133,13 @@ jobs: timeout-minutes: 30 steps: - uses: actions/checkout@v3 - - name: Install nix version corresponding to latest stable channel - uses: cachix/install-nix-action@v23 + # We use the Determinate Systems installer for 2.18 because the + # Sequoia UID/GID changes have not yet been backported to the + # official installer for that version. + - name: Install nix corresponding to latest stable channel + uses: DeterminateSystems/nix-installer-action@main with: - install_url: https://releases.nixos.org/nix/nix-2.13.6/install + nix-package-url: https://releases.nixos.org/nix/nix-2.18.5/nix-2.18.5-x86_64-darwin.tar.xz - name: Install nix-darwin run: | mkdir -p ~/.config/nix-darwin -- cgit v1.2.3 From 537097b3312b6089535d715b5f4a6e22ce4c5b41 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 12 Sep 2024 10:41:28 +0100 Subject: ci/update-manual: use Nixpkgs 24.05 --- .github/workflows/update-manual.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github') diff --git a/.github/workflows/update-manual.yml b/.github/workflows/update-manual.yml index ef9d52f..c66244d 100644 --- a/.github/workflows/update-manual.yml +++ b/.github/workflows/update-manual.yml @@ -17,11 +17,11 @@ jobs: fetch-depth: 0 - name: Install Nix - uses: cachix/install-nix-action@v22 + uses: cachix/install-nix-action@v27 - name: Build manual run: | - nix-build ./release.nix -I nixpkgs=channel:nixpkgs-23.11-darwin -I darwin=. -A manualHTML + nix-build ./release.nix -I nixpkgs=channel:nixpkgs-24.05-darwin -I darwin=. -A manualHTML - name: Push update to manual run: | -- cgit v1.2.3 From 8724129dc862432dc5e5c548f1af48f38c4368c4 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Tue, 22 Oct 2024 14:07:25 +1100 Subject: ci: don't run tests twice for PRs from forks By only triggering on pushes to `master`, when users push to non-`master` branches on forks, this workflow won't get triggered and will only get triggered when users make a PR to the main repo. --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6583817..f375aa8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,6 +2,8 @@ name: "Test" on: pull_request: push: + branches: + - master env: CURRENT_STABLE_CHANNEL: nixpkgs-24.05-darwin -- cgit v1.2.3 From cbb190eccbc01f9b492fab11185a9cd729562ec6 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Tue, 22 Oct 2024 14:48:39 +1100 Subject: ci: update Nix to match versions in nixpkgs --- .github/workflows/test.yml | 38 +++++++++++++++---------------------- .github/workflows/update-manual.yml | 2 +- 2 files changed, 16 insertions(+), 24 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6583817..feec41d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,13 +12,10 @@ jobs: timeout-minutes: 30 steps: - uses: actions/checkout@v3 - # We use the Determinate Systems installer for 2.18 because the - # Sequoia UID/GID changes have not yet been backported to the - # official installer for that version. - name: Install nix corresponding to latest stable channel - uses: DeterminateSystems/nix-installer-action@main + uses: cachix/install-nix-action@v30 with: - nix-package-url: https://releases.nixos.org/nix/nix-2.18.5/nix-2.18.5-x86_64-darwin.tar.xz + install_url: https://releases.nixos.org/nix/nix-2.18.8/install - run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A tests - run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A manpages - run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A examples.simple @@ -29,9 +26,9 @@ jobs: steps: - uses: actions/checkout@v3 - name: Install nix from current unstable channel - uses: cachix/install-nix-action@v27 + uses: cachix/install-nix-action@v30 with: - install_url: https://releases.nixos.org/nix/nix-2.24.6/install + install_url: https://releases.nixos.org/nix/nix-2.24.9/install - run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A tests - run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A manpages - run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A examples.simple @@ -41,20 +38,18 @@ jobs: timeout-minutes: 30 steps: - uses: actions/checkout@v3 - # We use the Determinate Systems installer for 2.18 because the - # Sequoia UID/GID changes have not yet been backported to the - # official installer for that version. - name: Install nix corresponding to latest stable channel - uses: DeterminateSystems/nix-installer-action@main + uses: cachix/install-nix-action@v30 with: - nix-package-url: https://releases.nixos.org/nix/nix-2.18.5/nix-2.18.5-x86_64-darwin.tar.xz + install_url: https://releases.nixos.org/nix/nix-2.18.8/install + nix_path: nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} - name: Install ${{ env.CURRENT_STABLE_CHANNEL }} channel run: | nix-channel --add https://nixos.org/channels/${{ env.CURRENT_STABLE_CHANNEL }} nixpkgs nix-channel --update - name: Install nix-darwin and test run: | - export NIX_PATH=nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} + export NIX_PATH=$HOME/.nix-defexpr/channels # We run nix-darwin twice to test that it can create darwin-configuration correctly for us # but we expect it to fail setting up /etc/nix/nix.conf @@ -89,9 +84,9 @@ jobs: steps: - uses: actions/checkout@v3 - name: Install nix from current unstable channel - uses: cachix/install-nix-action@v27 + uses: cachix/install-nix-action@v30 with: - install_url: https://releases.nixos.org/nix/nix-2.24.6/install + install_url: https://releases.nixos.org/nix/nix-2.24.9/install nix_path: nixpkgs=channel:nixpkgs-unstable - name: Install nixpkgs-unstable channel run: | @@ -133,13 +128,10 @@ jobs: timeout-minutes: 30 steps: - uses: actions/checkout@v3 - # We use the Determinate Systems installer for 2.18 because the - # Sequoia UID/GID changes have not yet been backported to the - # official installer for that version. - - name: Install nix corresponding to latest stable channel - uses: DeterminateSystems/nix-installer-action@main + - name: Install nix version corresponding to latest stable channel + uses: cachix/install-nix-action@v30 with: - nix-package-url: https://releases.nixos.org/nix/nix-2.18.5/nix-2.18.5-x86_64-darwin.tar.xz + install_url: https://releases.nixos.org/nix/nix-2.18.8/install - name: Install nix-darwin run: | mkdir -p ~/.config/nix-darwin @@ -220,9 +212,9 @@ jobs: steps: - uses: actions/checkout@v3 - name: Install nix from current unstable channel - uses: cachix/install-nix-action@v27 + uses: cachix/install-nix-action@v30 with: - install_url: https://releases.nixos.org/nix/nix-2.24.6/install + install_url: https://releases.nixos.org/nix/nix-2.24.9/install - name: Install nix-darwin run: | mkdir -p ~/.config/nix-darwin diff --git a/.github/workflows/update-manual.yml b/.github/workflows/update-manual.yml index c66244d..4bd5a0b 100644 --- a/.github/workflows/update-manual.yml +++ b/.github/workflows/update-manual.yml @@ -17,7 +17,7 @@ jobs: fetch-depth: 0 - name: Install Nix - uses: cachix/install-nix-action@v27 + uses: cachix/install-nix-action@v30 - name: Build manual run: | -- cgit v1.2.3 From 53b9de4d6ca51c38299f265630b811fed6d4fd05 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Sun, 3 Nov 2024 12:18:02 +1100 Subject: ci: remove tests to ensure submodules work --- .github/workflows/test.yml | 115 --------------------------------------------- 1 file changed, 115 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c7ad8c0..3dd8bcf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -153,60 +153,6 @@ jobs: run: | . /etc/static/bashrc darwin-rebuild build --flake ./modules/examples/flake#simple --override-input nix-darwin . --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} - - name: Test git submodules - run: | - . /etc/static/bashrc - - mkdir -p /tmp/{test-nix-darwin-submodules,example-submodule} - - pushd /tmp/example-submodule - echo '"hello"' > hello.nix - git init - git add . - git commit -m "add a submodule we will import" - popd - - cp -a ./modules/examples/. /tmp/test-nix-darwin-submodules - cp -a ./modules/examples/flake/flake.nix /tmp/test-nix-darwin-submodules - - pushd /tmp/test-nix-darwin-submodules - /usr/bin/sed -i.bak \ - '\#modules = \[#s#configuration#configuration ./simple.nix#' \ - ./flake.nix - /usr/bin/sed -i.bak \ - 's#pkgs.vim#pkgs."${import ./submodule-test/hello.nix}"#' \ - ./simple.nix - git init - git add flake.nix simple.nix - git \ - -c protocol.file.allow=always \ - submodule add /tmp/example-submodule submodule-test - popd - - # Should fail - darwin-rebuild build \ - --flake /tmp/test-nix-darwin-submodules#simple \ - --override-input nix-darwin . \ - --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} \ - && { - printf 'succeeded while expecting failure due to submodule\n' >/dev/stderr - exit 1 - } - # Should also fail - darwin-rebuild build \ - --flake /tmp/test-nix-darwin-submodules?submodules=0#simple \ - --override-input nix-darwin . \ - --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} \ - && { - printf 'succeeded while expecting failure due to submodule\n' >/dev/stderr - exit 1 - } - - # Should succeed - darwin-rebuild build \ - --flake /tmp/test-nix-darwin-submodules?submodules=1#simple \ - --override-input nix-darwin . \ - --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} \ install-flake-against-unstable: runs-on: macos-12 @@ -236,64 +182,3 @@ jobs: run: | . /etc/static/bashrc darwin-rebuild build --flake ./modules/examples/flake#simple --override-input nix-darwin . --override-input nixpkgs nixpkgs/nixpkgs-unstable - - name: Test git submodules - run: | - . /etc/static/bashrc - - mkdir -p /tmp/{test-nix-darwin-submodules,example-submodule} - - pushd /tmp/example-submodule - echo '"hello"' > hello.nix - git init - git add . - git commit -m "add a submodule we will import" - popd - - cp -a ./modules/examples/. /tmp/test-nix-darwin-submodules - cp -a ./modules/examples/flake/flake.nix /tmp/test-nix-darwin-submodules - - pushd /tmp/test-nix-darwin-submodules - /usr/bin/sed -i.bak \ - '\#modules = \[#s#configuration#configuration ./simple.nix#' \ - ./flake.nix - /usr/bin/sed -i.bak \ - 's#pkgs.vim#pkgs."${import ./submodule-test/hello.nix}"#' \ - ./simple.nix - git init - git add flake.nix simple.nix - git \ - -c protocol.file.allow=always \ - submodule add /tmp/example-submodule submodule-test - popd - - # Should fail - darwin-rebuild build \ - --flake /tmp/test-nix-darwin-submodules#simple \ - --override-input nix-darwin . \ - --override-input nixpkgs nixpkgs/nixpkgs-unstable \ - && { - printf 'succeeded while expecting failure due to submodule\n' >/dev/stderr - exit 1 - } - - # Should also fail - darwin-rebuild build \ - --flake /tmp/test-nix-darwin-submodules?submodules=0#simple \ - --override-input nix-darwin . \ - --override-input nixpkgs nixpkgs/nixpkgs-unstable \ - && { - printf 'succeeded while expecting failure due to submodule\n' >/dev/stderr - exit 1 - } - - # Should succeed - darwin-rebuild build \ - --flake /tmp/test-nix-darwin-submodules?submodules=1#simple \ - --override-input nix-darwin . \ - --override-input nixpkgs nixpkgs/nixpkgs-unstable - - # Should also succeed - darwin-rebuild build \ - --flake git+file:///tmp/test-nix-darwin-submodules?submodules=1#simple \ - --override-input nix-darwin . \ - --override-input nixpkgs nixpkgs/nixpkgs-unstable -- cgit v1.2.3 From 07db4e57d3596ae6de5877409ac6ec782e69afc8 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Tue, 5 Nov 2024 03:21:37 +1100 Subject: ci: switch to `macos-13` The `macos-12` runner image will be removed by 3 Dec 2024. --- .github/workflows/test.yml | 12 ++++++------ .github/workflows/update-manual.yml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3dd8bcf..bb247e9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ env: jobs: test-stable: - runs-on: macos-12 + runs-on: macos-13 timeout-minutes: 30 steps: - uses: actions/checkout@v3 @@ -23,7 +23,7 @@ jobs: - run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A examples.simple test-unstable: - runs-on: macos-12 + runs-on: macos-13 timeout-minutes: 30 steps: - uses: actions/checkout@v3 @@ -36,7 +36,7 @@ jobs: - run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A examples.simple install-against-stable: - runs-on: macos-12 + runs-on: macos-13 timeout-minutes: 30 steps: - uses: actions/checkout@v3 @@ -81,7 +81,7 @@ jobs: limit-access-to-actor: true install-against-unstable: - runs-on: macos-12 + runs-on: macos-13 timeout-minutes: 30 steps: - uses: actions/checkout@v3 @@ -126,7 +126,7 @@ jobs: limit-access-to-actor: true install-flake-against-stable: - runs-on: macos-12 + runs-on: macos-13 timeout-minutes: 30 steps: - uses: actions/checkout@v3 @@ -155,7 +155,7 @@ jobs: darwin-rebuild build --flake ./modules/examples/flake#simple --override-input nix-darwin . --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} install-flake-against-unstable: - runs-on: macos-12 + runs-on: macos-13 timeout-minutes: 30 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/update-manual.yml b/.github/workflows/update-manual.yml index 4bd5a0b..36e2fd8 100644 --- a/.github/workflows/update-manual.yml +++ b/.github/workflows/update-manual.yml @@ -8,7 +8,7 @@ on: jobs: update-manual: - runs-on: macos-12 + runs-on: macos-13 steps: - name: Checkout repository uses: actions/checkout@v3 -- cgit v1.2.3 From 68637ee7dbdb194755697930c36272ad115af4a6 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Sun, 3 Nov 2024 21:52:58 +1100 Subject: flake: expose `jobs` from `release.nix` as a flattened attrset --- .github/workflows/test.yml | 8 ++++---- .github/workflows/update-manual.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bb247e9..709edd3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,8 +19,8 @@ jobs: with: install_url: https://releases.nixos.org/nix/nix-2.18.8/install - run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A tests - - run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A manpages - - run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A examples.simple + - run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A docs + - run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A examples test-unstable: runs-on: macos-13 @@ -32,8 +32,8 @@ jobs: with: install_url: https://releases.nixos.org/nix/nix-2.24.9/install - run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A tests - - run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A manpages - - run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A examples.simple + - run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A docs + - run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A examples install-against-stable: runs-on: macos-13 diff --git a/.github/workflows/update-manual.yml b/.github/workflows/update-manual.yml index 36e2fd8..19638a2 100644 --- a/.github/workflows/update-manual.yml +++ b/.github/workflows/update-manual.yml @@ -21,7 +21,7 @@ jobs: - name: Build manual run: | - nix-build ./release.nix -I nixpkgs=channel:nixpkgs-24.05-darwin -I darwin=. -A manualHTML + nix build .#manualHTML --override-input nixpkgs nixpkgs/nixpkgs-24.05-darwin - name: Push update to manual run: | -- cgit v1.2.3 From e0f243d17e5c6281b2541c79b52be0270be9a360 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Mon, 4 Nov 2024 08:42:12 +1100 Subject: ci: run nix flake check --- .github/workflows/test.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 709edd3..176d56f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,9 +18,7 @@ jobs: uses: cachix/install-nix-action@v30 with: install_url: https://releases.nixos.org/nix/nix-2.18.8/install - - run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A tests - - run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A docs - - run: nix-build ./release.nix -I nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} -I darwin=. -A examples + - run: nix flake check --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} test-unstable: runs-on: macos-13 @@ -31,9 +29,7 @@ jobs: uses: cachix/install-nix-action@v30 with: install_url: https://releases.nixos.org/nix/nix-2.24.9/install - - run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A tests - - run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A docs - - run: nix-build ./release.nix -I nixpkgs=channel:nixpkgs-unstable -I darwin=. -A examples + - run: nix flake check --override-input nixpkgs nixpkgs/nixpkgs-unstable install-against-stable: runs-on: macos-13 -- cgit v1.2.3 From 37b591bd8b3ca9641a8aff165f30927755b5dc20 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Mon, 4 Nov 2024 11:53:47 +1100 Subject: ci: remove unused workflows --- .github/workflows/build.yml | 18 ------------------ .github/workflows/debug.yml | 23 ----------------------- 2 files changed, 41 deletions(-) delete mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/debug.yml (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 1cb2426..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: "Build" -on: - # curl -fsSL -XPOST \ - # -H "Accept: application/vnd.github.everest-preview+json" \ - # -H "Authorization: token $GITHUB_TOKEN" \ - # --data '{"event_type": "build", "client_payload": {"args": "-f channel:nixpkgs-unstable hello"}}' \ - # https://api.github.com/repos/LnL7/nix-darwin/dispatches - repository_dispatch: - types: - - build -jobs: - build: - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v22 - - run: | - nix build ${{ github.event.client_payload.args }} -vL diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml deleted file mode 100644 index 7535f71..0000000 --- a/.github/workflows/debug.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: "Debug" -on: - # curl -fsSL -XPOST \ - # -H "Accept: application/vnd.github.everest-preview+json" \ - # -H "Authorization: token $GITHUB_TOKEN" \ - # --data '{"event_type": "debug"}' \ - # https://api.github.com/repos/LnL7/nix-darwin/dispatches - repository_dispatch: - types: - - debug -jobs: - debug: - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v22 - - run: | - nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs - nix-channel --update - - run: | - nix-shell -A installer - nix-shell -A installer.check - - uses: mxschmitt/action-tmate@v3 -- cgit v1.2.3 From 223a920ab457160a245a588f4191f2b6782b3957 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Mon, 4 Nov 2024 14:37:59 +1100 Subject: ci: upgrade `actions/checkout` --- .github/workflows/test.yml | 12 ++++++------ .github/workflows/update-manual.yml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 176d56f..ce176eb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: runs-on: macos-13 timeout-minutes: 30 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install nix corresponding to latest stable channel uses: cachix/install-nix-action@v30 with: @@ -24,7 +24,7 @@ jobs: runs-on: macos-13 timeout-minutes: 30 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install nix from current unstable channel uses: cachix/install-nix-action@v30 with: @@ -35,7 +35,7 @@ jobs: runs-on: macos-13 timeout-minutes: 30 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install nix corresponding to latest stable channel uses: cachix/install-nix-action@v30 with: @@ -80,7 +80,7 @@ jobs: runs-on: macos-13 timeout-minutes: 30 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install nix from current unstable channel uses: cachix/install-nix-action@v30 with: @@ -125,7 +125,7 @@ jobs: runs-on: macos-13 timeout-minutes: 30 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install nix version corresponding to latest stable channel uses: cachix/install-nix-action@v30 with: @@ -154,7 +154,7 @@ jobs: runs-on: macos-13 timeout-minutes: 30 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install nix from current unstable channel uses: cachix/install-nix-action@v30 with: diff --git a/.github/workflows/update-manual.yml b/.github/workflows/update-manual.yml index 19638a2..a2f9382 100644 --- a/.github/workflows/update-manual.yml +++ b/.github/workflows/update-manual.yml @@ -11,7 +11,7 @@ jobs: runs-on: macos-13 steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: # So that we fetch all branches, since we need to checkout the `gh-pages` branch later. fetch-depth: 0 -- cgit v1.2.3 From ebca0c23c95cc2d2c75b3c3a290fa99a886b9738 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Tue, 5 Nov 2024 02:48:25 +1100 Subject: uninstaller: switch to `writeShellApplication` By not defining a `shellHook`, `nix-shell -A uninstaller` and `nix-shell -A uninstaller.check` no longer work. --- .github/workflows/test.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ce176eb..e786b4a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -66,9 +66,12 @@ jobs: darwin-rebuild switch -I darwin=. - name: Test uninstallation of nix-darwin run: | - export NIX_PATH=$HOME/.nix-defexpr/channels - nix-shell -A uninstaller - nix-shell -A uninstaller.check + nix run .#darwin-uninstaller \ + --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} \ + --extra-experimental-features "nix-command flakes" + nix run .#darwin-uninstaller.tests.uninstaller \ + --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} \ + --extra-experimental-features "nix-command flakes" - name: Debugging tmate session if: ${{ failure() }} uses: mxschmitt/action-tmate@v3 @@ -111,9 +114,12 @@ jobs: darwin-rebuild switch -I darwin=. - name: Test uninstallation of nix-darwin run: | - export NIX_PATH=$HOME/.nix-defexpr/channels - nix-shell -A uninstaller - nix-shell -A uninstaller.check + nix run .#darwin-uninstaller \ + --override-input nixpkgs nixpkgs/nixpkgs-unstable \ + --extra-experimental-features "nix-command flakes" + nix run .#darwin-uninstaller.tests.uninstaller \ + --override-input nixpkgs nixpkgs/nixpkgs-unstable \ + --extra-experimental-features "nix-command flakes" - name: Debugging tmate session if: ${{ failure() }} uses: mxschmitt/action-tmate@v3 -- cgit v1.2.3 From 7bbc7c5db686f4e57a29c82a185596f53d110647 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Mon, 4 Nov 2024 11:55:15 +1100 Subject: ci: test uninstallation of nix-darwin using flakes --- .github/workflows/test.yml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e786b4a..095cd3a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -155,6 +155,10 @@ jobs: run: | . /etc/static/bashrc darwin-rebuild build --flake ./modules/examples/flake#simple --override-input nix-darwin . --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} + - name: Test uninstallation of nix-darwin + run: | + nix run .#darwin-uninstaller --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} + nix run .#darwin-uninstaller.tests.uninstaller --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} install-flake-against-unstable: runs-on: macos-13 @@ -184,3 +188,7 @@ jobs: run: | . /etc/static/bashrc darwin-rebuild build --flake ./modules/examples/flake#simple --override-input nix-darwin . --override-input nixpkgs nixpkgs/nixpkgs-unstable + - name: Test uninstallation of nix-darwin + run: | + nix run .#darwin-uninstaller --override-input nixpkgs nixpkgs/nixpkgs-unstable + nix run .#darwin-uninstaller.tests.uninstaller --override-input nixpkgs nixpkgs/nixpkgs-unstable -- cgit v1.2.3 From 222c3cb558f4e56e3f9e84bb65fe23034f7f9c79 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Thu, 7 Nov 2024 16:47:15 +1100 Subject: ci: fix uninstaller failing to run in `install-against-unstable` --- .github/workflows/test.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 095cd3a..623cb69 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -114,12 +114,13 @@ jobs: darwin-rebuild switch -I darwin=. - name: Test uninstallation of nix-darwin run: | + # A regression in Nix 2.19 means we need to put `--extra-experimental-features` before `--override-input` nix run .#darwin-uninstaller \ - --override-input nixpkgs nixpkgs/nixpkgs-unstable \ - --extra-experimental-features "nix-command flakes" + --extra-experimental-features "nix-command flakes" \ + --override-input nixpkgs nixpkgs/nixpkgs-unstable nix run .#darwin-uninstaller.tests.uninstaller \ - --override-input nixpkgs nixpkgs/nixpkgs-unstable \ - --extra-experimental-features "nix-command flakes" + --extra-experimental-features "nix-command flakes" \ + --override-input nixpkgs nixpkgs/nixpkgs-unstable - name: Debugging tmate session if: ${{ failure() }} uses: mxschmitt/action-tmate@v3 -- cgit v1.2.3 From a89c85192354229d9fc0adfe11f3f89620eb9487 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Sat, 9 Nov 2024 20:37:07 +1100 Subject: ci: don't override nixpkgs when building the manual This causes `nix-darwin` to not have `rev` or `dirtyRev` --- .github/workflows/update-manual.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/update-manual.yml b/.github/workflows/update-manual.yml index a2f9382..42ee21e 100644 --- a/.github/workflows/update-manual.yml +++ b/.github/workflows/update-manual.yml @@ -21,7 +21,7 @@ jobs: - name: Build manual run: | - nix build .#manualHTML --override-input nixpkgs nixpkgs/nixpkgs-24.05-darwin + nix build .#manualHTML - name: Push update to manual run: | -- cgit v1.2.3 From 293589065dd0f6bbfd6f83fcdc4f2d74543337c9 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Sat, 9 Nov 2024 20:51:18 +1100 Subject: ci: fix manual not being regenerated when non-Nix files are updated This also fixes the README not being updated on the website as well --- .github/workflows/update-manual.yml | 2 -- 1 file changed, 2 deletions(-) (limited to '.github') diff --git a/.github/workflows/update-manual.yml b/.github/workflows/update-manual.yml index 42ee21e..8d2af53 100644 --- a/.github/workflows/update-manual.yml +++ b/.github/workflows/update-manual.yml @@ -3,8 +3,6 @@ on: push: branches: - master - paths: - - '**.nix' jobs: update-manual: -- cgit v1.2.3 From 7918e24e5b999e36c923573e9d6ac183b0c00f38 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Mon, 11 Nov 2024 22:30:42 +1100 Subject: treewide: remove `nix.package` example --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 623cb69..92d06d4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,7 +55,7 @@ jobs: nixConfHash=$(shasum -a 256 /etc/nix/nix.conf | cut -d ' ' -f 1) /usr/bin/sed -i.bak \ - "s/# nix.package = pkgs.nix;/nix.settings.access-tokens = [ \"github.com=\${{ secrets.GITHUB_TOKEN }}\" ]; environment.etc.\"nix\/nix.conf\".knownSha256Hashes = [ \"$nixConfHash\" ];/" \ + "s/# programs.fish.enable = true;/nix.settings.access-tokens = [ \"github.com=\${{ secrets.GITHUB_TOKEN }}\" ]; environment.etc.\"nix\/nix.conf\".knownSha256Hashes = [ \"$nixConfHash\" ];/" \ ~/.nixpkgs/darwin-configuration.nix nix-shell -A installer @@ -103,7 +103,7 @@ jobs: nixConfHash=$(shasum -a 256 /etc/nix/nix.conf | cut -d ' ' -f 1) /usr/bin/sed -i.bak \ - "s/# nix.package = pkgs.nix;/nix.settings.access-tokens = [ \"github.com=\${{ secrets.GITHUB_TOKEN }}\" ]; environment.etc.\"nix\/nix.conf\".knownSha256Hashes = [ \"$nixConfHash\" ];/" \ + "s/# programs.fish.enable = true;/nix.settings.access-tokens = [ \"github.com=\${{ secrets.GITHUB_TOKEN }}\" ]; environment.etc.\"nix\/nix.conf\".knownSha256Hashes = [ \"$nixConfHash\" ];/" \ ~/.nixpkgs/darwin-configuration.nix nix-shell -A installer @@ -145,7 +145,7 @@ jobs: nix flake init -t $darwin nixConfHash=$(shasum -a 256 /etc/nix/nix.conf | cut -d ' ' -f 1) /usr/bin/sed -i.bak \ - "s/# nix.package = pkgs.nix;/nix.settings.access-tokens = [ \"github.com=\${{ secrets.GITHUB_TOKEN }}\" ]; environment.etc.\"nix\/nix.conf\".knownSha256Hashes = [ \"$nixConfHash\" ];/" \ + "s/# programs.fish.enable = true;/nix.settings.access-tokens = [ \"github.com=\${{ secrets.GITHUB_TOKEN }}\" ]; environment.etc.\"nix\/nix.conf\".knownSha256Hashes = [ \"$nixConfHash\" ];/" \ flake.nix popd nix run .#darwin-rebuild -- \ @@ -178,7 +178,7 @@ jobs: nix flake init -t $darwin nixConfHash=$(shasum -a 256 /etc/nix/nix.conf | cut -d ' ' -f 1) /usr/bin/sed -i.bak \ - "s/# nix.package = pkgs.nix;/nix.settings.access-tokens = [ \"github.com=\${{ secrets.GITHUB_TOKEN }}\" ]; environment.etc.\"nix\/nix.conf\".knownSha256Hashes = [ \"$nixConfHash\" ];/" \ + "s/# programs.fish.enable = true;/nix.settings.access-tokens = [ \"github.com=\${{ secrets.GITHUB_TOKEN }}\" ]; environment.etc.\"nix\/nix.conf\".knownSha256Hashes = [ \"$nixConfHash\" ];/" \ flake.nix popd nix run .#darwin-rebuild -- \ -- cgit v1.2.3 From 9a1bea70d5728a19ee0a090dc0bcdeb73f09b7a4 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Sun, 17 Nov 2024 02:33:37 +1100 Subject: installer: move creating default configuration to README --- .github/workflows/test.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 92d06d4..90bd6fd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -49,17 +49,15 @@ jobs: run: | export NIX_PATH=$HOME/.nix-defexpr/channels - # We run nix-darwin twice to test that it can create darwin-configuration correctly for us - # but we expect it to fail setting up /etc/nix/nix.conf - nix-shell -A installer || true + mkdir -p ~/.config/nix-darwin + cp modules/examples/simple.nix ~/.config/nix-darwin/configuration.nix nixConfHash=$(shasum -a 256 /etc/nix/nix.conf | cut -d ' ' -f 1) /usr/bin/sed -i.bak \ "s/# programs.fish.enable = true;/nix.settings.access-tokens = [ \"github.com=\${{ secrets.GITHUB_TOKEN }}\" ]; environment.etc.\"nix\/nix.conf\".knownSha256Hashes = [ \"$nixConfHash\" ];/" \ - ~/.nixpkgs/darwin-configuration.nix + ~/.config/nix-darwin/configuration.nix - nix-shell -A installer - nix-shell -A installer.check + nix-shell -A installer -I darwin-config=$HOME/.config/nix-darwin/configuration.nix - name: Build and activate default derivation run: | . /etc/static/bashrc @@ -97,17 +95,15 @@ jobs: run: | export NIX_PATH=$HOME/.nix-defexpr/channels - # We run nix-darwin twice to test that it can create darwin-configuration correctly for us - # but we expect it to fail setting up /etc/nix/nix.conf - nix-shell -A installer || true + mkdir -p ~/.config/nix-darwin + cp modules/examples/simple.nix ~/.config/nix-darwin/configuration.nix nixConfHash=$(shasum -a 256 /etc/nix/nix.conf | cut -d ' ' -f 1) /usr/bin/sed -i.bak \ "s/# programs.fish.enable = true;/nix.settings.access-tokens = [ \"github.com=\${{ secrets.GITHUB_TOKEN }}\" ]; environment.etc.\"nix\/nix.conf\".knownSha256Hashes = [ \"$nixConfHash\" ];/" \ - ~/.nixpkgs/darwin-configuration.nix + ~/.config/nix-darwin/configuration.nix - nix-shell -A installer - nix-shell -A installer.check + nix-shell -A installer -I darwin-config=$HOME/.config/nix-darwin/configuration.nix - name: Build and activate default derivation run: | . /etc/static/bashrc -- cgit v1.2.3 From 65ea368ebbed4fa52a1a59fcb06848c49b310c9c Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Sun, 17 Nov 2024 02:51:42 +1100 Subject: installer: move channel creation to README --- .github/workflows/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 90bd6fd..73a3fb7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,8 +41,9 @@ jobs: with: install_url: https://releases.nixos.org/nix/nix-2.18.8/install nix_path: nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} - - name: Install ${{ env.CURRENT_STABLE_CHANNEL }} channel + - name: Install channels run: | + nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin nix-channel --add https://nixos.org/channels/${{ env.CURRENT_STABLE_CHANNEL }} nixpkgs nix-channel --update - name: Install nix-darwin and test @@ -87,8 +88,9 @@ jobs: with: install_url: https://releases.nixos.org/nix/nix-2.24.9/install nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Install nixpkgs-unstable channel + - name: Install channels run: | + nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs nix-channel --update - name: Install nix-darwin and test -- cgit v1.2.3 From 60ed03d0b10fa88054a73a0d34338f03f8d73f53 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Sun, 17 Nov 2024 02:14:06 +1100 Subject: installer: remove --- .github/workflows/test.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 73a3fb7..43aed10 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,7 +46,7 @@ jobs: nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin nix-channel --add https://nixos.org/channels/${{ env.CURRENT_STABLE_CHANNEL }} nixpkgs nix-channel --update - - name: Install nix-darwin and test + - name: Install nix-darwin run: | export NIX_PATH=$HOME/.nix-defexpr/channels @@ -58,7 +58,9 @@ jobs: "s/# programs.fish.enable = true;/nix.settings.access-tokens = [ \"github.com=\${{ secrets.GITHUB_TOKEN }}\" ]; environment.etc.\"nix\/nix.conf\".knownSha256Hashes = [ \"$nixConfHash\" ];/" \ ~/.config/nix-darwin/configuration.nix - nix-shell -A installer -I darwin-config=$HOME/.config/nix-darwin/configuration.nix + nix run .#darwin-rebuild \ + -- switch \ + -I darwin-config=$HOME/.config/nix-darwin/configuration.nix - name: Build and activate default derivation run: | . /etc/static/bashrc @@ -93,7 +95,7 @@ jobs: nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs nix-channel --update - - name: Install nix-darwin and test + - name: Install nix-darwin run: | export NIX_PATH=$HOME/.nix-defexpr/channels @@ -105,7 +107,9 @@ jobs: "s/# programs.fish.enable = true;/nix.settings.access-tokens = [ \"github.com=\${{ secrets.GITHUB_TOKEN }}\" ]; environment.etc.\"nix\/nix.conf\".knownSha256Hashes = [ \"$nixConfHash\" ];/" \ ~/.config/nix-darwin/configuration.nix - nix-shell -A installer -I darwin-config=$HOME/.config/nix-darwin/configuration.nix + nix run .#darwin-rebuild \ + -- switch \ + -I darwin-config=$HOME/.config/nix-darwin/configuration.nix - name: Build and activate default derivation run: | . /etc/static/bashrc -- cgit v1.2.3 From a4d4d12e3885f9fea3100c73d024664ea9572f94 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Sun, 17 Nov 2024 13:11:30 +1100 Subject: examples: change default architecture to `aarch64-darwin` --- .github/workflows/test.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 43aed10..b9eb32f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -149,6 +149,9 @@ jobs: /usr/bin/sed -i.bak \ "s/# programs.fish.enable = true;/nix.settings.access-tokens = [ \"github.com=\${{ secrets.GITHUB_TOKEN }}\" ]; environment.etc.\"nix\/nix.conf\".knownSha256Hashes = [ \"$nixConfHash\" ];/" \ flake.nix + /usr/bin/sed -i.bak \ + 's/nixpkgs.hostPlatform = "aarch64-darwin";/nixpkgs.hostPlatform = "'$(nix eval --expr builtins.currentSystem --impure --raw)'";/' \ + flake.nix popd nix run .#darwin-rebuild -- \ switch --flake ~/.config/nix-darwin#simple \ @@ -157,7 +160,9 @@ jobs: - name: Rebuild and activate simple flake, but this time using nix-darwin's flake interface run: | . /etc/static/bashrc - darwin-rebuild build --flake ./modules/examples/flake#simple --override-input nix-darwin . --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} + darwin-rebuild switch --flake ~/.config/nix-darwin#simple \ + --override-input nix-darwin . \ + --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} - name: Test uninstallation of nix-darwin run: | nix run .#darwin-uninstaller --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} @@ -182,6 +187,9 @@ jobs: /usr/bin/sed -i.bak \ "s/# programs.fish.enable = true;/nix.settings.access-tokens = [ \"github.com=\${{ secrets.GITHUB_TOKEN }}\" ]; environment.etc.\"nix\/nix.conf\".knownSha256Hashes = [ \"$nixConfHash\" ];/" \ flake.nix + /usr/bin/sed -i.bak \ + 's/nixpkgs.hostPlatform = "aarch64-darwin";/nixpkgs.hostPlatform = "'$(nix eval --expr builtins.currentSystem --impure --raw)'";/' \ + flake.nix popd nix run .#darwin-rebuild -- \ switch --flake ~/.config/nix-darwin#simple \ @@ -190,7 +198,9 @@ jobs: - name: Rebuild and activate simple flake, but this time using nix-darwin's flake interface run: | . /etc/static/bashrc - darwin-rebuild build --flake ./modules/examples/flake#simple --override-input nix-darwin . --override-input nixpkgs nixpkgs/nixpkgs-unstable + darwin-rebuild switch --flake ~/.config/nix-darwin#simple \ + --override-input nix-darwin . \ + --override-input nixpkgs nixpkgs/nixpkgs-unstable - name: Test uninstallation of nix-darwin run: | nix run .#darwin-uninstaller --override-input nixpkgs nixpkgs/nixpkgs-unstable -- cgit v1.2.3 From 9fe8a0a7387d24a4e5113587256e37d5f1294486 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Sun, 17 Nov 2024 16:16:32 +1100 Subject: ci: check that switching to new configurations works after installation --- .github/workflows/test.yml | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) (limited to '.github') 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 -- cgit v1.2.3 From 2ca27ba780bb072e9fb80565684ad81c2664f9d0 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Tue, 19 Nov 2024 12:50:32 +1100 Subject: ci: source `/etc/bashrc` instead of `/etc/static/bashrc` This should no longer be necessary after #687, as we can be sure that if activation succeeded, that `/etc/bashrc` points to `/etc/static/bashrc`. --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d26e051..6e06117 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -63,7 +63,7 @@ jobs: -I darwin-config=$HOME/.config/nix-darwin/configuration.nix - name: Switch to new configuration run: | - . /etc/static/bashrc + . /etc/bashrc /usr/bin/sed -i.bak \ "s/pkgs.vim/pkgs.hello/" \ @@ -119,7 +119,7 @@ jobs: -I darwin-config=$HOME/.config/nix-darwin/configuration.nix - name: Switch to new configuration run: | - . /etc/static/bashrc + . /etc/bashrc /usr/bin/sed -i.bak \ "s/pkgs.vim/pkgs.hello/" \ @@ -173,7 +173,7 @@ jobs: --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} - name: Switch to new configuration run: | - . /etc/static/bashrc + . /etc/bashrc /usr/bin/sed -i.bak \ "s/pkgs.vim/pkgs.hello/" \ @@ -218,7 +218,7 @@ jobs: --override-input nixpkgs nixpkgs/nixpkgs-unstable - name: Switch to new configuration run: | - . /etc/static/bashrc + . /etc/bashrc /usr/bin/sed -i.bak \ "s/pkgs.vim/pkgs.hello/" \ -- cgit v1.2.3 From d57e74864bccd31e081443733bfaee1eda85a242 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Tue, 19 Nov 2024 12:54:51 +1100 Subject: uninstaller: always specify `--extra-experimental-features` first See https://github.com/NixOS/nix/issues/11891 --- .github/workflows/test.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6e06117..c531aa5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,12 +74,14 @@ jobs: hello - name: Test uninstallation of nix-darwin run: | + # We need to specify `--extra-experimental-features` because `experimental-features` is set by + # `cachix/install-nix-action` but not by our default config above nix run .#darwin-uninstaller \ - --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} \ - --extra-experimental-features "nix-command flakes" + --extra-experimental-features "nix-command flakes" \ + --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} nix run .#darwin-uninstaller.tests.uninstaller \ - --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} \ - --extra-experimental-features "nix-command flakes" + --extra-experimental-features "nix-command flakes" \ + --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} - name: Debugging tmate session if: ${{ failure() }} uses: mxschmitt/action-tmate@v3 @@ -130,7 +132,8 @@ jobs: 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` + # We need to specify `--extra-experimental-features` because `experimental-features` is set by + # `cachix/install-nix-action` but not by our default config above nix run .#darwin-uninstaller \ --extra-experimental-features "nix-command flakes" \ --override-input nixpkgs nixpkgs/nixpkgs-unstable -- cgit v1.2.3 From 82ed8010ffb17b637cbbd916398ee3a4027cfb10 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Fri, 22 Nov 2024 12:58:40 +1100 Subject: ci: extend timeout and remove `tmate` --- .github/workflows/test.yml | 16 ---------------- 1 file changed, 16 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c531aa5..25211d3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,6 @@ env: jobs: test-stable: runs-on: macos-13 - timeout-minutes: 30 steps: - uses: actions/checkout@v4 - name: Install nix corresponding to latest stable channel @@ -22,7 +21,6 @@ jobs: test-unstable: runs-on: macos-13 - timeout-minutes: 30 steps: - uses: actions/checkout@v4 - name: Install nix from current unstable channel @@ -33,7 +31,6 @@ jobs: install-against-stable: runs-on: macos-13 - timeout-minutes: 30 steps: - uses: actions/checkout@v4 - name: Install nix corresponding to latest stable channel @@ -82,12 +79,6 @@ jobs: nix run .#darwin-uninstaller.tests.uninstaller \ --extra-experimental-features "nix-command flakes" \ --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} - - name: Debugging tmate session - if: ${{ failure() }} - uses: mxschmitt/action-tmate@v3 - timeout-minutes: 15 - with: - limit-access-to-actor: true install-against-unstable: runs-on: macos-13 @@ -140,16 +131,9 @@ jobs: nix run .#darwin-uninstaller.tests.uninstaller \ --extra-experimental-features "nix-command flakes" \ --override-input nixpkgs nixpkgs/nixpkgs-unstable - - name: Debugging tmate session - if: ${{ failure() }} - uses: mxschmitt/action-tmate@v3 - timeout-minutes: 15 - with: - limit-access-to-actor: true install-flake-against-stable: runs-on: macos-13 - timeout-minutes: 30 steps: - uses: actions/checkout@v4 - name: Install nix version corresponding to latest stable channel -- cgit v1.2.3 From 0680f9e9e1a2861e1513a4ffe5b483130ce736c7 Mon Sep 17 00:00:00 2001 From: Sam <30577766+Samasaur1@users.noreply.github.com> Date: Tue, 31 Dec 2024 22:29:20 +0000 Subject: ci, readme: update stable nixpkgs to 24.11 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 25211d3..94fec9d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,7 @@ on: - master env: - CURRENT_STABLE_CHANNEL: nixpkgs-24.05-darwin + CURRENT_STABLE_CHANNEL: nixpkgs-24.11-darwin jobs: test-stable: -- cgit v1.2.3 From c7b33c131fcbb83eb2f47e07de5a8dee587e5d4b Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 8 Jan 2025 19:10:22 +0000 Subject: ci: only test one version --- .github/workflows/test.yml | 152 +++++++++------------------------------------ 1 file changed, 28 insertions(+), 124 deletions(-) (limited to '.github') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 94fec9d..63c155b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,42 +6,42 @@ on: - master env: - CURRENT_STABLE_CHANNEL: nixpkgs-24.11-darwin + NIXPKGS_BRANCH: nixpkgs-unstable + NIX_DARWIN_BRANCH: master + NIX_VERSION: 2.24.11 jobs: - test-stable: - runs-on: macos-13 - steps: - - uses: actions/checkout@v4 - - name: Install nix corresponding to latest stable channel - uses: cachix/install-nix-action@v30 - with: - install_url: https://releases.nixos.org/nix/nix-2.18.8/install - - run: nix flake check --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} + # The `test-stable` and `install-against-stable` job names are + # load‐bearing, despite their inaccuracy on the unstable branch, as + # they are set as required checks in the repository configuration, + # which only repository admins can change. + # + # TODO: Change them once the repository configuration is updated. - test-unstable: + test-stable: runs-on: macos-13 steps: - uses: actions/checkout@v4 - - name: Install nix from current unstable channel + - name: Install Nix uses: cachix/install-nix-action@v30 with: - install_url: https://releases.nixos.org/nix/nix-2.24.9/install - - run: nix flake check --override-input nixpkgs nixpkgs/nixpkgs-unstable + install_url: https://releases.nixos.org/nix/nix-${{ env.NIX_VERSION }}/install + - run: nix flake check --override-input nixpkgs nixpkgs/${{ env.NIXPKGS_BRANCH }} install-against-stable: runs-on: macos-13 + timeout-minutes: 30 steps: - uses: actions/checkout@v4 - - name: Install nix corresponding to latest stable channel + - name: Install Nix uses: cachix/install-nix-action@v30 with: - install_url: https://releases.nixos.org/nix/nix-2.18.8/install - nix_path: nixpkgs=channel:${{ env.CURRENT_STABLE_CHANNEL }} + install_url: https://releases.nixos.org/nix/nix-${{ env.NIX_VERSION }}/install + nix_path: nixpkgs=channel:${{ env.NIXPKGS_BRANCH }} - name: Install channels run: | - nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin - nix-channel --add https://nixos.org/channels/${{ env.CURRENT_STABLE_CHANNEL }} nixpkgs + nix-channel --add https://github.com/LnL7/nix-darwin/archive/${{ env.NIX_DARWIN_BRANCH }}.tar.gz darwin + nix-channel --add https://nixos.org/channels/${{ env.NIXPKGS_BRANCH }} nixpkgs nix-channel --update - name: Install nix-darwin run: | @@ -75,116 +75,20 @@ jobs: # `cachix/install-nix-action` but not by our default config above nix run .#darwin-uninstaller \ --extra-experimental-features "nix-command flakes" \ - --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} + --override-input nixpkgs nixpkgs/${{ env.NIXPKGS_BRANCH }} nix run .#darwin-uninstaller.tests.uninstaller \ --extra-experimental-features "nix-command flakes" \ - --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} - - install-against-unstable: - runs-on: macos-13 - timeout-minutes: 30 - steps: - - uses: actions/checkout@v4 - - name: Install nix from current unstable channel - uses: cachix/install-nix-action@v30 - with: - install_url: https://releases.nixos.org/nix/nix-2.24.9/install - nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Install channels - run: | - nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin - nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs - nix-channel --update - - name: Install nix-darwin - run: | - export NIX_PATH=$HOME/.nix-defexpr/channels - - mkdir -p ~/.config/nix-darwin - cp modules/examples/simple.nix ~/.config/nix-darwin/configuration.nix - - nixConfHash=$(shasum -a 256 /etc/nix/nix.conf | cut -d ' ' -f 1) - /usr/bin/sed -i.bak \ - "s/# programs.fish.enable = true;/nix.settings.access-tokens = [ \"github.com=\${{ secrets.GITHUB_TOKEN }}\" ]; environment.etc.\"nix\/nix.conf\".knownSha256Hashes = [ \"$nixConfHash\" ];/" \ - ~/.config/nix-darwin/configuration.nix - - nix run .#darwin-rebuild \ - -- switch \ - -I darwin-config=$HOME/.config/nix-darwin/configuration.nix - - name: Switch to new configuration - run: | - . /etc/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: | - # We need to specify `--extra-experimental-features` because `experimental-features` is set by - # `cachix/install-nix-action` but not by our default config above - nix run .#darwin-uninstaller \ - --extra-experimental-features "nix-command flakes" \ - --override-input nixpkgs nixpkgs/nixpkgs-unstable - nix run .#darwin-uninstaller.tests.uninstaller \ - --extra-experimental-features "nix-command flakes" \ - --override-input nixpkgs nixpkgs/nixpkgs-unstable - - install-flake-against-stable: - runs-on: macos-13 - steps: - - uses: actions/checkout@v4 - - name: Install nix version corresponding to latest stable channel - uses: cachix/install-nix-action@v30 - with: - install_url: https://releases.nixos.org/nix/nix-2.18.8/install - - name: Install nix-darwin - run: | - mkdir -p ~/.config/nix-darwin - darwin=$(pwd) - pushd ~/.config/nix-darwin - nix flake init -t $darwin - nixConfHash=$(shasum -a 256 /etc/nix/nix.conf | cut -d ' ' -f 1) - /usr/bin/sed -i.bak \ - "s/# programs.fish.enable = true;/nix.settings.access-tokens = [ \"github.com=\${{ secrets.GITHUB_TOKEN }}\" ]; environment.etc.\"nix\/nix.conf\".knownSha256Hashes = [ \"$nixConfHash\" ];/" \ - flake.nix - /usr/bin/sed -i.bak \ - 's/nixpkgs.hostPlatform = "aarch64-darwin";/nixpkgs.hostPlatform = "'$(nix eval --expr builtins.currentSystem --impure --raw)'";/' \ - flake.nix - popd - nix run .#darwin-rebuild -- \ - switch --flake ~/.config/nix-darwin#simple \ - --override-input nix-darwin . \ - --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} - - name: Switch to new configuration - run: | - . /etc/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 }} - nix run .#darwin-uninstaller.tests.uninstaller --override-input nixpkgs nixpkgs/${{ env.CURRENT_STABLE_CHANNEL }} + --override-input nixpkgs nixpkgs/${{ env.NIXPKGS_BRANCH }} - install-flake-against-unstable: + install-flake: runs-on: macos-13 timeout-minutes: 30 steps: - uses: actions/checkout@v4 - - name: Install nix from current unstable channel + - name: Install Nix uses: cachix/install-nix-action@v30 with: - install_url: https://releases.nixos.org/nix/nix-2.24.9/install + install_url: https://releases.nixos.org/nix/nix-${{ env.NIX_VERSION }}/install - name: Install nix-darwin run: | mkdir -p ~/.config/nix-darwin @@ -202,7 +106,7 @@ jobs: nix run .#darwin-rebuild -- \ switch --flake ~/.config/nix-darwin#simple \ --override-input nix-darwin . \ - --override-input nixpkgs nixpkgs/nixpkgs-unstable + --override-input nixpkgs nixpkgs/${{ env.NIXPKGS_BRANCH }} - name: Switch to new configuration run: | . /etc/bashrc @@ -213,10 +117,10 @@ jobs: darwin-rebuild switch --flake ~/.config/nix-darwin#simple \ --override-input nix-darwin . \ - --override-input nixpkgs nixpkgs/nixpkgs-unstable + --override-input nixpkgs nixpkgs/${{ env.NIXPKGS_BRANCH }} hello - name: Test uninstallation of nix-darwin run: | - nix run .#darwin-uninstaller --override-input nixpkgs nixpkgs/nixpkgs-unstable - nix run .#darwin-uninstaller.tests.uninstaller --override-input nixpkgs nixpkgs/nixpkgs-unstable + nix run .#darwin-uninstaller --override-input nixpkgs nixpkgs/${{ env.NIXPKGS_BRANCH }} + nix run .#darwin-uninstaller.tests.uninstaller --override-input nixpkgs nixpkgs/${{ env.NIXPKGS_BRANCH }} -- cgit v1.2.3