Compare commits
No commits in common. "74e41de9d6df0398371ab008c50135cf3144d459" and "efe50be604fc524d593a148aac4afc3517add604" have entirely different histories.
74e41de9d6
...
efe50be604
@ -35,6 +35,11 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
# boot.initrd.luks.devices.${cfg.device.name} = {
|
||||||
|
# device = cfg.device.path;
|
||||||
|
# allowDiscards = cfg.device.allowDiscards;
|
||||||
|
# };
|
||||||
|
|
||||||
# Unlock LUKS disk over ssh
|
# Unlock LUKS disk over ssh
|
||||||
boot.initrd.network.enable = true;
|
boot.initrd.network.enable = true;
|
||||||
boot.initrd.kernelModules = cfg.kernelModules;
|
boot.initrd.kernelModules = cfg.kernelModules;
|
||||||
|
17
flake.lock
generated
17
flake.lock
generated
@ -215,22 +215,6 @@
|
|||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-frigate": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1695825837,
|
|
||||||
"narHash": "sha256-4Ne11kNRnQsmSJCRSSNkFRSnHC4Y5gPDBIQGjjPfJiU=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "5cfafa12d57374f48bcc36fda3274ada276cf69e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "5cfafa12d57374f48bcc36fda3274ada276cf69e",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-xone-fix": {
|
"nixpkgs-xone-fix": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@ -292,7 +276,6 @@
|
|||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"nix-index-database": "nix-index-database",
|
"nix-index-database": "nix-index-database",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-frigate": "nixpkgs-frigate",
|
|
||||||
"nixpkgs-xone-fix": "nixpkgs-xone-fix",
|
"nixpkgs-xone-fix": "nixpkgs-xone-fix",
|
||||||
"radio": "radio",
|
"radio": "radio",
|
||||||
"radio-web": "radio-web",
|
"radio-web": "radio-web",
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
||||||
nixpkgs-frigate.url = "github:NixOS/nixpkgs/5cfafa12d57374f48bcc36fda3274ada276cf69e";
|
|
||||||
|
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
|
||||||
@ -83,7 +82,6 @@
|
|||||||
src = nixpkgs;
|
src = nixpkgs;
|
||||||
patches = [
|
patches = [
|
||||||
./patches/gamepadui.patch
|
./patches/gamepadui.patch
|
||||||
./patches/esphome.patch
|
|
||||||
inputs.nixpkgs-xone-fix
|
inputs.nixpkgs-xone-fix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@ -125,7 +123,7 @@
|
|||||||
"aarch64-linux"."iso" = mkIso "aarch64-linux";
|
"aarch64-linux"."iso" = mkIso "aarch64-linux";
|
||||||
};
|
};
|
||||||
|
|
||||||
overlays.default = import ./overlays { inherit inputs; };
|
overlays.default = import ./overlays;
|
||||||
nixosModules.kernel-modules = import ./overlays/kernel-modules;
|
nixosModules.kernel-modules = import ./overlays/kernel-modules;
|
||||||
|
|
||||||
deploy.nodes =
|
deploy.nodes =
|
||||||
|
@ -5,8 +5,6 @@
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.config.cudaSupport = true;
|
|
||||||
|
|
||||||
# for luks onlock over tor
|
# for luks onlock over tor
|
||||||
services.tor.enable = true;
|
services.tor.enable = true;
|
||||||
services.tor.client.enable = true;
|
services.tor.client.enable = true;
|
||||||
|
@ -218,7 +218,6 @@
|
|||||||
4534
|
4534
|
||||||
8097
|
8097
|
||||||
9091
|
9091
|
||||||
8443 # unifi
|
|
||||||
];
|
];
|
||||||
|
|
||||||
virtualisation.oci-containers.backend = "podman";
|
virtualisation.oci-containers.backend = "podman";
|
||||||
@ -228,11 +227,5 @@
|
|||||||
configFile = ./dashy.yaml;
|
configFile = ./dashy.yaml;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.unifi = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
unifiPackage = pkgs.unifi8;
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" "armv7l-linux" ];
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" "armv7l-linux" ];
|
||||||
}
|
}
|
||||||
|
@ -3,40 +3,6 @@
|
|||||||
let
|
let
|
||||||
frigateHostname = "frigate.s0";
|
frigateHostname = "frigate.s0";
|
||||||
frigatePort = 61617;
|
frigatePort = 61617;
|
||||||
|
|
||||||
mkEsp32Cam = address: {
|
|
||||||
ffmpeg = {
|
|
||||||
input_args = "";
|
|
||||||
inputs = [{
|
|
||||||
path = address;
|
|
||||||
roles = [ "detect" "record" ];
|
|
||||||
}];
|
|
||||||
|
|
||||||
output_args.record = "-f segment -pix_fmt yuv420p -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -preset ultrafast -an ";
|
|
||||||
};
|
|
||||||
rtmp.enabled = false;
|
|
||||||
snapshots = {
|
|
||||||
enabled = true;
|
|
||||||
bounding_box = true;
|
|
||||||
};
|
|
||||||
record = {
|
|
||||||
enabled = true;
|
|
||||||
retain.days = 10; # Keep video for 10 days
|
|
||||||
events.retain = {
|
|
||||||
default = 30; # Keep video with detections for 30 days
|
|
||||||
mode = "active_objects";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
detect = {
|
|
||||||
enabled = true;
|
|
||||||
width = 800;
|
|
||||||
height = 600;
|
|
||||||
fps = 10;
|
|
||||||
};
|
|
||||||
objects = {
|
|
||||||
track = [ "person" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
@ -55,7 +21,40 @@ in
|
|||||||
host = "localhost:1883";
|
host = "localhost:1883";
|
||||||
};
|
};
|
||||||
cameras = {
|
cameras = {
|
||||||
dahlia-cam = mkEsp32Cam "http://dahlia-cam.lan:8080";
|
dahlia-cam = {
|
||||||
|
ffmpeg = {
|
||||||
|
input_args = "";
|
||||||
|
inputs = [{
|
||||||
|
path = "http://dahlia-cam.lan:8080";
|
||||||
|
roles = [ "detect" "record" ];
|
||||||
|
}];
|
||||||
|
|
||||||
|
output_args.record = "-f segment -pix_fmt yuv420p -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -preset ultrafast -an ";
|
||||||
|
};
|
||||||
|
rtmp.enabled = false;
|
||||||
|
snapshots = {
|
||||||
|
enabled = true;
|
||||||
|
bounding_box = true;
|
||||||
|
};
|
||||||
|
record = {
|
||||||
|
enabled = false;
|
||||||
|
retain.days = 0; # To not retain any recording if there is no detection of any events
|
||||||
|
events.retain = {
|
||||||
|
default = 3; # To retain recording for 3 days of only the events that happened
|
||||||
|
mode = "active_objects";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
detect = {
|
||||||
|
enabled = true;
|
||||||
|
width = 800;
|
||||||
|
height = 600;
|
||||||
|
fps = 20;
|
||||||
|
};
|
||||||
|
objects = {
|
||||||
|
track = [ "dog" ];
|
||||||
|
filters.dog.threshold = 0.4;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
# ffmpeg = {
|
# ffmpeg = {
|
||||||
# hwaccel_args = "preset-vaapi";
|
# hwaccel_args = "preset-vaapi";
|
||||||
|
@ -96,14 +96,4 @@
|
|||||||
spotify
|
spotify
|
||||||
retroarchFull
|
retroarchFull
|
||||||
];
|
];
|
||||||
|
|
||||||
# Command and Conquer Ports
|
|
||||||
networking.firewall.allowedUDPPorts = [ 4321 27900 ];
|
|
||||||
networking.firewall.allowedTCPPorts = [ 6667 28910 29900 29920 ];
|
|
||||||
|
|
||||||
nixpkgs.config.rocmSupport = true;
|
|
||||||
services.ollama = {
|
|
||||||
enable = true;
|
|
||||||
acceleration = "rocm";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,6 @@
|
|||||||
{ inputs }:
|
|
||||||
final: prev:
|
final: prev:
|
||||||
|
|
||||||
let
|
|
||||||
system = prev.system;
|
|
||||||
frigatePkgs = inputs.nixpkgs-frigate.legacyPackages.${system};
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
# It seems that libedgetpu needs to be built with the newer version of tensorflow in nixpkgs
|
libedgetpu = prev.callPackage ./libedgetpu { };
|
||||||
# but I am lazy so I instead just downgrade by using the old nixpkgs
|
|
||||||
libedgetpu = frigatePkgs.callPackage ./libedgetpu { };
|
|
||||||
frigate = frigatePkgs.frigate;
|
|
||||||
|
|
||||||
actual-server = prev.callPackage ./actualbudget { };
|
actual-server = prev.callPackage ./actualbudget { };
|
||||||
unifi8 = prev.unifi.overrideAttrs (oldAttrs: rec {
|
|
||||||
version = "8.1.113";
|
|
||||||
src = prev.fetchurl {
|
|
||||||
url = "https://dl.ui.com/unifi/8.1.113/unifi_sysvinit_all.deb";
|
|
||||||
sha256 = "1knm+l8MSb7XKq2WIbehAnz7loRPjgnc+R98zpWKEAE=";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
diff --git a/pkgs/tools/misc/esphome/default.nix b/pkgs/tools/misc/esphome/default.nix
|
|
||||||
index a8ab91f8f329..81bf135a023f 100644
|
|
||||||
--- a/pkgs/tools/misc/esphome/default.nix
|
|
||||||
+++ b/pkgs/tools/misc/esphome/default.nix
|
|
||||||
@@ -5,6 +5,7 @@
|
|
||||||
, platformio
|
|
||||||
, esptool
|
|
||||||
, git
|
|
||||||
+, stdenv
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
@@ -76,6 +77,7 @@ python.pkgs.buildPythonApplication rec {
|
|
||||||
# git is used in esphomeyaml/writer.py
|
|
||||||
"--prefix PATH : ${lib.makeBinPath [ platformio esptool git ]}"
|
|
||||||
"--prefix PYTHONPATH : $PYTHONPATH" # will show better error messages
|
|
||||||
+ "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}"
|
|
||||||
"--set ESPHOME_USE_SUBPROCESS ''"
|
|
||||||
];
|
|
Loading…
x
Reference in New Issue
Block a user