This repository contains NixOS configurations for my machines, managed through Nix Flakes.
It is structured to easily accommodate multiple machines and user configurations, leveraging nixpkgs, home-manager, and various other community contributions for a seamless NixOS experience.
flake.nix
: The flake itself, defining inputs (such as nixpkgs, home-manager, and hardware-specific optimizations) and outputs for NixOS and Home Manager configurations.hosts/
: NixOS configurations for each machine, including system-specific settings.home/
: Home Manager configurations for user-specific settings and applications.files/
: Miscellaneous configuration files and scripts used across various applications and services.flake.lock
: Lock file ensuring reproducible builds by pinning input versions.overlays/
: Custom Nix overlays for package modifications or additions.
- nixpkgs: Points to the
nixos-24.05
channel, providing stable NixOS packages. - nixpkgs-unstable: Points to the
nixos-unstable
channel for access to the latest packages. - home-manager: Manages user-specific configurations, following the
nixpkgs
input (release-24.05). - hardware: Optimizes settings for different hardware configurations.
- catppuccin: Provides global Catppuccin theme integration.
- spicetify-nix: Enhances Spotify client customization.
The flake now includes a users
attribute set, defining user-specific information:
users = {
jdoe = {
email = "joe.doe@example.com";
fullName = "Joe Doe";
gitKey = "A0000000";
name = "jdoe";
};
};
This configuration is passed to both NixOS and Home Manager configurations, allowing for consistent user settings across the system.
To apply a configuration to a specific system, run:
nixos-rebuild switch --flake .#<hostname>
Replace <hostname>
with the name of the target machine, e.g., energy
or nabokikh-z13
.
Home Manager is used to manage user configurations independently of system configurations. To apply a user configuration, use:
home-manager switch --flake .#<user>@<hostname>
To update all flake inputs to their latest versions:
nix flake update
This setup includes various custom modules and configurations:
- Desktop Environments: Supports both Hyprland and GNOME.
- Development Tools: Includes configurations for Neovim, Git, Go, and more.
- System Tools: Configures utilities like Alacritty, Atuin, Bottom, and FZF.
- Audio: Includes EasyEffects for audio enhancement.
- Gaming: Supports Steam and Lutris for gaming on NixOS.
- AI/ML: Includes Ollama for local AI model running.
Contributions are welcome! If you have improvements or suggestions, please open an issue or submit a pull request.
This repository is licensed under MIT License. Feel free to use, modify, and distribute according to the license terms.