diff options
Diffstat (limited to 'odin.nix')
-rw-r--r-- | odin.nix | 54 |
1 files changed, 54 insertions, 0 deletions
@@ -12,6 +12,7 @@ | |||
12 | ./custom/uucp.nix | 12 | ./custom/uucp.nix |
13 | ./custom/uucp-mediaserver.nix | 13 | ./custom/uucp-mediaserver.nix |
14 | ./custom/borgbackup.nix | 14 | ./custom/borgbackup.nix |
15 | ./custom/motion.nix | ||
15 | ]; | 16 | ]; |
16 | 17 | ||
17 | # Use the GRUB 2 boot loader. | 18 | # Use the GRUB 2 boot loader. |
@@ -198,6 +199,59 @@ | |||
198 | ''; | 199 | ''; |
199 | }; | 200 | }; |
200 | 201 | ||
202 | services.motion = { | ||
203 | cameras = [ | ||
204 | { | ||
205 | extraConfig = '' | ||
206 | camera_name ipcam01 | ||
207 | |||
208 | netcam_url mjpeg://ipcam01.hlidskjalf.yggdrasil:80/mjpeg.cgi | ||
209 | netcam_keepalive on | ||
210 | width 640 | ||
211 | height 480 | ||
212 | |||
213 | stream_port 8081 | ||
214 | |||
215 | despeckle_filter EedDl | ||
216 | threshold_tune on | ||
217 | noise_tune on | ||
218 | lightswitch 50 | ||
219 | minimum_motion_frames 5 | ||
220 | ''; | ||
221 | configFiles = [ "/etc/motion/ipcam01.secret" ]; | ||
222 | } | ||
223 | ]; | ||
224 | |||
225 | extraConfig = '' | ||
226 | text_left "%$\n%F %T %Z" | ||
227 | text_right "" | ||
228 | text_changes off | ||
229 | |||
230 | event_gap 20 | ||
231 | |||
232 | output_pictures off | ||
233 | |||
234 | ffmpeg_output_movies on | ||
235 | ffmpeg_video_codec mkv | ||
236 | ffmpeg_bps 500000 | ||
237 | max_movie_time 600 | ||
238 | |||
239 | target_dir /srv/hlidskjalf | ||
240 | movie_filename %Y-%m-%d/%H-%M-%S.%$ | ||
241 | |||
242 | stream_localhost off | ||
243 | stream_auth_method 1 | ||
244 | |||
245 | stream_quality 80 | ||
246 | stream_maxrate 100 | ||
247 | stream_motion on | ||
248 | |||
249 | webcontrol_port 0 | ||
250 | ''; | ||
251 | |||
252 | configFiles = [ "/etc/motion/motion.secret" ]; | ||
253 | }; | ||
254 | |||
201 | system.autoUpgrade.enable = true; | 255 | system.autoUpgrade.enable = true; |
202 | system.stateVersion = "18.09"; | 256 | system.stateVersion = "18.09"; |
203 | 257 | ||