Add Nix flake for NixOS/nix-based builds#34
Conversation
Adds flake.nix and the generated flake.lock so siomon can be built, installed, and integrated on NixOS (or any system with Nix) without manual setup.
|
I just saw that we already have a nixpkgs version.. https://search.nixos.org/packages?channel=unstable&query=siomon&show=siomon Closing this :) |
|
Hey @vinylen, thanks for putting this together! Nice to see NixOS interest. Just wanted to point you to some existing work around distro packaging:
Our target is to follow the way each distro officially manages and distributes packages through its own package manager and repositories. For NixOS, that means upstreaming to Nixpkgs — the central package set that What we'd love is an automated GitHub Actions workflow — similar to the AUR and PPA ones — that opens a PR against Nixpkgs from a temporary branch on each release. The approach would follow the same pattern from PR #24: a templated Some prior art and tooling around automated Nixpkgs contributions that might be useful:
Would you be up for taking a stab at that kind of workflow? Would be great to have Nix covered alongside AUR and PPA! |
Hey @sheevy, thanks for getting siomon into Nixpkgs (NixOS/nixpkgs#501034) — that's awesome! Since you're already familiar with the Nixpkgs contribution process, would you be interested in contributing an automated GitHub Actions workflow that keeps the Nixpkgs package up to date on new siomon releases? As described above, the idea is to follow the same pattern we're setting up for AUR and PPA (derived from PR #24): a templated Some tooling and context that might be helpful:
You'd be the perfect person for this since you already know how the package is structured in Nixpkgs. Would love to have you on board! |
|
I think that auto updating for siomon in nixpkgs is already implemented by the maintainer - https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/si/siomon/package.nix#L27 |
|
Hey @emansom As far as I understand, my original PR already handles that, see my comments: |
Oh very meta. Very interesting. Even better! Apologies, I should've researched a bit more before. Let's see if that works on the next tagged version! |
level1techs#34 NixOS/nixpkgs#501034 Co-authored-by: vinylen <victor@viclab.me> Co-authored-by: sheevy <mw.kubica@gmail.com>
level1techs#34 NixOS/nixpkgs#501034 Co-authored-by: vinylen <victor@viclab.me> Co-authored-by: sheevy <mw.kubica@gmail.com>
Yep, automation works. Cool! |
|
Indeed, but it took a while. |
Adds
flake.nixandflake.lockso siomon can be built and used on NixOS or any system with Nix, without manual setup.Flake outputs
packages.{x86_64,aarch64}-linux.defaultsiobinarypackages.{x86_64,aarch64}-linux.sinfo-io-kmodsinfo_io.koagainst the default nixpkgs kerneloverlays.defaultpkgs.siomonto a nixpkgs instancelib.{system}.mkSinfoIoKmodsinfo_io.koagainst any kernelUsage
Run without installing:
nix run github:level1techs/siomonUse the overlay in a NixOS or home-manager config:
Notes
cargoLock.lockFile = ./Cargo.lockis used instead ofcargoHash,so no hash needs updating when dependencies change.
nixpkgs-unstableis required; Rust ≥ 1.85 is not yetin a stable nixpkgs channel.
Flake maintenance
Maintenance of flake is minimal since only version string is required to match the Cargo.toml version