mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-06-27 00:16:37 +02:00
docs(nix): add a few more comments to the nix module
This commit is contained in:
parent
14ec2ddba7
commit
6108e98a76
2 changed files with 8 additions and 1 deletions
|
@ -87,13 +87,15 @@
|
||||||
[ cfg.domain ]
|
[ cfg.domain ]
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
# HTTPs URL, used frequently
|
||||||
baseUrl = "https://${fullDomain}";
|
baseUrl = "https://${fullDomain}";
|
||||||
in
|
in
|
||||||
lib.mkIf cfg.enable {
|
lib.mkIf cfg.enable {
|
||||||
|
|
||||||
|
# configure the user that runs the continuwuity server
|
||||||
users.users.${cfg.user} = {
|
users.users.${cfg.user} = {
|
||||||
inherit (cfg) group;
|
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
|
inherit (cfg) group;
|
||||||
home = cfg.dataDir;
|
home = cfg.dataDir;
|
||||||
createHome = true;
|
createHome = true;
|
||||||
shell = "${lib.getExe pkgs.bash}";
|
shell = "${lib.getExe pkgs.bash}";
|
||||||
|
@ -114,6 +116,9 @@
|
||||||
server = "${fullDomain}:443";
|
server = "${fullDomain}:443";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
# this applies the default config options as well as the extra config options
|
||||||
|
# NOTE: It might be possible to overwrite the defaults through the extraConfig, in this case the user of
|
||||||
|
# this module is on her own
|
||||||
mergedConfig =
|
mergedConfig =
|
||||||
builtins.foldl' lib.recursiveUpdate (builtins.removeAttrs cfg.settings [ "extraConfig" ])
|
builtins.foldl' lib.recursiveUpdate (builtins.removeAttrs cfg.settings [ "extraConfig" ])
|
||||||
[
|
[
|
||||||
|
@ -215,6 +220,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# optionally configure nginx if enabled
|
||||||
services.nginx =
|
services.nginx =
|
||||||
let
|
let
|
||||||
clientConfig = {
|
clientConfig = {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# This system sole purpose is to test the nixosModules.continuwuity module from ../modules/default.nix
|
||||||
{ inputs, ... }:
|
{ inputs, ... }:
|
||||||
{
|
{
|
||||||
testSystem = inputs.nixpkgs.lib.nixosSystem {
|
testSystem = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
|
Loading…
Add table
Reference in a new issue