gchristensen changed the topic of #nixops to: NixOps related talk | logs: https://logs.nix.samueldr.com/nixops/ https://meet.jit.si/NixOpsReview
cole-h has quit [Ping timeout: 264 seconds]
cole-h has joined #nixops
kaliumxyz has quit [Remote host closed the connection]
cole-h has quit [Quit: Goodbye]
andi- has quit [Ping timeout: 260 seconds]
kaliumxyz has joined #nixops
teto has joined #nixops
tewfik has joined #nixops
<tewfik> DigitalKiwi: sure thing ;)
tewfik has quit [Client Quit]
<adisbladis> Anyone up for a review call today? :)
<adisbladis> In particular I'd like to address https://github.com/NixOS/nixops/pull/1331
<{^_^}> nixops#1331 (by dhess, 6 weeks ago, open): eval-machine-info.nix: add nixpkgsPath argument.
meh` has joined #nixops
andi- has joined #nixops
<manveru> adisbladis: is there anything controversial about it? i'm all for this change :D
<manveru> just wish it'd have happened years ago
<manveru> maybe i'd even display a warning when it's not passed: "Your deployment depends on <nixpkgs>, which is known to cause different behaviour depending on your channel configuration" or something
<adisbladis> manveru: I'm not sure the design is right
<adisbladis> And I'm not clear on how it relates to flakes
<manveru> ah, ok
<adisbladis> Mostly I just want to involve more people in decision making & reviewing =)
<manveru> yeah, this is pretty much a conflict with the flakes PR
<manveru> but mostly because your PR still relies on <nixpkgs> :P
<manveru> which is evil
<adisbladis> Yeah, it's a bit of a bootstrapping issue going on here
<manveru> yes
<adisbladis> I think there are som quick wins to at least reduce the dependency on <nixpkgs>
<{^_^}> nixops#1368 (by adisbladis, 7 minutes ago, open): Minimise the dependency on <nixpkgs>
<adisbladis> It was pretty easy to get the dependency down to only `zipAttrs`
<manveru> zipAttrs isn't exactly a big function :)
<adisbladis> Nah, I just want to avoid copy-pasting the entire chain of functions leading up to it
<adisbladis> It's only 8 lines actually
<manveru> yeah
<adisbladis> Once you get rid of the old nix compat bits
<adisbladis> Alright, pushed :)
<manveru> there we go :)
<manveru> could be even smaller, but whatever
<adisbladis> It's literally copy-paste from nixpkgs
<adisbladis> If you want to improve something suggest a change ;)
<manveru> `zipAttrs = set: __listToAttrs (map (name: { inherit name; value = __catAttrs name set; }) (__concatMap __attrNames set))`
<manveru> well, change that __ to builtins if you like
<adisbladis> manveru: Nice, thanks
<manveru> nixops is really becoming a bit handsome now :)
<manveru> i can't believe how much work you guys put into it
<adisbladis> <3 <3
<adisbladis> Happy to hear that
<manveru> btw, is there any news on the deploy hooks front?
<adisbladis> You mean nixops#1245 ?
<{^_^}> https://github.com/NixOS/nixops/pull/1245 (by grahamc, 13 weeks ago, open): Deploy Targets: Policy/Behavior-free Deployment Hooks (auto-rollbacks, drain events, etc.)
<manveru> hm, that's on the server side
<manveru> i mean, the target server
<adisbladis> Please elaborate :)
<manveru> i need hooks on the nixops side to run stuff before deploy based on the network config :)
<adisbladis> Ahh
<adisbladis> nixops#1318 ?
<{^_^}> https://github.com/NixOS/nixops/pull/1318 (by adisbladis, 7 weeks ago, open): Add plugin hooks required for the encrypted links plugin
<adisbladis> I'm planning on getting that one merged today
<manveru> ah, so that would be via plugins
<manveru> do i really have to write python again? :P
<adisbladis> Explain your use case a bit more please :)
<manveru> well, we modified our nixops to have a `preDeploy` attribute for each machine, which specifies some script that does whatever...
<adisbladis> Ah, we could make a plugin for that functionality :)
<manveru> then we collect them using `nixops eval` and run them before deploy
<manveru> i see my eval pr wasn't merged either... and has conflicts now :|
<manveru> it had a bug anyway
<manveru> but yeah, it might be more suited to a nixops plugin indeed, so we don't have to eval the config twice
<manveru> though that's less of a performance issue with flakes :)
<adisbladis> manveru: If you want to we could have a chat about this. I'd love to understand your use case better.
<adisbladis> I really want plugin hooks to be able to provide what you need.
<manveru> sure
<manveru> so atm we have two major uses of the hooks
<manveru> one is to generate wireguard keys for the whole network, the other to fetch secrets from vault to put into the nixops secrets...
<adisbladis> The first one sounds _very_ similar to the old encrypted links
<manveru> yeah
<manveru> just that we need wireguard so people can connect from their home machines :)
<manveru> yep, that'd be how it's done
<adisbladis> Yeah, WG is obviously better, I'm just observing the very similar needs
<adisbladis> Or maybe you'd want a per-machine hook ?
<adisbladis> You can still iterate over machines from the Deployment object
<adisbladis> And then you'd only need to fetch once for your entire deployment and stick those attributes on each machine
<adisbladis> So maybe what you have there is good enough?
<adisbladis> Actually I just remembered nixops#1280
<{^_^}> https://github.com/NixOS/nixops/pull/1280 (by kisik21, 8 weeks ago, merged): Added a keyCmd option for fetching a key from local command
<manveru> that is also damn nice
<adisbladis> So for secrets I think keyCommand is the much better option
<gchristensen> nixops probably shouldn't go out of its way to support generating keys in a central place
<manveru> yep, definitely beats writing a plugin :D
<manveru> thanks a lot
<adisbladis> gchristensen: Nah, I think the post_wait hook introduced in nixops#1318 is better
<{^_^}> https://github.com/NixOS/nixops/pull/1318 (by adisbladis, 7 weeks ago, open): Add plugin hooks required for the encrypted links plugin
<gchristensen> yea
<adisbladis> Is anyone up for a call? It feels wrong to merge my own PRs without anyone else reviewing them =)
<manveru> adisbladis: well, i can join you for a bit
<manveru> if it's not longer than half an hour or so :)
meh` has quit [Ping timeout: 240 seconds]
meh` has joined #nixops
virus_dave has joined #nixops
virus_dave has quit [Client Quit]
virus_dave has joined #nixops
virus_dave has joined #nixops
virus_dave has quit [Client Quit]
virus_dave has joined #nixops
virus_dave has quit [Client Quit]
meh` has quit [Ping timeout: 256 seconds]
teto has quit [Quit: WeeChat 2.8]
cole-h has joined #nixops
meh` has joined #nixops
teto has joined #nixops
meh` has quit [Ping timeout: 256 seconds]
meh` has joined #nixops
tokudan has quit [Remote host closed the connection]
tokudan has joined #nixops
globin has joined #nixops
<cole-h> adisbladis++
<{^_^}> adisbladis's karma got increased to 100
meh` has quit [Ping timeout: 256 seconds]
virus_dave has joined #nixops
virus_dave has joined #nixops
virus_dave has quit [Client Quit]
virus_dave has joined #nixops
virus_dave has quit [Client Quit]
virus_dave has joined #nixops
virus_dave has joined #nixops
virus_dave has quit [Client Quit]
virus_dave has joined #nixops
virus_dave has quit [Client Quit]
virus_dave has joined #nixops
virus_dave has quit [Client Quit]
virus_dave has joined #nixops
virus_dave has joined #nixops
virus_dave has quit [Client Quit]
virus_dave has joined #nixops
virus_dave has quit [Client Quit]
virus_dave has joined #nixops
virus_dave has quit [Client Quit]
virus_dave has joined #nixops
virus_dave has quit [Client Quit]
virus_dave has joined #nixops
virus_dave has quit [Client Quit]
virus_dave has joined #nixops
virus_dave has quit [Client Quit]
virus_dave has joined #nixops
virus_dave has quit [Client Quit]
virus_dave has joined #nixops
virus_dave has joined #nixops
virus_dave has quit [Client Quit]
virus_dave has joined #nixops
virus_dave has quit [Client Quit]
virus_dave has joined #nixops
virus_dave has quit [Client Quit]
virus_dave has joined #nixops