diff --git a/heimserver/configuration.nix b/heimserver/configuration.nix index b5017f8..104f68e 100644 --- a/heimserver/configuration.nix +++ b/heimserver/configuration.nix @@ -35,6 +35,13 @@ boot.supportedFilesystems = [ "zfs" ]; boot.zfs.forceImportRoot = false; + + hardware.graphics.enable = true; + hardware.nvidia.open = true; + hardware.nvidia-container-toolkit.enable = true; + services.xserver.videoDrivers = [ "nvidia" ]; + + # Console and locale console = { font = "Lat2-Terminus16"; @@ -113,6 +120,7 @@ smartmontools parted borgbackup + lshw nil ]; @@ -231,7 +239,7 @@ # '' # ${lib.getExe cfg.package} admin user create --admin --email "root@localhost" --username crazychaoz --password temp123 || true # ''; - + # services.borgbackup.jobs."forgejo" = { # paths = config.services.forgejo.repositoryRoot; @@ -327,13 +335,18 @@ "frigate:/config" "/run/dbus:/run/dbus:ro" "/etc/localtime:/etc/localtime:ro" + "/root/frigate-models:/config/model_cache" ]; environment.FRIGATE_RTSP_PASSWORD = "password123"; # Note: The image will not be updated on rebuilds, unless the version label changes - image = "ghcr.io/blakeblackshear/frigate:stable"; + image = "ghcr.io/blakeblackshear/frigate:stable-tensorrt"; + devices = [ + "nvidia.com/gpu=all" + ]; extraOptions = [ "--shm-size=512m" "--network=host" + "--privileged" ]; }; containers.netflow2ng = { @@ -390,6 +403,9 @@ port = 8183; }; + + nixpkgs.config.allowUnfree = true; + # Nix settings nix.settings.experimental-features = [ "nix-command"