• loathsome dongeater@lemmygrad.ml
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    8 months ago

    I have a favour to ask of you. Please feel free to ignore if you don’t have the bandwidth. I won’t mind at all.

    I was thinking of putting NixOS on my SBC so that I could version control its configuration and also learn NixOS. Due to the weird nature of SBCs it’s not guaranteed every Linux distribution will work on them.

    I found this repository pertaining to running NixOS on it: https://github.com/povik/nixos-on-odroid-n2

    The favour I mentioned before is that I have two questions about it:

    1. Is this repository still relevant despite having no commits in over three years?
    2. What does this repository exactly do? I cannot in good conscience ask you to go in details but some high level explanation would be appreciated. I tried reading the .nix files but they made no sense to me.
    • wheresmysurplusvalue [comrade/them]@hexbear.net
      link
      fedilink
      English
      arrow-up
      4
      ·
      edit-2
      8 months ago

      Hi! Sorry that it’s probably beyond me, the smallest computer I have installed Nixos on is a raspberry pi. It was pretty easy because I just used instructions online from someone who already did it. I’m on a trip without my laptop at the moment so I can’t try building from this repo.

      But the process for building for rpi is that there’s a way to define a configuration.nix that gets used to generate an SD card image. So that looks like what the repository you used is doing. You run nix build to generate the image (goes into a ‘result’ directory) and then you can flash that to an SD card (for example using dd).

      Also, I saw this fork of the repo you linked, looks like someone added a little bit of instructions how to cross-compile (so you don’t need to build from an aarch64 machine) and also updated a path which changed between nixos versions.

      https://github.com/ardumont/nixos-on-odroid-n2

      If this repo works for you, I’d recommend using a remote deployment tool like deploy-rs. I use it for my raspberry pi. It means I can build (cross-compile) packages for the rpi on my desktop computer, and then copy the packages to the rpi via ssh and activate the generation.

    • wheresmysurplusvalue [comrade/them]@hexbear.net
      link
      fedilink
      English
      arrow-up
      2
      ·
      8 months ago

      One more comment! You might see some differences in nix commands being used across different blogs. This is because they are slowly migrating to a new command line API and away from the old API. Generally, if it’s using the new API (experimental/unstable), then it just uses the nix command. The older stable API generally has dashes, like nix-build, nix-shell, etc. But there’s usually some matching command in both APIs.