diff --git a/docs/content/en-US/04-nixos-modules/01-profiles/index.adoc b/docs/content/en-US/04-nixos-modules/01-profiles/index.adoc deleted file mode 100644 index 659fb817..00000000 --- a/docs/content/en-US/04-nixos-modules/01-profiles/index.adoc +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: Profiles ---- -= Profiles - -In my github:{github-repo}[NixOS modules, path=./modules/nixos, rev=master], there is a subset of modules for profiles. -The way we defined profiles is very similar to digga profiles. - -[quote, digga library] -____ -Profiles are a convenient shorthand for the definition of options in contrast to their declaration. -They're built into the NixOS module system for a reason: to elegantly provide a clear separation of concerns. -____ - -[NOTE] -==== -Despite mainly focusing on NixOS, this definition also applies to other environments such as github:nix-community/home-manager[opts=repo], github:numtide/system-manager[opts=repo], or github:LnL7/nix-darwin[opts=repo]. -==== - - -== What are profiles really? - -Except the difference is we also included a declaration for setting those options. -This enables different modules in our NixOS configurations to set those up in different points in time without getting a duplicate value error which is nice. -However, enabling profiles shouldn't be taken lightly. -In my project, the situations to enable profiles are limited. - -Here are the module namespaces with their guidelines for setting them profiles. - -[#lst:profile-namespace-guidelines] -* `services` and `programs` shouldn't use any profiles at all since they are small in scope that they are more likely to be combined with other modules. - -* Workflow modules (`workflows`) are prohibited to use profiles to discourage very customized configurations that are otherwise more suitable in the host, user, etc. -We have host- and user-specific modules for those purpose. - -* Really, anything that is being exported in the flake outputs (i.e., look for the attributes in `nix flake show`) unless explicitly stated like the case for `workflows`. - -[chat, Ezran, state=curious, role=reversed] -==== -Son, just like what I keep telling you: is this solution good enough? -==== - -[chat, foodogsquared] -==== -For the most part, yeah. -But the way how I'm using profiles is pretty similar to digga profiles in the same way that it is really used only once at most point. -==== - -[chat, Ezran, role=reversed] -==== -Why don't you use digga then? -==== - -[chat, foodogsquared] -==== -digga github:divnix/digga[was considered to be a dead project, issue=503] which is unfortunate. -When I was grokking flakes, I used their example extensively and eventually understood a lot about flakes and Nix modules overall. -But the project is really big and overwhelming to use it for someone who only started using flakes so I just went through the project piece by piece and only used a small subset of it. -I think link:https://github.com/divnix/digga/issues/503#issuecomment-1546359287[this comment sums up the problems of the project]. -==== diff --git a/docs/content/en-US/04-nixos-modules/02-workflows/index.adoc b/docs/content/en-US/04-nixos-modules/01-workflows/index.adoc similarity index 100% rename from docs/content/en-US/04-nixos-modules/02-workflows/index.adoc rename to docs/content/en-US/04-nixos-modules/01-workflows/index.adoc diff --git a/docs/content/en-US/04-nixos-modules/03-disko/index.adoc b/docs/content/en-US/04-nixos-modules/02-disko/index.adoc similarity index 100% rename from docs/content/en-US/04-nixos-modules/03-disko/index.adoc rename to docs/content/en-US/04-nixos-modules/02-disko/index.adoc diff --git a/docs/content/en-US/04-nixos-modules/04-host-specific-modules/index.adoc b/docs/content/en-US/04-nixos-modules/03-host-specific-modules/index.adoc similarity index 100% rename from docs/content/en-US/04-nixos-modules/04-host-specific-modules/index.adoc rename to docs/content/en-US/04-nixos-modules/03-host-specific-modules/index.adoc diff --git a/docs/content/en-US/05-home-manager/index.adoc b/docs/content/en-US/05-home-manager/index.adoc index 1549ebc4..3aede491 100644 --- a/docs/content/en-US/05-home-manager/index.adoc +++ b/docs/content/en-US/05-home-manager/index.adoc @@ -5,7 +5,7 @@ title: "home-manager" This NixOS configuration uses github:nix-community/home-manager[opts=repo] extensively for home environment configuration. Each of the home-manager users are placed in `users/home-manager` at the project root. -Furthermore, they are typically deployed as part of the NixOS configuration and as stand-alone home-manager configuration. +Furthermore, they are typically deployed as part of the NixOS configuration and as stand-alone home-manager configuration (but not standalone configs in NixOS systems). For more information, see xref:../03-project-specific-setup/01-declarative-host-management/index.adoc[Declarative host management] and xref:../03-project-specific-setup/02-declarative-user-management/index.adoc[Declarative user management]. diff --git a/docs/content/en-US/menu.adoc b/docs/content/en-US/menu.adoc index 9ad5d6cd..ad559c2d 100644 --- a/docs/content/en-US/menu.adoc +++ b/docs/content/en-US/menu.adoc @@ -15,10 +15,9 @@ ** link:{{< relref "./03-project-specific-setup/04-custom-firefox-addons" >}}[Custom Firefox addons] * NixOS modules -** link:{{< relref "./04-nixos-modules/01-profiles" >}}[Profiles] -** link:{{< relref "./04-nixos-modules/02-workflows" >}}[Workflows] -** link:{{< relref "./04-nixos-modules/03-disko" >}}[disko] -** link:{{< relref "./04-nixos-modules/04-host-specific-modules" >}}[Host-specific modules] +** link:{{< relref "./04-nixos-modules/01-workflows" >}}[Workflows] +** link:{{< relref "./04-nixos-modules/02-disko" >}}[disko] +** link:{{< relref "./04-nixos-modules/03-host-specific-modules" >}}[Host-specific modules] * link:{{< relref "./05-home-manager" >}}[home-manager]