Skip to content

Commit 5b54ab3

Browse files
committed
docs/src/getting_started: add anchors
1 parent 8cf97d2 commit 5b54ab3

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

docs/src/getting_started/initialization.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Configuration Initialization
1+
# Configuration Initialization {#initialization}
22
This section will describe creating the `minimal` template from scratch.
33

44
You do not have to do this; you can simply clone the minimal configuration template with the following command:
@@ -11,7 +11,7 @@ You can also copy the minimal configuration template without the rices:
1111
nix flake init -t github:yunfachi/denix#minimal-no-rices
1212
```
1313

14-
## Flake
14+
## Flake {#flake}
1515
First, create a directory for your configuration and a `flake.nix` file with the following content:
1616
```nix
1717
{
@@ -59,7 +59,7 @@ Code explanation:
5959
- `denix.lib.configurations` - [Configurations (flakes) - Introduction](/configurations/introduction).
6060
- `paths = [./hosts ./modules ./rices];` - paths to be recursively imported by Denix. Remove `./rices` if you don't want to use rices.
6161

62-
## Hosts
62+
## Hosts {#hosts}
6363
Create a `hosts` directory, and within it, create a subdirectory with the name of your host, for example, `desktop`.
6464

6565
In this subdirectory, create a `default.nix` file with the following content:
@@ -91,7 +91,7 @@ delib.host {
9191

9292
The `default.nix` file will be modified later after adding modules and rices, so you can keep it open.
9393

94-
## Rices
94+
## Rices {#rices}
9595
Skip this section if you do not wish to use rices.
9696

9797
Create a `rices` directory, and within it, create a subdirectory with the name of your rice, for example, `dark`.
@@ -104,7 +104,7 @@ delib.rice {
104104
}
105105
```
106106

107-
## Modules
107+
## Modules {#modules}
108108
Create a `modules` directory, and within it, create a `config` subdirectory (typically, it contains modules that are not tied to a specific program or service).
109109

110110
It should be mentioned that modules represent your configuration, meaning it's up to your imagination, and you are free to change the modules as you wish.
@@ -126,7 +126,7 @@ delib.module {
126126

127127
This file is optional, as are any of its options, which are only used by you, but it is strongly recommended as good practice.
128128

129-
### Hosts
129+
### Hosts {#modules-hosts}
130130
Also, create a `hosts.nix` file in this same directory (`modules/config`), and write any example from [Hosts - Examples](/hosts/examples).
131131

132132
For example, we will take ["With the `type` Option"](/hosts/examples#type-option):
@@ -171,7 +171,7 @@ delib.host {
171171
}
172172
```
173173

174-
### Rices
174+
### Rices {#modules-rices}
175175
Skip this section if you are not using rices.
176176

177177
In the `modules/config` directory, create a `rices.nix` file, and write any example from [Rices - Examples](/rices/examples).
@@ -208,7 +208,7 @@ delib.host {
208208
}
209209
```
210210

211-
### Home Manager
211+
### Home Manager {#modules-home-manager}
212212
If you created a [constants module](#modules-constants), just create a `home.nix` file with the following content:
213213
```nix
214214
{delib, ...}:
@@ -239,7 +239,7 @@ delib.module {
239239
}
240240
```
241241

242-
### User
242+
### User {#modules-user}
243243
You can also create a `user.nix` file with the configuration of your NixOS user:
244244
```nix
245245
{delib, ...}:
@@ -280,7 +280,7 @@ delib.module {
280280
}
281281
```
282282

283-
## Conclusion
283+
## Conclusion {#conclusion}
284284
If you have followed the instructions precisely, you will end up with the following configuration directory tree:
285285
```plaintext
286286
hosts

docs/src/ru/getting_started/initialization.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Инициализация конфигурации
1+
# Инициализация конфигурации {#initialization}
22
В этом разделе будет описано создание шаблона `minimal` с нуля.
33

44
Делать это необязательно, можно просто склонировать шаблон минимальной конфигурации с помощью команды:
@@ -11,7 +11,7 @@ nix flake init -t github:yunfachi/denix#minimal
1111
nix flake init -t github:yunfachi/denix#minimal-no-rices
1212
```
1313

14-
## Флейк
14+
## Флейк {#flake}
1515
Первым делом создайте директорию под вашу конфигурацию и файл `flake.nix` со следующим содержанием:
1616
```nix
1717
{
@@ -59,7 +59,7 @@ nix flake init -t github:yunfachi/denix#minimal-no-rices
5959
- `denix.lib.configurations` - [Конфигурации (флейки) - Вступление](/ru/configurations/introduction).
6060
- `paths = [./hosts ./modules ./rices];` - пути, которые будут рекурсивно импортированы Denix. Удалите `./rices`, если не хотите использовать райсы.
6161

62-
## Хосты
62+
## Хосты {#hosts}
6363
Создайте директорию `hosts`, а в ней поддиректорию с названием вашего хоста, например, `desktop`.
6464

6565
В этой поддиректории создайте файл `default.nix` со следующим содержанием:
@@ -91,7 +91,7 @@ delib.host {
9191

9292
Файл `default.nix` ещё будет изменяться после добавления модулей и райсов, поэтому его можно не закрывать.
9393

94-
## Райсы
94+
## Райсы {#rices}
9595
Пропустите этот пункт, если не хотите использовать райсы.
9696

9797
Создайте директорию `rices`, а в ней поддиректорию с названием вашего райса, например, `dark`.
@@ -104,7 +104,7 @@ delib.rice {
104104
}
105105
```
106106

107-
## Модули
107+
## Модули {#modules}
108108
Создайте директорию `modules`, а в ней поддиректорию `config` (обычно в ней находятся модули, которые не привязаны к какой-то программе или сервису).
109109

110110
Стоит упомянуть, что модули - это ваша конфигурация, а значит ваша фантазия, поэтому вы вольны менять модули так, как вам угодно.
@@ -126,7 +126,7 @@ delib.module {
126126

127127
Этот файл необязателен, так же как и любая из его опций, которые используются лишь вами, но он настоятельно рекомендуется как хорошая практика.
128128

129-
### Хосты
129+
### Хосты {#modules-hosts}
130130
Также создайте файл `hosts.nix` в этой же директории (`modules/config`), а в него запишите любой пример из [Хосты - Примеры](/ru/hosts/examples).
131131

132132
Для примера мы возьмём ["С опцией `type`"](/ru/hosts/examples#type-option):
@@ -171,7 +171,7 @@ delib.host {
171171
}
172172
```
173173

174-
### Райсы
174+
### Райсы {#modules-rices}
175175
Пропустите этой пункт, если вы не используете райсы.
176176

177177
В директории `modules/config` создайте файл `rices.nix`, а в него запишите любой пример из [Райсы - Примеры](/ru/rices/examples).
@@ -208,7 +208,7 @@ delib.host {
208208
}
209209
```
210210

211-
### Home Manager
211+
### Home Manager {#modules-home-manager}
212212
Если вы создали [модуль констант](#modules-constants), то просто создайте файл `home.nix` с таким содержанием:
213213
```nix
214214
{delib, ...}:
@@ -239,7 +239,7 @@ delib.module {
239239
}
240240
```
241241

242-
### Пользователь
242+
### Пользователь {#modules-user}
243243
Также можно создать файл `user.nix` с конфигурацией вашего пользователя NixOS:
244244
```nix
245245
{delib, ...}:
@@ -280,7 +280,7 @@ delib.module {
280280
}
281281
```
282282

283-
## Заключение
283+
## Заключение {#conclusion}
284284
Если вы чётко следовали инструкции, то в итоге у вас будет следующее дерево директории конфигурации:
285285
```plaintext
286286
hosts

0 commit comments

Comments
 (0)