summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2021-01-17 20:42:20 +0100
committerMichael Weiss <dev.primeos@gmail.com>2021-01-23 14:03:16 +0100
commit87fb5d381f13f2e7cce281d8f494cd1fb44ba5b5 (patch)
tree2a1064f873d85bf550a58d301d9303d0fd1885a7
parent971f0b45ef7129073a6e996f1c63a1f2b470a7e0 (diff)
downloadnixpkgs-87fb5d381f13f2e7cce281d8f494cd1fb44ba5b5.tar
nixpkgs-87fb5d381f13f2e7cce281d8f494cd1fb44ba5b5.tar.gz
nixpkgs-87fb5d381f13f2e7cce281d8f494cd1fb44ba5b5.tar.bz2
nixpkgs-87fb5d381f13f2e7cce281d8f494cd1fb44ba5b5.tar.lz
nixpkgs-87fb5d381f13f2e7cce281d8f494cd1fb44ba5b5.tar.xz
nixpkgs-87fb5d381f13f2e7cce281d8f494cd1fb44ba5b5.tar.zst
nixpkgs-87fb5d381f13f2e7cce281d8f494cd1fb44ba5b5.zip
nixos/smokeping: Add a PoC for using networking.fqdn
-rw-r--r--nixos/modules/services/networking/smokeping.nix4
-rw-r--r--nixos/tests/smokeping.nix1
2 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/smokeping.nix b/nixos/modules/services/networking/smokeping.nix
index 37ee2a80389..35506e0395a 100644
--- a/nixos/modules/services/networking/smokeping.nix
+++ b/nixos/modules/services/networking/smokeping.nix
@@ -124,7 +124,8 @@ in
       };
       hostName = mkOption {
         type = types.str;
-        default = config.networking.hostName;
+        default = config.networking.fqdn;
+        defaultText = "\${config.networking.fqdn}";
         example = "somewhere.example.com";
         description = "DNS name for the urls generated in the cgi.";
       };
@@ -156,6 +157,7 @@ in
       ownerEmail = mkOption {
         type = types.str;
         default = "no-reply@${cfg.hostName}";
+        defaultText = "no-reply@\${hostName}";
         example = "no-reply@yourdomain.com";
         description = "Email contact for owner";
       };
diff --git a/nixos/tests/smokeping.nix b/nixos/tests/smokeping.nix
index 4f8f0fcc9fe..77a980153ad 100644
--- a/nixos/tests/smokeping.nix
+++ b/nixos/tests/smokeping.nix
@@ -8,6 +8,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
     sm =
       { ... }:
       {
+        networking.domain = "example.com"; # FQDN: sm.example.com
         services.smokeping = {
           enable = true;
           port = 8081;