Skip Navigation

Posts
4
Comments
10
Joined
3 yr. ago

  • [solved, kinda] "lookup registry-1.docker.io: no such host" when starting an oci-container for the first time at boot

    Jump
  • I too experimented with k3s, but then abandoned the idea of using it after I realized the proper way to run postgres on it was (IIUC) to use bitnami's helm chart. I like to have some level of understanding of how my homelab and it's config works, and that humongous amount of unreadable templates was not appealing in the least.

    As for containers, I am not really looking for service isolation (IIUC until ##368565 lands, all virtualisation.oci-containers basically run as root and I'm fine with that)... I just want to be able to run different (usually more recent, but in nixos one also can't easily "pin" an older version of a package if the need arises ) versions of services than those packaged is nixos. Also, not all services I want to run are available as nixos packages, and even less have modules.

    I know what risk I'm running (more or less): nothing in my homelab is accessible from outside my lan and, even if the container host was somehow pwned, that machine can't really do much harm (the important stuff is on a separate one).

    I guess I could import an older version of nixpkgs in my flake, but that requires way too much editing just to pin a package (time I'd rather spend solving the actual issue).

  • [solved, kinda] "lookup registry-1.docker.io: no such host" when starting an oci-container for the first time at boot

    Jump
  • Thanks that was really helpful!

    In my case, the system did not have a default route - I've updated the post with details.

  • Given that it downloads random shit from the internet

    You seem to trust the javascript ecosystem just as much as I do :)

    Jokes aside, the repo has a lock file so it should actually be fine (time will tell)

  • Found the solution (I think): basically it should just work as expected if you just add outputHashAlgo, outputHashMode and outputHash to your derivation.

    documentationarticle

  • Nix / NixOS @programming.dev

    Network access while building a derivation?

  • In case anyone comes here with the same problem, the solution is:

     
        
    attoparsec-aeson = haskellPackages.mkDerivation {
      ...
      postUnpack = ''
        mv source source-aeson
        cp -rL source-aeson/attoparsec-aeson source
        rm -fr source-aeson
      '';
      ...
    };
    *___*
      
  • That's the thing you want to build (a single project may generate multiple executables - eg. a server and a client) so it won't help in this case but... I must say, I am impressed and really grateful that you went and looked that up for me! Thanks, mate!

  • cabal2nix doesn't care about any source-repository-package in cabal.project (I think it doesn't even read that file?).

    In my case, it generated a project that depended on the aeon from nixpkgs (which IIUC in turn comes from hackage) rather than the forked version.

  • I agree: flakes are great for development (and not only)!

    Unfortunately I still need to build that third party project from source :)Maybe I should look into disregarding the whole haskellPackages infrastructure and just build with cabal via a shell script.. IDK if that would be accepted in nixpkgs though :/

  • Nix / NixOS @programming.dev

    Help with haskell package that lives in a subdirectory of src

  • That, or git log --graph --pretty=oneline

    (IDK why people seem to be willing to recommend using anything in order to learn git, with the exception of git itself)