-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
62 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# nix-channel | ||
|
||
## Add channel | ||
|
||
```bash | ||
nix-channel --add <url> [<channel_alias>] | ||
``` | ||
|
||
:::info | ||
`channel_alias` is optional, defaults to `nixpkgs` | ||
::: | ||
|
||
## List channel | ||
|
||
```bash | ||
nix-channel --list | ||
``` | ||
|
||
## Remove channel | ||
|
||
```bash | ||
nix-channel --remove <channel_alias> | ||
``` | ||
|
||
## Update channel | ||
|
||
You'll need to fetch channel info after adding new channels | ||
|
||
```bash | ||
nix-channel --update [<...channel_alias>] # update all or specific channels | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ There's two ways to install packages using home-manager. | |
``` | ||
|
||
**However, you won't be able to config the package in a same place.** | ||
To generate any file as well as config file, use `home.file."<file_path>"` | ||
|
||
```nix | ||
{ cofig, pkgs, ... }: { | ||
|
@@ -34,3 +35,24 @@ There's two ways to install packages using home-manager. | |
}; | ||
} | ||
``` | ||
|
||
## Install and config by builtin option | ||
|
||
**For some packages, nix provides builtin options to set them up programmatically** | ||
|
||
```nix | ||
{ cofig, pkgs, ... }: { | ||
programs.git = { | ||
enable = true; | ||
userName = "foo"; | ||
userEmail = "[email protected]"; | ||
}; | ||
} | ||
``` | ||
|
||
*`enable` implies that the package will be installed implicitly.* | ||
|
||
:::info | ||
Only few packages has builtin options, how do I know? | ||
Go to [Home-manager Options](https://nix-community.github.io/home-manager/options.xhtml) and search `programs.<pkg_name>` | ||
::: |