NixOS Flake configuration primarily designed to make the Steamdeck a more functional and productive Linux machine.
Go to file
2024-11-02 02:41:32 -07:00
.git-crypt Add 1 git-crypt collaborator 2024-11-01 19:19:17 -07:00
hosts incorporated elements from novas config and switched to flake -- WARNING, not tested or built yet 2024-11-02 02:41:32 -07:00
lib incorporated elements from novas config and switched to flake -- WARNING, not tested or built yet 2024-11-02 02:41:32 -07:00
modules incorporated elements from novas config and switched to flake -- WARNING, not tested or built yet 2024-11-02 02:41:32 -07:00
profiles incorporated elements from novas config and switched to flake -- WARNING, not tested or built yet 2024-11-02 02:41:32 -07:00
secrets incorporated elements from novas config and switched to flake -- WARNING, not tested or built yet 2024-11-02 02:41:32 -07:00
system incorporated elements from novas config and switched to flake -- WARNING, not tested or built yet 2024-11-02 02:41:32 -07:00
users/jeirmeister incorporated elements from novas config and switched to flake -- WARNING, not tested or built yet 2024-11-02 02:41:32 -07:00
.gitattributes (refactor) simplified structure even more, added sops and git-crypt secrets management 2024-11-01 19:13:44 -07:00
.gitignore refactor: reorganize program configuration structure 2024-10-30 21:31:46 -07:00
.repo-to-text-settings.yaml incorporated elements from novas config and switched to flake -- WARNING, not tested or built yet 2024-11-02 02:41:32 -07:00
flake.nix incorporated elements from novas config and switched to flake -- WARNING, not tested or built yet 2024-11-02 02:41:32 -07:00
README.md incorporated elements from novas config and switched to flake -- WARNING, not tested or built yet 2024-11-02 02:41:32 -07:00
repo_overview.txt incorporated elements from novas config and switched to flake -- WARNING, not tested or built yet 2024-11-02 02:41:32 -07:00

NixOS Configuration Structure

This repository contains a NixOS configuration managed through a flake-driven approach. Each directory serves a specific purpose in the overall configuration structure.

Directory Structure Overview

flake.nix

The entry point and source of truth for the entire configuration. This file:

  • Defines system configurations
  • Sets up home-manager configurations
  • Enables profiles
  • Manages input sources
  • Configures the Nix environment

lib/

Library functions and utilities that power the configuration system.

  • conds.nix: Condition checking helpers for configuration logic
  • default.nix: Main library entry point that re-exports all functions
  • mkHome.nix: Home-manager configuration builder
  • mkHost.nix: NixOS host configuration builder
  • secrets.nix: Secret management helper functions
  • utils.nix: General utility functions used throughout the configuration

profiles/

Profile definitions that enable specific sets of modules and configurations.

  • core/: System-level profiles

    • minimal.nix: Basic system setup
    • workstation.nix: Desktop/laptop configuration
    • server.nix: Server-specific setup
  • home/: Home-manager profiles

    • desktop.nix: Desktop environment configuration
    • development.nix: Development tools and settings
    • gaming.nix: Gaming-related configuration

Profiles are enabled through the flake.nix and determine which modules are activated.

modules/

Module definitions that implement actual functionality. Modules are enabled by profiles.

  • core/: System-level modules

    • age.nix: Age encryption setup
    • desktop.nix: Desktop environment fundamentals
    • filesystem.nix: Filesystem configurations
    • home-manager.nix: Home-manager integration
    • networking.nix: Network configuration
    • nix.nix: Nix package manager settings
    • security/: Security-related modules
    • user.nix: User management
    • xdg.nix: XDG base directory support
  • home/: Home-manager modules

    • comms/: Communication tools
    • development/: Development environments
    • firefox/: Browser configuration
    • media/: Media applications
    • terminal/: Terminal emulators
    • theme/: Theming configuration
    • virtualization/: Virtualization tools

system/

System-level configurations that are used by modules.

  • boot/: Boot-related configurations

    • quietboot.nix: Silent boot configuration
    • systemd-boot.nix: Systemd-boot setup
  • desktop/: Desktop environment configurations

    • appimage.nix: AppImage support
    • plasma6.nix: KDE Plasma 6 configuration
  • hardware/: Hardware-specific settings

    • bluetooth.nix: Bluetooth configuration
    • hardware-acceleration.nix: GPU acceleration
    • qmk.nix: QMK keyboard firmware
    • rgb.nix: RGB lighting control
  • locales/: Language and locale settings

    • us-english.nix: US English locale configuration
  • services/: System services

    • flatpak.nix: Flatpak support
    • printing.nix: Printer configuration
    • sunshine.nix: Sunshine streaming
    • syncthing.nix: Syncthing file sync
    • tailscale.nix: Tailscale VPN
  • shell/: Shell configurations

    • aliases.nix: Shell aliases
    • atuin.nix: Shell history database
    • zsh.nix: Zsh configuration
    • tmux.nix: Tmux terminal multiplexer

secrets/

Secret management using age encryption.

  • encrypted/: Encrypted secret files
  • identities/: Age identities for decryption
  • users/: User-specific secret configurations
    • ${username}/: Per-user secret definitions

hosts/

Host-specific configurations created via mkHost.

  • ${hostname}/
    • hardware-configuration.nix: Hardware-specific settings
    • default.nix: Host-specific overrides

users/

User-specific configurations created via mkHome.

  • ${username}/
    • config/: User-specific configurations
    • dotfiles/: User dotfiles
    • ${hostname}.nix: Host-specific user settings

pkgs/

Custom package definitions and overlays.

  • default.nix: Entry point for custom packages
  • overlays/: Nixpkgs overlays
    • default.nix: Main overlay entry point
    • modifications/: Modified existing packages
    • custom/: Custom package definitions
    • patches/: Package patches for existing packages

The pkgs directory serves several purposes:

  • Define custom packages not available in nixpkgs
  • Modify existing packages from nixpkgs
  • Create overlays for system-wide package modifications
  • Store patches for package modifications

Package definitions here can be used throughout the configuration by:

  1. Being imported through overlays in flake.nix
  2. Direct reference in module configurations
  3. Usage in home-manager configurations
  4. Integration with development environments

Configuration Flow

  1. flake.nix initiates configuration
  2. lib functions build configurations
  3. Profiles enable appropriate modules
  4. Modules implement functionality using system configurations
  5. Secrets are applied where needed
  6. Host-specific configurations override as needed
  7. User configurations are applied through home-manager

Important Notes

  • Configurations should flow from the flake.nix
  • Profiles should enable modules, not implement functionality
  • Modules should be composable and configurable
  • System configurations should be reusable
  • Secrets should be managed through age/agenix
  • Host configurations should only contain necessary overrides
  • User configurations should be host-aware