koluacik / nixos-configuration

My NixOS with home-manager configuration and dotfiles.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NixOS Configuration

My single-user and single-device multiple-device NixOS configuration flake with Home Manager to manage my dotfiles.

Brief overview of the repository structure

  • flake.nix is the top level definition of the system configuration flake. It provides my system configuration and nixpkgs with overlays applied for usage with flake-based nix commands (nix repl etc.).
  • home/ directory is the place for non-NixOS specific dotfiles.
  • hosts/ declares hosts. Each host declaration imports various modules for the specific hardware.
  • users/ has user configuration and user space programs for the declared users.
  • modules/ is my attempt at modularizing the system configuration. These modules are imported by the declared hosts and users. modules/home-modules has Home Manager modules, meanwhile the other sibling directories are NixOS modules. modules/devices has hardware-specific configurations initially generated by nixos-generate-config.
  • overlays/ is my changes applied to the upstream nixpkgs. The modified nixpkgs is also an output of this flake so that I can use it in my flake commands. For old nix commands (nix-shell etc.), I use the overlays-compat trick.
  • xmonad/ directory has my xmonad and xmobar configurations. The cabal project is included in my haskellPackages package set and included as an extra package in my nixos module for the wm. I run rm ~/.cache/xmonad/*; cabal install --installdir=./ --install-method=copy --overwrite-policy=always && cp my-xmonad ~/.cache/xmonad/xmonad-x86_64-linux && xmonad --restart instead of waiting for nixos-rebuild to complete after each change I made in my config for rapid feedback from the changes I've made. Compared to nix-shell -based recompilation scripts, this setup seems to be the best of both worlds for me. nixos-rebuild forces the recompilation of xmonad after an update, meaning I don't get a surprise 10-minutes wait with no wm after a reboot, meanwhile having the ability to test the changes to the xmonad configuration without waiting for too long.

About

My NixOS with home-manager configuration and dotfiles.


Languages

Language:Python 50.6%Language:Nix 22.5%Language:Shell 11.5%Language:Haskell 10.4%Language:KakouneScript 5.0%