From 296e0a4483151a0d6a4f3fdf801e746930d356ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sat, 6 May 2023 08:27:17 +0100 Subject: [PATCH] add zoneminder to bolty --- flake.lock | 48 ++++++++++++++--------------- nixos/boxes/bolty/default.nix | 3 +- nixos/boxes/bolty/home-security.nix | 12 ++++++++ 3 files changed, 38 insertions(+), 25 deletions(-) create mode 100644 nixos/boxes/bolty/home-security.nix diff --git a/flake.lock b/flake.lock index 0ced959a..29163b05 100644 --- a/flake.lock +++ b/flake.lock @@ -46,11 +46,11 @@ ] }, "locked": { - "lastModified": 1682009832, - "narHash": "sha256-QdNOeFE7sI+0ddqVfn9vQDCUs7OdxhJ7evo9sdyP82Y=", + "lastModified": 1682773107, + "narHash": "sha256-+h94XeJnG3uk5imJlBi/1lVmcfCbxHpwZp5u7n3Krwg=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "a1ee4d333b092bc055655fb06229eb3013755812", + "rev": "379d42fad6bc5c28f79d5f7ff2fa5f1c90cb7bf8", "type": "github" }, "original": { @@ -83,11 +83,11 @@ ] }, "locked": { - "lastModified": 1682674689, - "narHash": "sha256-+JJ92RA7PjHyMYfHs0OfNb0bEA6oKw24Fs9vYou81o0=", + "lastModified": 1682926881, + "narHash": "sha256-EW5CXj+JY+kn0ilmZXojlAaHMR+mju4Hvlvj2Ia6AvY=", "owner": "nix-community", "repo": "disko", - "rev": "77a54e53cc353045b026aa814798cafaee9779ac", + "rev": "5989fbc8c46edb4f09221a4f09048a2ffec4b43f", "type": "github" }, "original": { @@ -359,11 +359,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1680876084, - "narHash": "sha256-eP9yxP0wc7XuVaODugh+ajgbFGaile2O1ihxiLxOuvU=", + "lastModified": 1682836095, + "narHash": "sha256-PdzpJhuXBz71AgWNWMMYLbB8GMMce6QguhQY/6HOOcc=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "3006d2860a6ed5e01b0c3e7ffb730e9b293116e2", + "rev": "e4a21ddcb45ee5f5c85a5d9e9698debf77fb98c3", "type": "github" }, "original": { @@ -375,11 +375,11 @@ }, "nixpkgs-master": { "locked": { - "lastModified": 1682746310, - "narHash": "sha256-HV8o7iaL1rhPx5SfsBQbrX+yRKNUCCIL2Tv9OZCaSh0=", + "lastModified": 1682927122, + "narHash": "sha256-eKJQ50tT/hEGyzCF9jDmR6F0tw6fVDUb36OAxh0MBBo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "988b93ddb84c5cd419ed58f188c3ebb17ae2cabe", + "rev": "732d2353098d5233dda2a293f2d2ccc7e47a00a6", "type": "github" }, "original": { @@ -391,11 +391,11 @@ }, "nixpkgs-nixos-unstable": { "locked": { - "lastModified": 1682692304, - "narHash": "sha256-9/lyXN2BpHw+1xE+D2ySBSLMCHWqiWu5tPHBMRDib8M=", + "lastModified": 1682786779, + "narHash": "sha256-m7QFzPS/CE8hbkbIVK4UStihAQMtczr0vSpOgETOM1g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "937a9d1ee7b1351d8c55fff6611a8edf6e7c1c37", + "rev": "08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b", "type": "github" }, "original": { @@ -423,11 +423,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1682669017, - "narHash": "sha256-Vi+p4y3wnl0/4gcwTdmCO398kKlDaUrNROtf3GOD2NY=", + "lastModified": 1682817260, + "narHash": "sha256-kFMXzKNj4d/0Iqbm5l57rHSLyUeyCLMuvlROZIuuhvk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7449971a3ecf857b4a554cf79b1d9dcc1a4647d8", + "rev": "db1e4eeb0f9a9028bcb920e00abbc1409dd3ef36", "type": "github" }, "original": { @@ -439,11 +439,11 @@ }, "nur": { "locked": { - "lastModified": 1682739583, - "narHash": "sha256-ZMj7KzCAjp5e3iUOjgDBoY8gSbcMAEdhr0I9eOC/Bn8=", + "lastModified": 1682923190, + "narHash": "sha256-c/VngL/4eku/EhXX9cfw+MC5GoikKR17ZSbFJRbxGl8=", "owner": "nix-community", "repo": "NUR", - "rev": "31da946bd4de2657adb9ec9baab975b1a7fa9c3d", + "rev": "65020354709d1b5d88327a0bd170e0a95872c6b2", "type": "github" }, "original": { @@ -547,11 +547,11 @@ ] }, "locked": { - "lastModified": 1682539132, - "narHash": "sha256-djX/Vp1snR1XHyk400HKCfwWVoLBE8uiQalTXMH7Kj0=", + "lastModified": 1682823324, + "narHash": "sha256-KNu3OAqVyoKwnDP+gqptjQYCnZXxEwXccR89c0r1/8k=", "owner": "Mic92", "repo": "sops-nix", - "rev": "4a330ead6a990365c9bb48f30523ac048fb6d8ae", + "rev": "4f308f76633f81253a12b80e7b05b80d325005b2", "type": "github" }, "original": { diff --git a/nixos/boxes/bolty/default.nix b/nixos/boxes/bolty/default.nix index d0bf6b5a..5cc7adab 100644 --- a/nixos/boxes/bolty/default.nix +++ b/nixos/boxes/bolty/default.nix @@ -4,6 +4,7 @@ ./bolty-boot.nix ./grafana.nix ./home-assistant.nix + ./home-security.nix ./influxdb.nix ./matrix-server.nix ./networking.nix @@ -12,8 +13,8 @@ ./real-hardware.nix ./restic-server.nix ./tailscale-cert.nix - ./woodpecker-agent.nix ./virtualisation.nix + ./woodpecker-agent.nix ]; boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; programs.ccache.enable = true; diff --git a/nixos/boxes/bolty/home-security.nix b/nixos/boxes/bolty/home-security.nix new file mode 100644 index 00000000..ad71b1a5 --- /dev/null +++ b/nixos/boxes/bolty/home-security.nix @@ -0,0 +1,12 @@ +{ config, pkgs, inputs, lib, ... }: { + services.zoneminder = { + enable = true; + storageDir = "/data/zoneminder"; + openFirewall = true; + cameras = 5; + database = { + createLocally = true; + username = "zoneminder"; + }; + }; +}