>nix run .#build
Running build for aarch64-darwin
Starting build...
error:
… while calling the 'derivationStrict' builtin
at :9:12:
8|
9| strict = derivationStrict drvAttrs;
| ^
10|
… while evaluating derivation 'darwin-system-24.05.20240502.63c3a29+darwin4.230a197'
whose name attribute is located at /nix/store/p69bcs7ma6ijj8v9xsrg3nq3nn8ryn95-source/pkgs/stdenv/generic/make-derivation.nix:331:7
… while evaluating attribute 'activationScript' of derivation 'darwin-system-24.05.20240502.63c3a29+darwin4.230a197'
at /nix/store/a21fcz0fgrixwrcxw63xccrzjhb6xnym-source/modules/system/default.nix:95:7:
94|
95| activationScript = cfg.activationScripts.script.text;
| ^
96| activationUserScript = cfg.activationScripts.userScript.text;
(stack trace truncated; use '--show-trace' to show the full trace)
error: nixVersions.unstable has been removed. For bleeding edge (Nix master, roughly weekly updated) use nixVersions.git, otherwise use nixVersions.latest.
I somehow run into situation:
➜ nixos-config nix run .#build-switch
Running build-switch for aarch64-darwin
Starting build...
Switching to new generation...
building the system configuration...
setting up Homebrew (/opt/homebrew)...
ln: /opt/homebrew/bin/brew: No such file or directory
Can you tell me what's wrong? :)
- Reduce down set of packages and my custom config
- Create a nix-command to sed/replace a %USER% token with the current
- Simplify Emacs configuration
- Test it on a fresh Macbook install
- Update README
Just going to put these into one issue as improvements that can be made/noted in the README file (installing onto MacOS Sonoma):
-
In section 8. Optional: Setup secrets, step 8a notes to create the repo and keep it empty. There are two issues here with the workflow:
a. The code assumes that your default branch is 'master'. With the changes to GitHub lately, this is 'main' by default.
b. The statement to leave the repository empty is a little misleading as, if you create an empty repo on GitHub, you cannot clone it using the ssh:// URL. Only the git:// format will work. Otherwise, you get a publickey denial. Adding a single file (empty README.md works) to the repository allows you to now successfully execute the 'nix run .#create-keys' command.
-
Clarification on whether an existing standalone installation of home-manager will work with this configuration or not would be greatly appreciated. Would that be something easy to add here?
-
Clarification on whether or not there are any issues when applying OS upgrades. Is it as simple as runnning 'nix run .#build-switch' aftwards? Is that even needed?
Thanks for the work! This is very interesting and I'm still studying the code to see what might break in my existing home-manager configuration as I'm using that across three different machines and two platforms.
Hi Dustin,
I'm following the README instructions for NixOS, and the install
step is erroring out:
$ sudo nix run --extra-experimental-features 'nix-command flakes' github:dustinlyons/nixos-config#install
Running install for x86_64-linux
+ cleanup
+ rm -rf nixos-config-main.zip nixos-config-main nixos-config
+ check_installer
+ '[' -e /etc/NIXOS ']'
+ echo -e '\e[1;32mRunning in the NixOS installer environment.\e[0m'
Running in the NixOS installer environment.
+ download_config
+ curl -LJ0 https://github.com/dustinlyons/nixos-config/archive/main.zip -o nixos-config-main.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 2320k 0 2320k 0 0 4661k 0 --:--:-- --:--:-- --:--:-- 4661k
+ unzip nixos-config-main.zip
Archive: nixos-config-main.zip
090115311285ad626e1d1b4e3614efbbf695c35e
creating: nixos-config-main/
creating: nixos-config-main/.github/
inflating: nixos-config-main/.github/dependabot.yml
creating: nixos-config-main/.github/workflows/
inflating: nixos-config-main/.github/workflows/build-template.yml
inflating: nixos-config-main/.github/workflows/build.yml
inflating: nixos-config-main/.github/workflows/lint.yml
inflating: nixos-config-main/.github/workflows/update-flake-lock.yml
extracting: nixos-config-main/.gitignore
inflating: nixos-config-main/LICENSE
inflating: nixos-config-main/README.md
creating: nixos-config-main/apps/
inflating: nixos-config-main/apps/README.md
creating: nixos-config-main/apps/aarch64-darwin/
inflating: nixos-config-main/apps/aarch64-darwin/apply
inflating: nixos-config-main/apps/aarch64-darwin/build
inflating: nixos-config-main/apps/aarch64-darwin/build-switch
inflating: nixos-config-main/apps/aarch64-darwin/check-keys
inflating: nixos-config-main/apps/aarch64-darwin/copy-keys
inflating: nixos-config-main/apps/aarch64-darwin/create-keys
linking: nixos-config-main/apps/aarch64-linux -> x86_64-linux
creating: nixos-config-main/apps/x86_64-linux/
inflating: nixos-config-main/apps/x86_64-linux/apply
inflating: nixos-config-main/apps/x86_64-linux/build-switch
inflating: nixos-config-main/apps/x86_64-linux/check-keys
inflating: nixos-config-main/apps/x86_64-linux/copy-keys
inflating: nixos-config-main/apps/x86_64-linux/create-keys
inflating: nixos-config-main/apps/x86_64-linux/install
inflating: nixos-config-main/apps/x86_64-linux/install-with-secrets
inflating: nixos-config-main/flake.lock
inflating: nixos-config-main/flake.nix
creating: nixos-config-main/hosts/
creating: nixos-config-main/hosts/darwin/
inflating: nixos-config-main/hosts/darwin/default.nix
creating: nixos-config-main/hosts/nixos/
inflating: nixos-config-main/hosts/nixos/default.nix
creating: nixos-config-main/modules/
creating: nixos-config-main/modules/darwin/
inflating: nixos-config-main/modules/darwin/README.md
inflating: nixos-config-main/modules/darwin/casks.nix
creating: nixos-config-main/modules/darwin/dock/
inflating: nixos-config-main/modules/darwin/dock/default.nix
inflating: nixos-config-main/modules/darwin/files.nix
inflating: nixos-config-main/modules/darwin/home-manager.nix
inflating: nixos-config-main/modules/darwin/packages.nix
inflating: nixos-config-main/modules/darwin/secrets.nix
creating: nixos-config-main/modules/nixos/
inflating: nixos-config-main/modules/nixos/README.md
creating: nixos-config-main/modules/nixos/config/
inflating: nixos-config-main/modules/nixos/config/login-wallpaper.png
creating: nixos-config-main/modules/nixos/config/polybar/
inflating: nixos-config-main/modules/nixos/config/polybar/bars.ini
inflating: nixos-config-main/modules/nixos/config/polybar/colors.ini
inflating: nixos-config-main/modules/nixos/config/polybar/config.ini
inflating: nixos-config-main/modules/nixos/config/polybar/modules.ini
inflating: nixos-config-main/modules/nixos/config/polybar/user_modules.ini
creating: nixos-config-main/modules/nixos/config/rofi/
inflating: nixos-config-main/modules/nixos/config/rofi/colors.rasi
inflating: nixos-config-main/modules/nixos/config/rofi/confirm.rasi
inflating: nixos-config-main/modules/nixos/config/rofi/launcher.rasi
inflating: nixos-config-main/modules/nixos/config/rofi/message.rasi
inflating: nixos-config-main/modules/nixos/config/rofi/networkmenu.rasi
inflating: nixos-config-main/modules/nixos/config/rofi/powermenu.rasi
inflating: nixos-config-main/modules/nixos/config/rofi/styles.rasi
inflating: nixos-config-main/modules/nixos/disk-config.nix
inflating: nixos-config-main/modules/nixos/files.nix
inflating: nixos-config-main/modules/nixos/home-manager.nix
inflating: nixos-config-main/modules/nixos/packages.nix
inflating: nixos-config-main/modules/nixos/secrets.nix
creating: nixos-config-main/modules/shared/
inflating: nixos-config-main/modules/shared/README.md
creating: nixos-config-main/modules/shared/cachix/
inflating: nixos-config-main/modules/shared/cachix/default.nix
creating: nixos-config-main/modules/shared/config/
creating: nixos-config-main/modules/shared/config/emacs/
extracting: nixos-config-main/modules/shared/config/emacs/.gitignore
inflating: nixos-config-main/modules/shared/config/emacs/config.org
inflating: nixos-config-main/modules/shared/config/emacs/init.el
inflating: nixos-config-main/modules/shared/config/p10k.zsh
inflating: nixos-config-main/modules/shared/default.nix
inflating: nixos-config-main/modules/shared/files.nix
inflating: nixos-config-main/modules/shared/home-manager.nix
inflating: nixos-config-main/modules/shared/packages.nix
creating: nixos-config-main/overlays/
inflating: nixos-config-main/overlays/10-feather-font.nix
inflating: nixos-config-main/overlays/README.md
creating: nixos-config-main/templates/
creating: nixos-config-main/templates/starter-with-secrets/
creating: nixos-config-main/templates/starter-with-secrets/apps/
creating: nixos-config-main/templates/starter-with-secrets/apps/aarch64-darwin/
inflating: nixos-config-main/templates/starter-with-secrets/apps/aarch64-darwin/apply
inflating: nixos-config-main/templates/starter-with-secrets/apps/aarch64-darwin/build
inflating: nixos-config-main/templates/starter-with-secrets/apps/aarch64-darwin/build-switch
inflating: nixos-config-main/templates/starter-with-secrets/apps/aarch64-darwin/check-keys
inflating: nixos-config-main/templates/starter-with-secrets/apps/aarch64-darwin/copy-keys
inflating: nixos-config-main/templates/starter-with-secrets/apps/aarch64-darwin/create-keys
linking: nixos-config-main/templates/starter-with-secrets/apps/aarch64-linux -> x86_64-linux
creating: nixos-config-main/templates/starter-with-secrets/apps/x86_64-linux/
inflating: nixos-config-main/templates/starter-with-secrets/apps/x86_64-linux/apply
inflating: nixos-config-main/templates/starter-with-secrets/apps/x86_64-linux/build-switch
inflating: nixos-config-main/templates/starter-with-secrets/flake.nix
creating: nixos-config-main/templates/starter-with-secrets/hosts/
creating: nixos-config-main/templates/starter-with-secrets/hosts/darwin/
inflating: nixos-config-main/templates/starter-with-secrets/hosts/darwin/default.nix
creating: nixos-config-main/templates/starter-with-secrets/hosts/nixos/
inflating: nixos-config-main/templates/starter-with-secrets/hosts/nixos/default.nix
creating: nixos-config-main/templates/starter-with-secrets/modules/
creating: nixos-config-main/templates/starter-with-secrets/modules/darwin/
inflating: nixos-config-main/templates/starter-with-secrets/modules/darwin/README.md
inflating: nixos-config-main/templates/starter-with-secrets/modules/darwin/casks.nix
creating: nixos-config-main/templates/starter-with-secrets/modules/darwin/dock/
inflating: nixos-config-main/templates/starter-with-secrets/modules/darwin/dock/default.nix
inflating: nixos-config-main/templates/starter-with-secrets/modules/darwin/files.nix
inflating: nixos-config-main/templates/starter-with-secrets/modules/darwin/home-manager.nix
inflating: nixos-config-main/templates/starter-with-secrets/modules/darwin/packages.nix
inflating: nixos-config-main/templates/starter-with-secrets/modules/darwin/secrets.nix
creating: nixos-config-main/templates/starter-with-secrets/modules/nixos/
inflating: nixos-config-main/templates/starter-with-secrets/modules/nixos/README.md
creating: nixos-config-main/templates/starter-with-secrets/modules/nixos/config/
inflating: nixos-config-main/templates/starter-with-secrets/modules/nixos/config/login-wallpaper.png
creating: nixos-config-main/templates/starter-with-secrets/modules/nixos/config/polybar/
inflating: nixos-config-main/templates/starter-with-secrets/modules/nixos/config/polybar/bars.ini
inflating: nixos-config-main/templates/starter-with-secrets/modules/nixos/config/polybar/colors.ini
inflating: nixos-config-main/templates/starter-with-secrets/modules/nixos/config/polybar/config.ini
inflating: nixos-config-main/templates/starter-with-secrets/modules/nixos/config/polybar/modules.ini
inflating: nixos-config-main/templates/starter-with-secrets/modules/nixos/config/polybar/user_modules.ini
creating: nixos-config-main/templates/starter-with-secrets/modules/nixos/config/rofi/
inflating: nixos-config-main/templates/starter-with-secrets/modules/nixos/config/rofi/colors.rasi
inflating: nixos-config-main/templates/starter-with-secrets/modules/nixos/config/rofi/confirm.rasi
inflating: nixos-config-main/templates/starter-with-secrets/modules/nixos/config/rofi/launcher.rasi
inflating: nixos-config-main/templates/starter-with-secrets/modules/nixos/config/rofi/message.rasi
inflating: nixos-config-main/templates/starter-with-secrets/modules/nixos/config/rofi/networkmenu.rasi
inflating: nixos-config-main/templates/starter-with-secrets/modules/nixos/config/rofi/powermenu.rasi
inflating: nixos-config-main/templates/starter-with-secrets/modules/nixos/config/rofi/styles.rasi
inflating: nixos-config-main/templates/starter-with-secrets/modules/nixos/disk-config.nix
inflating: nixos-config-main/templates/starter-with-secrets/modules/nixos/files.nix
inflating: nixos-config-main/templates/starter-with-secrets/modules/nixos/home-manager.nix
inflating: nixos-config-main/templates/starter-with-secrets/modules/nixos/packages.nix
inflating: nixos-config-main/templates/starter-with-secrets/modules/nixos/secrets.nix
creating: nixos-config-main/templates/starter-with-secrets/modules/shared/
inflating: nixos-config-main/templates/starter-with-secrets/modules/shared/README.md
creating: nixos-config-main/templates/starter-with-secrets/modules/shared/cachix/
inflating: nixos-config-main/templates/starter-with-secrets/modules/shared/cachix/default.nix
creating: nixos-config-main/templates/starter-with-secrets/modules/shared/config/
creating: nixos-config-main/templates/starter-with-secrets/modules/shared/config/emacs/
extracting: nixos-config-main/templates/starter-with-secrets/modules/shared/config/emacs/.gitignore
inflating: nixos-config-main/templates/starter-with-secrets/modules/shared/config/emacs/config.org
inflating: nixos-config-main/templates/starter-with-secrets/modules/shared/config/emacs/init.el
inflating: nixos-config-main/templates/starter-with-secrets/modules/shared/config/p10k.zsh
inflating: nixos-config-main/templates/starter-with-secrets/modules/shared/default.nix
inflating: nixos-config-main/templates/starter-with-secrets/modules/shared/files.nix
inflating: nixos-config-main/templates/starter-with-secrets/modules/shared/home-manager.nix
inflating: nixos-config-main/templates/starter-with-secrets/modules/shared/packages.nix
creating: nixos-config-main/templates/starter-with-secrets/overlays/
inflating: nixos-config-main/templates/starter-with-secrets/overlays/10-feather-font.nix
inflating: nixos-config-main/templates/starter-with-secrets/overlays/README.md
creating: nixos-config-main/templates/starter/
creating: nixos-config-main/templates/starter/apps/
creating: nixos-config-main/templates/starter/apps/aarch64-darwin/
inflating: nixos-config-main/templates/starter/apps/aarch64-darwin/apply
inflating: nixos-config-main/templates/starter/apps/aarch64-darwin/build
inflating: nixos-config-main/templates/starter/apps/aarch64-darwin/build-switch
linking: nixos-config-main/templates/starter/apps/aarch64-linux -> x86_64-linux
creating: nixos-config-main/templates/starter/apps/x86_64-linux/
inflating: nixos-config-main/templates/starter/apps/x86_64-linux/apply
inflating: nixos-config-main/templates/starter/apps/x86_64-linux/build-switch
inflating: nixos-config-main/templates/starter/flake.nix
creating: nixos-config-main/templates/starter/hosts/
creating: nixos-config-main/templates/starter/hosts/darwin/
inflating: nixos-config-main/templates/starter/hosts/darwin/default.nix
creating: nixos-config-main/templates/starter/hosts/nixos/
inflating: nixos-config-main/templates/starter/hosts/nixos/default.nix
creating: nixos-config-main/templates/starter/modules/
creating: nixos-config-main/templates/starter/modules/darwin/
inflating: nixos-config-main/templates/starter/modules/darwin/README.md
inflating: nixos-config-main/templates/starter/modules/darwin/casks.nix
creating: nixos-config-main/templates/starter/modules/darwin/dock/
inflating: nixos-config-main/templates/starter/modules/darwin/dock/default.nix
inflating: nixos-config-main/templates/starter/modules/darwin/files.nix
inflating: nixos-config-main/templates/starter/modules/darwin/home-manager.nix
inflating: nixos-config-main/templates/starter/modules/darwin/packages.nix
creating: nixos-config-main/templates/starter/modules/nixos/
inflating: nixos-config-main/templates/starter/modules/nixos/README.md
creating: nixos-config-main/templates/starter/modules/nixos/config/
inflating: nixos-config-main/templates/starter/modules/nixos/config/login-wallpaper.png
creating: nixos-config-main/templates/starter/modules/nixos/config/polybar/
inflating: nixos-config-main/templates/starter/modules/nixos/config/polybar/bars.ini
inflating: nixos-config-main/templates/starter/modules/nixos/config/polybar/colors.ini
inflating: nixos-config-main/templates/starter/modules/nixos/config/polybar/config.ini
inflating: nixos-config-main/templates/starter/modules/nixos/config/polybar/modules.ini
inflating: nixos-config-main/templates/starter/modules/nixos/config/polybar/user_modules.ini
creating: nixos-config-main/templates/starter/modules/nixos/config/rofi/
inflating: nixos-config-main/templates/starter/modules/nixos/config/rofi/colors.rasi
inflating: nixos-config-main/templates/starter/modules/nixos/config/rofi/confirm.rasi
inflating: nixos-config-main/templates/starter/modules/nixos/config/rofi/launcher.rasi
inflating: nixos-config-main/templates/starter/modules/nixos/config/rofi/message.rasi
inflating: nixos-config-main/templates/starter/modules/nixos/config/rofi/networkmenu.rasi
inflating: nixos-config-main/templates/starter/modules/nixos/config/rofi/powermenu.rasi
inflating: nixos-config-main/templates/starter/modules/nixos/config/rofi/styles.rasi
inflating: nixos-config-main/templates/starter/modules/nixos/disk-config.nix
inflating: nixos-config-main/templates/starter/modules/nixos/files.nix
inflating: nixos-config-main/templates/starter/modules/nixos/home-manager.nix
inflating: nixos-config-main/templates/starter/modules/nixos/packages.nix
creating: nixos-config-main/templates/starter/modules/shared/
inflating: nixos-config-main/templates/starter/modules/shared/README.md
creating: nixos-config-main/templates/starter/modules/shared/cachix/
inflating: nixos-config-main/templates/starter/modules/shared/cachix/default.nix
creating: nixos-config-main/templates/starter/modules/shared/config/
creating: nixos-config-main/templates/starter/modules/shared/config/emacs/
extracting: nixos-config-main/templates/starter/modules/shared/config/emacs/.gitignore
inflating: nixos-config-main/templates/starter/modules/shared/config/emacs/config.org
inflating: nixos-config-main/templates/starter/modules/shared/config/emacs/init.el
inflating: nixos-config-main/templates/starter/modules/shared/config/p10k.zsh
inflating: nixos-config-main/templates/starter/modules/shared/default.nix
inflating: nixos-config-main/templates/starter/modules/shared/files.nix
inflating: nixos-config-main/templates/starter/modules/shared/home-manager.nix
inflating: nixos-config-main/templates/starter/modules/shared/packages.nix
creating: nixos-config-main/templates/starter/overlays/
inflating: nixos-config-main/templates/starter/overlays/10-feather-font.nix
inflating: nixos-config-main/templates/starter/overlays/README.md
finishing deferred symbolic links:
nixos-config-main/apps/aarch64-linux -> x86_64-linux
nixos-config-main/templates/starter-with-secrets/apps/aarch64-linux -> x86_64-linux
nixos-config-main/templates/starter/apps/aarch64-linux -> x86_64-linux
+ mv nixos-config-main/templates/starter nixos-config
+ cd nixos-config
+ run_apply
+ ./bin/apply
/nix/store/9vi19cpxijbhf6h0kcr07wl40d53qbzv-source/apps/x86_64-linux/install: line 25: ./bin/apply: No such file or directory
Do you know how to resolve this? Thanks for making this repository public by the way; it's been a very helpful learning resource.
Hi @dustinlyons,
I'm taking you up on your generous offer from #40 (comment). I created a pared down version of your nixos-config for my own edification, and am having an issue where my WiFi device won't start after installing the flake from the Minimal ISO.
I can connect to WiFi using wpa_supplicant
from the Minimal ISO in order to install NixOS on my machine. However, when I actually boot into the newly-installed NixOS, my WiFi network device fails to start (it times out after 1min 30s):
A start job is running for /sys/subsystem/net/devices/wlp3s0 (12s / 1min 30s)
Once I log in, the device (wlp3s0) is missing when I run ip a
. For reference, I am configuring nixos-hardware here and setting up networking here (I set the commented credentials before the installation).
Do you have any idea what might be going wrong?
- I want to dual boot it with windows but it seems Running this will reformat my drive to the ext4 filesystem so what can I do about it ?
- What is "secrets" mentioned everywhere & what will installing the configuration with secrets will do?
Some users have asked to disable emacs
and how to do that. We should ask the user what editor they want as part of install process: vim
, nvim
, or emacs
We can assume emacs
should be daemon mode.
Hey Dustin!
I'm updating my config to the new apps/host/modules/overlays setup with secrets. Getting an error due to your private dependency dustinlyons/nix-secrets.git
in flake.nix
nixos-config on modular [$✘»!]
✦2 ❯ nix flake archive
warning: Git tree '/Users/olafur/dev/nixos-config' is dirty
no such identity: /Users/olafur/.ssh/id_github: No such file or directory
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
warning: could not read HEAD ref from repo at 'ssh://[email protected]/dustinlyons/nix-secrets.git', using 'master'
no such identity: /Users/olafur/.ssh/id_github: No such file or directory
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
error:
… while updating the lock file of flake 'git+file:///Users/olafur/dev/nixos-config'
… while updating the flake input 'secrets'
… while fetching the input 'git+ssh://[email protected]/dustinlyons/nix-secrets.git'
error: program 'git' failed with exit code 128
secrets = {
url = "git+ssh://[email protected]/dustinlyons/nix-secrets.git";
flake = false;
};
I understand that it is a bit complicated, but I wonder if you could update the README.md
? If I understand correctly I would have my own nix-secrets
private repo or similar? Why not store the secrets directly in this config? Portability?
I'd like to be able to install packages ad-hoc without generating a whole new profile generation. Sometimes I'm test driving something, sometimes I'm just in a hurry and don't want to go through the whole process of editing a nix file and rebuilding my system. I understand that installing packages this way isn't "permanent" in the way that declaring them in my nix config is, and I still want to be able to do this.
$ nix-channel --list
nixpkgs https://nixos.org/channels/nixpkgs-23.11-darwin
nixpkgs-23.11-darwin https://nixos.org/channels/nixpkgs-23.11-darwin
Using $ nix-env -iA nixpkgs.hello
I get errors saying that nixpkgs
isn't in my default search path, which is confusing to me given the output from nix-channel --list
.
My next idea was to try $ nix profile install 'nixpkgs#hello'
, but that also has issues.
If I understand things correctly, I have 3 nix profiles: ~/.local/state/nix/profiles/home-manager
, /nix/var/nix/profiles/system
and /nix/var/nix/profiles/default -> /nix/var/nix/profiles/per-user/root/profile
Trying to $ nix profile install
to the HM profile seems like a bad idea and not what I want, so that leaves me with the system
and per-user/root
profiles to try, but those both give permission denied:
$ nix profile install 'nixpkgs#hello'
error: creating symlink from '/nix/var/nix/profiles/system-76-link.tmp-47457-239703633' to '/nix/store/wp55qs45bkwd6wnvrf2syjr2abymwbxk-profile': Permission denied
$ nix profile install 'nixpkgs#hello' --profile /nix/var/nix/profiles/system
error: creating symlink from '/nix/var/nix/profiles/system-76-link.tmp-48959-324922186' to '/nix/store/wp55qs45bkwd6wnvrf2syjr2abymwbxk-profile': Permission denied
$ nix profile install 'nixpkgs#hello' --profile /nix/var/nix/profiles/default
error: creating symlink from '/nix/var/nix/profiles/default-1-link.tmp-47660-1073039347' to '/nix/store/mds25w525q6wdmcz78clz7dpqw05bnj3-profile': Permission denied
$ nix profile install 'nixpkgs#hello' --profile /nix/var/nix/profiles/per-user/root/profile
error: creating symlink from '/nix/var/nix/profiles/per-user/root/profile-3-link.tmp-47945-91487723' to '/nix/store/mds25w525q6wdmcz78clz7dpqw05bnj3-profile': Permission denied
I don't know if I've installed something incorrectly, or if I'm going about this the wrong way.
Hi!
I'm trying to follow the instructions for the full starter template with secrets management. However, I'm getting the following error:
$ nix run .#create-keys
Running create-keys for aarch64-darwin
/nix/store/n8qlll9v78ml2lwlp3f4yb0zq24mczsv-create-keys/bin/create-keys: line 4: /nix/store/s54dazbbdqhdc34i6cgd83d19rjjiq1f-source/apps/aarch64-darwin/create-keys: No such file or directory
/nix/store/n8qlll9v78ml2lwlp3f4yb0zq24mczsv-create-keys/bin/create-keys: line 4: exec: /nix/store/s54dazbbdqhdc34i6cgd83d19rjjiq1f-source/apps/aarch64-darwin/create-keys: cannot execute: No such file or directory
I'm following the guide using a new MacBook Pro with an M3 Max chip. Really new to nix on Darwin.
At first, I thought it might be because I installed nix (2.19.2) with the official installation method from https://nixos.org/download.html#nix-install-macos.
I deleted my previous nix installation, and used the instructions provided in this repo, that install an older version of nix. I'm getting the same error though...
Any hints?
Hi,
I've added two packages:
"koekeishiya/formulae/yabai"
"koekeishiya/formulae/skhd"
When running nix run .#build-switch
I'm getting:
Installing yabai
==> Tapping koekeishiya/formulae
fatal: could not create leading directories of '/usr/local/Homebrew/Library/Taps/koekeishiya/homebrew-formulae': Permission denied
Error: Failure while executing; `git clone https://github.com/koekeishiya/homebrew-formulae /usr/local/Homebrew/Library/Taps/koekeishiya/homebrew-formulae --origin=origin --template= --config core.fsmonitor=false` exited with 128.
Installing yabai has failed!
Installing skhd
==> Tapping koekeishiya/formulae
fatal: could not create leading directories of '/usr/local/Homebrew/Library/Taps/koekeishiya/homebrew-formulae': Permission denied
Error: Failure while executing; `git clone https://github.com/koekeishiya/homebrew-formulae /usr/local/Homebrew/Library/Taps/koekeishiya/homebrew-formulae --origin=origin --template= --config core.fsmonitor=false` exited with 128.
Installing skhd has failed!
Not sure why this is happening - any idea?
My Emacs configuration is two files; init.el and Emacs.org.
In my nix
configuration, I enable service.emacs
to run the daemon on both MacOS and NixOS. It works well, with natively compiled Emacs taboot.
However, I have to do manual fiddling to get everything to work. init.el is manually symlinked to my ~/.emacs
file, for example. This isn't in the spirit of immutable, reproducible code, which is the spirit of Nix and what I set out to build with this configuration.
So let's fix it.
This issue is to track the work to bring my Emacs.org
over to Nix 100%.
Would it be possible to automatically backup files via -b
flag to home-manager. Unfortunately I don't know how to add that into the darwin.lib.darwinSystem
or /apps/
directory.
I've been trying to wrap my head around a single git repo I can use to:
- Configure OSX (nix-darwin)
- Configure NixOS (looks like you have that)
- Configure my setup on random linux machines with just nix-shell that I have to use daily
Does this repo have support for the 3rd option? Say I'm stuck in redhat/ubuntu land and I want to have my same prompt and utilities available I like everywhere ... is your repo an approach I can take?
Thanks - otherwise it looks awesome.
Now that dockutil
works in MacOS 12.3+, we should reenable the code around this. It was previously commented out.
Link:
I want to add Stylix with the option to generate a wallpaper dynamically (See this option). But if I use this example:
stylix = {
image = config.lib.stylix.pixel "base0A";
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-latte.yaml";
};
I get the following error:
error: undefined variable 'config'
at /nix/store/lghn0x32saqcp5in1sw8jm04h2cvd4vv-source/flake.nix:90:25:
89| stylix = {
90| image = config.lib.stylix.pixel "base0A";
| ^
91| base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-latte.yaml";
How can I fix this?
I just tried to run step 10. to apply changes to my system (finally! =) Yes!) - however, I seem to have hit an issue with the macOS-sourced apps:
$ nix run .#build-switch
Running build-switch for aarch64-darwin
Starting build...
Switching to new generation...
warning: unknown setting 'upgrade-nix-store-path-url'
building the system configuration...
warning: unknown setting 'upgrade-nix-store-path-url'
Password:
Sorry, try again.
Password:
Sorry, try again.
Password:
warning: unknown setting 'upgrade-nix-store-path-url'
setting up /run via /etc/synthetic.conf...
setting up Homebrew (/opt/homebrew)...
user defaults...
setting up user launchd services...
Homebrew bundle...
Installing mas
Installing docker
Installing visual-studio-code
Installing discord
Installing zoom
Installing 1password
Error: No downloads began
No downloads
Installing 1password has failed!
Installing wireguard
Error: No downloads began
No downloads
Installing wireguard has failed!
Homebrew Bundle failed! 2 Brewfile dependencies failed to install.
During the install, I got this popup dialog:
![CleanShot 2024-05-27 at 12 58 08@2x](https://private-user-images.githubusercontent.com/243499/333944288-18250450-f0fd-45fc-9853-75d670aa09a1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMxOTQwNjQsIm5iZiI6MTcyMzE5Mzc2NCwicGF0aCI6Ii8yNDM0OTkvMzMzOTQ0Mjg4LTE4MjUwNDUwLWYwZmQtNDVmYy05ODUzLTc1ZDY3MGFhMDlhMS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgwOVQwODU2MDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zZWJmMWIzOWE4N2FmMWVlZWViODFmZDIyZjUzZTA2ZTc0NmE5OTY2ZDQ5ZmQzYjZjZmFhOThjNWMwYTQxZDE3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.PkXO3GCg837lU5PhXMAeO-3wCWJM_v1F4ATjHkLgLUY)
Do you know if this is expected? Or what's the workaround?
This prevents some of the auto-updating features to not work correctly. It was previously working before migrating my install over to using the nix-homebrew flake.
To re-install zoom, run:
brew reinstall --cask zoom
Installing appcleaner
Installing appcleaner cask. It is not currently installed.
Warning: Cask 'appcleaner' is already installed.
To re-install appcleaner, run:
brew reinstall --cask appcleaner
Installing syncthing
Installing syncthing cask. It is not currently installed.
Warning: Cask 'syncthing' is already installed.
To re-install syncthing, run:
brew reinstall --cask syncthing
Installing steam
Installing steam cask. It is not currently installed.
Warning: Cask 'steam' is already installed.
To re-install steam, run:
brew reinstall --cask steam
Installing vlc
Installing vlc cask. It is not currently installed.
Warning: Cask 'vlc' is already installed.
To re-install vlc, run:
brew reinstall --cask vlc
Installing raycast
Installing raycast cask. It is not currently installed.
Warning: Cask 'raycast' is already installed.
To re-install raycast, run:
brew reinstall --cask raycast
Installing asana
Installing asana cask. It is not currently installed.
Warning: Cask 'asana' is already installed.
To re-install asana, run:
brew reinstall --cask asana
Installing google-chrome
Installing google-chrome cask. It is not currently installed.
Warning: Cask 'google-chrome' is already installed.
To re-install google-chrome, run:
brew reinstall --cask google-chrome
Installing diffusionbee
Installing diffusionbee cask. It is not currently installed.
Warning: Cask 'diffusionbee' is already installed.
To re-install diffusionbee, run:
brew reinstall --cask diffusionbee
I get the following error when I try to build and switch my configuration:
Error: Your Homebrew is too outdated for `brew bundle`. Please run `brew update`!
But when I run brew update
I get the following error:
/nix/store/qkmybdpgm0xdmm1qnxx91sx09l3f4dij-source/.git: Permission denied
How can I fix this?
Thank you
First, thank you for sharing your config! I've been setting it up on MacOS and it's been great.
I wanted to test the config in a linux cloud environment so I consulted this list of NixOS friendly hosters and decided to try Gandi.net's base VPS. NixOS is actually an image option when setting up the VPS, which I thought was great.
Anyway, when I run the install command (without secrets) ...
sudo nix run --extra-experimental-features 'nix-command flakes' github:dustinlyons/nixos-config#install
... I run into some issues that seem to corrupt the filesystem/server. I've included the logs below. A couple things that stood out to me were umount: /mnt: not found
and umount: /nix/store: target is busy
, which seems to indicate there was a problem unmounting directories (because they're in use or weren't mounted successfully).
Another thing to note is the boot drive type for the VPS is xvd. I checked disko
to make sure that xvd is also supported and it looks like support was added last year.
If this is a disko
issue, I apologize. I can create an issue over there if so.
Here are the logs from running the install command. I've excluded the beginning of the logs before apply
is called.
Found primary network interface enX0
\033[1;33mYou're running as root. Please enter your desired username: \033[0m
ryansnyder
\033[1;33mPlease enter your email: \033[0m
[email protected]
\033[1;33mPlease enter your name: \033[0m
Ryan Snyder
\033[1;33mPlease enter a hostname for the system: \033[0m
nixos-playground
\033[1;33mAvailable disks:\033[0m
xvda 25G
\033[0;31mWARNING: All data on the chosen disk will be erased during the installation!\033[0m
\033[1;33mPlease choose your boot disk (e.g., nvme0n1, sda): \033[0m
xvda
\033[1;33mYou have selected xvda as the boot disk. This will delete everything on this disk. Are you sure? (Y/N): \033[0m
Y
\033[0;32mUsername: ryansnyder
Email: [email protected]
Name: Ryan Snyder\033[0m
\033[0;32mPrimary interface: enX0
Boot disk: xvda
Hostname: nixos-playground\033[0m
\033[1;33mIs this correct? (Y/N): \033[0m
Y
\033[0;32mContinuing...\033[0m
\033[0;32mUser ryansnyder information applied.\033[0m
+ '[' '!' -f /tmp/username.txt ']'
++ cat /tmp/username.txt
+ export USERNAME=ryansnyder
+ USERNAME=ryansnyder
+ run_disko
+ sudo nix run --extra-experimental-features nix-command --extra-experimental-features flakes github:nix-community/disko -- --mode zap_create_mount ./modules/nixos/disk-config.nix
this derivation will be built:
/nix/store/zq74n48ndl7wvrl3rq027aja6dikhiqi-disko.drv
these 76 paths will be fetched (27.96 MiB download, 137.27 MiB unpacked):
/nix/store/072kqjmbhfrmziz5hbs499h6czw7w4pj-jq-1.7-lib
/nix/store/15wap48wv4rdm1jasvlncs7ivg8f3922-npth-1.6
/nix/store/16mv7ipba73qn6aads1r2x3vm11bq12x-gnupg-2.4.1
/nix/store/207d2mg23g6c28f8cpb471a9mc4h44iw-libnfnetlink-1.0.2
/nix/store/2yxxbsgclg2fx2picgnfi3f4x1vglq3v-audit-3.1.2
/nix/store/35p0hz5k0fl2fgcgdjxi138xix4bl299-util-linux-2.39.2-swap
/nix/store/3glzfq0m5pkjywc3a5kk1zi8p6dh35l9-libbsd-unstable-2023-04-29
/nix/store/3qkckv4scqwzf36nl8dy8rhx0j9mhh3d-shadow-4.14.2
/nix/store/3yd7qdyl9ix3layh3dlg99qmr9y1pqsq-json-c-0.16
/nix/store/43pl823dyb6g2i58rf5v71yszk6abfrc-unbound-1.19.0-lib
/nix/store/4h02i6q6hfvp5avk97lympf43zvnk2d0-util-linux-2.39.2-bin
/nix/store/4i1p5vr6iai2br2kq8d7mhwlllivf6g8-parted-3.6
/nix/store/4qlgccn3g3mfw3i0bjibkqhq59cs0rdm-libpcap-1.10.4
/nix/store/4r1k85y1cp857sy6ndak6327gajqrg45-jq-1.7
/nix/store/5pwqfff4cmk3f0w6qni8p6g3ja5diw1k-linux-pam-1.5.2
/nix/store/5pzhzzncm5w39hrsd4g024y3lf85m3ww-elfutils-0.190
/nix/store/5ri38niq6c90g33i8dw8wd5h16ab2l9w-jq-1.7-man
/nix/store/5rnczbi8hgzj79bgh23kzmq9aaljgnz1-kmod-31-lib
/nix/store/69jh5m8vlfifkrvzk3gwphfhbglv2a5z-db-4.8.30
/nix/store/6ivcrp3mzhav2sxn0c8ki5iipwp63cva-systemd-minimal-libs-254.6
/nix/store/762lfw3pylbyqpvfx61ldivb0n68a7q3-libmnl-1.0.5
/nix/store/7n7vhrxhlgr9qjr48zxwxmxm3d91x4s7-tcb-1.2
/nix/store/84i8hby69rhzcpd8bb8gs2ffhcshc2gj-util-linux-2.39.2-lib
/nix/store/8fmnax57pv1f2qnsx38ipkd7kp5b6ki6-dosfstools-4.2
/nix/store/8nv450f5vysch3pv2fvmmfb241aziik3-libassuan-2.5.6
/nix/store/90pxz1wkwlxd4abnjzbxz6ch25hxrcf6-libbpf-1.2.2
/nix/store/98cclz91d6mk2sh1dmvn9n34wca5bc2r-oniguruma-6.9.9-lib
/nix/store/992jdjy03684w846fg0h2bldnjh9v7bv-libcap-ng-0.8.3
/nix/store/9k3sphy2cwryxq1wpkmfprykg3gw4hyn-popt-1.19
/nix/store/9mr0pvccggsgdidpi80nyl8594mkkbza-libevent-2.1.12
/nix/store/9skmhnmgrxqnq5k64n1gn4mmxd0gw5ry-glibc-2.38-27-getent
/nix/store/a5gbjpq7fbvrxgj81a44nf08ab3rjv5l-util-linux-minimal-2.39.2-mount
/nix/store/b8rdg9m7rwka4nwn3rw2xb60hqcbnzra-p11-kit-0.25.3
/nix/store/bh4lz3c2n3qfbm2hhwjhnqcaxcjs2sm8-glibc-2.38-27-bin
/nix/store/cg2sr37b48p5djkf91jai2c6kigphvvp-util-linux-minimal-2.39.2-lib
/nix/store/d8d9599pqibwmil6cai7czqpmzqcv7ha-gptfdisk-1.0.9
/nix/store/dprzgza01whqv34apwvn16ax0qk5wvc1-getent-glibc-2.38-27
/nix/store/dz5hf9dx2660d1cqdz5a5kg3iihzkfky-jq-1.7-doc
/nix/store/h882slh5qapvd13cmdn27r3pgk3j7iyw-libgpg-error-1.47
/nix/store/h9v5cvh23sbhxhsdksgp0vz96pd7q25i-libnetfilter_conntrack-1.0.9
/nix/store/iglb2fmla149fbprj6fb18swfls033q4-libseccomp-2.5.4-lib
/nix/store/iidxwcyp8pqhrq3iji17shs4m6gin0kv-systemd-254.6
/nix/store/iwsavni1qjnrx4gx52l1d7zc67l4wjci-gnutls-3.8.2
/nix/store/j7fnaznwcxvd6sh5hivcdxhsfi834g9d-util-linux-2.39.2-mount
/nix/store/k0dkcbfnaq3jb07qamafazsw862xb475-lvm2-2.03.22-lib
/nix/store/l6l2q7c6xvlb44rxbkpajssz6cma2hwd-bash-interactive-5.2-p21
/nix/store/lbydzhxxywg3kk4y34yl0f09nwwxiik5-gmp-with-cxx-6.3.0
/nix/store/lmj8lfkd8h448grf1nf92lsm5gm2fnf6-libcap-2.69-lib
/nix/store/lmyd230scwqrkym7f5b5y74gn1lmq4gr-util-linux-minimal-2.39.2-login
/nix/store/lzd1lanwicgs3k4wnl7pms0w7dbi10mk-nettle-3.9.1
/nix/store/mfcqapbv8qls5fdyk7jp52g8yjhh1yq7-e2fsprogs-1.47.0
/nix/store/mjsfijxvrynlznpdyqwvgg6mzg4w4wh7-libtasn1-4.19.0
/nix/store/mv03xraqqqpgckj70cfjrv0ps6cg7a0f-libnftnl-1.2.6
/nix/store/p5gkxx84ck6gs5iy5hi9caimxl3r8zpj-libmd-1.1.0
/nix/store/p7ic21469hc43byj4lzjlp7ksa5ni1jp-libcbor-unstable-2023-01-29
/nix/store/pk2mck2nv2gmp0w7ra3nifvvj87w15s0-libfido2-1.14.0
/nix/store/ps2ml653c5bxm5q18whsg3rdvhvxray8-pcsclite-1.9.5
/nix/store/qir6rqd5jl9gl6h64n3729g76xkvf65d-libgcrypt-1.10.3
/nix/store/qp6kq2m0g4ml94jrb6kb0yy4x1z8wj35-kbd-2.6.3
/nix/store/svqgxg9q92mw6dpfy2r94pysq1vjn30h-systemd-minimal-254.6
/nix/store/v818n6imwi4n6gc4qlyyld0n25bf38gs-kmod-31
/nix/store/vvmm0a9g7wygwzw3rvvxjh1mi46lnw7c-util-linux-minimal-2.39.2-swap
/nix/store/vwpki5nihab5yssssd54kd8f5c32sg7f-lz4-1.9.4
/nix/store/w0rr0h1v1lfbjhm4blaqnkzi18wqcqvm-iptables-1.8.10
/nix/store/wp5c5sjlvm6nxavvs1prdnw5n41mgciq-libapparmor-3.1.6
/nix/store/wplzchq27f03b0ccw84wnxqpspnixwal-zstd-1.5.5-bin
/nix/store/x2p2v26yc23vn6xc9j1i8yvnqniwcp01-libargon2-20190702
/nix/store/xdmynnfk2f5c8z39wrh7h216lhh91bjq-jq-1.7-bin
/nix/store/xdrsf841kdlf95rxd3qy6yhi57s25krr-dns-root-data-2023-11-27
/nix/store/y2j4jzz73h9z5w295jjhd8z3agy4aizq-libmicrohttpd-0.9.71
/nix/store/y6rlcs6v3hjd090666g6yqdpc0wq9wgn-e2fsprogs-1.47.0-bin
/nix/store/yf0nkhph494py6049fb9031ls332bprc-cryptsetup-2.6.1
/nix/store/ys0bfhm36c2f3bzzgj82gn85cl52kggz-libnl-3.7.0
/nix/store/z8cfxl3ywb5knpag542lk6i8gw2yljnm-util-linux-2.39.2-login
/nix/store/zkgzs99lbmwpgkhqfg7ck0qnwy3dfsdr-kexec-tools-2.0.26
/nix/store/znnb7n9m1pr4j3nb1mv9x2bpmb8lzsx9-tpm2-tss-4.0.1
copying path '/nix/store/4r1k85y1cp857sy6ndak6327gajqrg45-jq-1.7' from 'https://cache.nixos.org'...
copying path '/nix/store/2yxxbsgclg2fx2picgnfi3f4x1vglq3v-audit-3.1.2' from 'https://cache.nixos.org'...
copying path '/nix/store/l6l2q7c6xvlb44rxbkpajssz6cma2hwd-bash-interactive-5.2-p21' from 'https://cache.nixos.org'...
copying path '/nix/store/69jh5m8vlfifkrvzk3gwphfhbglv2a5z-db-4.8.30' from 'https://cache.nixos.org'...
copying path '/nix/store/xdrsf841kdlf95rxd3qy6yhi57s25krr-dns-root-data-2023-11-27' from 'https://cache.nixos.org'...
copying path '/nix/store/8fmnax57pv1f2qnsx38ipkd7kp5b6ki6-dosfstools-4.2' from 'https://cache.nixos.org'...
copying path '/nix/store/5pzhzzncm5w39hrsd4g024y3lf85m3ww-elfutils-0.190' from 'https://cache.nixos.org'...
copying path '/nix/store/bh4lz3c2n3qfbm2hhwjhnqcaxcjs2sm8-glibc-2.38-27-bin' from 'https://cache.nixos.org'...
copying path '/nix/store/9skmhnmgrxqnq5k64n1gn4mmxd0gw5ry-glibc-2.38-27-getent' from 'https://cache.nixos.org'...
copying path '/nix/store/lbydzhxxywg3kk4y34yl0f09nwwxiik5-gmp-with-cxx-6.3.0' from 'https://cache.nixos.org'...
copying path '/nix/store/dprzgza01whqv34apwvn16ax0qk5wvc1-getent-glibc-2.38-27' from 'https://cache.nixos.org'...
copying path '/nix/store/dz5hf9dx2660d1cqdz5a5kg3iihzkfky-jq-1.7-doc' from 'https://cache.nixos.org'...
copying path '/nix/store/5ri38niq6c90g33i8dw8wd5h16ab2l9w-jq-1.7-man' from 'https://cache.nixos.org'...
copying path '/nix/store/3yd7qdyl9ix3layh3dlg99qmr9y1pqsq-json-c-0.16' from 'https://cache.nixos.org'...
copying path '/nix/store/zkgzs99lbmwpgkhqfg7ck0qnwy3dfsdr-kexec-tools-2.0.26' from 'https://cache.nixos.org'...
copying path '/nix/store/v818n6imwi4n6gc4qlyyld0n25bf38gs-kmod-31' from 'https://cache.nixos.org'...
copying path '/nix/store/5rnczbi8hgzj79bgh23kzmq9aaljgnz1-kmod-31-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/wp5c5sjlvm6nxavvs1prdnw5n41mgciq-libapparmor-3.1.6' from 'https://cache.nixos.org'...
copying path '/nix/store/x2p2v26yc23vn6xc9j1i8yvnqniwcp01-libargon2-20190702' from 'https://cache.nixos.org'...
copying path '/nix/store/90pxz1wkwlxd4abnjzbxz6ch25hxrcf6-libbpf-1.2.2' from 'https://cache.nixos.org'...
copying path '/nix/store/lmj8lfkd8h448grf1nf92lsm5gm2fnf6-libcap-2.69-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/992jdjy03684w846fg0h2bldnjh9v7bv-libcap-ng-0.8.3' from 'https://cache.nixos.org'...
copying path '/nix/store/p7ic21469hc43byj4lzjlp7ksa5ni1jp-libcbor-unstable-2023-01-29' from 'https://cache.nixos.org'...
copying path '/nix/store/9mr0pvccggsgdidpi80nyl8594mkkbza-libevent-2.1.12' from 'https://cache.nixos.org'...
copying path '/nix/store/h882slh5qapvd13cmdn27r3pgk3j7iyw-libgpg-error-1.47' from 'https://cache.nixos.org'...
copying path '/nix/store/p5gkxx84ck6gs5iy5hi9caimxl3r8zpj-libmd-1.1.0' from 'https://cache.nixos.org'...
copying path '/nix/store/8nv450f5vysch3pv2fvmmfb241aziik3-libassuan-2.5.6' from 'https://cache.nixos.org'...
copying path '/nix/store/3glzfq0m5pkjywc3a5kk1zi8p6dh35l9-libbsd-unstable-2023-04-29' from 'https://cache.nixos.org'...
copying path '/nix/store/qir6rqd5jl9gl6h64n3729g76xkvf65d-libgcrypt-1.10.3' from 'https://cache.nixos.org'...
copying path '/nix/store/762lfw3pylbyqpvfx61ldivb0n68a7q3-libmnl-1.0.5' from 'https://cache.nixos.org'...
copying path '/nix/store/207d2mg23g6c28f8cpb471a9mc4h44iw-libnfnetlink-1.0.2' from 'https://cache.nixos.org'...
copying path '/nix/store/mv03xraqqqpgckj70cfjrv0ps6cg7a0f-libnftnl-1.2.6' from 'https://cache.nixos.org'...
copying path '/nix/store/h9v5cvh23sbhxhsdksgp0vz96pd7q25i-libnetfilter_conntrack-1.0.9' from 'https://cache.nixos.org'...
copying path '/nix/store/ys0bfhm36c2f3bzzgj82gn85cl52kggz-libnl-3.7.0' from 'https://cache.nixos.org'...
copying path '/nix/store/iglb2fmla149fbprj6fb18swfls033q4-libseccomp-2.5.4-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/4qlgccn3g3mfw3i0bjibkqhq59cs0rdm-libpcap-1.10.4' from 'https://cache.nixos.org'...
copying path '/nix/store/mjsfijxvrynlznpdyqwvgg6mzg4w4wh7-libtasn1-4.19.0' from 'https://cache.nixos.org'...
copying path '/nix/store/w0rr0h1v1lfbjhm4blaqnkzi18wqcqvm-iptables-1.8.10' from 'https://cache.nixos.org'...
copying path '/nix/store/5pwqfff4cmk3f0w6qni8p6g3ja5diw1k-linux-pam-1.5.2' from 'https://cache.nixos.org'...
copying path '/nix/store/vwpki5nihab5yssssd54kd8f5c32sg7f-lz4-1.9.4' from 'https://cache.nixos.org'...
copying path '/nix/store/lzd1lanwicgs3k4wnl7pms0w7dbi10mk-nettle-3.9.1' from 'https://cache.nixos.org'...
copying path '/nix/store/15wap48wv4rdm1jasvlncs7ivg8f3922-npth-1.6' from 'https://cache.nixos.org'...
copying path '/nix/store/98cclz91d6mk2sh1dmvn9n34wca5bc2r-oniguruma-6.9.9-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/16mv7ipba73qn6aads1r2x3vm11bq12x-gnupg-2.4.1' from 'https://cache.nixos.org'...
copying path '/nix/store/072kqjmbhfrmziz5hbs499h6czw7w4pj-jq-1.7-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/b8rdg9m7rwka4nwn3rw2xb60hqcbnzra-p11-kit-0.25.3' from 'https://cache.nixos.org'...
copying path '/nix/store/xdmynnfk2f5c8z39wrh7h216lhh91bjq-jq-1.7-bin' from 'https://cache.nixos.org'...
copying path '/nix/store/ps2ml653c5bxm5q18whsg3rdvhvxray8-pcsclite-1.9.5' from 'https://cache.nixos.org'...
copying path '/nix/store/9k3sphy2cwryxq1wpkmfprykg3gw4hyn-popt-1.19' from 'https://cache.nixos.org'...
copying path '/nix/store/6ivcrp3mzhav2sxn0c8ki5iipwp63cva-systemd-minimal-libs-254.6' from 'https://cache.nixos.org'...
copying path '/nix/store/7n7vhrxhlgr9qjr48zxwxmxm3d91x4s7-tcb-1.2' from 'https://cache.nixos.org'...
copying path '/nix/store/pk2mck2nv2gmp0w7ra3nifvvj87w15s0-libfido2-1.14.0' from 'https://cache.nixos.org'...
copying path '/nix/store/k0dkcbfnaq3jb07qamafazsw862xb475-lvm2-2.03.22-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/3qkckv4scqwzf36nl8dy8rhx0j9mhh3d-shadow-4.14.2' from 'https://cache.nixos.org'...
copying path '/nix/store/43pl823dyb6g2i58rf5v71yszk6abfrc-unbound-1.19.0-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/84i8hby69rhzcpd8bb8gs2ffhcshc2gj-util-linux-2.39.2-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/iwsavni1qjnrx4gx52l1d7zc67l4wjci-gnutls-3.8.2' from 'https://cache.nixos.org'...
copying path '/nix/store/4i1p5vr6iai2br2kq8d7mhwlllivf6g8-parted-3.6' from 'https://cache.nixos.org'...
copying path '/nix/store/y2j4jzz73h9z5w295jjhd8z3agy4aizq-libmicrohttpd-0.9.71' from 'https://cache.nixos.org'...
copying path '/nix/store/z8cfxl3ywb5knpag542lk6i8gw2yljnm-util-linux-2.39.2-login' from 'https://cache.nixos.org'...
copying path '/nix/store/j7fnaznwcxvd6sh5hivcdxhsfi834g9d-util-linux-2.39.2-mount' from 'https://cache.nixos.org'...
copying path '/nix/store/35p0hz5k0fl2fgcgdjxi138xix4bl299-util-linux-2.39.2-swap' from 'https://cache.nixos.org'...
copying path '/nix/store/cg2sr37b48p5djkf91jai2c6kigphvvp-util-linux-minimal-2.39.2-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/lmyd230scwqrkym7f5b5y74gn1lmq4gr-util-linux-minimal-2.39.2-login' from 'https://cache.nixos.org'...
copying path '/nix/store/yf0nkhph494py6049fb9031ls332bprc-cryptsetup-2.6.1' from 'https://cache.nixos.org'...
copying path '/nix/store/mfcqapbv8qls5fdyk7jp52g8yjhh1yq7-e2fsprogs-1.47.0' from 'https://cache.nixos.org'...
copying path '/nix/store/d8d9599pqibwmil6cai7czqpmzqcv7ha-gptfdisk-1.0.9' from 'https://cache.nixos.org'...
copying path '/nix/store/y6rlcs6v3hjd090666g6yqdpc0wq9wgn-e2fsprogs-1.47.0-bin' from 'https://cache.nixos.org'...
copying path '/nix/store/znnb7n9m1pr4j3nb1mv9x2bpmb8lzsx9-tpm2-tss-4.0.1' from 'https://cache.nixos.org'...
copying path '/nix/store/a5gbjpq7fbvrxgj81a44nf08ab3rjv5l-util-linux-minimal-2.39.2-mount' from 'https://cache.nixos.org'...
copying path '/nix/store/vvmm0a9g7wygwzw3rvvxjh1mi46lnw7c-util-linux-minimal-2.39.2-swap' from 'https://cache.nixos.org'...
copying path '/nix/store/wplzchq27f03b0ccw84wnxqpspnixwal-zstd-1.5.5-bin' from 'https://cache.nixos.org'...
copying path '/nix/store/qp6kq2m0g4ml94jrb6kb0yy4x1z8wj35-kbd-2.6.3' from 'https://cache.nixos.org'...
copying path '/nix/store/iidxwcyp8pqhrq3iji17shs4m6gin0kv-systemd-254.6' from 'https://cache.nixos.org'...
copying path '/nix/store/svqgxg9q92mw6dpfy2r94pysq1vjn30h-systemd-minimal-254.6' from 'https://cache.nixos.org'...
copying path '/nix/store/4h02i6q6hfvp5avk97lympf43zvnk2d0-util-linux-2.39.2-bin' from 'https://cache.nixos.org'...
building '/nix/store/zq74n48ndl7wvrl3rq027aja6dikhiqi-disko.drv'...
umount: /mnt: not found
++ realpath /dev/xvda
+ disk=/dev/xvda
+ lsblk -a -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
loop0
loop1
loop2
loop3
loop4
loop5
loop6
loop7
xvda
└─xvda1 ext4 1.0 nixos f222513b-ded1-49fa-b591-20ce86a2fe7f 20.1G 13% /nix/store
/
+ bash -x
+ lsblk --output-all --json
++ dirname /nix/store/f722nll5akkkv155midnwli1jrrqq2bk-disk-deactivate/disk-deactivate
+ jq -r --arg disk_to_clear /dev/xvda -f /nix/store/f722nll5akkkv155midnwli1jrrqq2bk-disk-deactivate/disk-deactivate.jq
+ set -fu
+ umount -R /nix/store
umount: /nix/store: target is busy.
+ umount -R /
umount: /dev/pts: target is busy.
+ wipefs --all -f /dev/xvda1
/dev/xvda1: 2 bytes were erased at offset 0x00000438 (ext4): 53 ef
++ sed -nr 's/ +name: '\''(.*)'\''/\1/p'
++ zdb -l /dev/xvda
bash: line 5: zdb: command not found
+ zpool=
+ [[ -n '' ]]
+ unset zpool
+ wipefs --all -f /dev/xvda
/dev/xvda: 2 bytes were erased at offset 0x000001fe (dos): 55 aa
+ dd if=/dev/zero of=/dev/xvda bs=440 count=1
1+0 records in
1+0 records out
440 bytes copied, 0.00373755 s, 118 kB/s
+ lsblk -a -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
loop0
loop1
loop2
loop3
loop4
loop5
loop6
loop7
xvda
└─xvda1 ext4 1.0 nixos f222513b-ded1-49fa-b591-20ce86a2fe7f 20.1G 13% /nix/store
/
++ mktemp -d
+ disko_devices_dir=/tmp/tmp.I3HOuftgoz
+ trap 'rm -rf "$disko_devices_dir"' EXIT
+ mkdir -p /tmp/tmp.I3HOuftgoz
+ device=/dev/xvda
+ imageSize=2G
+ name=vdb
+ type=disk
+ device=/dev/xvda
+ type=gpt
+ sgdisk --set-alignment=2048 --align-end --new=1:0:+100M --change-name=1:disk-vdb-ESP --typecode=1:EF00 /dev/xvda
Creating new GPT entries in memory.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.
+ partprobe /dev/xvda
/nix/store/k4rgz2yf5f04iplv4i5pizwsm3wnx24c-disko: line 82: 1809 Bus error partprobe /dev/xvda
+ rm -rf /tmp/tmp.I3HOuftgoz
/nix/store/k4rgz2yf5f04iplv4i5pizwsm3wnx24c-disko: line 1: rm: command not found
Hi. Thanks for maintaining this excellent repo. I am not using it directly, but it's guiding my own setup.
I ran into the problem that this is trying to handle:
|
# Check if the directory exists before running chmod |
|
if [ -d "/opt/homebrew/Library/Taps" ]; then |
|
sudo /bin/chmod +a "dustin allow list,add_file,search,delete,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown" /opt/homebrew/Library/Taps/homebrew/ |
|
else |
|
echo "${RED}The directory /opt/homebrew/Library/Taps/homebrew/ does not exist. Skipping chmod.${CLEAR}" |
|
fi |
And found this discussion here zhaofengli/nix-homebrew#9 (comment). I followed the suggestion about tapping homebrew-bundle in nix, and it works. This seems like a better approach than what darwin-build
is doing, as far as my understanding of the situation goes 🌞.
So, maybe you want to do the same; this is just FYI.
Hi.
Found your repo when I was researching into nix as a package manager for macOS. Thought I'd give it a shot so been following your README to test out on my Mac Studio M1.
I've tripped across this error that I can't seem to find an answer for when searching and not having the experience in nix having some difficulties in trying to resolve.
I'm running off your starter script and the error I get is when I come to run "nix run .#build" it gives me this:
Running build for aarch64-darwin
Starting build...
error:
… while calling the 'derivationStrict' builtin
at <nix/derivation-internal.nix>:9:12:
8|
9| strict = derivationStrict drvAttrs;
| ^
10|
… while evaluating derivation 'darwin-system-24.05.20240502.63c3a29+darwin4.230a197'
whose name attribute is located at /nix/store/p69bcs7ma6ijj8v9xsrg3nq3nn8ryn95-source/pkgs/stdenv/generic/make-derivation.nix:331:7
… while evaluating attribute 'activationScript' of derivation 'darwin-system-24.05.20240502.63c3a29+darwin4.230a197'
at /nix/store/a21fcz0fgrixwrcxw63xccrzjhb6xnym-source/modules/system/default.nix:95:7:
94|
95| activationScript = cfg.activationScripts.script.text;
| ^
96| activationUserScript = cfg.activationScripts.userScript.text;
(stack trace truncated; use '--show-trace' to show the full trace)
error: nixVersions.unstable has been removed. For bleeding edge (Nix master, roughly weekly updated) use nixVersions.git, otherwise use nixVersions.latest.
Are you able to offer any insight?
Thanks.
Hi!
I tried the instructions in the README
on a fresh install of macOS 13.5 on a 2022 M2 MacBook Air and ran into the following error:
% bin/build
Requesting sudo to set homebrew tap permissions...
Starting build...
Switching to new generation...
building the system configuration...
setting up Homebrew (/opt/homebrew)...
Error: An existing /opt/homebrew/Library/Taps is in the way
Removing /opt/homebrew/Library/Taps
(or even all of /opt/homebrew
) seems to have no effect.
Bring in declarative private keys, root passwords, etc. via a secrets module using simple .gitignore.
Example: adamlwgriffiths repo
Problem:
Testing failure, un-modified main branch nix deployment on a clean mac OS.
Reproduce:
- Follow instructions for macos setup found in dustinlyons/nixos-config/README.md
- Observe failure to build flake
note: expandable logs included below [1][2][3]
Logs
CLICK TO EXPAND LOGS [1]> nix-shell -p nix-info --run "nix-info -m"
dustin@Dustins-MBP> nix-shell -p nix-info --run "nix-info -m". ~/nixos-config
- system: `"aarch64-darwin"`
- host os: `Darwin 22.5.0, macOS 13.4.1`
- multi-user?: `yes`
- sandbox: `no`
- version: `nix-env (Nix) 2.15.1`
- channels(root): `"nixpkgs"`
- nixpkgs: `/Users/dustin/.nix-defexpr/channels/nixpkgs`
CLICK TO EXPAND LOGS [2]> ./bin/build
dustin@Dustins-MBP> ./bin/build ~/nixos-config
+ VERSION=1.0
+ GREEN='\033[1;32m'
+ RED='\033[1;31m'
+ CLEAR='\033[0m'
+ FLAKE=Dustins-MBP
+ SYSTEM=darwinConfigurations.Dustins-MBP.system
+ export NIXPKGS_ALLOW_UNFREE=1
+ NIXPKGS_ALLOW_UNFREE=1
+++ readlink -f ./bin/darwin-build
++ dirname /Users/dustin/nixos-config/bin/darwin-build
+ cd /Users/dustin/nixos-config/bin
+ cd ..
+ echo '\033[1;32mStarting...\033[0m'
Starting...
+ nix --experimental-features 'nix-command flakes' build .#darwinConfigurations.Dustins-MBP.system --impure
error:
… while evaluating the attribute 'value'
at /nix/store/w9py11if12n2z4nvdgmwcarry9vclc58-source/lib/modules.nix:768:9:
767| in warnDeprecation opt //
768| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
769| inherit (res.defsFinal') highestPrio;
… while calling the 'addErrorContext' builtin
at /nix/store/w9py11if12n2z4nvdgmwcarry9vclc58-source/lib/modules.nix:768:17:
767| in warnDeprecation opt //
768| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
769| inherit (res.defsFinal') highestPrio;
(stack trace truncated; use '--show-trace' to show the full trace)
error: The option `home-manager.users.dustin.home.stateVersion' is used but not defined.
CLICK TO EXPAND LOGS [3]> nix build --show-trace
dustin@Dustins-MBP> nix --experimental-features 'nix-command flakes' build .#darwinConfigurations.Dustins-MBP.system --impure --show-trace 2>&1 | tee /tmp/log
error:
… while evaluating the attribute 'config.system.build.toplevel'
at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:320:9:
319| options = checked options;
320| config = checked (removeAttrs config [ "_module" ]);
| ^
321| _module = checked (config._module);
… while calling the 'seq' builtin
at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:320:18:
319| options = checked options;
320| config = checked (removeAttrs config [ "_module" ]);
| ^
321| _module = checked (config._module);
… while evaluating a branch condition
at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:261:9:
260| checkUnmatched =
261| if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [] then
| ^
262| let
… in the left operand of the AND (&&) operator
at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:261:72:
260| checkUnmatched =
261| if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [] then
| ^
262| let
… in the left operand of the AND (&&) operator
at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:261:33:
260| checkUnmatched =
261| if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [] then
| ^
262| let
… while evaluating a branch condition
at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:254:12:
253|
254| in if declaredConfig._module.freeformType == null then declaredConfig
| ^
255| # Because all definitions that had an associated option ended in
… from call site
at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:242:28:
241| # For definitions that have an associated option
242| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
243|
… while calling 'mapAttrsRecursiveCond'
at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/attrsets.nix:594:5:
593| # Attribute set to recursively map over.
594| set:
| ^
595| let
… from call site
at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:234:33:
233| ({ inherit lib options config specialArgs; } // specialArgs);
234| in mergeModules prefix (reverseList collected);
| ^
235|
… while calling 'reverseList'
at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/lists.nix:436:17:
435| */
436| reverseList = xs:
| ^
437| let l = length xs; in genList (n: elemAt xs (l - n - 1)) l;
… from call site
at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:229:25:
228| merged =
229| let collected = collectModules
| ^
230| class
… while calling anonymous lambda
at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:443:37:
442|
443| in modulesPath: initialModules: args:
| ^
444| filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);
… from call site
at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:444:7:
443| in modulesPath: initialModules: args:
444| filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);
| ^
445|
… while calling 'filterModules'
at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:411:36:
410| # modules recursively. It returns the final list of unique-by-key modules
411| filterModules = modulesPath: { disabled, modules }:
| ^
412| let
… while calling anonymous lambda
at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:437:31:
436| disabledKeys = concatMap ({ file, disabled }: map (moduleKey file) disabled) disabled;
437| keyFilter = filter (attrs: ! elem attrs.key disabledKeys);
| ^
438| in map (attrs: attrs.module) (builtins.genericClosure {
… from call site
at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:398:22:
397| let
398| module = checkModule (loadModule args parentFile "${parentKey}:anon-${toString n}" x);
| ^
399| collectedImports = collectStructuredModules module._file module.key module.imports args;
… while calling anonymous lambda
at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:363:11:
362| else
363| m: m;
| ^
364|
… from call site
at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:398:35:
397| let
398| module = checkModule (loadModule args parentFile "${parentKey}:anon-${toString n}" x);
| ^
399| collectedImports = collectStructuredModules module._file module.key module.imports args;
… while calling 'loadModule'
at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:334:53:
333| # Like unifyModuleSyntax, but also imports paths and calls functions if necessary
334| loadModule = args: fallbackFile: fallbackKey: m:
| ^
335| if isFunction m then
… from call site
at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:335:12:
334| loadModule = args: fallbackFile: fallbackKey: m:
335| if isFunction m then
| ^
336| unifyModuleSyntax fallbackFile fallbackKey (applyModuleArgs fallbackKey m args)
… while calling 'isFunction'
at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/trivial.nix:448:16:
447| */
448| isFunction = f: builtins.isFunction f ||
| ^
449| (f ? __functor && isFunction (f.__functor f));
error: file 'home-manager/nix-darwin' was not found in the Nix search path (add it using $NIX_PATH or -I)
at «none»:0: (source not available)
Hi there, thanks for providing this incredible Nix config file on macOS! I have always wanted to try Nix on my Mac (aarch64), but I am a bit afraid of the steep learning curve, and this config will go a long way in alleviating that concern.
However, the instructions in the README seem tailored to install the configuration on a brand-new MacOS installation. Is migrating from an in-use-for-years config supported now?
For context, my computer currently has ~400 Homebrew core packages and ~100 Casks installed. Ideally, all the core packages should be migrated to use the Nixpkgs version, but the Casks should remain untouched. How should I approach the installation?
- Should I simply dump all my installed casks into
modules/darwin/casks.nix
, then migrate the Core packages by installing the Nixpkgs version and removing them from Homebrew one by one?
- How will
nix run .#build
affect the existing /opt/homebrew
installation? I'd assume it will not touch it since all the packages will be under /nix
, but what about the specified casks in modules/darwin/casks.nix
? Will they also reside in /nix
and be linked to Applications, or will they reuse the existing installed cask files?
Thanks for the hard work in advance!
Hello, I'm currently trying to install emacs-plus using the Homebrew tap, but it seems that the tap is not functioning properly.
Is there any part that I might have set up incorrectly?
Info
Env: M3 Pro Mackbook
Error
nix run .#build-switch
Warning: 'emacs-plus@30' formula is unreadable: No available formula with the name "emacs-plus@30".
Installing emacs-plus@30
Warning: 'emacs-plus@30' formula is unreadable: No available formula with the name "emacs-plus@30".
/opt/homebrew/bin/brew tap
d12frosted/emacs-plus
homebrew/bundle
homebrew/cask
homebrew/core
flake.nix
# inputs
homebrew-emacs-plus = {
url = "github:d12frosted/homebrew-emacs-plus";
flake = false;
};
### outputs darwinConfigurations
macos = darwin.lib.darwinSystem {
system = "aarch64-darwin";
specialArgs = inputs;
modules = [
home-manager.darwinModules.home-manager
nix-homebrew.darwinModules.nix-homebrew
{
nix-homebrew = {
enable = true;
user = "${user}";
taps = {
"homebrew/homebrew-core" = homebrew-core;
"homebrew/homebrew-cask" = homebrew-cask;
"d12frosted/emacs-plus" = homebrew-emacs-plus;
"homebrew/homebrew-bundle" = homebrew-bundle;
};
mutableTaps = false;
autoMigrate = true;
};
}
./hosts/darwin
];
modules/darwin/brews.nix
homebrew = {
enable = true;
casks = pkgs.callPackage ./casks.nix {};
brews = [
{
name = "emacs-plus@30";
args = [
"with-mailutil"
"with-xwidgets"
"with-imagemagick"
"with-native-comp"
"with-poll"
];
}
];
I'm trying to follow the install guide in the README on a new box.
I'm at step 5. and running the following comman:
However, it seems to fail here:
Running apply for aarch64-darwin
Would you mind quickly starring my Github repo? yes/no [yes]:
yes
Please enter your email:
[email protected]
Please enter your name:
John Smith
Username: foobar
Email: [email protected]
Name: John Smith
Is this correct? yes/no:
yes
Invalid option. Exiting script.
However, there's no details on which part is the "invalid option".
Is it possible to find out what's going on here, or get some more verbose logging?
I'm trying to setup starter without secrets, but
- #apply asks for GitHub config anyways
- #build fails with what appears to be secret repo failure (of course, it doesn't exist)
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
warning: could not read HEAD ref from repo at 'ssh://[email protected]//.git', using 'master'
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
warning: could not update mtime for file '/Users/xxxx/.cache/nix/gitv3/1x7mdlzb2qbqf1vjp1i3w1vr6h3q3wa9q5b07jkbzrxi6rr0ymwk/refs/heads/master': No such file or directory
fatal: Refusing to point HEAD outside of refs/
warning: could not update cached head 'master' for 'ssh://[email protected]//.git'
error:
… while updating the lock file of flake 'path:/Users/xxxx/nixos-config?lastModified=1708284621&narHash=sha256-pLfyOdF1o%2Bggv0sCGI6aioVu6gKbz%2B3Ql16ms%2BY8Lwg%3D'
… while updating the flake input 'secrets'
… while fetching the input 'git+ssh://[email protected]//.git'
error: opening file '/Users/xxxx/.cache/nix/gitv3/1x7mdlzb2qbqf1vjp1i3w1vr6h3q3wa9q5b07jkbzrxi6rr0ymwk/refs/heads/master': No such file or directory
My disk's name is sda but the installer doesn't recognize it
...
+ sgdisk --set-alignment=2048 --align-end --new=1:0:+100M --change-name=1:disk-vdb-ESP --typecode=1:EF00 /dev/nvme0n1
Problem opening /dev/nvme0n1 for reading! Error is 2.
The specified file does not exist!
I am absolute noob with Nix.
I am following your tutorial. I am stuck at step 6
"6. Decide what packages to install"
Well, I decided to install Bash. I do nix-env -i bash
, I get
error: selector 'bash' matches no derivations
What should I do? All the tutorials I can find always assume I understand Nix :D
Hi 👋 Thanks for this excellent repository!
I wonder if you had any debugging advice for a nix-noob who is trying to set up nix on a fresh M2 MacBook Pro running Sonoma 14.1.1
I'm encountering an issue while running the build step of bin/build
. To my eyes it looks like glibc
isn't successfully building. It says the GNU C library is currently unavailable for this platform. I can see an entry for glibc on search.nixos.org (but, indeed, no darwin
support). It gets through to the configuring
phase
My question is: why do you think it is looking for glibc
when doing a build on darwin? I've tried a few things (clean reinstall, adding gnugrep and glibc to list of packages, using NixOS/nixpkgs - main and unstable) but am a bit hampered by my Nix ignorance here. Do you have any suggestions for how to address this?
Starting build...
warning: Git tree '/Users/iggy/nixos-config' is dirty
error: builder for '/nix/store/d20vsmbkvs93qcdhlaliig2g4bz38lsw-glibc-nolibgcc-2.38-23.drv' failed with exit code 1;
last 10 log lines:
[I've added in a few more log lines from nix log for extra context:
...
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
configure flags: --disable-static --prefix=/nix/store/csvckbkqpbcq61kriv05prznm2ln1y1c-glibc-nolibgcc-2.38-23 --bindir=/nix/store/s4i9zfnjadh2qxgb1qsa8ri4j1gavr4i-glibc-nolibgcc-2.38-23-bin/bin --sbindir=/nix/store/s4i9zfnjadh2qxgb1qsa>
configure: creating cache config.cache
checking build system type... aarch64-apple-darwin23.1.0
checking host system type... aarch64-apple-darwin23.1.0
checking for gcc... gcc
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking whether g++ can link programs... no
checking for sysdeps preconfigure fragments... aarch64 alpha arc arm csky hppa i386 loongarch m68k microblaze checking for grep that handles long lines and -e... /nix/store/kxbn7dv0i7p0ylsbr53j7z0gf45kim78-gnugrep-3.11/bin/grep]
> checking for egrep... /nix/store/kxbn7dv0i7p0ylsbr53j7z0gf45kim78-gnugrep-3.11/bin/grep -E
> mips nios2 or1k powerpc riscv s390 sh checking for grep that handles long lines and -e... (cached) /nix/store/kxbn7dv0i7p0ylsbr53j7z0gf45kim78-gnugrep-3.11/bin/grep
> checking for egrep... (cached) /nix/store/kxbn7dv0i7p0ylsbr53j7z0gf45kim78-gnugrep-3.11/bin/grep -E
> sparc x86_64
> configure: error:
> *** The GNU C library is currently unavailable for this platform.
> *** If you are interested in seeing glibc on this platform visit
> *** the "How to submit a new port" in the wiki:
> *** https://sourceware.org/glibc/wiki/#Development
> *** and join the community!
For full logs, run 'nix-store -l /nix/store/d20vsmbkvs93qcdhlaliig2g4bz38lsw-glibc-nolibgcc-2.38-23.drv'.
error: 1 dependencies of derivation '/nix/store/br1z6ln523bd2ngwv1q1il49wb864ril-home-manager-applications.drv' failed to build
error: 1 dependencies of derivation '/nix/store/728vr3w204fnsi0j7jhd70w5p429x5d3-home-manager-fonts.drv' failed to build
error: 1 dependencies of derivation '/nix/store/7538zh42mv1s7jh9rjpg13hhcj6vdal4-home-manager-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/g7k28kvkwmjxl5pmavryihhm0yd77x7a-system-applications.drv' failed to build
error: 1 dependencies of derivation '/nix/store/4n8k3dfx9h3g31lji33bma9jmmda2wbj-darwin-system-23.11.20231114.e5e3346+darwin4.e67f2bf.drv' failed to build
Currently, we run bin/apply
to ask the user for some info, and run a sed
replace function to replace various static tokens throughout the code.
These look like %USER%
, %HOST_NAME%
, etc. in the templates. We should clean these up so that it's defined once in flake.nix
, and that input is provided as part of building the system.
This might be due to the new-ness to all of this - but what is the proper way to update from your template, if we're partway through the install, or even after the install?
For example, there was a bug in the template that was fixed here.
However, I had already run this line previously (step 3 in the README):
mkdir -p nixos-config && cd nixos-config && nix flake --extra-experimental-features 'nix-command flakes' init -t github:dustinlyons/nixos-config#starter-with-secrets
When I checked ~/nixos-config, it wasn't a git directory - so I couldn't git pull (I assume this is by design?)
And running the last part of that command didn't work either, due to the existing files.
Is it possible to add a note to the README about the correct way to update from your template?
Hi!
I have seen the video posted in the README about updating "dependencies" with one command. I am not sure the video is updated neither that this instruction will upgrade my installed packages.
- I use to do a
nix flake update
, then I use git add .
(if I changed anything in my config), followed by nix run .#build-switch
.
- I don't have a
./bin/ build
file/directory. Is this somehow related to #40 ? Is the video oudated? I have a apps/aarch64-darwin/build
and apps/aarch64-darwin/build-switch
scripts though. Are these the ones that are supposed to upgrade my installed packages? It doesn't seem they are upgrading my packages (at least not the ones installed by using homebrew declaratively).
- I did a
brew upgrade && brew update && brew update --cask && brew cleanup
and it DID upgraded a bunch of outdated packages, that I have installed via nix-homebrew and related.
Lastly, how can I clean up/collect some of the garbage that could be outdated in my installation, just like I would do in a NixOS installation?
Context
GNOME has been sluggish and not as integrated into my workflow as I'd like.
- Trial a few new window managers (like bwspm)
- Add polybar
- Add rofi
- Add thunar
Context
I receive the following error when opening Emacs on my Macbook. Resolve this.
Warning (with-editor): Cannot determine a suitable Emacsclient
I need to debug the local path emacs
uses on MacOS to resolve this.
Another dumb noob question.
What is the purpose for asking name and email? Will that be used somewhere later?
Context
Deprecate my old dotfiles
repository in favor of home-manager
.
Review the following configs and add what is relevant. Delete the rest.
Polybar
Picom
Rofi
Tmux
Dunst
Hey @dustinlyons
here we go with the install log as mentioned in #21
directly after the installation I get the following
building the flake in path:/mnt/etc/nixos?lastModified=1699605049&narHash=sha256-bRfiuis%2fGf1RLZORbWPUaHmi%2f%2fAtOB74eG7q7Koytso=...
trace: warning: optionsDocBook is deprecated since 23.11 and will be removed in 24.05
trace: warning: optionsDocBook is deprecated since 23.11 and will be removed in 24.05
trace: warning: optionsDocBook is deprecated since 23.11 and will be removed in 24.05
installing the boot loader...
[agenix] creating new generation in /run/agenix.d/1
[agenix] decrypting secrets...
decrypting '/nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/github-signing-key.age' to '/home/tboston/.ssh/pgp_github.key'...
[agenix] WARNING: encrypted file /nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/github-signing-key.age does not exist!
Error: No such file or directory (os error 2)
[ Did rage not do what you expected? Could an error be more useful? ]
[ Tell us: https://str4d.xyz/rage/report ]
chmod: cannot access '/home/tboston/.ssh/pgp_github.key.tmp': No such file or directory
mv: cannot stat '/home/tboston/.ssh/pgp_github.key.tmp': No such file or directory
decrypting '/nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/github-ssh-key.age' to '/home/tboston/.ssh/id_github'...
[agenix] WARNING: encrypted file /nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/github-ssh-key.age does not exist!
Error: No such file or directory (os error 2)
[ Did rage not do what you expected? Could an error be more useful? ]
[ Tell us: https://str4d.xyz/rage/report ]
chmod: cannot access '/home/tboston/.ssh/id_github.tmp': No such file or directory
mv: cannot stat '/home/tboston/.ssh/id_github.tmp': No such file or directory
decrypting '/nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/felix-syncthing-cert.age' to '/run/agenix.d/1/syncthing-cert'...
[agenix] WARNING: encrypted file /nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/felix-syncthing-cert.age does not exist!
Error: No such file or directory (os error 2)
[ Did rage not do what you expected? Could an error be more useful? ]
[ Tell us: https://str4d.xyz/rage/report ]
chmod: cannot access '/run/agenix.d/1/syncthing-cert.tmp': No such file or directory
mv: cannot stat '/run/agenix.d/1/syncthing-cert.tmp': No such file or directory
decrypting '/nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/felix-syncthing-key.age' to '/run/agenix.d/1/syncthing-key'...
[agenix] WARNING: encrypted file /nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/felix-syncthing-key.age does not exist!
Error: No such file or directory (os error 2)
[ Did rage not do what you expected? Could an error be more useful? ]
[ Tell us: https://str4d.xyz/rage/report ]
chmod: cannot access '/run/agenix.d/1/syncthing-key.tmp': No such file or directory
mv: cannot stat '/run/agenix.d/1/syncthing-key.tmp': No such file or directory
[agenix] symlinking new secrets to /run/agenix (generation 1)...
Activation script snippet 'agenixInstall' failed (1)
[agenix] chowning...
chown: cannot access '/home/tboston/.ssh/pgp_github.key': No such file or directory
chown: cannot access '/home/tboston/.ssh/id_github': No such file or directory
chown: cannot access '/run/agenix.d/1/syncthing-cert': No such file or directory
chown: cannot access '/run/agenix.d/1/syncthing-key': No such file or directory
Activation script snippet 'agenixChown' failed (1)
setting up /etc...
Initializing machine ID from random generator.
Created "/boot/EFI".
Created "/boot/EFI/systemd".
Created "/boot/EFI/BOOT".
Created "/boot/loader".
Created "/boot/loader/entries".
Created "/boot/EFI/Linux".
Copied "/nix/store/vapnrxrw3b21c7ji61bmnbzl2cj1vl96-systemd-254.3/lib/systemd/boot/efi/systemd-bootx64.efi" to "/boot/EFI/systemd/systemd-bootx64.efi".
Copied "/nix/store/vapnrxrw3b21c7ji61bmnbzl2cj1vl96-systemd-254.3/lib/systemd/boot/efi/systemd-bootx64.efi" to "/boot/EFI/BOOT/BOOTX64.EFI".
⚠️ Mount point '/boot' which backs the random seed file is world accessible, which is a security hole! ⚠️
⚠️ Random seed file '/boot/loader/.#bootctlrandom-seed4ac3184e6c3f3b47' is world accessible, which is a security hole! ⚠️
Random seed file /boot/loader/random-seed successfully written (32 bytes).
Created EFI boot entry "Linux Boot Manager".
[agenix] creating new generation in /run/agenix.d/1
[agenix] decrypting secrets...
decrypting '/nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/github-signing-key.age' to '/home/tboston/.ssh/pgp_github.key'...
[agenix] WARNING: encrypted file /nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/github-signing-key.age does not exist!
Error: No such file or directory (os error 2)
[ Did rage not do what you expected? Could an error be more useful? ]
[ Tell us: https://str4d.xyz/rage/report ]
chmod: cannot access '/home/tboston/.ssh/pgp_github.key.tmp': No such file or directory
mv: cannot stat '/home/tboston/.ssh/pgp_github.key.tmp': No such file or directory
decrypting '/nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/github-ssh-key.age' to '/home/tboston/.ssh/id_github'...
[agenix] WARNING: encrypted file /nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/github-ssh-key.age does not exist!
Error: No such file or directory (os error 2)
[ Did rage not do what you expected? Could an error be more useful? ]
[ Tell us: https://str4d.xyz/rage/report ]
chmod: cannot access '/home/tboston/.ssh/id_github.tmp': No such file or directory
mv: cannot stat '/home/tboston/.ssh/id_github.tmp': No such file or directory
decrypting '/nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/felix-syncthing-cert.age' to '/run/agenix.d/1/syncthing-cert'...
[agenix] WARNING: encrypted file /nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/felix-syncthing-cert.age does not exist!
Error: No such file or directory (os error 2)
[ Did rage not do what you expected? Could an error be more useful? ]
[ Tell us: https://str4d.xyz/rage/report ]
chmod: cannot access '/run/agenix.d/1/syncthing-cert.tmp': No such file or directory
mv: cannot stat '/run/agenix.d/1/syncthing-cert.tmp': No such file or directory
decrypting '/nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/felix-syncthing-key.age' to '/run/agenix.d/1/syncthing-key'...
[agenix] WARNING: encrypted file /nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/felix-syncthing-key.age does not exist!
Error: No such file or directory (os error 2)
[ Did rage not do what you expected? Could an error be more useful? ]
[ Tell us: https://str4d.xyz/rage/report ]
chmod: cannot access '/run/agenix.d/1/syncthing-key.tmp': No such file or directory
mv: cannot stat '/run/agenix.d/1/syncthing-key.tmp': No such file or directory
[agenix] symlinking new secrets to /run/agenix (generation 1)...
Activation script snippet 'agenixInstall' failed (1)
[agenix] chowning...
chown: cannot access '/home/tboston/.ssh/pgp_github.key': No such file or directory
chown: cannot access '/home/tboston/.ssh/id_github': No such file or directory
chown: cannot access '/run/agenix.d/1/syncthing-cert': No such file or directory
chown: cannot access '/run/agenix.d/1/syncthing-key': No such file or directory
Activation script snippet 'agenixChown' failed (1)
setting up /etc...
[agenix] creating new generation in /run/agenix.d/1
[agenix] decrypting secrets...
decrypting '/nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/github-signing-key.age' to '/home/tboston/.ssh/pgp_github.key'...
[agenix] WARNING: encrypted file /nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/github-signing-key.age does not exist!
Error: No such file or directory (os error 2)
[ Did rage not do what you expected? Could an error be more useful? ]
[ Tell us: https://str4d.xyz/rage/report ]
chmod: cannot access '/home/tboston/.ssh/pgp_github.key.tmp': No such file or directory
mv: cannot stat '/home/tboston/.ssh/pgp_github.key.tmp': No such file or directory
decrypting '/nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/github-ssh-key.age' to '/home/tboston/.ssh/id_github'...
[agenix] WARNING: encrypted file /nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/github-ssh-key.age does not exist!
Error: No such file or directory (os error 2)
[ Did rage not do what you expected? Could an error be more useful? ]
[ Tell us: https://str4d.xyz/rage/report ]
chmod: cannot access '/home/tboston/.ssh/id_github.tmp': No such file or directory
mv: cannot stat '/home/tboston/.ssh/id_github.tmp': No such file or directory
decrypting '/nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/felix-syncthing-cert.age' to '/run/agenix.d/1/syncthing-cert'...
[agenix] WARNING: encrypted file /nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/felix-syncthing-cert.age does not exist!
Error: No such file or directory (os error 2)
[ Did rage not do what you expected? Could an error be more useful? ]
[ Tell us: https://str4d.xyz/rage/report ]
chmod: cannot access '/run/agenix.d/1/syncthing-cert.tmp': No such file or directory
mv: cannot stat '/run/agenix.d/1/syncthing-cert.tmp': No such file or directory
decrypting '/nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/felix-syncthing-key.age' to '/run/agenix.d/1/syncthing-key'...
[agenix] WARNING: encrypted file /nix/store/6jcbnjr4298701njnnj4gyi289fh22h9-source/felix-syncthing-key.age does not exist!
Error: No such file or directory (os error 2)
[ Did rage not do what you expected? Could an error be more useful? ]
[ Tell us: https://str4d.xyz/rage/report ]
chmod: cannot access '/run/agenix.d/1/syncthing-key.tmp': No such file or directory
mv: cannot stat '/run/agenix.d/1/syncthing-key.tmp': No such file or directory
[agenix] symlinking new secrets to /run/agenix (generation 1)...
Activation script snippet 'agenixInstall' failed (1)
[agenix] chowning...
chown: cannot access '/home/tboston/.ssh/pgp_github.key': No such file or directory
chown: cannot access '/home/tboston/.ssh/id_github': No such file or directory
chown: cannot access '/run/agenix.d/1/syncthing-cert': No such file or directory
chown: cannot access '/run/agenix.d/1/syncthing-key': No such file or directory
Activation script snippet 'agenixChown' failed (1)
setting up /etc...
setting root password...
New password:
Retype new password:
passwd: password updated successfully
installation finished!
+ sudo chmod -R 775 /mnt/etc/nixos
+ cleanup
+ rm -rf nixos-config-main.zip nixos-config-main nixos-config
+ prompt_reboot
+ read -p 'Do you want to reboot now? (y/yes) ' choice
Do you want to reboot now? (y/yes)
Maybe you wanna look into that first. I'll keep the laptop running for now in this stage.
Hi,
I'm trying to install the config on nix 2.20.1. on macOS. nix run .#apply fails:
error: experimental Nix feature 'nix-command' is disabled; add '--extra-experimental-features nix-command' to enable it
This seems to work:
nix --extra-experimental-features 'nix-command flakes' run .#apply
When calling bin/build
I get the following error
~/dev via v21.1.0 via 🐦
❯ mkdir -p nixos-config
~/dev via v21.1.0 via 🐦
❯ cd nixos-config && nix flake init -t github:dustinlyons/nixos-config#starte
error: experimental Nix feature 'nix-command' is disabled; use '--extra-experimental-features nix-command' to override
~/dev/nixos-config
❯ nix flake --extra-experimental-features nix-command --extra-experimental-features flakes init -t github:dustinlyons/nixos-config#starter
wrote: /Users/olafur/dev/nixos-config/bin/apply
wrote: /Users/olafur/dev/nixos-config/bin/nixos-build
wrote: /Users/olafur/dev/nixos-config/bin/darwin-build
wrote: /Users/olafur/dev/nixos-config/bin/build
wrote: /Users/olafur/dev/nixos-config/bin
wrote: /Users/olafur/dev/nixos-config/overlays/README.md
wrote: /Users/olafur/dev/nixos-config/overlays
wrote: /Users/olafur/dev/nixos-config/shared/home-manager.nix
wrote: /Users/olafur/dev/nixos-config/shared/files.nix
wrote: /Users/olafur/dev/nixos-config/shared/config/p10k.zsh
wrote: /Users/olafur/dev/nixos-config/shared/config/emacs/config.org
wrote: /Users/olafur/dev/nixos-config/shared/config/emacs/init.el
wrote: /Users/olafur/dev/nixos-config/shared/config/emacs/.gitignore
wrote: /Users/olafur/dev/nixos-config/shared/config/emacs
wrote: /Users/olafur/dev/nixos-config/shared/config
wrote: /Users/olafur/dev/nixos-config/shared/README.md
wrote: /Users/olafur/dev/nixos-config/shared/default.nix
wrote: /Users/olafur/dev/nixos-config/shared/packages.nix
wrote: /Users/olafur/dev/nixos-config/shared/cachix/default.nix
wrote: /Users/olafur/dev/nixos-config/shared/cachix
wrote: /Users/olafur/dev/nixos-config/shared
wrote: /Users/olafur/dev/nixos-config/flake.nix
wrote: /Users/olafur/dev/nixos-config/nixos/home-manager.nix
wrote: /Users/olafur/dev/nixos-config/nixos/disk-config.nix
wrote: /Users/olafur/dev/nixos-config/nixos/files.nix
wrote: /Users/olafur/dev/nixos-config/nixos/config/login-wallpaper.png
wrote: /Users/olafur/dev/nixos-config/nixos/config/rofi/launcher.rasi
wrote: /Users/olafur/dev/nixos-config/nixos/config/rofi/colors.rasi
wrote: /Users/olafur/dev/nixos-config/nixos/config/rofi/confirm.rasi
wrote: /Users/olafur/dev/nixos-config/nixos/config/rofi/message.rasi
wrote: /Users/olafur/dev/nixos-config/nixos/config/rofi/powermenu.rasi
wrote: /Users/olafur/dev/nixos-config/nixos/config/rofi/styles.rasi
wrote: /Users/olafur/dev/nixos-config/nixos/config/rofi/networkmenu.rasi
wrote: /Users/olafur/dev/nixos-config/nixos/config/rofi
wrote: /Users/olafur/dev/nixos-config/nixos/config/polybar/modules.ini
wrote: /Users/olafur/dev/nixos-config/nixos/config/polybar/bars.ini
wrote: /Users/olafur/dev/nixos-config/nixos/config/polybar/config.ini
wrote: /Users/olafur/dev/nixos-config/nixos/config/polybar/colors.ini
wrote: /Users/olafur/dev/nixos-config/nixos/config/polybar/user_modules.ini
wrote: /Users/olafur/dev/nixos-config/nixos/config/polybar
wrote: /Users/olafur/dev/nixos-config/nixos/config
wrote: /Users/olafur/dev/nixos-config/nixos/README.md
wrote: /Users/olafur/dev/nixos-config/nixos/default.nix
wrote: /Users/olafur/dev/nixos-config/nixos/packages.nix
wrote: /Users/olafur/dev/nixos-config/nixos
wrote: /Users/olafur/dev/nixos-config/darwin/home-manager.nix
wrote: /Users/olafur/dev/nixos-config/darwin/files.nix
wrote: /Users/olafur/dev/nixos-config/darwin/casks.nix
wrote: /Users/olafur/dev/nixos-config/darwin/README.md
wrote: /Users/olafur/dev/nixos-config/darwin/default.nix
wrote: /Users/olafur/dev/nixos-config/darwin/packages.nix
wrote: /Users/olafur/dev/nixos-config/darwin/dock/default.nix
wrote: /Users/olafur/dev/nixos-config/darwin/dock
wrote: /Users/olafur/dev/nixos-config/darwin
~/dev/nixos-config
❯ chmod +x bin/apply && bin/apply
\033[0;32mUsername: xxx
Email: [email protected]
Name: xxx\033[0m
\033[1;33mIs this correct? (Y/N): \033[0m
Y
\033[0;32mContinuing...\033[0m
\033[0;32mUser xxx information applied.\033[0m
~/dev/nixos-config took 2s
❯ sudo mv /etc/nix/nix.conf /etc/nix/nix.conf.before-nix-darwin
Password:
mv: rename /etc/nix/nix.conf to /etc/nix/nix.conf.before-nix-darwin: No such file or directory
~/dev/nixos-config took 2s
❯ chmod +x bin/darwin-build && chmod +x bin/build && bin/build
Starting build...
warning: creating lock file '/Users/olafur/dev/nixos-config/flake.lock'
error: flake 'path:/Users/olafur/dev/nixos-config' does not provide attribute 'packages.aarch64-darwin.darwinConfigurations.Dustins-MBP.system', 'legacyPackages.aarch64-darwin.darwinConfigurations.Dustins-MBP.system' or 'darwinConfigurations.Dustins-MBP.system'
Chained chmod
commands are broken:
current:
chmod +x apps/aarch64-darwin/apply && chmod +x apps/aarch64-darwin/build chmod +x apps/aarch64-darwin/build-switch
should:
chmod +x apps/aarch64-darwin/apply && chmod +x apps/aarch64-darwin/build && chmod +x apps/aarch64-darwin/build-switch
see ampersands between the second and the third chmod
.
After running the command in step 2., I then attempted to run the command in step 3. Initialise a starter template:
foobar:~ foobar$ mkdir -p nixos-config && cd nixos-config && nix flake --extra-experimental-features 'nix-command flakes' init -t github:dustinlyons/nixos-config#starter
-bash: nix: command not found
It seems I need to restart the shell for it to work (I assume for the PATH)
Should this be mentioned in the README? Or maybe just explicitly add the command to reload the PATH?
Also - the actual command above (for step 3). gives a relative path - is the implication that nixos-config
should live under $HOME
? Or is that meant to be up to the user? Might be worth making that a bit more explicit.
Recommend Projects
-
-
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
An Open Source Machine Learning Framework for Everyone
-
The Web framework for perfectionists with deadlines.
-
A PHP framework for web artisans
-
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
Some thing interesting about web. New door for the world.
-
A server is a program made to process requests and deliver data to clients.
-
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Some thing interesting about visualization, use data art
-
Some thing interesting about game, make everyone happy.
-
Recommend Org
-
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Open source projects and samples from Microsoft.
-
Google ❤️ Open Source for everyone.
-
Alibaba Open Source for everyone
-
Data-Driven Documents codes.
-
China tencent open source team.
-