diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2019-07-29 21:27:38 +0200 |
|---|---|---|
| committer | Daiderd Jordan <daiderd@gmail.com> | 2019-07-29 21:28:35 +0200 |
| commit | ef3d6e4354d029c7ef6f614654e48e9656e077f8 (patch) | |
| tree | 1df266d5400b745e4f28036faea25f5a791d27cf /modules | |
| parent | 21c2ffdda9b5a2c3d3536d5f7a1a4fb44ed95ef5 (diff) | |
lnl: remove default sandbox
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/examples/lnl.nix | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/modules/examples/lnl.nix b/modules/examples/lnl.nix index 88bbedd..99a77e8 100644 --- a/modules/examples/lnl.nix +++ b/modules/examples/lnl.nix @@ -119,7 +119,6 @@ set -g status-right '#[fg=white]#(id -un)@#(hostname) #(cat /run/current-system/darwin-version)' ''; - programs.tmux.defaultCommand = "IN_NIX_SANDBOX=1 /usr/bin/sandbox-exec -f /etc/nix/user-sandbox.sb ${config.environment.loginShell}"; environment.etc."nix/user-sandbox.sb".text = '' (version 1) (allow default) @@ -192,8 +191,8 @@ PS1='%F{red}%B%(?..%? )%b%f%# ' RPS1='$(_prompt_nix)%F{green}%~%f' - if [ -z "$IN_NIX_SANDBOX" ]; then - PS1+='%F{red}[no-sandbox]%f ' + if [ -n "$IN_NIX_SANDBOX" ]; then + PS1+='%F{red}[sandbox]%f ' fi ''; @@ -228,6 +227,10 @@ diskutil erasevolume JHFS+ RAM $(hdiutil attach -nomount ram://10248576) } + ls() { + ${pkgs.coreutils}/bin/ls --color=auto "$@" + } + install_name_tool() { ${pkgs.darwin.cctools}/bin/install_name_tool "$@" } @@ -308,12 +311,6 @@ echo "https://github.com/NixOS/nixpkgs/archive/''${@:-master}.tar.gz" } - pr-darwin() { - local pr=$1 - shift 1 - rev-darwin "$(curl "https://api.github.com/repos/LnL7/nix-darwin/pulls/$pr/commits" | jq -r '.[-1].sha')" - } - pr-nixpkgs() { local pr=$1 shift 1 @@ -335,11 +332,12 @@ reexec-sandbox() { unset __NIX_DARWIN_SET_ENVIRONMENT_DONE unset __ETC_ZPROFILE_SOURCED __ETC_ZSHENV_SOURCED __ETC_ZSHRC_SOURCED - exec IN_NIX_SANDBOX=1 /usr/bin/sandbox-exec -f /etc/nix/user-sandbox.sb exec $SHELL -l + export IN_NIX_SANDBOX=1 + exec /usr/bin/sandbox-exec -f /etc/nix/user-sandbox.sb $SHELL -l } no-sandbox() { - tmux split-window -c '#{pane_current_path}' -p 25 $SHELL -l + tmux split-window -c '#{pane_current_path}' -p 25 if [ $# -gt 0 ]; then tmux send-keys -t . "$*" Enter fi @@ -382,10 +380,9 @@ environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix"; nix.nixPath = - [ # Use local nixpkgs checkout instead of channels. - "darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix" - "darwin=$HOME/.nix-defexpr/darwin" - "nixpkgs=$HOME/.nix-defexpr/nixpkgs" + [{ # Use local nixpkgs checkout instead of channels. + darwin-config = "$HOME/.config/nixpkgs/darwin/configuration.nix"; + darwin = "$HOME/.nix-defexpr/darwin"; } ]; nixpkgs.config.allowUnfree = true; |
