summary refs log tree commit diff
path: root/nixos/modules/services/backup
diff options
context:
space:
mode:
authorpennae <github@quasiparticle.net>2021-12-05 22:36:38 +0100
committerpennae <github@quasiparticle.net>2021-12-09 01:42:24 +0100
commit9407761763a61a4f0551c43aa3b818d7ede1fa39 (patch)
treea13ad016a080781077e9f55698d39fcb8fe06b95 /nixos/modules/services/backup
parent3226c5aded7bbe52cadf323eb45d3db83408ec6c (diff)
downloadnixpkgs-9407761763a61a4f0551c43aa3b818d7ede1fa39.tar
nixpkgs-9407761763a61a4f0551c43aa3b818d7ede1fa39.tar.gz
nixpkgs-9407761763a61a4f0551c43aa3b818d7ede1fa39.tar.bz2
nixpkgs-9407761763a61a4f0551c43aa3b818d7ede1fa39.tar.lz
nixpkgs-9407761763a61a4f0551c43aa3b818d7ede1fa39.tar.xz
nixpkgs-9407761763a61a4f0551c43aa3b818d7ede1fa39.tar.zst
nixpkgs-9407761763a61a4f0551c43aa3b818d7ede1fa39.zip
treewide: add defaultText for options using other shortcut bindings
Diffstat (limited to 'nixos/modules/services/backup')
-rw-r--r--nixos/modules/services/backup/tarsnap.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/services/backup/tarsnap.nix b/nixos/modules/services/backup/tarsnap.nix
index 9cce8683661..4dfd0a1dffb 100644
--- a/nixos/modules/services/backup/tarsnap.nix
+++ b/nixos/modules/services/backup/tarsnap.nix
@@ -1,9 +1,10 @@
-{ config, lib, pkgs, utils, ... }:
+{ config, lib, options, pkgs, utils, ... }:
 
 with lib;
 
 let
   gcfg = config.services.tarsnap;
+  opt = options.services.tarsnap;
 
   configFile = name: cfg: ''
     keyfile ${cfg.keyfile}
@@ -65,6 +66,7 @@ in
               keyfile = mkOption {
                 type = types.str;
                 default = gcfg.keyfile;
+                defaultText = literalExpression "config.${opt.keyfile}";
                 description = ''
                   Set a specific keyfile for this archive. This defaults to
                   <literal>"/root/tarsnap.key"</literal> if left unspecified.