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 | ||
.Rhistory | ||
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 hopefully transition my Ubuntu server over soon!
How to
- NixOS
- 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- I rename
configuration.nix
todefault.nix
and link to the appropriate modules underflake.nix
- I rename
- Create a
hosts
directory on git for the new machine and either use an existingusers
or create a new one
- home-manager
- 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
- Declare desktop, kernals & RAM, modules, host & user specific items, and home-manager in flake.nix
- Declare packages either globally under
/hosts/<location>/hostname/packages.nix
or/users/<username>/home-manager.nix
- Maintenance
- See
/config/.bashrc
foralias
usingnixos-rebuild --flake .#<hostname>
commands and other useful items
- See
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 |
tuisto | AMD Ryzen 5 | Desktop | 16GB | AMD Ryzen 5 (Renoir) | Remote |
TODO | AMD Ryzen 5 | Server | ??GB | AMD 2200G | Test Server |
TODO | AMD Ryzen 5 | Server | ??GB | AMD 2200G | Main Server |