{ config, pkgs, inputs, nixpkgs, ... }: { imports = [ ./hardware-configuration.nix # inputs.home-manager.nixosModules.default ]; # Bootloader. boot = { loader.grub.enable = true; loader.grub.device = "/dev/sda"; loader.grub.useOSProber = true; supportedFilesystems = [ "ntfs" ]; # tmp = { # useTmpfs = false; # tmpfsSize = "30%"; # }; initrd.kernelModules = [ "amdgpu" ]; kernelPackages = pkgs.linuxPackages_latest; kernelModules = [ "coretemp" "cpuid" ]; plymouth.enable = true; }; fileSystems."/mnt/apps" = { device = "/dev/disk/by-label/Apps"; fsType = "ntfs-3g"; options = [ "rw" "uid=1000" ]; }; fileSystems."/mnt/photos" = { device = "/dev/disk/by-label/Photos"; fsType = "ntfs-3g"; options = [ "rw" "uid=1000" ]; }; fileSystems."/mnt/ext" = { device = "/dev/disk/by-label/Externe"; fsType = "ntfs-3g"; options = [ "auto" "nofail" "noatime" "rw" "uid=1000" ]; }; networking.hostName = "arcueid"; # Define your hostname. networking.networkmanager.enable = true; nix = { settings = { auto-optimise-store = true; experimental-features = [ "nix-command" "flakes" ]; trusted-users = [ "root" "yoru" ]; }; gc = { automatic = true; dates = "weekly"; options = "--delete-older-than 10d"; }; nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; extraOptions = '' extra-substituters = https://devenv.cachix.org extra-trusted-public-keys = devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw= ''; }; nixpkgs.config = { allowUnfree = true; allowBroken = true; }; time.timeZone = "Europe/Paris"; i18n.defaultLocale = "fr_FR.UTF-8"; i18n.extraLocaleSettings = { LC_ADDRESS = "fr_FR.UTF-8"; LC_IDENTIFICATION = "fr_FR.UTF-8"; LC_MEASUREMENT = "fr_FR.UTF-8"; LC_MONETARY = "fr_FR.UTF-8"; LC_NAME = "fr_FR.UTF-8"; LC_NUMERIC = "fr_FR.UTF-8"; LC_PAPER = "fr_FR.UTF-8"; LC_TELEPHONE = "fr_FR.UTF-8"; LC_TIME = "fr_FR.UTF-8"; }; hardware = { sane.enable = true; graphics = { enable = true; enable32Bit = true; }; bluetooth.enable = true; bluetooth.powerOnBoot = true; }; environment = { sessionVariables = { FLAKE = "/home/yoru/nixos"; DIRENV_LOG_FORMAT = ""; }; systemPackages = with pkgs; [ pavucontrol vial xwayland-satellite clinfo gcc ]; }; programs = { niri.enable = true; }; security = { rtkit.enable = true; sudo.wheelNeedsPassword = false; }; systemd.tmpfiles.rules = [ "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" ]; services = { udev.packages = with pkgs; [ vial ]; openssh = { enable = true; settings = { PasswordAuthentication = true; AllowUsers = null; }; }; pulseaudio.enable = false; xserver.enable = true; xserver.xkb = { layout = "us"; variant = "altgr-intl"; }; xserver.videoDrivers = [ "amdgpu" ]; blueman.enable = true; printing.enable = true; avahi = { enable = true; nssmdns4 = true; openFirewall = true; }; pipewire = { enable = true; alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; }; frigate = { enable = true; hostname = "arcueid.int.m0rel.eu"; settings = { mqtt = { enabled = true; host = "mqtt.int.m0rel.eu"; user = "frigate"; password = "pouet"; }; ffmpeg.hwaccel_args = "preset-vaapi"; auth.enabled = false; proxy.default_role = "admin"; detect.enabled = true; detect.fps = 5; objects.track = [ "person" "car" "bird" "cat" "dog" ]; audio = { enabled = true; max_not_heard = 10; min_volume = 500; listen = [ "bark" "fire_alarm" "scream" "speech" "yell" ]; # filters.speech.threshold = 0.8; }; motion = { enabled = true; # mask = [ # "0.316" # "0.037" # "0.317" # "0.012" # "0.035" # "0.01" # "0.033" # "0.035" # ]; }; semantic_search.enabled = true; semantic_search.model_size = "small"; review.detections.enabled = true; record.enabled = true; record.retain.days = 2; record.preview.quality = "medium"; face_recognition.enabled = true; face_recognition.model_size = "small"; lpr.enabled = true; # audio_transcription = { # enabled = true; # device = "CPU"; # model_size = "small"; # language = "fr"; # }; classification = { bird.enabled = true; custom = { Animaux = { enabled = true; name = "Animaux"; threshold = 0.8; object_config.objects = [ "cat" "dog" ]; # classification_type = "sub_label"; }; Voitures = { enabled = true; name = "Voitures"; threshold = 0.8; object_config.objects = [ "car" ]; # classification_type = "sub_label"; }; Personnes = { enabled = true; name = "Personnes"; threshold = 0.8; object_config.objects = [ "person" ]; # classification_type = "sub_label"; }; }; }; snapshots.enabled = true; snapshots.retain.default = 7; cameras.front = { enabled = true; ffmpeg.inputs = [ { path = "rtsp://admin:admin@192.168.68.240:554/?streamtype=0&subtype=1"; roles = [ "audio" "detect" "record" ]; } ]; onvif = { host = "192.168.68.240"; port = 8899; user = "admin"; password = "admin"; }; # zones = { # cour = { # coordinates = [ # "0.001" # "0.492" # "0.001" # "0.043" # "0.893" # "0.054" # "0.888" # "0.5" # ]; # loitering_time = 0; # friendly_name = "Cour"; # }; # entree = { # coordinates = [ # "0.001" # "0.5" # "0.001" # "0.997" # "0.996" # "0.991" # "0.997" # "0.513" # ]; # loitering_time = 0; # friendly_name = "Entrée"; # }; # }; }; }; }; }; myNixOS = { home-users = { "yoru" = { userConfig = ./home.nix; }; }; archetype.general.enable = true; feature.fonts.enable = true; feature.virtualisation.enable = true; }; system.stateVersion = "24.05"; }