Collection of dotfiles & system configurations for personal use.
Using Nix and the custom dots
command, it's trivial to install and update the configurations.
The configurations provided via the flake support NixOS, Nix-Darwin, and standalone Home-Manager.
The former two contain a Home-Manager submodule.
As long as Nix is installed, you do not need to worry about any setup. In case you have flakes enabled already, you can omit the --experimental-features
flag.
Run the followig command to run dots
directly from GitHub:
nix --experimental-features 'nix-command flakes' run github:imatpot/dotfiles
It will prompt you to clone the repository to ~/.config/dotfiles
if it doesn't exist yet.
dots
is installed to your configurations automatically. If it isn't you can also nix run
it from the cloned repository, or use nix run github:imatpot/dotfiles
to run it directly from GitHub.
dots
tries to figure out the system it's running on & what configurations are available, and select appropriate defaults.
For example, on Darwin it will look for Nix-Darwin configurations for the current hostname, and fall back to Home-Manager configurations if none are found.
It will run build
by default, but you can of course change this behaviour by passing appropirate arguments.
Here's a list of supported arguments:
-
build
: Build the configurations. Will prompt toswitch
to successfully built configurations. -
test, activate
: Build the configurations and run the activation script. -
switch
: Build the configurations, run the activation script, and set as default. -
os, system
: Auto-detect system and matching NixOS or Nix-Darwin configuration. -
nixos
: Auto-detect matching NixOS configuration. -
darwin
: Auto-detect matching Nix-Darwin configuration. -
home, home-manager
: Auto-detect matching Home-Manager configuration. -
-f, --flake <flake>
: Specify the full flake to query for configurations. -
-u, --url <url>
: Specify the flake URL to query for configurations. Must not include#
-suffix. -
-n, --name <name>
: Specify the flake output name of the configuration. Must not include#
-prefix. -
-r, --raw
: Whether to usenix build
for system configurations. Only supportsbuild
. -
-d, --debug
: Whether to show debug output. -
Any other argument that does not contain
-
will try to find a matching NixOS, Nix-Darwin, or Home-Manager configuration and build, test, or switch to it.
Let dots
figure out and build the matching system or home configuration
dots
Switch to the Nix-Darwin configuration with the name kitchen
dots switch darwin --name kitchen
Build (inferred) whatever the configuration with the name imatpot
is
dots imatpot
Build a matching NixOS configuration from /etc/nixos
dots nixos --url /etc/nixos
Test the NixOS configuration with the name kitchen
from GitHub
dots test nixos --flake github:imatpot/dotfiles#kitchen
or
dots test nixos --url github:imatpot/dotfiles --name kitchen
Show debug information when building the user imatpot
dots build home --name imatpot --debug