mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 06:19:00 +00:00
docs/site: make it more readable
This commit is contained in:
parent
8b1c513e7f
commit
65f6e90d6c
@ -49,7 +49,7 @@ Now, we could have our host setup like in the following code.
|
||||
{ config, lib, pkgs, ... }
|
||||
|
||||
{
|
||||
# ...
|
||||
imports = [ ./modules ];
|
||||
|
||||
hosts.$HOSTNAME.services = {
|
||||
# Essential services.
|
||||
@ -66,7 +66,7 @@ Now, we could have our host setup like in the following code.
|
||||
----
|
||||
|
||||
You could even structure it further by combining all of the essential services into a module, say in `modules/core-services.nix` and enable them in a switch with `hosts.$HOSTNAME.core-services.enable`.
|
||||
The possibilities are only limited in how you imagine.
|
||||
The possibilities are only limited in your imagination.
|
||||
|
||||
[chat, Ezran, state=curious, role=reversed]
|
||||
====
|
||||
|
@ -31,18 +31,18 @@ On the host configuration, you can then import it like so.
|
||||
[source, nix]
|
||||
----
|
||||
{ config, lib, pkgs, ... }: {
|
||||
imports = [ (lib.getUser "nixos" "plover") ]
|
||||
imports = [ (lib.private.getUser "nixos" "plover") ]
|
||||
}
|
||||
----
|
||||
|
||||
But creating a dedicated NixOS user onto a file then importing the module just to use a home-manager is more of a hassle.
|
||||
It shouldn't require much boilerplate.
|
||||
This is why this NixOS config has created a function for it: `mapHomeManagerUser`.
|
||||
This is why this project has created a function for it: `mapHomeManagerUser`.
|
||||
|
||||
.An example of how to use it
|
||||
[source, nix]
|
||||
----
|
||||
lib.mapHomeManagerUser "foo-dogsquared" {
|
||||
lib.private.mapHomeManagerUser "foo-dogsquared" {
|
||||
extraGroups = [
|
||||
"adbusers"
|
||||
"wheel"
|
||||
|
Loading…
Reference in New Issue
Block a user