- Clone it
- Run ./install.sh to install
- Run ./uninstall.sh to uninstall
Nix help: https://github.com/agilesteel/.dotfiles/blob/master/nix/home-manager/home.nix
- Configure Determinate Nix daemon to know about cert whereabouts:
sudo vim /Library/LaunchDaemons/systems.determinate.nix-daemon.plistadd the following environment configuration:
<key>EnvironmentVariables</key>
<dict>
<key>NIX_SSL_CERT_FILE</key>
<string>/etc/nix/macos-keychain.crt</string>
<key>SSL_CERT_FILE</key>
<string>/etc/nix/macos-keychain.crt</string>
<key>CURL_CA_BUNDLE</key>
<string>/etc/nix/macos-keychain.crt</string>
<key>GIT_SSL_CAINFO</key>
<string>/etc/nix/macos-keychain.crt</string>
<key>REQUESTS_CA_BUNDLE</key>
<string>/etc/nix/macos-keychain.crt</string>
</dict>- Restart nix daemon:
sudo launchctl bootout system /Library/LaunchDaemons/systems.determinate.nix-daemon.plist
sudo launchctl bootstrap system /Library/LaunchDaemons/systems.determinate.nix-daemon.plist
sudo launchctl kickstart -k system/systems.determinate.nix-daemon
Nix downloads packages from Github and you may quickly get rate limited by Github. For that not to happen, generate a token in Github and add it to nix.conf file as:
access-tokens = github.com=<access_token>
If you have access to lib, then set sha256 = lib.fakeHash, run the build, check the error message, it'd show the real hash value which you can then take and set.
Otherwie you may use nix-prefetch with fetchFromGithub command specifying the repository details, as shown down below:
nix-prefetch fetchFromGitHub --owner catppuccin --repo alacritty --rev main
The fetcher will be called as follows:
> fetchFromGitHub {
> owner = "catppuccin";
> repo = "alacritty";
> rev = "main";
> sha256 = "sha256:0000000000000000000000000000000000000000000000000000";
> }
sha256-HiIYxTlif5Lbl9BAvPsnXp8WAexL8YuohMDd/eCJVQ8=
Most of the packages have home-manager support, for example
wezterm has this page that tells what options you have to configure it:
https://home-manager-options.extranix.com/?query=wezterm&release=master
Feeling lost with nix-darwin config options?
darwin-helpThis command opens a browser window with documentation about nix-darwin settings
| Name | Description |
|---|---|
empty |
A NixOS system and modules ready to modify. |
home |
A Nix Flake that exports home manager. |
system |
A NixOS system and modules ready to modify. |
package |
A Nix Flake that exports packages and an overlay. |
module |
A Nix Flake that exports NixOS modules. |
lib |
A Nix Flake that exports a custom lib |
To generate template files, run:
home template <name>