<elvishjerricco> LnL: How do you do that?
<LnL> either chsh -s to set your login shell or just configure it in your terminal settings
<elvishjerricco> LnL: does `environment.loginShell` do that?
<LnL> no, that just sets SHELL and is used by some other modules
<elvishjerricco> Would it be possible to make this something declarative in nix-darwin?
Lisanna has joined #nix-darwin
<LnL> sure, it's just a bit tricky because it also won't work with the default /etc/shells
<elvishjerricco> LnL: Can THAT be set with nix-darwin? :P
<LnL> but there's already environment.shells so given some sanity checking it could be added
<elvishjerricco> Ah I see. So now I've got /etc/shells defined in Nix. How would I go about changing the default shell in Nix now?
<LnL> environment.shells = [ pkgs.bash ];
<LnL> make sure activation changed the file, it already exists so won't get replaced by defult
<LnL> then run chsh -s /run/current-system/sw/bin/bash
<LnL> so a chsh option could run that during activation if /etc/shells looks ok and show an error with some instructions otherwis
<elvishjerricco> LnL: I think running `chsh` as root won't cause user shells to update :/
<pikajude> doesn't chsh take a user argument though
<pikajude> it does, yeah
<elvishjerricco> Oh. Then I guess you'd have to tell the option what users to do this too?
LnL has quit [Ping timeout: 265 seconds]
ryanartecona has joined #nix-darwin
ryanartecona has quit [Quit: ryanartecona]
sonarpulse has quit [Ping timeout: 240 seconds]
LnL has joined #nix-darwin
LnL has quit [Ping timeout: 268 seconds]
pxc has quit [Ping timeout: 260 seconds]
Lisanna has quit [Quit: Lisanna]
pxc has joined #nix-darwin
pxc has quit [Ping timeout: 240 seconds]
Lisanna has joined #nix-darwin
pxc has joined #nix-darwin
pxc has quit [Ping timeout: 260 seconds]
pxc has joined #nix-darwin
pxc has quit [Ping timeout: 264 seconds]
pxc has joined #nix-darwin
zzamboni has joined #nix-darwin
zzamboni has quit [Client Quit]
pxc has quit [Ping timeout: 268 seconds]
Lisanna has quit [Remote host closed the connection]
disasm has quit [Ping timeout: 240 seconds]
pxc has joined #nix-darwin
pxc has quit [Ping timeout: 264 seconds]
pxc has joined #nix-darwin
pxc has quit [Ping timeout: 264 seconds]
zzamboni has joined #nix-darwin
zzamboni has quit [Client Quit]
zzamboni has joined #nix-darwin
disasm has joined #nix-darwin
pxc has joined #nix-darwin
pxc has quit [Ping timeout: 240 seconds]
pxc has joined #nix-darwin
pxc has quit [Ping timeout: 240 seconds]
zzamboni has quit [Read error: Connection reset by peer]
LnL has joined #nix-darwin
zzamboni has joined #nix-darwin
zzamboni has quit [Client Quit]
zzamboni has joined #nix-darwin
pxc has joined #nix-darwin
pxc has quit [Ping timeout: 264 seconds]
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
pxc has joined #nix-darwin
pxc has quit [Ping timeout: 264 seconds]
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
zzamboni has quit [Client Quit]
zzamboni has joined #nix-darwin
pxc has joined #nix-darwin
pxc has quit [Ping timeout: 256 seconds]
zzamboni has quit [Ping timeout: 240 seconds]
pxc has joined #nix-darwin
zzamboni has joined #nix-darwin
pxc has quit [Ping timeout: 256 seconds]
jtojnar_ has joined #nix-darwin
jtojnar has quit [Ping timeout: 248 seconds]
jtojnar_ has quit [Ping timeout: 264 seconds]
pxc has joined #nix-darwin
pxc has quit [Ping timeout: 240 seconds]
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
zzamboni has quit [Client Quit]
zzamboni has joined #nix-darwin
zzamboni has quit [Client Quit]
zzamboni has joined #nix-darwin
zzamboni has quit [Client Quit]
zzamboni has joined #nix-darwin
zzamboni has quit [Ping timeout: 256 seconds]
zzamboni has joined #nix-darwin
zzamboni has quit [Ping timeout: 240 seconds]
zzamboni has joined #nix-darwin
zzamboni has quit [Client Quit]
zzamboni has joined #nix-darwin
pxc has joined #nix-darwin
zzamboni has quit [Client Quit]
zzamboni has joined #nix-darwin
pxc has quit [Ping timeout: 276 seconds]
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
pxc has joined #nix-darwin
zzamboni has quit [Client Quit]
zzamboni has joined #nix-darwin
zzamboni has quit [Client Quit]
zzamboni has joined #nix-darwin
pxc has quit [Ping timeout: 260 seconds]
zzamboni has quit [Remote host closed the connection]
zzamboni has joined #nix-darwin
zzamboni1 has joined #nix-darwin
zzamboni has quit [Read error: Connection reset by peer]
periklis has joined #nix-darwin
periklis has quit [Ping timeout: 240 seconds]
pxc has joined #nix-darwin
pxc has quit [Ping timeout: 268 seconds]
zzamboni1 has quit [Read error: Connection reset by peer]
periklis has joined #nix-darwin
jtojnar has joined #nix-darwin
pxc has joined #nix-darwin
pxc has quit [Ping timeout: 264 seconds]
ryanartecona has joined #nix-darwin
periklis has quit [Ping timeout: 248 seconds]
zzamboni has joined #nix-darwin
pxc has joined #nix-darwin
Lisanna has joined #nix-darwin
pxc has quit [Ping timeout: 260 seconds]
zzamboni has quit [Quit: Leaving.]
pxc has joined #nix-darwin
sonarpulse has joined #nix-darwin
ryanartecona has quit [Quit: ryanartecona]
jtojnar has quit [Quit: jtojnar]
Lisanna has quit [Remote host closed the connection]
jtojnar has joined #nix-darwin
ryanartecona has joined #nix-darwin
Lisanna has joined #nix-darwin
shlevy has quit [Quit: Quit]
zzamboni has joined #nix-darwin
Lisanna has quit [Quit: Lisanna]
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
<elvishjerricco> Well, changing my shell with `chsh` works fine for login shells. But now whenever I use `ssh mymac cmd` to run a command directly, I get spammed with those errors from using `enableCompletion` with bash 3.2
<LnL> aah all this recursion in the apple-sdk is pretty confusing
<elvishjerricco> LnL: Any idea why running a command directly with SSH would be using the old system bash at all, when it should just be running `cmd`?
<LnL> it won't be interactive, but I'd expect it to use the same shell
<LnL> what does dscl . -read /Users/<user> UserShell say?
<elvishjerricco> UserShell: /run/current-system/sw/bin/bash
<elvishjerricco> which is of course the bash 4.4
<elvishjerricco> But I thought that running commands directly with SSH wouldn't launch *any* shell
<LnL> don't think so ssh desktop 'echo *'
<gchristensen> it can do that if your ssh server is misconfigured, but it really shouldn't
<elvishjerricco> gchristensen: Shouldn't do what?
<gchristensen> launch a shell
<LnL> gchristensen: then you wouldn't have _any_ environment variables if you run a command like that
<elvishjerricco> gchristensen: Maybe MacOS's SSH server is misconfigured by default :P
<gchristensen> hmm
<elvishjerricco> Yea `ssh host 'echo *'` prints the files in PWD both when host is mac or linux
<LnL> gchristensen: ssh desktop env | grep __ETC
<gchristensen> you're right, d'oh
<gchristensen> sorry ;)
<LnL> ^ that's nixos/nix-darwin specific stuff from /etc/bashrc or whatever shell you use
<elvishjerricco> So then what shell does it launch in this case, and how can I reconfigure that?
<LnL> ssh localhost -- echo '$0' is not bash on my system
<LnL> so I have no idea why it wouldn't use your login shell
<elvishjerricco> LnL: `ssh localhost -- echo '$0'` just outputs `bash`
<LnL> oh, maybe restart sshd? could be that it just doesn't know about it yet because of login sessions
<elvishjerricco> LnL: I already restarted the whole machine ;P
<elvishjerricco> But just to be sure... How do you do that on macos?
<LnL> well, I guess not then
<elvishjerricco> FWIW: Manually running `echo $0` in an interactive shell also just outputs `bash`
<elvishjerricco> and the `bash` on my PATH is 4.4
<LnL> yeah you can't check the actual version like that
<LnL> ah echo "${BASH_VERSINFO[@]}"
<elvishjerricco> `ssh localhost 'echo "${BASH_VERSINFO[@]}"'`
<elvishjerricco> Spams with the completion errors as thought it were bash 3.2
<elvishjerricco> but then outputs:
<elvishjerricco> `4 4 12 1 release x86_64-apple-darwin16.6.0`
<LnL> euh
<LnL> so either it's lying or the completion errors are not necceceraly because of 3.2
<elvishjerricco> Yea that's perplexing
<elvishjerricco> Oh I hadn't considered that
<elvishjerricco> But the wall of errors is definitely the same as the one I got when I tried to enable completion when my shell was 3.2.
ryanartecona has quit [Quit: ryanartecona]
<elvishjerricco> So it seems like *something* is trying to launch 3.2, even if it's not the shell SSH ultimately puts you into
zzamboni has quit [Quit: Leaving.]
jtojnar has quit [Ping timeout: 240 seconds]
zzamboni has joined #nix-darwin
ryanartecona has joined #nix-darwin
<elvishjerricco> Hm if I pass `-v` to SSH, I see `debug1: Entering interactive session.` That doesn't seem right
pxc has quit [Ping timeout: 240 seconds]
jtojnar has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
zzamboni has quit [Read error: Connection reset by peer]
zzamboni has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
ryanartecona has quit [Quit: ryanartecona]
zzamboni has joined #nix-darwin
pxc has joined #nix-darwin
jtojnar_ has joined #nix-darwin
jtojnar has quit [Quit: jtojnar]
jtojnar has joined #nix-darwin
jtojnar_ has quit [Ping timeout: 268 seconds]
ryanartecona has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]