My NixOS flake built with snowfall.
sys
is a bash script I made that makes working with NixOS easier.
Rebuild (in flake directory)
sudo sys rebuild # or `r` as a shorthand
Testing an ephemeral config:
sudo sys test # or `t` as a shorthand
The automated install is preferred for x86_64-linux systems.
Clone the repo:
git clone https://github.com/IogaMaster/dotfiles.git
cd dotfiles
Install:
nix run .#install -- <hostname> <ip-address>
Done!
Manual Install
# Graphical
nix build .#install-isoConfigurations.graphical
# Minimal tty
nix build .#install-isoConfigurations.minimal
Network manager is installed by default. If you need wifi.
nmtui
Now become root.
sudo su
This is pretty much copy and paste.
UEFI
# Become root
sudo su
# Assuming /dev/sda is the device you are installing to.
parted /dev/sda -- mklabel gpt
parted /dev/sda -- mkpart primary 512MB -8GB
parted /dev/sda -- mkpart primary linux-swap -8GB 100%
parted /dev/sda -- mkpart ESP fat32 1MB 512MB
parted /dev/sda -- set 3 esp on
# Make filesystems and mount
mkfs.ext4 -L nixos /dev/sda1
mkswap -L swap /dev/sda2
mkfs.fat -F 32 -n boot /dev/sda3
mount /dev/disk/by-label/nixos /mnt
mkdir -p /mnt/boot
mount /dev/disk/by-label/boot /mnt/boot
swapon /dev/sda2
BIOS
# Become root
sudo -i
# Assuming /dev/sda is the device you are installing to.
parted /dev/sda -- mklabel msdos
parted /dev/sda -- mkpart primary 1MB -8GB
parted /dev/sda -- set 1 boot on
parted /dev/sda -- mkpart primary linux-swap -8GB 100%
# Make filesystems and mount
mkfs.ext4 -L nixos /dev/sda1
mkswap -L swap /dev/sda2
mount /dev/disk/by-label/nixos /mnt
swapon /dev/sda2
Now we need to add your system.
First clone the dotfiles in /mnt
git clone git@github.com:IogaMaster/dotfiles /mnt/.dotfiles
cd /mnt/.dotfiles/
Then copy the example config with the new hostname of your system.
# The `x86_64-linux` part comes from nixos generators, if you are using a different arch use that directory. eg `aarch64-linux` for arm
cp -r systems/x86_64-linux/example/ systems/x86_64-linux/hostname
[!WARNING]
Do not use my hardware configurations they won't work with your system!
Generate your config and copy the hardware configuration.
nixos-generate-config --root /mnt
cp /mnt/etc/nixos/hardware-configuration.nix /mnt/.dotfiles/systems/x86_64-linux/hostname/
Then install.
nixos-install
[!WARNING]
The default password for the iogamaster user ispassword
please change it.
I normally clone the dotfiles repo to ~/.dotfiles/
A special thanks to:
hlissner for getting me into NixOS.
redyf for the bar and other minor hyprland config options.
Wil Taylor for his youtube series on setting up NixOS with a flake.
Jake Hamilton for his NixOS config and snowfall.
Tech Support on Hold for the battery module