Skip to content

Foo's Nix and Home Manager configuration with Flake for NixOS

License

Notifications You must be signed in to change notification settings

foofrog/nix-config

Repository files navigation

Caped frogs in hexagon, a parody of the Nix & NixOS logo

Foo's Nix & NixOS Configuration

Important

This repository contains my NixOS setup with Home Manager and Flakes. While it isn't fully modular yet, it is mostly functional and Just Works. I plan to eventually develop it to a fully modular system and avoid unnecessary complexity to maintain readability in the codebase.

Feel free to use it as reference for your own configurations.

Albeit the setup isn't perfect, I hope it can provide some useful insights as I add informational comments wherever possible.

Consider creating an issue addressing a problem or suggestions for improvement; otherwise, feel free to submit a pull request.

Directory structure (at a glance)

.
├── flake.nix
├── hosts
│   └── foobar
└── modules
    ├── environment
    │   ├── packages
    │   ├── programs
    │   ├── services
    │   └── users
    │       └── foo
    │           └── home-depot
    │               ├── packages
    │               ├── programs
    │               └── services
    ├── foundations
    │   ├── bootloader
    │   ├── graphics
    │   ├── i18n
    │   │   ├── fonts
    │   │   └── l10n
    │   ├── internet
    │   └── kernel
    └── peripherals
        ├── audio
        ├── bluetooth
        └── tablet

Currently, all OS and Home Manager modules are imported within /hosts/foobar/systemwide.nix and /hosts/foobar/userspace.nix explicitly. These two files are ideally intended to be used as module switches or toggles if you will, for /modules. /modules/users/foo/home-depot directory serves as a deposit for the user's home configurations managed by Home Manager.

Acknowledgements

Nix and NixOS differs from traditional distributions and thus has a learning curve. One has to step out of their comfort zone but if able to learn, it's greatly benefiting. Same philosophy can apply for everything else in life.

With that said, I'd like to thank:

  • Tanvir, his invaluable guidance enabled me to make the hop to Nix & NixOS (from Arch, btw) and to come up with an initial setup. His own Nix/NixOS configuration has been incredibly helpful in creating mine.
  • Krey, Fufezan, and Ryan Yin for their repositories, which were indispensable sources of learning and reference.
  • NixOS Discourse, official NixOS community forum that helped me debug hours of pure pain.

The holy trinity of Nix

Nix trinity