gchristensen changed the topic of #nixos-borg to: https://www.patreon.com/ofborg https://monitoring.nix.ci/dashboard/db/ofborg?refresh=10s&orgId=1&from=now-1h&to=now "I get to skip reviewing the PHP code and just wait until it is rewritten in something sane, like POSIX shell. || https://logs.nix.samueldr.com/nixos-borg
<gchristensen> working so far ... :)
mic921 has quit [Ping timeout: 250 seconds]
timokau[m] has quit [Ping timeout: 250 seconds]
<samueldr> ovmf_code is available in pkgs.OVMF.fd if you desire so
<samueldr> the one from the osx-kvm repo shouldn't be special
<gchristensen> whoa! cool!
<gchristensen> I'm impressed :D
<samueldr> that's how I was testing uefi stuff for the bootloader
<samueldr> AFAIUI that's "just a bios for qemu", which is tianocore
<samueldr> what would be amazing, but not so useful, is to build clover ;)
<samueldr> not trying to nerd snipe you
<gchristensen> I do build my own Clover
<gchristensen> I have a lot of stuff to do before this is shippable, like loading config from the host
<samueldr> clover is built from source?
<gchristensen> oh, no
<gchristensen> -device ide-drive,bus=ide.0,drive=MacDVD \
<samueldr> :)
<gchristensen> -drive id=MacDVD,if=none,snapshot=on,media=cdrom,file=./'HighSierra-10.13.6.iso' \
<gchristensen> oops
<gchristensen> mkdir -p ${configRoot}/etc/ssh
<gchristensen> ssh-keygen -A -f ${configRoot}
<gchristensen> genisoimage -v -J -r -V CONFIG -o /tmp/config.iso .
<samueldr> packing the existing clover is easy mode :)
<gchristensen> -device ide-drive,bus=ide.0,drive=config \
<gchristensen> -drive id=config,if=none,snapshot=on,media=cdrom,file=/tmp/config.iso \
<samueldr> (still a good thing and you're amazing for doing this)
<gchristensen> sudo cp /Volumes/CONFIG/etc/ssh/ssh_host_* /etc/ssh/
<gchristensen> sudo chown root:root /etc/ssh/ssh_host_*_key
<gchristensen> sudo umount /Volumes/CONFIG
<samueldr> :D that was what I thought you were doing when asking about genisoimage the other day
<gchristensen> :D
<gchristensen> the annoying thing to do now is figure out how to make macOS run it on boot
<samueldr> (I was doing a similar thing, but going with a .img build using guestfish)
<gchristensen> probably not real hard but ... it is Mac stuff and ... :)
<samueldr> does it still allow things in /etc/init.rc?
<gchristensen> hmm let's see
<samueldr> (I think that wasn't the right name though)
<samueldr> good thing all the apple developer doc is freely accessible online, like the manpages
<samueldr> oh wait, it isn't anymore
<samueldr> (yes I'm sour)
<gchristensen> :D
<samueldr> Since Mac OS X 10.4, startup items such as /etc/rc.local file or /Library/StartupItems folder are deprecated in favour of launchd daemons and agents.source
<gchristensen> hmm StartupItems
<samueldr> deprecated, no?
<gchristensen> ooh
<gchristensen> I misread that
<samueldr> though there is that launchd example
<samueldr> as a first "get this out of the door" I would probably write a script, make that launchd thing start it; that script would set a stateful at the end /var/lib/look.ma.I.ran and look at it initially; sanwiching mounting/running of the iso
<samueldr> (or unregister itself from launchd)
<gchristensen> every boot is pristine :)
<samueldr> or that
<samueldr> no need to tell 'ma you ran
<gchristensen> which, notably, makes it annoying to test this :D
<gchristensen> also, I should probably make this script trivial and just execute a /Volumes/CONFIG/apply.sh
<samueldr> I concur, easier to then do anything with zombo.com^W^W the script
<gchristensen> hah
<samueldr> you say "pristine boot" what happens with qemu on reboots? on KP? (though, KP on real hardware must suck anyway)
<gchristensen> ooh
<gchristensen> if qemu does a reboot, it stays
<gchristensen> but if qemu terminates, the data is lost
<samueldr> wondering if you could poison the clover boot setting so it powers off next boot in that script?
<samueldr> (if you definitely don't want reboots)
<gchristensen> eh
<gchristensen> seems overkill :)
<samueldr> says the one building a virtualization integration for hydra+macOS ;)
<gchristensen> haha
<gchristensen> ok so this should be not bad...
<gchristensen> ok
<gchristensen> fingers crossed, samueldr?
<samueldr> that's not good for posture
<gchristensen> hah
<samueldr> you just have to believe :)
<gchristensen> seems the code .fd file isn't the same
<samueldr> chances are it isn't the same, but incompatible? hm that's a bother
<samueldr> oh, unless osx-kvm starts something else than tianocore as the bios?
<gchristensen> it didn't work :(
<gchristensen> (the boot script)
<gchristensen> I forgot
<gchristensen> <key>RunAtLoad</key>
<gchristensen> <true/>
<gchristensen> [root@nixos:~]# launchctl status
<gchristensen> launchctl: command not found
<gchristensen> sigh
<gchristensen> oeuthontuhonuh
<gchristensen> it worked-ish
<gchristensen> but the disk wasn't mounted yet, so it failed
<gchristensen> ok, bed time
<gchristensen> but
<gchristensen> the cdrom isn't mounted until a user logs in over the GUI making this not a useful avenue
<gchristensen> next thing to try: not a cdrom, but maybe some other type of FS? maybe LnL has ideas on auto-mounting the cdrom earlier... anyway. Bed time.
<gchristensen> (after a user logs in, the bootup hook: https://gist.github.com/grahamc/126b1a28d50d99db315fb5b6fce551c7 works great)
orivej has joined #nixos-borg
orivej has quit [Ping timeout: 252 seconds]
<gchristensen> I might need to make a test suite for this macos image.
<gchristensen> !!!!!!
<gchristensen> it worked!!!
<gchristensen> omg finally
<LnL> nice!
<gchristensen> >>> /private/etc/sudoers.d/passwordless: syntax error near line 1 <<<
<gchristensen> sudo: parse error in parse error in parse error in doers.d/passwordless near line 1 near line 1
<gchristensen> sudo: no valid sudoers sources found, quitting
<gchristensen> sudo: unable to initialize policy plugin
<gchristensen> oops
<LnL> heh
<gchristensen> ooo!
<gchristensen> this exited immediately: /Volumes/CONFIG/apply.sh::::45 nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin
<gchristensen> /Volumes/CONFIG/apply.sh::::46 nix-channel --update
<LnL> how do you mean?
orivej has joined #nixos-borg
<gchristensen> the darwin-install program exits with error code 141
<LnL> that doesn't ring a bell
<gchristensen> might be sigpipe
<gchristensen> sudo -i -H -u nixos -- darwin-rebuild switch -I darwin-config=/var/root/.nixpkgs/darwin-configuration.nix:/nix/var/nix/profiles/per-user/root/channels:/var/root/.nix-defexpr/channels:darwin=https://github.com/LnL7/nix-darwin/archive/master.tar.gz
<gchristensen> building the system configuration...
<gchristensen> error: file 'darwin' was not found in the Nix search path (add it using $NIX_PATH or -I)
<LnL> yeah the check doesn't allow that unless you do something similar to nix.nixPath
<gchristensen> oh
<gchristensen> I have installed macOS, Nix, and Nix-Darwin so many times this week :D
<gchristensen> my CPU must be very familiar with its instructions
<gchristensen> this is my apply script
<gchristensen> and it works =)
orivej has quit [Ping timeout: 252 seconds]
<gchristensen> yaaas
<LnL> well look at that :)
<samueldr> isn't it concerning to see half a builder?
<gchristensen> :)
<gchristensen> one builder, half a builder, all the same
<LnL> you can't really count a mac mini as a full machine can you
<gchristensen> haha
<cransom> we don't raspberry pi build farms, do we?
<gchristensen> sorry?
<cransom> just in the grand theme, if we have fractional builders, a pi has to be no more than 1/8th of a builder.
<gchristensen> definitely
<{^_^}> [ofborg] @costrouc opened pull request #246 → Add costrouc to extra-known-users → https://git.io/fx8TA
orivej has joined #nixos-borg