Setup
This dotfiles is intended to be used with either Fedora 40>, Ubuntu 20.04> or Arch Linux. Please install a clean version of either distro and then follow the steps below.
Installation
0. Install distro
Download the latest ISO from your desired distro and write it to a USB stick.
1. Clone dotfiles to home directory
Open a shell and begin the setup process. This setup requires you to provide a hostname as a parameter. You can use an existing hostname to restore an old system or choose a new name.
If you are running this in a VM be sure to answer yes if it prompts you.
curl -L https://df.mvl.sh | bash -s your-hostname
Replace your-hostname with your desired hostname for this machine.
2. Relog/Reboot
It's probably a good idea that you either reboot or log out and log back in to make sure all the changes are applied.
# sudo reboot
3. Create ~/.op_sat (Optional)
For servers you can place a file ~/.op_sat with your 1Password Service Access Token, this can then be used by Ansible to fetch secrets for services. This is mostly for server systems so you're able to skip it for workstations.
4. Run dotf update
Run the dotf update command, although the setup script did most of the work some symlinks still need to be set which at the moment is done using shell scripts.
dotf update
6. Profit
You should now have a fully setup system with all the configurations applied.
Adding a new system
Paths in the repository
Here are some paths that contain files named after the hostname of the system. If you add a new system you should add the relevant files to these paths.
config/ssh/authorized_keys: Contains the public keys per hostname that will be symlinked to the~/.ssh/authorized_keysfile.flake.nix: Contains an arrayhomeConfigurationswhere you should be adding the new system hostname and relevant configuration.
Server reboots
In case you reboot a server, it's likely that this runs JuiceFS. To be sure that every service is properly accessing JuiceFS mounted files you should probably restart the services once when the server comes online.
dotf service stop --all
df # confirm JuiceFS is mounted
dotf service start --all
Object Storage (Servers only)
In case you need to adjust anything regarding the /mnt/object_storage JuiceFS. Ensure to shut down all services:
dotf service stop --all
Unmount the volume:
sudo systemctl stop juicefs
And optionally if you're going to do something with metadata you might need to stop redis too.
cd ~/services/juicefs-redis/
docker compose down --remove-orphans
Adding a new system
To add a new system you should follow these steps:
- Add the relevant files shown in the section above.
- Ensure you've either updated or added the
$HOME/.hostnamefile with the hostname of the system. - Run
dotf updateto ensure the symlinks are properly updated/created.
Using 1Password SSH Agent with WSL2 (Windows 11)
This setup allows you to use your 1Password-managed SSH keys inside WSL2. The WSL-side steps are automated by Ansible. The following Windows-side steps must be performed manually:
Windows-side Setup
-
Enable 1Password SSH Agent
- Open the 1Password app on Windows.
- Go to Settings → Developer and enable "Use the SSH agent".
-
Install npiperelay using winget
- Open PowerShell and run the following command:
winget install albertony.npiperelay - This will install the latest maintained fork of npiperelay and add it to your PATH automatically.
- Open PowerShell and run the following command:
-
Restart Windows Terminal
- After completing the above steps, restart your Windows Terminal to ensure all changes take effect.
-
Test the SSH Agent in WSL2
- Open your WSL2 terminal and run:
ssh-add -l - If your 1Password keys are listed, the setup is complete.
- Open your WSL2 terminal and run: