newbie-friendly flake & home-manager instructions
This commit is contained in:
parent
9f79e7ef14
commit
de3f79cae7
1 changed files with 22 additions and 10 deletions
32
README.md
32
README.md
|
|
@ -45,37 +45,49 @@ Please file an issue.
|
||||||
|
|
||||||
### With flakes
|
### With flakes
|
||||||
|
|
||||||
Add this flake as an input:
|
Add this flake as an input in `flake.nix`:
|
||||||
|
|
||||||
``` nix
|
``` nix
|
||||||
nix-doom-emacs-unstraightened.url = "github:marienz/nix-doom-emacs-unstraightened";
|
inputs = {
|
||||||
# Optional, to download less. Neither the module nor the overlay uses this input.
|
nix-doom-emacs-unstraightened.url = "github:marienz/nix-doom-emacs-unstraightened";
|
||||||
nix-doom-emacs-unstraightened.inputs.nixpkgs.follows = "";
|
# Optional, to download less. Neither the module nor the overlay uses this input.
|
||||||
|
nix-doom-emacs-unstraightened.inputs.nixpkgs.follows = "";
|
||||||
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
If your Doom configuration lives in a different repository, add that as input
|
If your Doom configuration lives in a different repository, add that as input
|
||||||
too:
|
too:
|
||||||
|
|
||||||
``` nix
|
``` nix
|
||||||
doom-config.url = "...";
|
inputs = {
|
||||||
doom-config.flake = false;
|
doom-config.url = "...";
|
||||||
|
doom-config.flake = false;
|
||||||
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Home Manager
|
#### Home Manager
|
||||||
|
|
||||||
If you use [Home Manager](https://github.com/nix-community/home-manager), add
|
If you use [Home Manager](https://github.com/nix-community/home-manager), add
|
||||||
Unstraightened's home-manager module:
|
Unstraightened's home-manager module in `flake.nix`:
|
||||||
|
|
||||||
``` nix
|
``` nix
|
||||||
imports = [ inputs.nix-doom-emacs-unstraightened.hmModule ];
|
outputs = inputs @ { nixpkgs, home-manager, ... }: {
|
||||||
|
homeConfigurations."username" = home-manager.lib.homeManagerConfiguration {
|
||||||
|
modules = [
|
||||||
|
inputs.nix-doom-emacs-unstraightened.hmModule
|
||||||
|
./home.nix
|
||||||
|
];
|
||||||
|
extraSpecialArgs = { inherit inputs; };
|
||||||
|
};
|
||||||
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
Configure it:
|
Configure it in `home.nix`:
|
||||||
|
|
||||||
``` nix
|
``` nix
|
||||||
programs.doom-emacs = {
|
programs.doom-emacs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
doomDir = inputs.doom-config;
|
doomDir = inputs.doom-config; # or e.g. `./doom.d` for a local configuration
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue