Skip to content

Commit

Permalink
Build Shadow Nix with NixOS 22.05
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyroussel committed May 30, 2022
1 parent 8476940 commit e210ed6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 42 deletions.
42 changes: 13 additions & 29 deletions .github/workflows/home-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,49 +9,33 @@ on:
- master

jobs:
home-manager-21-11:
home-manager-build:
runs-on: ubuntu-latest
strategy:
matrix:
pairs:
- branch: release-21.11
channel: nixos-21.11
- branch: release-22.05
channel: nixos-22.05
- branch: master
channel: nixos-unstable
env:
NIXPKGS_ALLOW_UNFREE: 1
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v17
with:
nix_path: nixpkgs=channel:nixos-21.11:/home/runner/.nix-defexpr/channels
nix_path: nixpkgs=channel:${{ matrix.pairs.channel }}:/home/runner/.nix-defexpr/channels

- name: Add Home Manager
run: nix-channel --add https://github.com/nix-community/home-manager/archive/release-21.11.tar.gz home-manager
run: nix-channel --add https://github.com/nix-community/home-manager/archive/${{ matrix.pairs.branch }}.tar.gz home-manager

- name: Update channels
run: nix-channel --update

- name: Install Home Manager
run: nix-shell 'https://github.com/nix-community/home-manager/archive/release-21.11.tar.gz' -A install

- name: Copy configuration file
run: cp -f .github/home-manager.nix /home/runner/.config/nixpkgs/home.nix

- name: Rebuild Home Manager configuration
run: home-manager switch --show-trace

home-manager-unstable:
runs-on: ubuntu-latest
env:
NIXPKGS_ALLOW_UNFREE: 1
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v17
with:
nix_path: nixpkgs=channel:nixos-21.11:/home/runner/.nix-defexpr/channels

- name: Add Home Manager
run: nix-channel --add https://github.com/nix-community/home-manager/archive/release-21.11.tar.gz home-manager

- name: Update channels
run: nix-channel --update

- name: Install Home Manager
run: nix-shell 'https://github.com/nix-community/home-manager/archive/release-21.11.tar.gz' -A install
run: nix-shell 'https://github.com/nix-community/home-manager/archive/${{ matrix.pairs.branch }}.tar.gz' -A install

- name: Copy configuration file
run: cp -f .github/home-manager.nix /home/runner/.config/nixpkgs/home.nix
Expand Down
21 changes: 8 additions & 13 deletions .github/workflows/nix-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,19 @@ on:
- master

jobs:
package-21-11:
package-build:
runs-on: ubuntu-latest
strategy:
matrix:
channel:
- nixos-21.11
- nixos-22.05
- nixos-unstable
env:
NIXPKGS_ALLOW_UNFREE: 1
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v17
with:
nix_path: nixpkgs=channel:nixos-21.11
- run: nix-shell .github/shadow-packages.nix

package-unstable:
runs-on: ubuntu-latest
env:
NIXPKGS_ALLOW_UNFREE: 1
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v17
with:
nix_path: nixpkgs=channel:nixos-unstable
nix_path: nixpkgs=channel:${{ matrix.channel }}
- run: nix-shell .github/shadow-packages.nix

0 comments on commit e210ed6

Please sign in to comment.