Skip to content

Instantly share code, notes, and snippets.

@arianvp
Last active August 2, 2022 02:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arianvp/b64a910aa4226219ed52cbafc2ad1f0d to your computer and use it in GitHub Desktop.
Save arianvp/b64a910aa4226219ed52cbafc2ad1f0d to your computer and use it in GitHub Desktop.

Nix.dev @zupo

All the commands in the nix.dev documentation are now checked by CI.

The problem is that we have nested shells; which default tooling for this doesn't work. It works on my machine. What left is polishing and adding it to CI

Nix code samples are extracted into a file such that e.g. following nix-build calls can access those files. So that we can check that the default.nix in the document actually works.

M1 NixOS

We are booting into M1 NixOS!

  • Wifi works. We have to load a custom firmware blob

  • We are trying to upstream everything into nixpkgs.

  • We are working on an installer. Have ISOs in hydra

  • Even further than that: We are creating a custom AsahLinux installer that goes into NixOS immediately. We go from curl to full desktop image in one go. That is the plan. All you need to do for NixOS on mac is run one command.

Dream2nix

dream2nix automatically parses your existing projects and automatically creates flakes using the lower level tooling for each language.

We demoed it on the M1 and it worked! wooohooo

@domenkozar
Copy link

domenkozar commented Apr 8, 2022

Incremental builds

Martin prototyped a solution how to incrementally build virtualbox source using Nix.

It's a generic function that overrides an existing derivation by feeding in the previous output.

@domenkozar
Copy link

Typechecking in NixOS tests

If a NixOS test runs for a long time, there could for example be a typo in the script.

With typechecking that's detected before running the script, where as currently full test has to run.

@domenkozar
Copy link

Systemd in stage1

Janne replaced our current script logic with systemd as an opt-in.

The motivation is to reduce complexity we have to currently maintain and with the help of systemd make that layer thiner.

He is also working on writing tests for the new stage-1.

Currently lacks yubikey, tpm and gpg key card support.

@domenkozar
Copy link

Lassulus merged 40 PRs!!

@arianvp
Copy link
Author

arianvp commented Apr 8, 2022

Cachix Deploy

Domen has been working on cachix deploy the last year.

Most of the tooling is push-based. Deployed centrally to machines with ssh.

Cachix is a combination of push and pulll..
Machines run simple daemon. pulls from cache and activates.

We still need proper home-manager integeration.

Works with any binary cache; but works well with cachix.

On the other side there is a command cachix deploy activate. You generate a json file with nix with agents and store paths. You can run this in CI. But this doesn't trigger a deploy yet.
The agent can then poll for updates. E.g. your laptop automatically updates on demand once it has internet again.
This scales to 1000s of machines. First 10 agents are free.

@domenkozar
Copy link

Flo upgraded his machine to the latest NixOS stable and used all the new fancy tooling for his projects.

Domen started a new Nix language tutorial based on existing ones, but it's not finished yet.

@m1-s
Copy link

m1-s commented Apr 14, 2022

Incremental builds

Michael prototyped a solution how to incrementally build virtualbox source using Nix.

It's a generic function that overrides an existing derivation by feeding in the previous output.

Martin did this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment