These are my NixOS dotfiles for my systems. These are not intended to be a drop in configuration for your computer, but you are welcome to use it as a reference or starting point for your own configuration.
If you are looking for a more generic NixOS configuration, I recommend nix-starter-configs.
This is all themed using Catppuccin Mocha.
Hosts
Hostname
Board
CPU
RAM
GPU
Role
OS
State
laptop
Lenovo Yoga 6 13ABR8
AMD Ryzen 5 7530U
16GB
Radeon Graphics × 12
💻️🎭️
❄️
✅
home-server
HP EliteDesk 800 G2 SFF
INTEL Core i7-6700
8GB
Intel HD Graphics 530
🗄️
❄️
✅
desktop
Gigabyte A520M DS3H AC
AMD Ryzen 5 3600
16GB
NVIDIA GTX 1660 SUPER
🖥️🎭️
❄️
🚧
Key:
🎭️ : Dual boot
🖥️ : Desktop
💻️ : Laptop
🗄️ : Server
☁️ : Cloud Server
For more details on the hosts and what apps I use see the sections below:
Laptop
Laptop details
Intro
My laptop is dual booting Windows (for school assessments), & NixOS (for everything else), It's a Lenovo Yoga 6 as described above. It has 512GB of storage split evenly (around about) between the two operating systems.
It has two desktop environments/WMs, Gnome & Hyprland, I am in the process of switching to Hyprland from Gnome as managing dconf settings using home-manager is terrible. However this is taking a while and is a low priority so it won't happen anytime soon. Below listed are the apps I use.
My home-server is a HP EliteDesk 800 G2 SFF as said above, it's a converted desktop that I got from school, it has 125GBs of storage on the main drive but mounts an external HDD to hold media. The modules running on it can roughly be split into two sections:
Media
On the server is an automatic media setup using [Nixarr](https://github.com/rasmus-kirk/nixarr).
Other Modules
These other modules are run using [declarative docker containers](https://nixos.wiki/wiki/NixOS_Containers#Declarative_docker_containers).
| Type | Program |
| :------------- | :----------: |
| DNS | [Adguard Home](https://adguard.com/en/adguard-home/overview.html) |
| Dashboard | [Homarr](https://homarr.dev/) |
| Minecraft Server| [Minecraft server Docker container](https://hub.docker.com/r/itzg/minecraft-server) |
My Desktop is used mostly for gaming and its config is very smiler to my laptop. It's dualbooting windows, as VR games don't work well enough with linux Nvidia drivers, It's running Gnome as the DE and has mostly the same apps and general configurations.
Things that are the same as my laptop configuration
Things that are different from my laptop configuration
Gaming
Here are a list of apps & services I am using for gaming:
| Name |
| :------------- |
| [Steam](https://store.steampowered.com/about/)|
| [OBS-studio](https://obsproject.com/)|
| [Prism-launcher](https://prismlauncher.org/)|
| [Minecraft](https://www.minecraft.net/en-us)|
| [Lutris](https://lutris.net/)|
| [Cartridges](https://github.com/kra-mo/cartridges)|
| [steam-run](https://store.steampowered.com/about/)|
I am also using the proprietary Nvidia drivers.
Installation
This install procedure assumes that the user is on a fresh install of NixOS, that they are using bash, and that their hardware-configuration is the same as the hosts dotfiles they will be using. So modify the way you install the dotfiles if this is not the case. If you are dualbooting linux and windows you need to make sure that your /boot partition has more than 250Mb of space, otherwise you will run into issues.
First enter a nix shell with git nix-shell -p git
Change the ownership of /etc/nixos to your user (Optional) sudo chown -R "USER" /etc/nixos
Remove all files currently in /etc/nixos(You should probably save hardware-configuration.nix first) sudo rm -rf /etc/nixos/*
Go into /etc/nixos and initialize a git repo cd /etc/nixos && git init
Add this repo as a remote origin git remote add origin https://github.com/AlexBerry0/dots.git)
Pull from this origin git pull origin master
Finally rebuild using the chosen host sudo nixos-rebuild switch --flake /etc/nixos/#HOST-NAME-HERE
Reboot
What to do if you manually partitioned the NixOS install and Windows isn't showing up in the boot menu
Boot into a windows install USB
Press Shift + F10 to open a DOS menu
Run diskpart
Run select Disk=0
Run list partition
Look for the partition that matches the size and type of the /boot partition.
Run select partition (num partition of `/boot`)
Assign it a letter by running assign letter="", the letter can be any unused disk letter, I used "Y"
Exit diskpart
Now run bcdboot C:/Windows /s "":
Enter diskpart again
Run list volume
Identify the volume corresponding to the `/boot` partition
Run select volume (num partition of `/boot`)
Run remove letter=""
reboot
[!IMPORTANT]
If you run into issues with /boot running out of storage space while attempting to rebuild and switch after (This will happen if you used automatic partitioning from the Calamares installer and are trying to dualboot with Windows.) Then you should reinstall NixOS and use manual partitioning to make /boot at least 250Mb. However, if you will not do that then this guide is your best bet for fixing this. You will need to do this every time you update the kernel.