Move v4l2loopback to teams

This commit is contained in:
DashieTM 2024-08-24 13:55:33 +02:00
parent c73cb37278
commit 54df643d80
2 changed files with 16 additions and 6 deletions

View file

@ -2,11 +2,6 @@
let username = config.conf.username; let username = config.conf.username;
in { in {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot = {
extraModulePackages =
[ pkgs.linuxKernel.packages.linux_xanmod_latest.v4l2loopback ];
kernelModules = [ "v4l2loopback" ];
};
# Bootloader. # Bootloader.
boot.loader.systemd-boot = { boot.loader.systemd-boot = {

View file

@ -9,9 +9,24 @@ in {
description = description =
"Enables teams via a chromium pwa (for the poor souls that have to use this for work)"; "Enables teams via a chromium pwa (for the poor souls that have to use this for work)";
}; };
loopback = lib.mkOption {
default = true;
example = false;
type = lib.types.bool;
description = "Enables loopback for screensharing -> teams sucks :)";
};
}; };
config = lib.mkIf config.mods.teams.enable config = lib.mkIf config.mods.teams.enable
(lib.optionalAttrs (options ? home.packages) { (lib.optionalAttrs (options ? home.packages) {
home.packages = [ (callPackage ../../override/teams.nix { }) ]; home.packages = [ (callPackage ../../override/teams.nix { }) ];
}); } // (lib.optionalAttrs (options ? boot.kernelModules) {
boot = {
extraModulePackages =
[ pkgs.linuxKernel.packages.linux_xanmod_latest.v4l2loopback ];
kernelModules = [ "v4l2loopback" ];
extraModprobeConfig = ''
options v4l2loopback exclusive_caps=1 card_label="Virtual Camera"
'';
};
}));
} }