diff options
author | pennae <github@quasiparticle.net> | 2021-12-05 22:56:22 +0100 |
---|---|---|
committer | pennae <github@quasiparticle.net> | 2021-12-09 01:42:24 +0100 |
commit | e67a646a925bc3cda86101a3f3afb81db3030ef5 (patch) | |
tree | fc91f2996187c22215a45c494a4fd21aba960db6 /nixos/modules/services/networking | |
parent | 1f960e7571d46bd13dd4b5865f115467e100ef7d (diff) | |
download | nixpkgs-e67a646a925bc3cda86101a3f3afb81db3030ef5.tar nixpkgs-e67a646a925bc3cda86101a3f3afb81db3030ef5.tar.gz nixpkgs-e67a646a925bc3cda86101a3f3afb81db3030ef5.tar.bz2 nixpkgs-e67a646a925bc3cda86101a3f3afb81db3030ef5.tar.lz nixpkgs-e67a646a925bc3cda86101a3f3afb81db3030ef5.tar.xz nixpkgs-e67a646a925bc3cda86101a3f3afb81db3030ef5.tar.zst nixpkgs-e67a646a925bc3cda86101a3f3afb81db3030ef5.zip |
treewide: add defaultText to remaining options
these are mostly options that use alias bindings, bindings to constants, or bindings to calculated values.
Diffstat (limited to 'nixos/modules/services/networking')
-rw-r--r-- | nixos/modules/services/networking/amuled.nix | 6 | ||||
-rw-r--r-- | nixos/modules/services/networking/quassel.nix | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/nixos/modules/services/networking/amuled.nix b/nixos/modules/services/networking/amuled.nix index 39320643dd5..e55ac7a6b18 100644 --- a/nixos/modules/services/networking/amuled.nix +++ b/nixos/modules/services/networking/amuled.nix @@ -1,9 +1,10 @@ -{ config, lib, pkgs, ... }: +{ config, lib, options, pkgs, ... }: with lib; let cfg = config.services.amule; + opt = options.services.amule; user = if cfg.user != null then cfg.user else "amule"; in @@ -26,6 +27,9 @@ in dataDir = mkOption { type = types.str; default = "/home/${user}/"; + defaultText = literalExpression '' + "/home/''${config.${opt.user}}/" + ''; description = '' The directory holding configuration, incoming and temporary files. ''; diff --git a/nixos/modules/services/networking/quassel.nix b/nixos/modules/services/networking/quassel.nix index 22940ef7a13..844c9a6b8b3 100644 --- a/nixos/modules/services/networking/quassel.nix +++ b/nixos/modules/services/networking/quassel.nix @@ -1,9 +1,10 @@ -{ config, lib, pkgs, ... }: +{ config, lib, options, pkgs, ... }: with lib; let cfg = config.services.quassel; + opt = options.services.quassel; quassel = cfg.package; user = if cfg.user != null then cfg.user else "quassel"; in @@ -63,6 +64,9 @@ in dataDir = mkOption { default = "/home/${user}/.config/quassel-irc.org"; + defaultText = literalExpression '' + "/home/''${config.${opt.user}}/.config/quassel-irc.org" + ''; type = types.str; description = '' The directory holding configuration files, the SQlite database and the SSL Cert. |