Skip to content

considerate/nixos-odroidhc4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hardkernel NixOS for ODROID HC4

This is an unofficial installation configuration of NixOS 22.05 for the Hardkernel ODROID HC4 microcomputer.

Usage

The recommended usage is to import this repository as a nix flake

Enable aarch64 emulation for the host system:

  boot.binfmt.emulatedSystems = [ "aarch64-linux" ];

Create a flake.nix with the following content:

{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/release-22.05";
  inputs.nixos-odroidhc4.url = "github:considerate/nixos-odroidhc4/release-22.05";
  outputs = inputs: {
    packages.aarch64-linux = {
      uboot = inputs.nixos-odroidhc4.packages.aarch64-linux.uboot-odroid-hc4;
      sd-image = inputs.self.nixosConfigurations.nixos-hc4.config.system.build.sdImage;
    };
    nixosConfigurations = {
      nixos-hc4 = inputs.nixpkgs.lib.nixosSystem {
        system = "aarch64-linux";
        modules = [
          inputs.nixos-odroidhc4.nixosModules.odroidhc4
          # add your own modules here...
        ];
      };
    };
  };
}

Build the SD image by running:

$ nix build .#packages.aarch64-linux.sd-image

Copy the built image to an SD-card with:

# dd if=result/sd-image/nixos-sd-image-*-aarch64-linux.img of=/dev/<DEVICE> status=progress bs=512K

Add the U-boot boot loader to the SD-card by building and running

$ nix build .#packages.aarch64-linux.uboot
$ ./result/sd_fusing.sh /dev/<DEVICE>

About

NixOS configuration for the ODROID HC4 microcomputer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages