My flake files which I use to manage my local and remote machines https://git.disroot.org/Zonsopkomst/flake
Go to file
Zonsopkomst 21d4b545e8 Updated 2023-10-26 13:31:47 -05:00
common Added duplicati 2023-10-21 17:02:56 -05:00
config Added nitch 2023-10-09 21:24:54 -05:00
desktop
display
hosts Added gcc for emacs org-roam 2023-10-21 19:33:17 -05:00
reference Added warehouse flatpak 2023-10-23 11:45:51 -05:00
users Updated 2023-10-26 13:30:34 -05:00
.Rhistory
.directory
.gitignore
LICENSE.md
README.md
flake.lock Updated 2023-10-21 19:38:44 -05:00
flake.nix Updated 2023-10-26 13:31:47 -05:00
nixos.org Moved TODO file 2023-10-09 15:02:04 -05:00

README.md

My NixOS Configuraton File

This is my NixOS setup to manage multiple computers with a home-manager config structure using nix flakes.

Current Desktop Screenshot

Gnome Gnome

Highlights:

  • Multiple NixOS configurations: desktop, laptop, and hopefully a test server and eventually a full transition over from my Ubuntu server.

How to

Process
Source: South Park

  1. NixOS Installation
    1. Install NixOS on a computer using the default Gnome installer from https://nixos.org/download.html.
    2. Clone this repository zonsopkomst in the `/home// directory.
    3. Update the subdirectories in hosts and users.
      1. Copy the configuration.nix and hardware-configuration.nix files from the /etc/nixos directory and move them to hosts/PLACE(local OR remote)/NEW_PC_NAME.
      2. Rename configuration.nix to default.nix and, update flake.nix located in the top directory, link the appropriate modules to be used.
      3. Make sure the correct version of NixOS is listed in the appropriate files.
    4. flake.nix is where .nix files are imported with further instructions on declared packages and modules.
      1. Declare packages either globally under /hosts/<location>/hostname/packages.nix or /users/<username>/home-manager.nix.
    5. Rebuild NixOS ( must be include the first time rebuilding, after the first rebuild, .# can be used and the system will know which hostname is to be used)
      1. nix-channel --update
      2. nixos-rebuild switch --flake .#
    6. Push the updated git files to the repository so that they can be pulled and the system rebuilt during the next update.

Maintenance

  1. See /config/.bashrc for alias using nixos-rebuild --flake .#<hostname> commands and other useful items

Sources

nix flakes home-manager 1. Added as unstable channel 1. sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager 1. sudo nix-channel --update

Structure

Directory What is it for?
common Shared configurations and modules
config Config files that are managed by NixOS
desktop Shared desktop configs
display Login Display managers
hosts The PCs deployed
reference Package list, git assets, notes, etc.
users Individual User configs
flake.nix & flake.lock Declared configuration using the above directories & configs

Hosts

Hostname Model Type RAM Processor Main Use
weda Dell Inspiron 15 Laptop 16GB AMD Ryzen 5 (Cezanne) Business
frija Acer Aspire 3 Laptop 4GB AMD A9 Testing
tyr Intel i5 Desktop 16GB Intel i5 Media
tii Dell Lattitude 5511 Laptop 16GB Intel i5 Quad (i5-10400H) Remote
tuisto AMD Ryzen 5 Desktop 16GB AMD Ryzen 5 (Renoir) Remote
sintanne Intel i5 Desktop 16GB Intel i5-11320H Remote
TODO AMD Ryzen 5 Server ??GB AMD 2200G Test Server
TODO AMD Ryzen 5 Server ??GB AMD 2200G Main Server