Files
nixos-config/install.org
2025-10-01 20:25:42 -05:00

4.1 KiB

Install

These are just some simple install notes for myself (in-case I have to reinstall unexpectedly). You could also use these to try out my config in a VM.

Manual Install Procedure

Currently, the only supported install method is installing manually. This way yuo can see all the steps (kind of like an Arch install before the archinstall script existed), you can follow this following procedure:

Clone Repo and Modify Configuration

Start by cloning the repo to /etc/nixos:

sudo mv /etc/nixos /etc/nixos.bkp
git clone https://gitlab.com/librephoenix/nixos-config.git /etc/nixos

Any custom directory should also work:

git clone https://gitlab.com/librephoenix/nixos-config.git /your/custom/directory

If you install to a custom directory, make sure to edit systemSettings.dotfilesDir in the system configuration, or else the phoenix wrapper script won't work.

# somewhere in system-level config:
{ config, lib, pkgs, ...}:
{
  systemSettings.dotfilesDir = "/your/custom/directory";
}

To configure a new system, navigate to the hosts directory and copy the TEMPLATE directory. Name the copy whatever you want the new hostname to be (needs to match the hostname exactly).

Next, configure the resulting configuration.nix and home.nix with the available options. Make sure to change all references to USERNAME, NAME and EMAIL for your desired user(s).

Next, you must copy or generate the new system's hardware-config into your specific host's hardware-configuration.nix. To get the hardware configuration on a new system, either copy from /etc/nixos.bkp/hardware-configuration.nix or run:

sudo nixos-generate-config --show-hardware-config > /etc/nixos/hosts/YOURHOSTNAMEHERE/hardware-configuration.nix

Note: If you're installing this to a VM, Hyprland won't work unless 3D acceleration is enabled.

Disclaimer: If you copy my ori host config to setup a sever with NixOS, MAKE SURE YOU CHANGE OR REMOVE THE PUBLIC SSH KEYS UNLESS YOU WANT ME TO BE ABLE TO SSH INTO YOUR SERVER. YOU CAN CHANGE OR REMOVE THE SSH KEY IN THE RELEVANT CONFIGURATION.NIX (see configuration.nix).

Clone and Setup Secrets Config Repo

Clone and setup the /etc/nixos.secrets directory using my template repo. Intructions on how to set it up can be found in that repository. This will allow you to track your main config to a public repo, without exposing all of your configuration options publically.

If you'd rather not set that up, you can just delete all references to the secrets input in the flake.nix and it will stop complaining about the input not being found!

Rebuild and Switch System Config

Once the variables are set, then switch into the system configuration by running:

sudo nixos-rebuild switch --flake ~/.dotfiles#system

or for your own custom directory:

sudo nixos-rebuild switch --flake /your/custom/directory#system

Subsequent rebuilds can now use my phoenix wrapper script to rebuild:

phoenix sync

FAQ

I installed this to a VM and when I log in, it crashes and sends me back to the login manager (SDDM)?

Enable 3D acceleration for your virtual machine. Hyprland doesn't work without it.

It's complaining about not finding an input called secrets?

Either setup the /etc/nixos.secrets directory using my template repo or delete all references to the secrets input in the flake.nix!

You used to have an auto-install script! Where did it go?

My old auto-install script was kind of cool, but I found it wasn't really stable (even for me). I'll probably revisit this at some point (looking at you nixos-everywhere and disko).