ChanServ changed the topic of #nixus to: Nixus is an experimental deployment tool for NixOS systems - https://github.com/Infinisil/nixus - https://logs.nix.samueldr.com/nixus/
cole-h has joined #nixus
cole-h has quit [Quit: Goodbye]
bqv has quit [*.net *.split]
bqv has joined #nixus
srk has joined #nixus
<srk> sup
<infinisil> o/
<infinisil> Regarding https://github.com/Infinisil/nixus/pull/33, I don't see how that would work
<infinisil> I don't see `shell` being used by `runCommand` anywhere
<infinisil> And also the `pkgs` in that scope should be for the target host already
<srk> scripts/switch starts with #! @shell@
<srk> and without that it ends up pointing to x86 bash for me
<infinisil> Ohh that's where it's used
<srk> this makes it expand to #! /usr/bin/env bash and fixes that :)
<srk> I went backwards from the weird error it gave me so it was easier to catch, still not sure why it points to wrong bash
<infinisil> srk: I think it's because the `shell` in the derivation builder points to the build-time shell, not the runtime one
<infinisil> srk: Can you try `shell = pkgs.runtimeShell`?
<srk> sure
<srk> yeah, that looks better /nix/store/szkym53k5qs7bvs77ppnam4cq21kz89s-bash-4.4-p23-armv7l-unknown-linux-gnueabihf/bin/bash :)
<infinisil> Nice, can you change the PR to use that?
<srk> cool, will update the PR
<infinisil> :)
<srk> will test against the pi to be sure
<srk> like nixus so far! pretty good for managing cross built rpi, I just nix-build sd image and do the rest of the updates/changes via nixus
<srk> it's hitting a sweet spot between too lightweight like nixos-rebuild --target-host and too heavy like morph or even nixops
<infinisil> Hehe nice
<infinisil> Though I intend to add more features over time
<srk> I've had this idea that it would be nice to have something like this part of NixOS, possibly with different backends operating on some kind of standardized module interface
<srk> so you could define deployments similar to containers and possibly even run these on nixos-rebuild of the host
<srk> like you can probably quickly hack something like that together using nixus-as-a-systemd-service :D
<infinisil> srk: I once wrote some ideas down, and the first point seems very relevant: https://github.com/Infinisil/nixus/blob/master/notes.md
<infinisil> I really wish I had lots of time to develop this further, there's lots of things I wish to do
<srk> cool :) I was going thru the issues and noticed you've mentioned using Haskell - sounds good but as bqv pointed out it's also nice that it barely requires any deps currently
<srk> maybe having two (or even more) backends could work, like you want this lightweight bash one, ok.. want log streaming and whatnot, there's this heavyweight haskell one :D
<srk> I've started with RIIH nixops once but plugins/backends/state were problematic so I didn't get too far. maybe if I was treating the problem like interpret this stateless nix it could work :D
<infinisil> Yeah I'm also worried about using haskell
<srk> hehe, it took me countless wasted hours to get to armv7l ghc /o\
<infinisil> I think what I'll do is to allow deployment phases to be any executable, and a simple JSON-based API is used to communicate with them
<infinisil> E.g. each phase can have an output JSON, which can be used by subsequent phases as input
<infinisil> This allows using arbitrary languages for the phases
<srk> interesting
<infinisil> And there would be a very simple bash phase runner on top
<srk> that sounds like pretty good compromise
<infinisil> srk: Oh also, this might allow splitting all these phase executables from nixus
<infinisil> E.g. there could be `github.com/infinisil/aws-provision-phase`, which is just a generic Nix project that provisions AWS, using the nixus JSON API
<infinisil> And other projects like morph, nixops, etc. could use that as well
<infinisil> Maybe the core ones would still be in nixus, but this makes it a lot more flexible
cole-h has joined #nixus
V has joined #nixus
<srk> mm, meta deployment tool :D
<infinisil> srk: Did you have any success yet with runtimeShell?
<srk> yup, it works
<infinisil> Nice