This repository contains the configurations for my systems. Currently, an Asahi Linux + macOS nix-darwin M1 macbook, and a homelab server.
.
├── apps # Nix commands used to bootstrap and build configuration
├── configs # Normal .config/ configurations I call inside of Nix (set as XDG_CONFIG_DIR)
├── hosts # Host-specific configuration
├── modules # NixOS, nix-darwin, and shared configuration
├── secrets # Secrets handling with sops-nix
└── overlays # Drop an overlay file in this dir, and it runs. So far, mainly patches.
This configuration supports both Intel and Apple Silicon Macs.
Ensure the build works before deploying the configuration, run:
nix run .#build
Note
If you're using a git repository, only files in the working tree will be copied to the Nix Store.
You must run git add .
first.
Warning
You may encounter error: Unexpected files in /etc, aborting activation
if nix-darwin
detects it will overwrite
an existing /etc/
file. The error will list the files like this:
The following files have unrecognized content and would be overwritten:
/etc/nix/nix.conf
/etc/bashrc
Please check there is nothing critical in these files, rename them by adding .before-nix-darwin to the end, and then try again.
Backup and move the files out of the way and/or edit your Nix configuration before continuing.
Alter your system with this command:
nix run .#build-switch
They work as normal NixOS systems, so for instance, for my Asahi system:
nixos-rebuild switch --flake .#asahi