flake-utils-plus
nix-darwin
Our great sponsors
flake-utils-plus | nix-darwin | |
---|---|---|
19 | 39 | |
443 | 2,249 | |
- | - | |
4.9 | 8.7 | |
20 days ago | 3 days ago | |
Nix | Nix | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
flake-utils-plus
-
[Question] When using flakes, can I remove all channels?
You don't need channels to use nix-shell or nix-env. You can generate the Nix path and registry from your flake inputs. flake-utils-plus makes this easy with nix.generateRegistryFromInputs and nix.generateNixPathFromInputs.
-
How do I deploy a configuration to a machine with an existing hardware-configuration.nix?
Use flake-utils-plus to easily define multiple systems in flake.nix.and then use the --target-host flag of nixos-rebuild to deploy it remotely.
-
Have a shell command in configuration.nix that runs on nixos-rebuild
If you're trying to handle multiple systems with one config a flake is a significantly better option. I would personally recommend looking at flake-utils-plus and specifically this example config.
- Nix Flakes
-
Best way to manage multiple home manager configs for both NixOS and non-NixOS systems using flakes?
I looked at some past threads / examples and saw people recommend flake-utils-plus, but after reading the examples I don't understand how I would get home-manager on Darwin or Ubuntu.
-
Nix: Taming Unix with Functional Programming
Depending on your specific needs, the channelsConfig (modify arguments passed to Nixpkgs) and overlay tooling in flake-utils-plus may be adequate: https://github.com/gytis-ivaskevicius/flake-utils-plus/tree/...
-
What to do...
For flakes you don't have to set up everything manually there are helper libraries, I use flake-utils-plus.
-
How shall I install a package not found at https://search.nixos.org/packages?
Converting to flakes is not that hard if you use a good library. The documentation is other people's configs, really.
-
I made a thing you can load in Nix repl to get variables from your NixOS configuration
Neat! I've been using flake-utils-plus's implementation until now. https://github.com/gytis-ivaskevicius/flake-utils-plus/blob/master/lib/repl.nix
-
How to use a patched nixpkgs locally?
I use flake-utils-plus based configuration to apply patches on top of nixpkgs where overlays don't suffice.
nix-darwin
- Nix-Darwin: Nix modules for Darwin
-
My MacBook setup (the 2024 version)
Just a shout out to nix-darwin[1]. It is nix, so initial setup is a bit involved. But then it truly makes it easy to configure everything in one place including mac defaults, homebrew apps declaratively and mas apps etc.
There is a sample config in nix-darwin repo[2].
[1] https://github.com/LnL7/nix-darwin
[2] https://github.com/LnL7/nix-darwin/blob/master/modules/examp...
-
macOS Sonoma Broke Grep
https://github.com/LnL7/nix-darwin/tree/master/modules
-
What is the difference between NixOS and any other distro running the nix package manager?
nix-darwin does similar thing for MacOS
-
How to install a library globally using nix-env (or home manager) on macos?
You can use https://github.com/LnL7/nix-darwin
- Nix-Darwin
-
Issues with installing applications on Macos
There are many threads around where you can learn more about this (and why it's complicated...), but https://github.com/nix-community/home-manager/issues/1341 and https://github.com/LnL7/nix-darwin/issues/139 seem like two of the most comprehensive.
-
Zero to Nix, an unofficial, opinionated, gentle introduction to Nix
Nix is pretty usable for both desktops and headless servers. Personally, I even use it on macOS without much trouble.
My system looks like any other install of Ventura, but all of my configuration, ranging from the terminal and VS Code to macOS-specific system preferences and Safari, is done declaratively in Nix [1]. The overwhelming majority of my installed software also comes from Nix packages, with some exceptions for stuff that is not packaged yet (e.g., I have Podman Desktop, the macOS ZFS port, Lulu, yubikey-manager-qt installed through Homebrew -- fortunately nix-darwin [2] also just lets me have an set of brews/casks in my config).
It was been a bit of a nightmare at first since the error messages are kind of horrific, and there can be a lack of good examples/docs on flakes. But I think the weekend worth of time I invested was worth it since I no longer need to rely on hacky shellscripts or remember to manually configure anything.
[1]: <https://github.com/nix-community/home-manager>
[2]: <https://github.com/LnL7/nix-darwin>
-
Beginner Question: Managing the global environment using Nix
Take a look at nix-darwin, this is what I use. It allows you to configure your system similar to NixOS including globally installed programs.
-
How to install Chrome on MacOS without homebrew?
This — I still use mas and brew —-cask through the nix-darwin module, though. It’s not exactly reproducible, but it’s at least closer to reproducible and declarative.
What are some alternatives?
Home Manager using Nix - Manage a user environment using Nix [maintainer=@rycee]
flake-utils - Pure Nix flake utility functions [maintainer=@zimbatm]
NixOS-docker - DEPRECATED! Dockerfiles to package Nix in a minimal docker container
nixGL - A wrapper tool for nix OpenGL application [maintainer=@guibou]
nix - Nix, the purely functional package manager
poetry2nix - Convert poetry projects to nix automagically [maintainer=@adisbladis]
nixos-shell - Spawns lightweight nixos vms in a shell
digga - A flake utility library to craft shell-, home-, and hosts- environments.
deploy-rs - A simple multi-profile Nix-flake deploy tool.
NUR - Nix User Repository: User contributed nix packages [maintainer=@Mic92]