Comments (8)
I recall something about this related to the fact that the default version of bash on macOS is really old. Using the nix version of bash as your login shell might resolve this if that's the case.
from nix-darwin.
@LnL7 I have:
{ pkgs, ... }: {
users.users.will = {
description = "Will Fancher";
home = "/Users/will";
shell = "/run/current-system/sw/bin/bash";
};
environment.shells = [ pkgs.bashInteractive ];
}
So I thought I had that set up right. And in fact:
$ echo $BASH
/run/current-system/sw/bin/bash
$ echo $BASH_VERSION
4.4.12(1)-release
However, oddly enough, if I do these things directly from SSH then I get different results:
$ ssh hostname 'echo $BASH'
/bin/bash
$ ssh hostname 'echo $BASH_VERSION'
4.4.12(1)-release
It's using /bin/bash
, though it does appear to be a recent version.
EDIT: Weird:
$ ssh hostname /bin/bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16)
Copyright (C) 2007 Free Software Foundation, Inc.
from nix-darwin.
With #109 non-interactive cases shouldn't suffer from this anymore, but unless that was the cause somehow there's not much that can be done about it I think.
from nix-darwin.
@LnL7 though it's definitely less of a problem for only interactive logins to be slow, I think it's still a problem. The issue should probably remain open and be renamed.
from nix-darwin.
Oh, I confused this with #98.
from nix-darwin.
but unless that was the cause somehow there's not much that can be done about it I think.
@LnL7 How does NixOS avoid this problem? I remember reading somewhere that Bash can lazily load completions. Maybe we need to do that?
from nix-darwin.
Not sure, that's why my initial suspicion was the default bash 3.2.
from nix-darwin.
Pushed a fix for this which speeds up the interactive bash startup time significantly. Bash loads the completions from /share/ on demand, so they don't have to be preloaded. NixOS also fixed this in the same way in NixOS/nixpkgs#32534
from nix-darwin.
Related Issues (20)
- If use-xdg-base-directories is true then NIX_PROFILES is not correct
- Flake installation fails if `~/.config` is a Git repository and `nix-darwin/flake.nix` is not committed HOT 2
- sdate builds and installs but will not run HOT 3
- nix-darwin doesnt build after updating flake HOT 2
- Is there a better (native) way to enable AppExposé HOT 1
- `persistent-others` doesn't work with relative paths HOT 6
- skhd binary not in path HOT 4
- macOS Sequoia replaces `_nixbld{1,2,3,4}` with system users causing `darwin-rebuild` to fail HOT 6
- Add `ollama` service
- [Revert!] Option `nix.gc.interval.Hour is not of type null or integer between 0 and 23 (both inclusive)'. HOT 2
- preserve host ssh agent
- Error on darwin-rebuild switch: called with unexpected argument 'class' HOT 7
- Diff old and new generation in postActivation script HOT 2
- Sorting in persistent-others HOT 1
- Why does generated `/etc/zshrc` hardcode `HISTFILE`?
- Home Directory is not Created for the New User HOT 1
- Option to enable touch ID authentication for sudo doesn't work in tmux HOT 3
- Unclear Step 1 documentation for installer HOT 9
- Failed build mpv scripts HOT 2
- Deprecation warning mkPackageOptionMD should be changed to mkPackageOption HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nix-darwin.