summary refs log tree commit diff
path: root/nixos/modules/services
diff options
context:
space:
mode:
authorDan Peebles <pumpkin@me.com>2017-05-24 18:56:22 -0400
committerDan Peebles <pumpkin@me.com>2017-05-26 18:14:31 -0400
commit7c3253e519a572f90a907fc56bb6407da004b24c (patch)
treebdb31f059a3988521842d5b8ac2d92c7937d26ed /nixos/modules/services
parent8a11612d502d8578d7828e21778dcf3391084095 (diff)
downloadnixpkgs-7c3253e519a572f90a907fc56bb6407da004b24c.tar
nixpkgs-7c3253e519a572f90a907fc56bb6407da004b24c.tar.gz
nixpkgs-7c3253e519a572f90a907fc56bb6407da004b24c.tar.bz2
nixpkgs-7c3253e519a572f90a907fc56bb6407da004b24c.tar.lz
nixpkgs-7c3253e519a572f90a907fc56bb6407da004b24c.tar.xz
nixpkgs-7c3253e519a572f90a907fc56bb6407da004b24c.tar.zst
nixpkgs-7c3253e519a572f90a907fc56bb6407da004b24c.zip
Simple proof of concept for how to do other types of services
Diffstat (limited to 'nixos/modules/services')
-rw-r--r--nixos/modules/services/security/hologram-server.nix14
1 files changed, 11 insertions, 3 deletions
diff --git a/nixos/modules/services/security/hologram-server.nix b/nixos/modules/services/security/hologram-server.nix
index e267fed2795..8315c9ea5d6 100644
--- a/nixos/modules/services/security/hologram-server.nix
+++ b/nixos/modules/services/security/hologram-server.nix
@@ -23,6 +23,8 @@ let
     stats  = cfg.statsAddress;
     listen = cfg.listenAddress;
   });
+
+  script = "${pkgs.hologram.bin}/bin/hologram-server --debug --conf ${cfgFile}";
 in {
   options = {
     services.hologram-server = {
@@ -94,9 +96,15 @@ in {
       after       = [ "network.target" ];
       wantedBy    = [ "multi-user.target" ];
 
-      serviceConfig = {
-        ExecStart = "${pkgs.hologram.bin}/bin/hologram-server --debug --conf ${cfgFile}";
-      };
+      inherit script;
+    };
+
+    docker-containers.hologram-server = {
+      inherit script;
+    };
+
+    trivial-services.hologram-server = {
+      inherit script;
     };
   };
 }