/nic-os

💻 My nixOS / macOS configurations !

Primary LanguageNix

Nic-OS - My nix configs w/ flake

This repository replaces my configuration / dotfiles repository.

This allows centralized and reproductable management of:

  • My linux computer management with NixOS
  • Dotfiles and custom configurations for programs
  • TODO: management of MacOS settings too (With nix-darwin)

All that, via a declarative and functional approach ("os-management-as-code") thanks to;

Why nic-os ?

Profesionally, I'm known as "NicoS", and this manages my NixOS ! 😛

NixOS - Base install

Start

sudo su
nix-shell -p nixFlakes git

Configuration

Apply disk configuration from hardward-configuration.nix - or switch to custom installation.

Install

nixos-install --flake github:nSimonFR/nic-os#BeAsT

NixOS - Custom install

Make sure you're started correctly !

Clone repo

git clone git@github.com:nSimonFR/nic-os.git
cd nic-os

Mount disk / hardware configuration

Mount your disks as you wish (Guide)

Then, re-generate and move hardware-configuration.nix:

nixos-generate-config --root /mnt
cp /mnt/etc/nixos/hardware-configuration.nix nixos/

Rename variables (Optional)

vim flake.nix
# locate and update ouputs => "let"

Install

nixos-install --flake .#YourConfigName

MacOS - Install

Pre-requesite: clone.

Install nix

sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon

Home Manager install

nix-shell -p nixUnstable --command "nix build --experimental-features 'nix-command flakes' '.#homeConfigurations.nBook-Pro.activationPackage'" # Or replace host
./result/activate

Apply updates (local)

NixOS / BeAsT

nixos-rebuild switch --flake .#BeAsT

Home Manager - NixOS

home-manager switch --flake .#BeAsT

Home Manager - MacOS

home-manager switch --flake .#nBook-Pro