diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2018-04-13 13:24:10 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2018-04-13 13:24:10 +0200 |
commit | 930f2ea21bdff73a627c1c4b518b172d318ee57a (patch) | |
tree | 087f45372c8d2bc263a9c2c1efc128c1c4b155d2 /custom | |
parent | f85b85657d0093bad6cab87c3be7de97857a6a16 (diff) | |
download | nixos-930f2ea21bdff73a627c1c4b518b172d318ee57a.tar nixos-930f2ea21bdff73a627c1c4b518b172d318ee57a.tar.gz nixos-930f2ea21bdff73a627c1c4b518b172d318ee57a.tar.bz2 nixos-930f2ea21bdff73a627c1c4b518b172d318ee57a.tar.xz nixos-930f2ea21bdff73a627c1c4b518b172d318ee57a.zip |
…
Diffstat (limited to 'custom')
-rw-r--r-- | custom/motion.nix | 30 |
1 files changed, 11 insertions, 19 deletions
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 | |||
21 | }; | 21 | }; |
22 | }; | 22 | }; |
23 | 23 | ||
24 | userConfig = { | ||
25 | options = { | ||
26 | name = mkOption { | ||
27 | type = types.str; | ||
28 | default = "motion"; | ||
29 | description = "Name of the dedicated user"; | ||
30 | }; | ||
31 | |||
32 | config = { | ||
33 | type = types.attrs; | ||
34 | default = {}; | ||
35 | }; | ||
36 | }; | ||
37 | }; | ||
38 | |||
39 | cameraConfig' = cameraId: cCfg: pkgs.writeText "${toString cameraId}.conf" '' | 24 | cameraConfig' = cameraId: cCfg: pkgs.writeText "${toString cameraId}.conf" '' |
40 | camera_id ${toString cameraId} | 25 | camera_id ${toString cameraId} |
41 | 26 | ||
@@ -81,10 +66,17 @@ in { | |||
81 | description = "Config files to append to service config"; | 66 | description = "Config files to append to service config"; |
82 | }; | 67 | }; |
83 | 68 | ||
84 | user = mkOption { | 69 | user = { |
85 | type = types.submodule userConfig; | 70 | name = mkOption { |
86 | default = {}; | 71 | type = types.str; |
87 | description = "Overrides for the motion user"; | 72 | default = "motion"; |
73 | description = "Name of the dedicated user"; | ||
74 | }; | ||
75 | |||
76 | config = { | ||
77 | type = types.attrs; | ||
78 | default = {}; | ||
79 | }; | ||
88 | }; | 80 | }; |
89 | }; | 81 | }; |
90 | }; | 82 | }; |