diff options
author | pennae <github@quasiparticle.net> | 2021-12-05 21:28:49 +0100 |
---|---|---|
committer | pennae <github@quasiparticle.net> | 2021-12-09 01:13:48 +0100 |
commit | fb0e5be84331188a69b3edd31679ca6576edb75a (patch) | |
tree | 80d713f568ae02e4a3aed70114bafe46e9fe753f /nixos/modules/services/misc/gogs.nix | |
parent | f6d0b014fe1db9e6edec5485f41a1162136c8a70 (diff) |
treewide: add defaultText for options with simple interpolation defaults
adds defaultText for all options that use `cfg.*` values in their defaults, but only for interpolations with no extra processing (other than toString where necessary)
Diffstat (limited to 'nixos/modules/services/misc/gogs.nix')
-rw-r--r-- | nixos/modules/services/misc/gogs.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/gogs.nix b/nixos/modules/services/misc/gogs.nix index d7233f10c7cb8..c7ae4f494071b 100644 --- a/nixos/modules/services/misc/gogs.nix +++ b/nixos/modules/services/misc/gogs.nix @@ -1,9 +1,10 @@ -{ config, lib, pkgs, ... }: +{ config, lib, options, pkgs, ... }: with lib; let cfg = config.services.gogs; + opt = options.services.gogs; configFile = pkgs.writeText "app.ini" '' APP_NAME = ${cfg.appName} RUN_USER = ${cfg.user} @@ -129,6 +130,7 @@ in path = mkOption { type = types.str; default = "${cfg.stateDir}/data/gogs.db"; + defaultText = literalExpression ''"''${config.${opt.stateDir}}/data/gogs.db"''; description = "Path to the sqlite3 database file."; }; }; @@ -142,6 +144,7 @@ in repositoryRoot = mkOption { type = types.str; default = "${cfg.stateDir}/repositories"; + defaultText = literalExpression ''"''${config.${opt.stateDir}}/repositories"''; description = "Path to the git repositories."; }; |