unify versioning #279

Closed
opened 2025-03-25 09:32:59 +01:00 by kiara · 2 comments
Owner

right now, we manage dependency versions using:

  • flakes
  • npins

this currently allows discrepancies in versions used in e.g. local development vs deployed services, essentially breaking our reproducibility.

at #274, i stumbled upon a versioning discrepancy now with our demo environment being passed a nixpkgs instance from our flake (offering e.g. opentofu 1.8.7), whereas some of our development shells have used an instance from npins (offering opentofu 1.8.5, used in a dev shell's tofu init).

  • launch/tf.nix
    • panel/env.nix
      • panel/default.nix
        • infra/machines/fedi201/fedipanel.nix (1.8.7: flake)
      • panel/nix/configuration.nix
    • panel/nix/package.nix
      • panel/default.nix
        • infra/machines/fedi201/fedipanel.nix (1.8.7: flake)
      • panel/nix/configuration.nix
        • panel/default.nix
          • infra/machines/fedi201/fedipanel.nix (1.8.7: flake)
    • launch/default.nix: shell (1.8.5: npins)

note that there have been various reasons for how this came about:

  • flake.nix: used as nixops wants flake outputs
    • nixpkgs: used as flake-parts' system isn't explicitly known in infra/flake-part.nix to instantiate an npins nixpkgs
  • npins/sources.json: used as @fricklerhandwerk used it and we opted to make a distinct shell for the panel
    • nixpkgs: taken from npins as consuming this from flake seems more involved

note that there have been multiple barriers toward potentially replacing flakes (tho at least they can import one another's):

  • outputs
  • inputs
    • importing modules exposed this way from without flakes would need rework
    • instantiating nixpkgs from npins wants a system, whereas we haven't had this exposed in our flake parts
    • npins double downloading bug
right now, we manage dependency versions using: - flakes - npins this currently allows discrepancies in versions used in e.g. local development vs deployed services, essentially breaking our reproducibility. at #274, i stumbled upon a versioning discrepancy now with our demo environment being passed a nixpkgs instance from our flake (offering e.g. opentofu 1.8.7), whereas some of our development shells have used an instance from npins (offering opentofu 1.8.5, used in a dev shell's `tofu init`). - `launch/tf.nix` - `panel/env.nix` - `panel/default.nix` - `infra/machines/fedi201/fedipanel.nix` (1.8.7: flake) - `panel/nix/configuration.nix` - `panel/nix/package.nix` - `panel/default.nix` - `infra/machines/fedi201/fedipanel.nix` (1.8.7: flake) - `panel/nix/configuration.nix` - `panel/default.nix` - `infra/machines/fedi201/fedipanel.nix` (1.8.7: flake) - `launch/default.nix`: shell (1.8.5: npins) note that there have been various reasons for how this came about: - `flake.nix`: used as nixops wants flake outputs - `nixpkgs`: used as flake-parts' system isn't explicitly known in `infra/flake-part.nix` to instantiate an npins nixpkgs - `npins/sources.json`: used as @fricklerhandwerk used it and we opted to make a distinct shell for the panel - `nixpkgs`: taken from npins as consuming this from flake seems [more involved](https://github.com/fricklerhandwerk/flake-inputs/) <!-- - `launch/default.nix`: used as a tf-specific development shell --> <!-- - `launch/flake.nix`: used as nixos-anywhere `special_args` still wants a flake (https://github.com/nix-community/nixos-anywhere/issues/462) --> <!-- - `nixpkgs`: borrowed from npins to reduce the number of disparate versions --> note that there have been multiple barriers toward potentially [replacing flakes](https://git.fediversity.eu/kiara/meta/compare/main...on-flakes) (tho at least they can [import](https://github.com/fricklerhandwerk/flake-inputs/) one another's): - outputs - [ ] nixops4 using this (#309) - ~~[ ] nixos-anywhere TF's `special_args` [only supporting flakes so far](https://github.com/nix-community/nixos-anywhere/issues/462)~~ - superseded by #307 - inputs - [ ] importing modules exposed this way from without flakes would need rework - [ ] instantiating nixpkgs from npins wants a `system`, whereas we haven't had this exposed in our flake parts - [x] npins [double downloading bug](https://github.com/andir/npins/issues/57)
kiara self-assigned this 2025-03-25 12:21:52 +01:00
kiara removed their assignment 2025-03-25 12:22:04 +01:00
kiara self-assigned this 2025-03-25 12:22:14 +01:00
kiara added this to the Fediversity project 2025-04-14 11:29:59 +02:00
Author
Owner

in retrospect i guess this can be picked up even while flakes are still handling the outer interface, so i removed the dependency on #309 here

in retrospect i guess this can be picked up even while flakes are still handling the outer interface, so i removed the dependency on #309 here
kiara removed this from the Fediversity project 2025-06-10 18:49:28 +02:00
Author
Owner

the flake seems still there so far with its own nixpkgs version

the flake seems still there so far with its own nixpkgs version
kiara reopened this issue 2025-06-10 18:49:50 +02:00
Niols closed this issue 2025-06-12 13:05:13 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
#224 automated dev-ops workflows
fediversity/fediversity
Reference
fediversity/fediversity#279
No description provided.