Skip to content

Latest commit

 

History

History
75 lines (51 loc) · 1.82 KB

README.md

File metadata and controls

75 lines (51 loc) · 1.82 KB

It's Matt's dotfiles!

Starring configurations for...

It's Nix!

The configuration in this repo relies on Nix and Home Manager. That doesn't mean it only works on NixOS! I've also used it in macOS (with nix-darwin), Arch Linux, and ChromeOS's Crostini.

Why do all of the nix commands use --impure?

So I don't have to hard-code the system architecture, username, or home directory. The nix configurations in this repo rely on builtins.currentSystem and builtins.getEnv which don't work in pure evaluations with flakes.

Getting Started

Creating a new flake with the template

Prerequisites:

  • nix
  • gnumake
  1. Use the flake template:

    nix flake new -t github:mattbun/dotfiles destination-dir
  2. Open the directory

    cd destination-dir
  3. Customize home.nix to your liking

  4. Apply configuration

    make

Adding to an existing home-manager flake

{
  inputs = {
    # ...

    # Add to inputs
    dotfiles.url = "github:mattbun/dotfiles";
  };

  outputs = { dotfiles, ... }: {
      homeConfigurations.matt = home-manager.lib.homeManagerConfiguration {
        # ...

        modules = [
          # ...

          # Add to modules
          dotfiles.homeModule
        ];
      };
    };
}

See templates/default/flake.nix for a full example.