mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 08:08:11 +09:00
36 lines
578 B
Nix
36 lines
578 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.my.system.camera;
|
|
in
|
|
{
|
|
options.my.system.camera = {
|
|
enable = lib.mkEnableOption "camera support";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
boot.kernelModules = [ "uvcvideo" ];
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
v4l-utils
|
|
ffmpeg-full
|
|
];
|
|
|
|
services.pipewire = {
|
|
enable = true;
|
|
alsa.enable = true;
|
|
pulse.enable = true;
|
|
};
|
|
security.rtkit.enable = true;
|
|
|
|
xdg.portal = {
|
|
enable = true;
|
|
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
|
};
|
|
};
|
|
}
|