Skip to content

Repository files navigation

hey2022/dotfiles

Cooked configs for NixOS and Home-Manager using flake-parts.

See an overview of the flake outputs by running nix flake show github:hey2022/dotfiles.

Project documentation can be found here.

🗃️ Architecture

The architecture of this flake is designed around the concepts of roles, profiles, and components. It isolates implementation code from decision-making logic, allowing configurations to remain modular and clean.

  • Roles: The entry point for each machine is found in hosts, where it is split into system NixOS configuration.nix and user Home-Manager home.nix roles. They act as the top-level configuration that enables profiles for the purpose of its role as well as setting machine specific configuration.

  • Profiles: Configurable options are where profiles come into play. You can find them in .system/profiles and ./home/profiles. While most shared configurations across all machines are enabled by default, profiles act as a control layer defining high-level group options to enable extra sets of programs and services on or off.

  • Components: The module system is equivalent to components. NixOS configurations live in ./system and Home Manager configurations live in ./home. They define localized program configurations while remaining agnostic of which roles and profiles it is used in. To achieve this and the principle of Locality of Behaviour (LoB) in profiles, each component should not look up into profiles for their lib.mkIf config.profile.<...>.enable options, but rather it should enable based on its own lib.mkIf cfg.enable option that will be set by profiles. Upstream NixOS or Home Manager modules already provide these enable options, so upstream options should be used where possible, if not an enable option should be created for the program.

Additional Directories:

💾 Resources

Other configurations where I have stolen from.

About

NixOS and Home-Manager configuration

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages