Skip to content

SX-9/nix-conf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image

Warning

While the system when built and configured uses less than 4GB of memory, building it for the first time requires 12GB of memory so its recomended you create a swapfile or add more memory first if you dont have sufficient memory. Otherwise the system will crash while building from out of memory.

to enable swap:

sudo dd if=/dev/zero of=/swapfile bs=512M count=4 # change this to the amount required
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

to build the system:

# 0. clone repo and edit options:
nix-shell -p git vim tmux htop home-manager #  tmux and htop for monitoring
git clone github.com/SX-9/nix-conf --depth 1
vim info.nix # change the username and hostname here

# 1. hardware config:
nixos-generate-config --show-hardware-config > hardware/scan.nix
git add . -f # (-f)orce add hardware scan as its in .gitignore

# 2. apply nixos config (available flakes: nixos, server, thinkpad)
sudo nixos-rebuild switch --flake .#nixos

# 3. apply home config (available flakes: shell, desktop, laptop)
home-manager switch --flake .#shell

or with nixos-anywhere

vim info.nix # change config to enable disko
vim disko/default.nix # change disk partitioning
nixos-anywhere --generate-hardware-config nixos-generate-config ./hardware/scan.nix --flake .#FLAKE --target-host root@HOST

About

nixos configuration files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages