mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
nixos/matamo: Refactor to use config.networking.fqdnOrHostName
This commit is contained in:
parent
5699ff529a
commit
ed5aa53f45
@ -12,8 +12,6 @@ let
|
||||
phpExecutionUnit = "phpfpm-${pool}";
|
||||
databaseService = "mysql.service";
|
||||
|
||||
fqdn = if config.networking.domain != null then config.networking.fqdn else config.networking.hostName;
|
||||
|
||||
in {
|
||||
imports = [
|
||||
(mkRenamedOptionModule [ "services" "piwik" "enable" ] [ "services" "matomo" "enable" ])
|
||||
@ -77,11 +75,9 @@ in {
|
||||
|
||||
hostname = mkOption {
|
||||
type = types.str;
|
||||
default = "${user}.${fqdn}";
|
||||
default = "${user}.${config.networking.fqdnOrHostName}";
|
||||
defaultText = literalExpression ''
|
||||
if config.${options.networking.domain} != null
|
||||
then "${user}.''${config.${options.networking.fqdn}}"
|
||||
else "${user}.''${config.${options.networking.hostName}}"
|
||||
"${user}.''${config.${options.networking.fqdnOrHostName}}"
|
||||
'';
|
||||
example = "matomo.yourdomain.org";
|
||||
description = lib.mdDoc ''
|
||||
|
Loading…
Reference in New Issue
Block a user