flake/README.md
2023-02-26 16:53:51 -06:00

1.8 KiB

My NixOS Configuraton File

This is my NixOS with home-manager config structure using nix flakes

Current Desktop Screenshot

Gnome

Highlights:

  • Multiple NixOS configurations: desktop, laptop, and server (#TODO)

Structure

  • flake.nix: Declare hosts and home configurations
  • hosts: NixOS Configurations using nixos-rebuild --flake .#
  • common: Shared configurations

Machines

Hostname Model Type RAM Processor Main Use
weda Dell Inspiron Laptop 16GB AMD Ryzen 5 Work
frija Acer Aspire 3 Laptop 4GB ?? Testing
tyr Intel i5 Desktop 16GB i5 Media
tuisto AMD Ryzen 5 Desktop ??GB Remote
#TODO AMD Ryzen 5 Server ??GB 2200G Test Server

How to

Process

  1. See https://github.com/nix-community/home-manager for manual and configuration options
  2. Remember to add unstable channel (in this case) in the terminal:
  3. sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
  4. sudo nix-channel --update
  5. Include "<home-manager/nixos>" in "Imports" section above
  6. Install NixOS on a Machine. I use the default Gnome installer from https://nixos.org/download.html.
  7. Copy the configuration.nix and hardware-configuration.nix files from the /etc/nixos directory
    1. Rename configuration.nix to default.nix and link to the appropriate modules under flake.nix
  8. Create a hosts directory on git for the new machine and either use an existing users or create a new one