diff options
author | Brian Picciano <mediocregopher@gmail.com> | 2021-08-08 09:07:51 -0600 |
---|---|---|
committer | Brian Picciano <mediocregopher@gmail.com> | 2021-08-08 09:07:51 -0600 |
commit | ca27cd6c677f5effe7b08639a8db92371065b4e3 (patch) | |
tree | 56e84757b9a77852bea850c934e777ec719d6ef7 /srv/default.nix | |
parent | 6feffc568ae790a883b9e0509d755e7d9bd82ee1 (diff) |
get a basic mailinglist-cli working
Diffstat (limited to 'srv/default.nix')
-rw-r--r-- | srv/default.nix | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/srv/default.nix b/srv/default.nix index 8a12f33..d7a80f7 100644 --- a/srv/default.nix +++ b/srv/default.nix @@ -1,11 +1,14 @@ {pkgs, config, staticBuild}: rec { - opts = [ - "-pow-secret=${config.powSecret}" + mailingListOpts = [ "-ml-smtp-addr=${config.mlSMTPAddr}" "-ml-smtp-auth='${config.mlSMTPAuth}'" "-data-dir=${config.dataDir}" "-public-url=${config.publicURL}" + ]; + + opts = mailingListOpts ++ [ + "-pow-secret=${config.powSecret}" "-listen-proto=${config.listenProto}" "-listen-addr=${config.listenAddr}" ] ++ ( @@ -30,9 +33,13 @@ go run ./cmd/mediocre-blog/main.go ${toString opts} ''; + runMailingListCLIScript = pkgs.writeScriptBin "run-mailinglist-cli" '' + go run ./cmd/mailinglist-cli/main.go ${toString mailingListOpts} $@ + ''; + shell = pkgs.stdenv.mkDerivation { name = "mediocre-blog-srv-shell"; - buildInputs = [ pkgs.go runScript ]; + buildInputs = [ pkgs.go runScript runMailingListCLIScript ]; }; } |