My flake files which I use to manage my local and remote machines
https://git.disroot.org/Zonsopkomst/flake
common | ||
config | ||
desktop | ||
display | ||
hosts | ||
reference | ||
users | ||
.directory | ||
flake.lock | ||
flake.nix | ||
LICENSE.md | ||
README.md |
My NixOS Configuraton File
This is my NixOS with home-manager config structure using nix flakes
Current Desktop Screenshot
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
- See https://github.com/nix-community/home-manager for manual and configuration options
- Remember to add unstable channel (in this case) in the terminal:
- sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
- sudo nix-channel --update
- Include "<home-manager/nixos>" in "Imports" section above
- Install NixOS on a Machine. I use the default Gnome installer from https://nixos.org/download.html.
- Copy the
configuration.nix
andhardware-configuration.nix
files from the /etc/nixos directory- Rename
configuration.nix
todefault.nix
and link to the appropriate modules underflake.nix
- Rename
- Create a
hosts
directory on git for the new machine and either use an existingusers
or create a new one