diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-12-24 22:19:05 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-01-09 16:07:23 +0000 |
commit | f2bee6b239169169c3d9ab93212e38895510b791 (patch) | |
tree | 117b8980235b95d989468775a2e6d77b085cfce5 /nixpkgs | |
parent | 8cbe850aea22a98cc426349842cf39cf72f90eca (diff) | |
download | nixlib-f2bee6b239169169c3d9ab93212e38895510b791.tar nixlib-f2bee6b239169169c3d9ab93212e38895510b791.tar.gz nixlib-f2bee6b239169169c3d9ab93212e38895510b791.tar.bz2 nixlib-f2bee6b239169169c3d9ab93212e38895510b791.tar.lz nixlib-f2bee6b239169169c3d9ab93212e38895510b791.tar.xz nixlib-f2bee6b239169169c3d9ab93212e38895510b791.tar.zst nixlib-f2bee6b239169169c3d9ab93212e38895510b791.zip |
nixos/spamassassin: allow initPreConf to be a path
Supporting a path here is important because it allows e.g. fetching a configuration from a URL. To do this and provide the configuration as a string, IFD would be necessary. It's just written into a path anyway.
Diffstat (limited to 'nixpkgs')
-rw-r--r-- | nixpkgs/nixos/modules/services/mail/spamassassin.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixpkgs/nixos/modules/services/mail/spamassassin.nix b/nixpkgs/nixos/modules/services/mail/spamassassin.nix index 71cdd5679dac..cea525606481 100644 --- a/nixpkgs/nixos/modules/services/mail/spamassassin.nix +++ b/nixpkgs/nixos/modules/services/mail/spamassassin.nix @@ -5,7 +5,6 @@ with lib; let cfg = config.services.spamassassin; spamassassin-local-cf = pkgs.writeText "local.cf" cfg.config; - spamassassin-init-pre = pkgs.writeText "init.pre" cfg.initPreConf; in @@ -56,8 +55,9 @@ in }; initPreConf = mkOption { - type = types.str; + type = with types; either str path; description = "The SpamAssassin init.pre config."; + apply = val: if builtins.isPath val then val else pkgs.writeText "init.pre" val; default = '' # |