Skip to content
/ nix Public

Personal NixOS/MacOS declarative config

Notifications You must be signed in to change notification settings

ffloyd/nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NixOS + MacOS configuration

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.
dotfiles/* These files are linked directly, not through Nix store. It allows to edit them in place without creating a new generation for each change.

The reposiory should be cloned into nix folder in the user's home folder.

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 .
nix --extra-experimental-features nix-command --extra-experimental-features flakes run home-manager/master -- switch --flake .

Common tasks

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

About

Personal NixOS/MacOS declarative config

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published