/nnn

Primary LanguageNix

NNN - Nouun's New Nix(OS) (Environment)

Nix(OS) flakes configuration for my personal computer, supporting x86_64-linux with NixOS (coming soon:tm:), aarch64-linux with NixOS using AsahiLinux' kernel and bootloader, and aarch64-darwin with Nix and nix-darwin.

Building and Instalation

NixOS (Arm)

Follow the nixos-apple-silicon guide to NixOS. Once you have mounted NixOS and generated a base config, you can create a new nix-shell with git and clone the repository.

nix-shell -p git --run "git clone https://github.com/nouun/nnn /mnt/etc/nixos"

After it has finished cloning, cd into the directory and run the following command to install NixOS with the config.

sudo nixos-install --extra-experimental-features 'nix-command flakes --flake .#nixbook

This may take a while as it has to compile the kernel, but once that is completed you will be prompted for your root password. Reboot and you should be able to login.

Once you have NixOS setup and installed, you can switch to this config by using the following command. If your host-name is anypthing other than nixbook you need to append nixbook after #.

sudo nixos-rebuild switch --flake .#

MacOS

Install Nix with the following command.

curl -L https://nixos.org/nix/install | sh

Once Nix is installed, run the following command to build the flake and switch to it. If it the first time installing this config you may need to append --extra-experimental-features 'nix-command flakes' if they weren't enabled in your previous configuration.

nix build .#darwinConfigurations.macbook.system
./result/sw/bin/darwin-rebuild switch --flake .

Once you have nix-darwin setup and installed, you can switch to this config by using the following command. If your host-name is anypthing other than nixbook you need to append nixbook after #.

darwin-rebuild switch --flake .#