From 930f2ea21bdff73a627c1c4b518b172d318ee57a Mon Sep 17 00:00:00 2001
From: Gregor Kleen <gkleen@yggdrasil.li>
Date: Fri, 13 Apr 2018 13:24:10 +0200
Subject: =?UTF-8?q?=E2=80=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 custom/motion.nix | 30 +++++++++++-------------------
 1 file changed, 11 insertions(+), 19 deletions(-)

(limited to 'custom')

diff --git a/custom/motion.nix b/custom/motion.nix
index 1aa39f41..21693a34 100644
--- a/custom/motion.nix
+++ b/custom/motion.nix
@@ -21,21 +21,6 @@ let
     };
   };
 
-  userConfig = {
-    options = {
-      name = mkOption {
-        type = types.str;
-        default = "motion";
-        description = "Name of the dedicated user";
-      };
-
-      config = {
-        type = types.attrs;
-        default = {};
-      };
-    };
-  };
-
   cameraConfig' = cameraId: cCfg: pkgs.writeText "${toString cameraId}.conf" ''
     camera_id ${toString cameraId}
 
@@ -81,10 +66,17 @@ in {
         description = "Config files to append to service config";
       };
       
-      user = mkOption {
-        type = types.submodule userConfig;
-        default = {};
-        description = "Overrides for the motion user";
+      user = {
+        name = mkOption {
+          type = types.str;
+          default = "motion";
+          description = "Name of the dedicated user";
+        };
+
+        config = {
+          type = types.attrs;
+          default = {};
+        };
       };
     };
   };
-- 
cgit v1.2.3