Skip to content

Repository files navigation

NixOS + MacOS configuration

This repository contains my personal configuration for NixOS and MacOS. It's a Nixflake that provides configuration modules for both systems.

FilesPurpose
flake.nixThe main entry point, defines configuration for two machines: x86_64-linux NixOS and aarch64-darwin MacOS.
globals.nixAn attrs set with some global values. Propogated to all modules.
private.nixAn attrs set with some global values that are personal data. Encrypted by git-crypt. Propogated to all modules.
hm/*.nixhome-manager configuration modules that shared between NixOS and MacOS.
nixos/*.nixNixOS 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/*.nixnix-darwin configuration modules. home.nix is a top-level home-manager module.

Setup on NixOS

Installation command:

sudo nixos-rebuild switch --flake .

Setup on MacOS

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 .

Common tasks

  • formatting: nix fmt
  • upgrade to new versions: nix flake update

About

Personal NixOS/MacOS declarative config

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages