Skip to content

Commit 23ad755

Browse files
committed
docs/src: add nix-darwin support, swap NixOS and Home Manager where needed
1 parent 6fd98ab commit 23ad755

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

docs/src/getting_started/initialization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ You do not have to do this; you can simply clone the minimal configuration templ
66
nix flake init -t github:yunfachi/denix#minimal
77
```
88

9-
You can also copy the minimal configuration template without the rices:
9+
You can also clone the minimal configuration template without the rices:
1010
```sh
1111
nix flake init -t github:yunfachi/denix#minimal-no-rices
1212
```
@@ -15,7 +15,7 @@ nix flake init -t github:yunfachi/denix#minimal-no-rices
1515
First, create a directory for your configuration and a `flake.nix` file with the following content:
1616
```nix
1717
{
18-
description = "Modular configuration of Home Manager, NixOS, and Nix-Darwin with Denix";
18+
description = "Modular configuration of NixOS, Home Manager, and Nix-Darwin with Denix";
1919
2020
inputs = {
2121
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";

docs/src/getting_started/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ A module includes options, configuration, and importing other modules.
2828
- `config = {};`: Similar to initializing variables, but here it's about specifying values for options.
2929
- `imports = [];`: A list of paths to modules or just module code (attrset or lambda that returns attrset).
3030

31-
NixOS and Home Manager have their own modules, which you have likely already worked with. You can search for options on these sites:
31+
NixOS, Home Manager, and Nix-Darwin have their own modules, which you have likely already worked with. You can search for options on these sites:
3232
- NixOS: https://search.nixos.org/options
3333
- Home Manager: https://home-manager-options.extranix.com/
3434
- Nix-Darwin: https://nix-darwin.github.io/nix-darwin/manual/

docs/src/getting_started/transfer_to_denix.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ However, you will need to create the following from scratch:
99
The main part of the configuration can be fully reused from your old setup. The key is to separate the hardware configuration from the general configuration. See the section [How Does It Work?](#how-it-works).
1010

1111
## How Does It Work? {#how-it-works}
12-
All Denix modules are standard Home Manager, NixOS, or Nix-Darwin modules but with additional logic for enabling and disabling configurations.
12+
All Denix modules are standard NixOS, Home Manager, or Nix-Darwin modules but with additional logic for enabling and disabling configurations.
1313

1414
This means that you can add code or files from the old configuration into the new one, so they are imported through [`delib.configurations`](/configurations/introduction). You can place this code in the `modules` directory or create a new one, for example, `modules_nixos_old` for older configurations.
1515

docs/src/modules/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ delib.module {
3030
```
3131

3232
## Simplicity and Cleanliness {#simplicity-and-cleanliness}
33-
Denix modules tend to look simpler and cleaner compared to NixOS/Home Manager modules, due to the following reasons:
33+
Denix modules tend to look simpler and cleaner compared to NixOS/Home Manager/Nix-Darwin modules, due to the following reasons:
3434

3535
1. Simple yet fully functional option declaration (see [Options](/options/introduction)).
3636
2. Built-in logic for separating configurations based on the value of `${delib.module :: name}.enable`: always, ifEnabled, ifDisabled.

docs/src/ru/getting_started/initialization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
nix flake init -t github:yunfachi/denix#minimal
77
```
88

9-
Также можно скопировать шаблон минимальной конфигурации, но без райсов:
9+
Также можно склонировать шаблон минимальной конфигурации, но без райсов:
1010
```sh
1111
nix flake init -t github:yunfachi/denix#minimal-no-rices
1212
```
@@ -15,7 +15,7 @@ nix flake init -t github:yunfachi/denix#minimal-no-rices
1515
Первым делом создайте директорию под вашу конфигурацию и файл `flake.nix` со следующим содержанием:
1616
```nix
1717
{
18-
description = "Modular configuration of Home Manager, NixOS, and Nix-Darwin with Denix";
18+
description = "Modular configuration of NixOS, Home Manager, and Nix-Darwin with Denix";
1919
2020
inputs = {
2121
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";

docs/src/ru/getting_started/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Denix в первую очередь нужен для упрощения соз
2828
- `config = {};`: Аналогично инициализации переменных, но здесь это указание значений для опций.
2929
- `imports = [];`: Список путей к модулям или просто код модуля (attrset или lambda, которая возвращает attrset).
3030

31-
NixOS и Home Manager имеют свои собственные модули, с которыми вы, скорее всего, уже работали. Поиск опций можно выполнить на этих сайтах:
31+
NixOS, Home Manager и Nix-Darwin имеют свои собственные модули, с которыми вы, скорее всего, уже работали. Поиск опций можно выполнить на этих сайтах:
3232
- NixOS: https://search.nixos.org/options
3333
- Home Manager: https://home-manager-options.extranix.com/
3434
- Nix-Darwin: https://nix-darwin.github.io/nix-darwin/manual/

docs/src/ru/getting_started/transfer_to_denix.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Основную часть конфигурации можно полностью использовать из вашей старой конфигурации, главное - отделить аппаратные настройки (hardware configuration) от общей конфигурации. См. раздел [Как это работает?](#how-it-works).
1010

1111
## Как это работает? {#how-it-works}
12-
Все модули Denix представляют собой обычные модули Home Manager, NixOS или Nix-Darwin, но с дополнительной логикой включения и выключения конфигураций.
12+
Все модули Denix представляют собой обычные модули NixOS, Home Manager или Nix-Darwin, но с дополнительной логикой включения и выключения конфигураций.
1313

1414
Это означает, что вы можете добавить код или файлы из старой конфигурации в новую, чтобы они импортировались через [`delib.configurations`](/ru/configurations/introduction). Вы можете положить этот код в директорию `modules` или создать новую директорию, например, `modules_nixos_old` для старых конфигураций.
1515

docs/src/ru/modules/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ delib.module {
3030
```
3131

3232
## Простота и чистота {#simplicity-and-cleanliness}
33-
Модули Denix в большинстве случаев выглядят проще и чище, чем модули NixOS/Home Manager, по следующим причинам:
33+
Модули Denix в большинстве случаев выглядят проще и чище, чем модули NixOS/Home Manager/Nix-Darwin, по следующим причинам:
3434

3535
1. Простое, но при этом полноценное декларирование опций (см. [Опции](/ru/options/introduction)).
3636
2. Встроенная логика разделения конфигураций в зависимости от значения опции `${delib.module :: name}.enable`: always, ifEnabled, ifDisabled.

0 commit comments

Comments
 (0)