Skip to content

chadac/dotfiles

Repository files navigation

@chadac's dotfiles

Pure Nix dotfile deployment! My descent into Nix continues...

This is a multi-host deployment for NixOS and Home Manager using flakes. Largely influenced by @lovesegfault's Nix config.

Features

  • Multi-host configuration with nix-config-modules
  • Custom app configurations for building more complex host specs
  • Multihead display configuration: Hosts can now specify a monitor configuration using standard xrandr outputs in a much more flexible fashion than what NixOS offers by default. I also include some Home Manager hooks so that display configurations can be applied at login on non-NixOS systems. See ./apps/display/wallpapers/default.nix for more details.

Usage

For rebuilding NixOS:

nixos-rebuild switch --flake .#<host>

For rebuilding Home Manager:

home-manager switch --flake .#<host>

Ubuntu Desktop with gdm

For Ubuntu systems, I needed to add one more configuration item to get this working perfectly:

/usr/share/xsessions/xsession.desktop:

[Desktop Entry]
Name=Nix
Comment=Runs the xsession provided by Nix.
Exec=/etc/X11/Xsession
Type=Application
DesktopNames=GNOME-Flashback;GNOME;
X-Ubuntu-Gettext-Domain=gnome-flashback

This sets up Ubuntu to use the ~/.xsession generated by Home Manager rather than its own WM.

TODO

  • Flake integration tests via GitHub.
  • Explicit declarations of nonfree software used. I'll be aiming to eliminate nonfree software from my system entirely.
  • Service for my hosts to self-update once a week.
  • Entrypoint package to simplify executing nixos-rebuild and home-manager.
  • Better QEMU virtual machine configuration. Currently there doesn't seem to be a way to deploy QEMU virtual machine XML configuration files via Nix directly, so I just need a script similar to what already exists for libvirtd that copies any machine configurations to /var/lib/libvirtd/qemu.conf.
  • Multi-user configuration: Current setup is fairly opinionated about deploying to systems with a single user. It'd be nice to extend it for multi-user configurations, perhaps by splitting up the host configuration into separate host and user configurations...

Previous Iterations

I've been maintaining my own dotfiles repo since around 2015-2016, but my commit history is a bit dishonest because I usually reset the repo from scratch when I decide to do total refactors. For those interested in my historical configurations:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published