This repository contains my personal configuration for NixOS and MacOS. It's a Nix flake that provides configuration modules for both systems.
Files | Purpose |
---|---|
flake.nix |
The main entry point, defines configuration for two machines: x86_64-linux NixOS and aarch64-darwin MacOS. |
globals.nix |
An attrs set with some global values. Propogated to all modules. |
private.nix |
An attrs set with some global values that are personal data. Encrypted by git-crypt . Propogated to all modules. |
hm/*.nix |
home-manager configuration modules that shared between NixOS and MacOS. |
nixos/*.nix |
NixOS configuration modules. home.nix is a top-level home-manager module. hardware-configuration.nix is a hardware configuration and also encrypted by git-crypt . |
darwin/*.nix |
nix-darwin configuration modules. home.nix is a top-level home-manager module. |
Installation command:
sudo nixos-rebuild switch --flake .
Install Nix and homebrew. Homebrew will be used only for installing casks. Then run the following command:
nix --extra-experimental-features nix-command --extra-experimental-features flakes run nix-darwin -- switch --flake .
- formatting:
nix fmt
- upgrade to new versions:
nix flake update