Skip to content

Commit

Permalink
Adding aarch64-linux architecture support
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasGuilloux committed Oct 22, 2024
1 parent 7fe5a42 commit d7d239d
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 13 deletions.
27 changes: 20 additions & 7 deletions .github/workflows/artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,27 @@ on:
pull_request:

jobs:
check:
build:
runs-on: ubuntu-latest
strategy:
matrix:
arch:
- 'x86_64-linux'
- 'aarch64-linux'
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix build
- uses: actions/upload-artifact@v3
- run: sudo apt-get install -y qemu-user-static

- uses: cachix/install-nix-action@v21
with:
extra_nix_config: |
system = ${{ matrix.arch }}
- name: Building tarball for ${{ matrix.arch }}
run: nix build

- name: Uploading artifacts
uses: actions/upload-artifact@v3
with:
name: nixos-system-x86_64-linux.tar.xz
path: result/tarball/nixos-system-x86_64-linux.tar.xz
name: nixos-system-${{ matrix.arch }}.tar.xz
path: result/tarball/nixos-system-${{ matrix.arch }}.tar.xz
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ GNU/Linux that has `systemd` using `machinectl`.
You don't need `nix` or NixOS to fetch and run the image:

```sh
# x86_64-linux architecture
machinectl pull-tar https://github.com/tfc/nspawn-nixos/releases/download/v1.0/nixos-system-x86_64-linux.tar.xz nixos --verify=no
machinectl start nixos

# aarch64-linux architecture
machinectl pull-tar https://github.com/tfc/nspawn-nixos/releases/download/v1.0/nixos-system-aarch64-linux.tar.xz nixos --verify=no

machinectl start nixos
# Set root password
machinectl shell nixos /usr/bin/env passwd

machinectl login nixos
```

Expand Down
2 changes: 1 addition & 1 deletion configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
wget
];

system.stateVersion = "23.11";
system.stateVersion = "24.05";

# Set an initial password here or at runtime do `machinectl shell nixos` and
# run `passwd` there.
Expand Down
2 changes: 1 addition & 1 deletion flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
treefmt-nix.url = "github:numtide/treefmt-nix";
};
Expand Down
2 changes: 1 addition & 1 deletion nspawn-tarball.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let

flakeFile = builtins.toFile "flake.nix" ''
{
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
outputs = inputs@{ self, nixpkgs, ...}: {
nixosConfigurations.${config.system.name} = nixpkgs.lib.nixosSystem {
Expand Down

0 comments on commit d7d239d

Please sign in to comment.