summaryrefslogtreecommitdiff
path: root/Que/Website.nix
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-10-23 16:16:50 -0400
committerBen Sima <ben@bsima.me>2020-10-23 16:16:50 -0400
commite069bc069f998e3158c826e20f7d94575907ae46 (patch)
tree4db36b4aa87670ec36dd97ed7a0e12a09da1a764 /Que/Website.nix
parent36021097e17ab1cfa971564cb70128d704e88f2d (diff)
Rename Que.{Server,Website} -> Que.{Host,Site}
Diffstat (limited to 'Que/Website.nix')
-rw-r--r--Que/Website.nix59
1 files changed, 0 insertions, 59 deletions
diff --git a/Que/Website.nix b/Que/Website.nix
deleted file mode 100644
index 6a24d9d..0000000
--- a/Que/Website.nix
+++ /dev/null
@@ -1,59 +0,0 @@
-{ options
-, lib
-, config
-, pkgs
-, modulesPath
-}:
-
-let
- cfg = config.services.que-website;
- static = pkgs.stdenv.mkDerivation {
- src = ./.;
- name = "que-website-static";
- installPhase = ''
- mkdir -p $out
- cp ${./apidocs.md} $out/apidocs.md
- cp ${./index.md} $out/index.md
- cp ${./quescripts.md} $out/quescripts.md
- cp ${./style.css} $out/style.css
- cp ${./tutorial.md} $out/tutorial.md
- cp ${./client.py} $out/client.py
- '';
- };
-in
-{
- options.services.que-website = {
- enable = lib.mkEnableOption "Enable the que-website service";
- namespace = lib.mkOption {
- type = lib.types.str;
- default = "_";
- description = ''
- The que namespace on which que-website will broadcast.
- '';
- };
- package = lib.mkOption {
- type = lib.types.package;
- description = "que-website package to use";
- };
- };
- config = lib.mkIf cfg.enable {
- systemd.services.que-website = {
- path = [ cfg.package pkgs.pandoc ];
- wantedBy = [ "multi-user.target" ];
- script = ''
- ${cfg.package}/bin/que-website ${static} ${cfg.namespace}
- '';
- description = ''
- Que website server
- '';
- serviceConfig = {
- User = "root";
- Environment = "HOME=/root";
- KillSignal = "INT";
- Type = "simple";
- Restart = "on-abort";
- RestartSec = "1";
- };
- };
- };
-}