Dotfiles¶
Repository¶
Canonically between github:andreijiroh-dev/dotfiles
and mau.dev/andreijiroh-dev/dotfiles
but also in the works for sourcehut mirror.
Branches¶
nixpkgs
- current branch
Usage¶
Setting up a new system¶
Basically followed ~sircmpwn's blog on how did he setup his dotfiles repo on a new system.
# cd to $HOME
cd ~
# pro tip: "command -v git" first before running (maybe "nix-shell -p gitFull"
# first if we're in nix environment)
git init
# check the URLs above for hints
git remote add hub https://github.com/andreijiroh-dev/dotfiles
git remote add lab https://mau.dev/andreijiroh-dev/dotfiles
git fetch --all
# force checkout to the branch for that host
git checkout -f nixpkgs # nixpkgs defaults
git checkout -f termux # termux
git submdoule update --init
Since our configurations are managed by home-manager
, we need to run
do the following commands, assuming nix-commands
and flakes
feature flags
are enabled (see userspace nix.conf
for hints and context)
# local copy / submodule
nix run home-manager/master -- switch --flake .config/nixos # flake mode
nix run home-manager/master -- switch # plain flakeless mode
# or just use the flake remotely without cloning it
nix run home-manager/master -- switch --flake github:andreijiroh-dev/nixops-config
Reusing configs in other systems¶
Think of Nest and Project Segfault for the Nix-based setups.
Instead of having to polluting things a la yadm
, we'll use Git branches as a hack
or workaround (depending on your vocabulary) and some quick edits should do at least,