about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authordevhell <^@regexmail.net>2015-01-18 13:50:36 +0000
committerdevhell <^@regexmail.net>2015-02-08 14:16:17 +0000
commitd6e9df1e1ade98ed3a404c4b37421449b6b86e2f (patch)
treefc150697c6c9e1fa9a77d29d16b7c355f7418d70 /nixos/modules
parent96d6344b131cad5af56ecef5cef7b4fd515e1982 (diff)
downloadnixlib-d6e9df1e1ade98ed3a404c4b37421449b6b86e2f.tar
nixlib-d6e9df1e1ade98ed3a404c4b37421449b6b86e2f.tar.gz
nixlib-d6e9df1e1ade98ed3a404c4b37421449b6b86e2f.tar.bz2
nixlib-d6e9df1e1ade98ed3a404c4b37421449b6b86e2f.tar.lz
nixlib-d6e9df1e1ade98ed3a404c4b37421449b6b86e2f.tar.xz
nixlib-d6e9df1e1ade98ed3a404c4b37421449b6b86e2f.tar.zst
nixlib-d6e9df1e1ade98ed3a404c4b37421449b6b86e2f.zip
canto-daemon: Add a systemd service
This adds a systemd service for the canto-daemon.
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/module-list.nix1
-rw-r--r--nixos/modules/services/misc/canto-daemon.nix37
2 files changed, 38 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index b949fef6bab7..4c0d45bc44ec 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -172,6 +172,7 @@
   ./services/mail/spamassassin.nix
   ./services/misc/apache-kafka.nix
   #./services/misc/autofs.nix
+  ./services/misc/canto-daemon.nix
   ./services/misc/cpuminer-cryptonight.nix
   ./services/misc/cgminer.nix
   ./services/misc/dictd.nix
diff --git a/nixos/modules/services/misc/canto-daemon.nix b/nixos/modules/services/misc/canto-daemon.nix
new file mode 100644
index 000000000000..ac292cd28261
--- /dev/null
+++ b/nixos/modules/services/misc/canto-daemon.nix
@@ -0,0 +1,37 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+cfg = config.services.canto-daemon;
+
+in {
+
+##### interface
+
+  options = {
+
+    services.canto-daemon {
+      enable = mkOption {
+        type = types.bool;
+        default = false;
+        description = "Whether to enable the canto RSS daemon.";
+      };
+    };
+
+  };
+
+##### implementation
+
+  config = mkIf cfg.enable {
+
+    systemd.user.services.canto-next = {
+      description = "Canto RSS Daemon";
+      after = [ "network.target" ];
+      wantedBy = [ "default.target" ];
+      serviceConfig.ExecStart = "${pkgs.canto-daemon}/bin/canto-daemon";
+      TimeoutStopSec = 10;
+    };
+  };
+}