Skip to content

rgroemmer/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NixOS Hyprland Home Manager Alacritty Neovim Love

This is my ever-evolving dotfiles repository, used to manage my desktop workstation, a MacBook Pro, and any Linux devbox capable of running Nix. This repository is constantly improved or changed in some way. It follows a structure to keep related configurations together, but not too much to reduce complexity.

🚀 Usage

Bootstrap

nix develop

# NixOS rebuilds (hostname autodetection)
nh os switch .

# HomeManager rebuilds (hostname & username autodetection)
nh home switch .

# NixOs build with custom hostname
nh os build --hostname k3s-m0 .

# HomeManager build with custom hostname
nh home switch -c macbook

# NixOS build installer iso image
nix build .#nixosConfigurations.iso.config.system.build.isoImage
💽 Disko

Disko is used to provision disks, it creates automatically the filsystems configuration.

# Run disko from an installer
sudo nix run github:nix-community/disko --no-write-lock-file -- --mode zap_create_mount ./hosts/zion/disko.nix

# After this nixos can be installed
sudo nixos-install --flake .#zion

🏛️ Structure

  • flake.nix Entrypoint to all:
    • NixOS configurations.
    • HomeManager configurations.
    • devShells to provide nix develop environment. (see shell.nix)
    • formatter.
  • shell.nix Shell config for nix develop environment.
    • Leverage git-commit-hooks with enforce of lint, fmt & code checking.
    • Shell environment with all tools needed to switch, build & run the flake.
  • hosts/ All physical machines managed by NixOS.
  • nixos Modules for NixOS separated into:
    • common/ default configurations for all hosts.
    • * optional to import.
  • home-manager Entrypoint for all home-configurations per host.
    • common/ contains configuration defaults valid for all home-configurations.
    • */ contains NixOS modules, optional to import.
  • isos/ Configuration for all NixOS configurations which build images.
  • static/ Static files mostly not used for nix.
  • nix.nix Nix & nixpkgs configuration for NixOS & HomeManager.

📜 Style guide & rules

  • Host:
    • ⚖️ Every hosts entrypoint is a default.nix.
      • ⚖️ It imports all NixOS modules as path.
      • ⚖️ Define host specific configuration
      • ⚖️ Imports hardware-configuration.nix
    • May has a disko.nix configuration to configure filsystems.
  • home-manager
    • ⚖️ Every host has its own entrypoint at toplevel.
    • ⚖️ Every host entrypoint is a file with the host name which:
      • Imports all Home configuration for this host.
      • Defines host specific configuration

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published