turned obs into a program module
This commit is contained in:
parent
43217cc1a3
commit
ccd03634de
30
flake.nix
30
flake.nix
@ -2,16 +2,6 @@
|
||||
description = "A very basic flake";
|
||||
|
||||
inputs = {
|
||||
# lix = {
|
||||
# url =
|
||||
# "git+https://git@git.lix.systems/lix-project/lix?ref=refs/tags/2.90-beta.1";
|
||||
# flake = false;
|
||||
# };
|
||||
# lix-module = {
|
||||
# url = "git+https://git.lix.systems/lix-project/nixos-module";
|
||||
# inputs.lix.follows = "lix";
|
||||
# inputs.nixpkgs.follows = "nixpkgs";
|
||||
# };
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-23.11";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
home-manager.url = "github:nix-community/home-manager/release-23.11";
|
||||
@ -42,6 +32,26 @@
|
||||
({ pkgs, ... }: {
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
gnome = super.gnome.overrideScope' (gFinal: gPrev: {
|
||||
nautilus = gPrev.nautilus.overrideAttrs (nsuper: {
|
||||
buildInputs = nsuper.buildInputs
|
||||
++ (with pkgs.gst_all_1; [
|
||||
gst-plugins-good
|
||||
gst-plugins-bad
|
||||
gst-plugins-ugly
|
||||
gst-plugins-base
|
||||
]);
|
||||
});
|
||||
mutter = gPrev.mutter.overrideAttrs (old: {
|
||||
src = super.pkgs.fetchgit {
|
||||
url = "https://gitlab.gnome.org/vanvugt/mutter.git";
|
||||
# GNOME 45: triple-buffering-v4-45
|
||||
rev = "0b896518b2028d9c4d6ea44806d093fd33793689";
|
||||
sha256 =
|
||||
"sha256-mzNy5GPlB2qkI2KEAErJQzO//uo8yO0kPQUwvGDwR4w=";
|
||||
};
|
||||
});
|
||||
});
|
||||
planify = pkgsU.planify;
|
||||
gdtoolkit = pkgsU.gdtoolkit;
|
||||
gallery-dl = pkgsU.gallery-dl;
|
||||
|
||||
@ -10,7 +10,9 @@ in {
|
||||
./hardware-configuration.nix
|
||||
../../base.nix
|
||||
../../gnome.nix
|
||||
./obs-studio.nix
|
||||
];
|
||||
programs.obs-studio = { enable = true; };
|
||||
my = {
|
||||
emacs.enable = true;
|
||||
apps = {
|
||||
|
||||
42
hosts/workstation/obs-studio.nix
Normal file
42
hosts/workstation/obs-studio.nix
Normal file
@ -0,0 +1,42 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let cfg = config.programs.obs-studio;
|
||||
in {
|
||||
options.programs.obs-studio = {
|
||||
enable = mkEnableOption "OBS Studio program";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.obs-studio;
|
||||
defaultText = "pkgs.obs-studio";
|
||||
description = "Set obs-studio package to use.";
|
||||
};
|
||||
|
||||
enableVirtualCamera = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Installs and sets up the v4l2loopback kernel module, necesary for OBS
|
||||
to start a virtual camera.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
boot = mkIf cfg.enableVirtualCamera {
|
||||
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
|
||||
|
||||
extraModprobeConfig = ''
|
||||
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
|
||||
'';
|
||||
};
|
||||
|
||||
security.polkit.enable = mkIf cfg.enableVirtualCamera true;
|
||||
};
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ CaptainJawZ ];
|
||||
}
|
||||
@ -2,7 +2,6 @@
|
||||
options.my.apps.multimedia.enable = lib.mkEnableOption "enable";
|
||||
config = lib.mkIf config.my.apps.multimedia.enable {
|
||||
users.users.jawz.packages = with pkgs; [
|
||||
obs-studio # screen recorder & streamer
|
||||
pitivi # video editor
|
||||
celluloid # video player
|
||||
curtail # image compressor
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user