xixiaofinland / dotfiles-nix

dotfiles managed by nix flake
3 stars 1 forks source link

Dotfiles with Nix

This repository contains my personal configuration files (dotfiles) managed using Nix Flakes. It supports both macOS and NixOS on a WSL2 subsystem in Windows.

⚠️ It's important to understand what the code does before applying to your own system. It has a learning curve to use Nix, take action rigorously!

Features

Installation

  1. Prerequistes:

  2. Clone the Repository:

    git clone https://github.com/xixiaofinland/dotfiles-nix.git ~/dotfiles-nix
    cd ~/dotfiles-nix
  3. Activate Flakes:

    • If you used the official Nix installation guide, make sure to enable flakes by adding experimental-features = nix-command flakes to your ~/.config/nix/nix.conf, or whatever way to enable the the flake feature.
    • If you used the 3rd party script, flake should have been auto-enabled for you.
  4. Apply Configurations: In NixOS:

    sudo nixos-rebuild switch --flake ~/dotfiles-nix/

    In MacOS:

    nix run nix-darwin -- switch --flake ~/dotfiles-nix/

Structure

Contributing

Feel free to open issues or submit pull requests. Contributions are welcome!

License

This repository is licensed under the MIT License.