Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/etc/profiles/per-user empty #1254

Open
kaihendry opened this issue Jan 5, 2025 · 0 comments
Open

/etc/profiles/per-user empty #1254

kaihendry opened this issue Jan 5, 2025 · 0 comments

Comments

@kaihendry
Copy link

https://discourse.nixos.org/t/nix-switch-to-determinate-isnt-working/58328/3?u=kaihendry

I installed the determinate installer on my MacOS Sequioa machine:

% curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \
  sh -s -- install
info: downloading installer (https://install.determinate.systems/nix/tag/v0.32.2/nix-installer-aarch64-darwin)
 INFO nix-installer v0.32.2
`nix-installer` needs to run as `root`, attempting to escalate now via `sudo`...
Password:
 INFO nix-installer v0.32.2
 WARN Couldn't find terminfo, using empty fallback terminfo
Nix install plan (v0.32.2)
Planner: macos (with default settings)

Planned actions:
* Create an encrypted APFS volume `Nix Store` for Nix on `disk3` and add it to `/etc/fstab` mounting on `/nix`
* Extract the bundled Nix (originally from /nix/store/fg8haq4wkgm320cffnib91f6lv2i28g6-nix-binary-tarball-2.25.3/nix-2.25.3-aarch64-darwin.tar.xz)
* Create a directory tree in `/nix`
* Synchronize /nix/var ownership
* Move the downloaded Nix into `/nix`
* Synchronize /nix/store ownership
* Create build users (UID 351-382) and group (GID 350)
* Configure Time Machine exclusions
* Setup the default Nix profile
* Place the Nix configuration in `/etc/nix/nix.conf`
* Configure the shell profiles
* Configuring zsh to support using Nix in non-interactive shells
* Create a `launchctl` plist to put Nix into your PATH
* Configure upstream Nix daemon service
* Remove directory `/nix/temp-install-dir`


Proceed? ([Y]es/[n]o/[e]xplain): Y
 INFO Step: Create an encrypted APFS volume `Nix Store` for Nix on `disk3` and add it to `/etc/fstab` mounting on `/nix`
 INFO Step: Provision Nix
 INFO Step: Create build users (UID 351-382) and group (GID 350)
 INFO Step: Configure Time Machine exclusions
 INFO Step: Configure Nix
 INFO Step: Configuring zsh to support using Nix in non-interactive shells
 INFO Step: Create a `launchctl` plist to put Nix into your PATH
 INFO Step: Configure upstream Nix daemon service
 INFO Step: Remove directory `/nix/temp-install-dir`
Nix was installed successfully!
To get started using Nix, open a new shell or run `. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh`

hendry@kaim1pro ~ % . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh

Sidenote: My config is upon https://github.com/kaihendry/mac-nix

And when I follow the instructions to install nix darwin:

nix run nix-darwin -- switch --flake .#kaim1pro
building the system configuration...
warning: Git tree '/Users/hendry/.config/nix-darwin' is dirty
user defaults...
restarting Dock...
setting up user launchd services...
Homebrew bundle...
Using raycast
Using visual-studio-code
Using alacritty
Homebrew Bundle complete! 3 Brewfile dependencies now installed.
Password:
setting up /Applications/Nix Apps...
setting up pam...
applying patches...
setting up /etc...
system defaults...
setting up launchd services...
creating service org.nixos.activate-system
reloading service org.nixos.nix-daemon
reloading nix-daemon...
waiting for nix-daemon
waiting for nix-daemon
configuring networking...
configuring power...
configuring keyboard...
setting up /Library/Fonts/Nix Fonts...
setting nvram variables...
Changing shell for root.
chsh: no changes made
Activating home-manager configuration for hendry
Starting Home Manager activation
Activating checkFilesChanged
Activating checkLaunchAgents
Activating checkLinkTargets
Activating writeBoundary
Activating installPackages
Activating linkGeneration
Cleaning up orphan links from /Users/hendry
No change so reusing latest profile generation 129
Creating home file links in /Users/hendry
Activating onFilesChange
Activating setupLaunchAgents
hendry@kaim1pro nix-darwin % ls /etc/profiles/per-user
hendry@kaim1pro nix-darwin % ls /etc/profiles/per-user
hendry@kaim1pro nix-darwin % darwin-rebuild
zsh: command not found: darwin-rebuild
hendry@kaim1pro nix-darwin % /run/current-system/sw/bin/bash
bash: /etc/profiles/per-user/hendry/bin/starship: No such file or directory

It would appear to me that problem is that /etc/profiles/per-user/ isn't being populated and I don't know why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant