My flake files which I use to manage my local and remote machines https://git.disroot.org/Zonsopkomst/flake
Find a file
2024-12-20 16:41:33 -06:00
common Updated nerd-fonts 2024-12-11 22:29:38 -06:00
config Updated 2024-10-30 20:46:03 -05:00
desktop Removed nemo due to lack of use 2024-09-12 16:34:07 -05:00
display File Cleanup 2024-03-12 13:30:55 -05:00
hosts Added Pinta 2024-12-13 09:51:45 -06:00
machines Update facts/secrets for service zerotier in machine tii 2024-09-27 12:50:21 -05:00
reference Added Pinta 2024-12-13 09:51:45 -06:00
sops Add user coleman to secrets 2024-09-27 16:13:21 -05:00
.directory Cleaned and compartmentalized files & hierarchy 2023-01-18 16:53:08 -06:00
.envrc Updated for direnv 2024-09-18 15:11:27 -05:00
.gitignore Added .direnv to .gitignore 2024-09-18 15:17:20 -05:00
flake.lock Updated 2024-12-20 16:41:33 -06:00
flake.nix Code cleanup (thuner, tii, tyr, tuisto, weda) 2024-09-05 10:44:39 -05:00
LICENSE.md Added 2023-01-31 09:02:24 -06:00
README.org I don't have users, well I do, but I don't here anymore 2024-09-05 08:46:46 -05:00

Flake Readme

My NixOS Configuraton File

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

Current Desktop Screenshots:

Gnome

https://git.disroot.org/Zonsopkomst/flake/raw/branch/working/reference/assets/20231102NixOSTyr3.png

Emacs

https://git.disroot.org/Zonsopkomst/flake/raw/branch/working/reference/assets/20231102NixOSTyr.png

Highlights:

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

How to:

https://git.disroot.org/Zonsopkomst/flake/raw/branch/working/reference/assets/underpants-gnomes.png

  1. NixOS Installation

    1. Install NixOS on a computer using the default Gnome installer from [https://nixos.org/download.html].
    2. Clone this repository [https://git.disroot.org/zonsopkomst] in the `/home/<username>/ directory.
    3. Update `hosts`.

      1. Create the host in `flake.nix` similar to one of the preexisting ones.
      2. Copy the `configuration.nix` and `hardware-configuration.nix` files from the `/etc/nixos` directory and move them to `hosts/<NEW_PC_NAME>/`.

        1. Link imports to `<common>.nix` shared files for things like bluetooth, systemd, and time (shared common resources).
      3. Make certain that the correct version of `NixOS` and `homemanager` are listed in both `configuration.nix` and `home.nix`.
      4. Declare packages either globally under `/hosts/<hostname>/configuration.nix` or for the user(s) under the `homemanager` sections.
    4. Rebuild NixOS

      1. `cd flake`
      2. `nix experimental-features 'nix-command flakes' flake update`

        1. NOTE: 2 dashes in front of experimental, in case `git` makes it a long dash.
      3. `nixos-rebuild switch flake .#<hostname>`

        1. (<hostname> 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)
        2. NOTE: 2 dashes in front of flake, in case `git` makes it a long dash.
    5. Make sure to update `git` with all changes

Maintenance

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

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.
flake.nix & flake.lock Declared configuration using the above directories & configs

Hosts

cLAN.lol meta.name = fosite

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
thuner AMD Ryzen 5 Server ??GB AMD 2200G Test Server
frijheid AMD Ryzen 5 Server 16GB AMD 2200G Main Server