Skip to content

Instantly share code, notes, and snippets.

@andrewchambers
Last active May 28, 2019 23:52
Show Gist options
  • Save andrewchambers/a729d371ad306455737ce721dbe16da1 to your computer and use it in GitHub Desktop.
Save andrewchambers/a729d371ad306455737ce721dbe16da1 to your computer and use it in GitHub Desktop.
Janetsh sysrc nixos
users.extraUsers.ac = {
shell = "${janetsh}/bin/janetsh-posix-wrapper";
};
environment.etc."janetsh.rc".text = ''
(import posixsh)
(def env-blacklist @{"_" true})
(when (not (= "1" (os/getenv "__NIXOS_SET_ENVIRONMENT_DONE")))
(posixsh/source-env "${config.system.build.setEnvironment}" nil env-blacklist))
'';
environment.shells = [
"/run/current-system/sw/bin/janetsh"
"/run/current-system/sw/bin/janetsh-posix-wrapper"
"${janetsh}/bin/janetsh"
"${janetsh}/bin/janetsh-posix-wrapper"
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment