Make infrastructure darwin install#95
Merged
Merged
Conversation
remove unused flake-utils Signed-off-by: Ajay Ganapathy <ajay@incremental.design>
project-lint --all for .nix files did not catch all .nix files in PWD because of a typo Signed-off-by: Ajay Ganapathy <ajay@incremental.design>
Signed-off-by: Ajay Ganapathy <ajay@incremental.design>
Signed-off-by: Ajay Ganapathy <ajay@incremental.design>
Signed-off-by: Ajay Ganapathy <ajay@incremental.design>
Signed-off-by: Ajay Ganapathy <ajay@incremental.design>
Signed-off-by: Ajay Ganapathy <ajay@incremental.design>
this template can be copied into /var/root and modified before running darwin-rebuild -- switch to install the darwin configuration this template references the darwin modules from infrastructure/flake.nix and includes them in a full darwin configuration Signed-off-by: Ajay Ganapathy <ajay@incremental.design>
script usage on macOS: sudo -H nix run incremental-design/projects?dir=infrastructure#install -- --help for options Signed-off-by: Ajay Ganapathy <ajay@incremental.design>
Signed-off-by: Ajay Ganapathy <ajay@incremental.design>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
create the infrastructure project, and add helper scripts for setting up a MacOS machine with NixOS
This PR contains the bare minimum needed to set up and test a nix-darwin installation. Future commits will add configuration for
users' home directories, applications, login items or launch agents
NixOS physical machines
physical networks
This PR demonstrates nix flake best practices. The flake exposes
modules containing Darwin configurations in infrastructure/macos/system
a template, which imports the modules and wraps them in a Darwin configuration
an #install package, which automatically copies the template, swaps in machine-specific variables, and applies the nix-darwin configuration to the MacOS machine. Try running sudo -H nix run "github:incremental-design/projects?dir=infrastructure -- --help
Why flakes?
Flakes standardize the contents of nix expressions. Without flakes, you have to read the source to find out what's in a .nix file. Flakes make it possible to nix flake show "github:incremental-design/projects?dir=infrastructure" to see the flake contents, or nix flake check "github:incremental-design/projects?dir=infrastructure
Why not flake parts?
Nix flakes already consume modules and arbitrary expressions. While flake parts is interesting, I wasn't able to get it to work with nix-darwin modules and configuration in a reasonable amount of time. I'm also skeptical of the value of flake-parts when I can use flake-schemas for a similar purpose. I may change my mind later.