Skip to content

MathieuDR/nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Feb 16, 2025
9daa7c0 Β· Feb 16, 2025
Feb 16, 2025
Dec 8, 2024
Feb 16, 2025
Jan 29, 2025
Nov 22, 2024
Feb 16, 2025
Nov 18, 2024
Nov 30, 2024
Nov 30, 2024
Feb 1, 2024
Dec 8, 2024
Dec 8, 2024
Dec 2, 2024
Feb 16, 2025
Dec 3, 2024
Dec 4, 2024
Nov 8, 2024

Repository files navigation

YSomic's NixOS Configuration

This repository contains a NixOS system configuration using the Flakes feature. It manages both system-level (NixOS) and user-level (Home Manager) configurations.

πŸ“ Structure

.
β”œβ”€β”€ configuration/       # Shared configurations between NixOS and Home Manager
β”‚   β”œβ”€β”€ nixos/          # NixOS-specific configurations
β”‚   └── home-manager/   # Home Manager-specific configurations
β”œβ”€β”€ hosts/              # Host-specific NixOS configurations
β”‚   β”œβ”€β”€ anchor/         # Configuration for 'anchor' machine
β”‚   └── wanderer/       # Configuration for 'wanderer' machine (WIP)
β”œβ”€β”€ home-manager/       # Host-specific Home Manager configurations
β”‚   └── anchor/        # Configuration for the user on 'anchor'
β”œβ”€β”€ modules/           # Custom NixOS and Home Manager modules
β”‚   β”œβ”€β”€ nixos/        # NixOS-specific modules
β”‚   β”œβ”€β”€ home-manager/ # Home Manager-specific modules
β”‚   └── shared/       # Shared module definitions
β”œβ”€β”€ pkgs/             # Custom package definitions
└── lib/              # Helper functions and documentation
    └── repl.md       # Guide for using the Nix REPL with this configuration

πŸš€ Features

  • Hyprland Wayland compositor setup with:
    • Waybar configuration
    • Custom lock screen (Hyprlock)
    • Automatic multi-monitor setup
  • Theme Integration with Catppuccin
  • Development Environment with:
    • NVIM & VSCode
    • Git configuration
    • Custom terminal setup (Kitty)
  • Gaming Support with Steam and Prismlauncher
  • Power management
  • Custom Scripts for:
    • Power management
    • Window management
    • Git operations
    • Screenshot capabilities
    • Listing all files, useful for AI

πŸ“ Planned Improvements

See TODOs.md for a list of planned improvements and additions to this configuration, including:

  • Automatic garbage collection
  • Backup configuration
  • System maintenance
  • Security enhancements
  • And more...

These improvements are tracked and documented to maintain system health and add useful features over time.

πŸ›  Usage

Prerequisites

  1. NixOS installation with Flakes enabled
  2. Git

Development

For development and debugging, you can use the provided REPL setup:

  • Check out the REPL Guide for detailed usage instructions
  • Use the just -l command for common operations:
    just         # Show available commands
    just rebuild # Rebuild NixOS configuration
    just hm      # Rebuild Home Manager configuration

βš™οΈ Configuration

Adding a New Host

  1. Create a new directory under hosts/
  2. Copy and modify the hardware configuration
  3. Create host-specific configurations

Modifying Home Manager

User-specific configurations are managed in:

  • home-manager/anchor/ for the anchor machine
  • configuration/home-manager/ for shared configurations

Custom Modules

Create new modules in modules/ following the existing structure:

  • modules/nixos/ for NixOS modules
  • modules/home-manager/ for Home Manager modules
  • modules/shared/ for shared module definitions

🀝 Credits

This configuration is inspired by and borrows from:

πŸ” Useful Resources

Bootstrapping

Work in progress

  • Create system agenix ssh key called /etc/HOSTNAME/agenix_HOSTNAME_system
    • Copy public key in data/secrets/secrets.nix
  • Create user ssh key called ~/.config/agenix/agenix_key
    • Since we don't have the user yet, we might need to move it around after first activation
    • Add it to public keys here
  • Rekey all secrets so that the keys can read em
  • Get keepass bootstrap for Google PW + download keepass
  • Be able to use rsa_id

WANDERER

  • Installed using gnome installer
  • Copied /etc/nixos/* configuration
  • Imported in configuration
  • Activate using flake
    • sudo nixos-rebuild switch --flake github:MathieuDR/nix#HOST --refresh
    • sudo home-manager switch --flake github:MathieuDR/nix#USER@HOST --refresh
  • Create system keys with just generate-keys
    • Use the CP argument to copy the public keys, ready to be added to the config
  • Syncthing
    • Gather device id syncthing generate
    • add it to configuration/home-manager/syncthing.nix
  • Firefox
    • Install firefox colour theme
    • User styles, sync from cloud
    • STG, import latest backup under ~/.config/<HOST>/firefox/STG.backup

About

All things nix

Resources

Stars

Watchers

Forks

Packages

No packages published