Skip to content

v420v/dotfiles

Repository files navigation

dotfiles

NixOS + Hyprland config, plus an M1 macOS (nix-darwin) variant. Both share the same flake and home-manager modules.

NixOS

Apply

cd ~/dotfiles
./install.sh        # imports hardware-config, generates wallpaper, runs nixos-rebuild

Or by hand:

sudo cp /etc/nixos/hardware-configuration.nix ~/dotfiles/nixos/
sudo nixos-rebuild switch --flake ~/dotfiles#nixos

Re-apply after any change with the same command (aliased to rebuild in zsh).

Remove

sudo nixos-rebuild switch --rollback   # go back to the previous generation
nix-collect-garbage -d                 # drop old generations

To fully drop it, point nixos-rebuild at a different configuration.nix and rebuild, then delete ~/dotfiles.

macOS (M1) — nix-darwin

Apply

# Enable flakes if you haven't:
mkdir -p ~/.config/nix
echo 'experimental-features = nix-command flakes' >> ~/.config/nix/nix.conf

# First run: bootstraps darwin-rebuild, then applies system + user.
sudo nix run nix-darwin/master#darwin-rebuild -- switch --flake ~/dotfiles#<user>

After the first run, re-apply with (aliased to rebuild):

sudo darwin-rebuild switch --flake ~/dotfiles#<user>

User-only changes (no sudo):

home-manager switch --flake ~/dotfiles#<user>@mac    # aliased to `rebuild-home`

Remove

sudo nix run nix-darwin#darwin-uninstaller          # removes nix-darwin

Stock files it replaced are backed up next to the originals as .before-nix-darwin / .hm-bak; restore those if needed, then delete ~/dotfiles.

About

Config files

Resources

Stars

Watchers

Forks

Contributors