unify versioning (minus around nixops, for now) #311
No reviewers
Labels
No labels
0 points
0.5 points
1 point
13 points
2 points
21 points
3 points
34 points
5 points
55 points
8 points
api service
blocked
component: fediversity panel
component: nixops4
documentation
estimation high: >3d
estimation low: <2h
estimation mid: <8h
infinite points
productisation
project-management
question
role: application developer
role: application operator
role: hosting provider
role: maintainer
security
technical debt
testing
type unclear
type: bug
type: deliverable
type: key result
type: objective
type: task
type: user story
user experience
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Blocks
#65 Automated dependency updates
fediversity/fediversity
Reference: fediversity/fediversity#311
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "kiara/fediversity:unify-versioning"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
closes #279
not sure how to port the nixops4 bits, so that bit i put off to #309.
WIP: unify versioning - not sure how to port nixops4 bits so wait until #309?to WIP: unify versioning@ -17,0 +2,4 @@outputs = { self, ... }: letinherit sources = import ./npins;inherit (sources) nixpkgs flake-parts nixops4 nixops4-nixos git-hooks;pkgs = import nixpkgs;This can't work, you're missing the argument to
nixpkgs.Also to make it unambiguous that you're just taking the pure library, do
@ -9,6 +8,9 @@ letinherit (lib) attrValues elem mkDefault;inherit (lib.attrsets) concatMapAttrs optionalAttrs;inherit (lib.strings) removeSuffix;# TODO: use thru nix path after #309Why would we use nix path anywhere?
(fwiw i removed this comment here now)
@ -10,2 +9,4 @@inherit (lib.attrsets) concatMapAttrs optionalAttrs;inherit (lib.strings) removeSuffix;# TODO: use thru nix path after #309sources = import ../../npins;At this point we may set up our own little module system class to pass around
sources. But I see this is trying to work around flake-parts, so either we rip out flake-parts or embrace it.i see little point ripping out flake-parts while nixops4 needs flakes as our external interface. it creates a diff moving
infra/flake-part.nixintoflake.nix, without meaningfully helping address unifying how we manage dependencies.@fricklerhandwerk thanks for your feedback - i'll close in favor of #309, but yeah let's further discuss the dependency management still (as per matrix).
WIP: unify versioningto unify versioning (minus around nixops, for now)Looks good generally (we can keep trimming it down later), but I don't understand why we would need multiple
shell.nixor.envrc@fricklerhandwerk thanks for reviewing!
.envrci guess prob seems like it should match our number of shells, as any would only help enter 'their' shell i guess.on the multiple shells, the intent was to reflect decoupling components (and already segregating the proxmox bits to nuke after #116), but fair enough, i deduplicated them again now.
We currently have no need to emphasize composition, and if we need to we can still follow through with the module system idea. Right now it's just a monorepo with stuff in it.
@ -0,0 +24,4 @@## Add a directory here if pre-commit hooks shouldn't apply to it.optout = ["npins"".terraform"Not using that yet
@ -0,0 +41,4 @@# shell for testing TF directlyshell = pkgs.mkShellNoCC {inherit (pre-commit-check) shellHook;buildInputs = pre-commit-check.enabledPackages;++ [ pkgs.npins ](we had a schema divergence multiple times now, please always ship npins with the project)@ -54,4 +38,1 @@shellcheck.enable = true;};devShells.default = pkgs.mkShell {We can just re-export that from
default.nixno? Why keep the split?i didn't know how to get non-flake nixops. i thought we imported flake inputs into
default.nixbefore, yet now i don't even see it anymore.We may have talked about it in a side channel, but this is how one can do it: https://github.com/fricklerhandwerk/flake-inputs (real-world example:
bbf2cdaa6b/default.nix (L2-L3))But in this case I would have thought we wanted it the other way round, and just not use the flake inputs?
npins seems harder to use in flakes, in the sense they disallow
builtins.currentSystem.even with
flake-inputs, i'm not sure how to proceed given that's aimed at gettinginputs, while with nixops4 i don't know how to manually translate theseconfigbits from the flake since they seemingly point nowhere.That's the
configof thepackagessubmodule fromflake-parts. And we don't needbuiltins.currentSystem-- just passsystemfrom theforAllSystemsinto that call, such as here:02ce465c91/flake.nix (L90-L96)thanks for the hint about
system!nixops4 tho feels like a pain to decouple from flakes, given the self-referential nature of flakes followed by
flake-parts😭Yeah but that's fine, nixops can keep living in its flake world.
i squashed a version with just nixops flakes-based now
@ -0,0 +1,10 @@#!/usr/bin/env bashDon't think that file is needed
@ -0,0 +1,14 @@{Is that imported from anywhere else except the top level? Because if not, we could just leave it with
{ pkgs }:for now.ad0ee3cff5toedd35361a1b378cc5292toaec599821faec599821fto56522e612556522e6125tof4ebf55a15Let's keep fixing it up piecemeal