Comments (25)
Another issue is that username dustin
is hardcoded inside darwin/files.nix
and is not changes when calling bin/apply
Calling nix build .#darwinConfigurations.macos.system && ./result/sw/bin/darwin-rebuild switch --flake .#macos
worked after changing dustin
to my own username.
from nixos-config.
Thanks for letting me know! I think I introduced a recent regression when making changes. I'll fix this in a few hours.
from nixos-config.
These should all be fixed now. Let me know if that's not the case.
I also updated the commands in the docs for the errors you pointed out. Thanks again, this helps a ton!
from nixos-config.
Thank you for the update Dustin!
Unfortunately I had to break the experimental flags into two
nix flake --extra-experimental-features nix-command --extra-experimental-features flakes init -t github:dustinlyons/nixos-config#starter
Otherwise I get the following error:
dustinlyons-nixos-config/nixos-config on ξ main
β― nix flake '--extra-experimental-features nix-command flakes' init -t github:dustinlyons/nixos-config#starter
error: unrecognised flag '--extra-experimental-features nix-command flakes'
Try 'nix --help' for more information.
from nixos-config.
I am not able to build using ./bin/build
dustinlyons-nixos-config/nixos-config on ξ main [?]
β― pwd
/Users/olafur/dev/dustinlyons-nixos-config/nixos-config
dustinlyons-nixos-config/nixos-config on ξ main [?]
β― chmod +x bin/apply && bin/apply
Username: olafur
Email: [email protected]
Name: Γlafur Bjarki Bogason
Is this correct? (Y/N):
y
Continuing...
User olafur information applied.
dustinlyons-nixos-config/nixos-config on ξ main [?]
β― [ -f /etc/nix/nix.conf ] && sudo mv /etc/nix/nix.conf /etc/nix/nix.conf.before-nix-darwin
dustinlyons-nixos-config/nixos-config on ξ main [?]
β― ls /etc/nix/
builder_ed25519 netrc nix.conf.before-nix-darwin@ registry.json@
builder_ed25519.pub nix.conf.before-nix-darwi nix.conf.before-nix-darwin2@
dustinlyons-nixos-config/nixos-config on ξ main [?]
β― chmod +x bin/darwin-build && chmod +x bin/build && bin/build
Starting build...
error: getting status of '/nix/store/g6pf2fqf9pwnz0mz94k1qbp51hq30803-source/nixos-config': No such file or directory
from nixos-config.
Can you try making your nixos-config a git repo, making an initial commit, then trying again?
from nixos-config.
Worked like a charm! Maybe include the git step in the tutorial too π Thank you again so much for this initiative, truly valuable!
Here is a GitHub repo I derived from your template.
Now however I am running into issues with Alacritty
. For some reason it won't start up and the dock icon is a question mark... any thoughts?
I filed a report and they told me it had something to do with a broken shell config..
from nixos-config.
Hey! Glad to hear it all worked. I will definitely add the Git step to the instructions.
In re: to the error, my configuration uses Zsh across NixOS and MacOS. I searched for the word 'fish' in my repo and yours, and can't find it. So something locally is conflicting and trying to load the fish shell and failing.
To temporarily get around this, you could try to add fish to the configuration and see if it loads. Then inspect what's in your home directory that could be causing the conflict. I actually don't know much about fish.
To add fish, you can look at shared/home-manager.nix
and add fish.enable = true;
to the top.
from nixos-config.
Sometimes I see the ? in the dock icon before running alacritty or Emacs for the first time; then the icon is set. So that doesn't necessarily point to something broken; I think Zsh is starting, then fish is trying to start, and since fish can't be found it fails and doesn't start the fish shell.
from nixos-config.
Hmmm strange. I am able to launch alacritty
just fine from the Terminal. But nothing happens when I click the dock icon.
from nixos-config.
from nixos-config.
And if you run it from the shell there, you get the fish
error? Or something else?
In my dock I get alacritty, and doing the 'Show in Finder' option shows the app inside the Nix Store. But it seems not be installed there.
from nixos-config.
I would try to get it working from the CLI (outside of the dock), maybe by trying to first simplify options in https://github.com/multivac61/dustinlyons-nixos-config/blob/main/shared/home-manager.nix#L195.
The font it uses comes from here:
I recently tested this on a fresh M1 Macbook Air and was able to bootstrap it, and the fish
error is strange given fish
doesn't exist in the configuration. So it makes me feel like something else is going on.
from nixos-config.
Could also be some of these options:
https://github.com/multivac61/dustinlyons-nixos-config/blob/main/shared/home-manager.nix#L10C1-L10C41
Can you try to remove and simplify these options are much as possible? You could even remove powerlevel10k
.
from nixos-config.
Hmm.. there isn't anything inside the Applications
folder
from nixos-config.
Okay, interesting. Are you able to launch alacritty from the terminal and it launches, but just the placement of the dock icon is broken? Or are there errors launching alacritty from the terminal?
from nixos-config.
I am able to launch alacritty for the terminal just fine, no errors. It's just the dock that is broken.
from nixos-config.
Here is what mine looks like:
Can you grab the latest and try to build everything again? Just want to make sure it happens on multiple builds.
from nixos-config.
I grabbed the latest and built everything again.. I even restarted the computer just in case!
Even tried one more time from scratch and then I got this..
from nixos-config.
I am 90% sure this has something to do with how I set up Alacritty
. If I remove the config dir I am able to run Alacritty
from the sidebar... need to investigate further on my end. Closing issue now.
ps thank you again for maintaining this template and continuing to work on it (love the new refactor!). I am learning a ton!
from nixos-config.
@multivac61 Good to hear! Let me know if you have any questions and I'm happy to try and help.
from nixos-config.
I'm not sure if it's actually related to this issue or not, but after running bin/build
, I'm also getting error: flake 'git+file:///my/nix/config' does not provide attribute 'packages.aarch64-darwin.default
or 'defaultPackage.aarch64-darwin'`
I see that it did install brew
, but it didn't install any brew packages, and I don't seem to have any nix packages installed either as far as I can tell.
It actually has kind of broken my whole machine, so any advice on how to fix OR rollback would be super appreciated π
from nixos-config.
Hmmm, very strange. Can you paste your flake.nix
here?
from nixos-config.
@dustinlyons I just spent like 30 minutes writing up a super detailed report on how I fixed everything, and then accidentally hit "back" and github lost it all π
The short version is:
- I'm a total nix noob and don't know what to watch for in build outputs
- Managed device profile caused
darwin-rebuild switch
to die on thedarwin/defaults
LSQuarantine
directive. - Old Home Manager version (21.11) was hitting an error when trying to apply settings because of an empty
$HOME/.cache/.keep
file. More info here. Upgrading to 23.11 fixed it- This was exacerbated a bit by the fact that the Home Manager Manual says "The state version is required and should stay at the version you originally installed.", so I was hesitant to try upgrading.
- Improved error reporting (maybe from something like a
trap
) would be a welcome addition to thebin/build
script to help newbies know when something didn't go as expected.
Last recommendation I'll make is what I think would be the most impactful: encourage some form of initial dry-run for new installs. This could be accomplished by updating the README to explain how to run a build and test it with nix-shell
or nix develop
or whatever, OR it could be built into the custom scripts in bin/
. The main thing is that I didn't realize that running bin/build
the first time would be a destructive operation to my existing development environment. And when that first build
went sideways, it left me with a lot of fires to put out.
I don't want to be a downer! I think this project is a really nice on-ramp, but it does have some pretty sharp edges and some extra guard rails would be welcome π
from nixos-config.
Oh wow, this is such great feedback! I very much appreciate you taking the time to write this (and your first draft π).
- I still feel like a Nix noob, don't worry.
- Based on your feedback, I'm going to flip the
LSQuarantine
directive totrue
in the template to avoid installation problems and add some comments around it for others to change if they want. - Hmm... looks like I'll need to update Home Manager as well. I'm doing a decent refactor into more idiomatic Nix (
hosts
andmodules
dirs instead ofnixos
anddarwin
at the root), so I may do it as part of that. - I'm in the process of porting all the
bin/
scripts over to be Nix apps (stillbash
scripts though), and as part of this will flesh out more error handling. Good idea.
Dry run is a great idea! I think for NixOS this is easy as I will have an option for a Live ISO soon. For nix-darwin
, I'll have to think through this, as it wants to alter your running system, change directives, update launchd, etc. Maybe something like
- Communicate to the user everything that is happening before it does
- Break out the
build
andswitch
steps. So the user can observe the build succeeding, and then decide to switch over their running system. Something like
nix run nix-darwin -- build --flake .#macos
first and then
darwin-rebuild switch --flake .#macos
All such good feedback I will incorporate soon. Thanks again @tlindsay!
from nixos-config.
Related Issues (20)
- dustinlyons/nix-secrets.git dependency HOT 6
- NixOS install `./bin/apply: No such file or directory` HOT 8
- Installation issue on NixOS with xvda boot disk HOT 3
- Installed new NixOS install using this repo, no GUI on reboot HOT 13
- macOS - User does not own "system" or "default" profile HOT 8
- error: selector 'bash' matches no derivations HOT 21
- Purpose of mail and name? HOT 2
- Networking wireless device fails to start HOT 3
- How to upgrade everything installed (Mac OSX Sonoma)? HOT 6
- Add -b backup to `home-manager switch` HOT 2
- error: experimental Nix feature 'nix-command' is disabled HOT 8
- starter config appears to expect secrets repo HOT 3
- Couple of issues found with the latest instructions/code HOT 4
- Homebrew not found HOT 4
- How can I fix this homebrew error? HOT 4
- Add option to choose editor during install
- Permission denied with homebrew HOT 4
- How can I add stylix HOT 1
- [Question] Have you considered adding a dock module to nix-darwin? HOT 1
- Does your configuration play with non nix-os Linux systems? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nixos-config.