nixos/README.md

1.6 KiB

Installing on a new machine

  1. Install NixOS from an ISO via USB
  2. Reboot machine
  3. Edit /etc/nixos/configuration.nix and add git to packages
  4. Clone this repo
  5. Create a new directory under hosts/ for the new machine
  6. Copy /etc/nixos/hardware-configuration.nix to hosts/<host>/hardware.nix
  7. Register the host in flake.nix via mkHost:
    nixosConfigurations.<host> = mkHost { host = "<host>"; };
    
  8. git add .
  9. Run sudo nixos-rebuild switch --flake .#<host>

Building NixOS VM

nix build .#nixosConfigurations.vm.config.system.build.vm

or run ./build-vm.sh (removes ./vm.qcow2 first)

https://gist.github.com/FlakM/0535b8aa7efec56906c5ab5e32580adf

Building NixOS ISO

nix build .#nixosConfigurations.live.config.system.build.isoImage

or run ./build-iso.sh

Using Standalone Home Manager

  1. Install Nix via:
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon
  1. Create ~/.config/nix/nix.conf file with the following contents to enable the use of flakes:
experimental-features = nix-command flakes
  1. Install git
  2. Clone this repo
  3. Edit flake.nix variables as needed
  4. home-manager switch --flake .#josh

Misc

Garbage collection

nix-collect-garbage -d

Fonts

Checking installed fonts

fc-list

Debugging kitty fonts

kitty --debug-font-fallback

SDDM virtual keyboard ??ZZ