My personal computing configuration that I wish to sync between machines.
- Install Nix on the system (with flakes enabled) by running bootstrap.sh
- Create system configuration with
nix run github:carlthome/dotfiles#switch-system
- Create user configuration with
nix run github:carlthome/dotfiles#switch-home
Run packages by nix run dotfiles#<name>
where <name>
is the package name.
Use nix flake show dotfiles
to list all available packages.
- Clone configuration to the current working directory by
nix flake clone github:carlthome/dotfiles --dest .
- Stage declarative changes in flake.nix as needed
- Test and deploy changes with
nix run
All systems will attempt to switch to the default branch configuration on a daily basis.
Develop individual packages with the following commands (where <name>
is a subdirectory in ./packages/
):
- Enter an interactive build environment with
nix develop .#<name>
and run tests like usual (e.g.pytest
,cargo test
,npm test
, etc.) - Run
nix develop .#<name> --command <command>
to execute a specific command within a build environment directly (for example:nix develop .#train-mnist --command pytest
to run Python tests for thetrain-mnist
package) - Build a package with
nix build .#<name> --print-build-logs
(view build output in theresult/
directory) - Temporarily install a package with
nix shell .#<name>
- Directly run a package's default entrypoint by
nix run .#<name>