64cdc0dd3c
Reproducible development environment for NixOS/Nix contributors: - Dev shell with Node 22, system Electron, Playwright, LD_LIBRARY_PATH for X11/Wayland/audio libs, activated automatically via direnv - buildNpmPackage derivation wrapping system Electron with desktop file and hicolor icons - NixOS module (programs.openscreen.enable) with xdg-desktop-portal - Home Manager module for per-user installation - Overlay for composing with other flakes Tested: nix flake show, nix develop, nix build, nixos-rebuild switch
37 lines
872 B
Nix
37 lines
872 B
Nix
# Home Manager module for OpenScreen
|
|
# Usage in flake-based Home Manager config:
|
|
#
|
|
# inputs.openscreen.url = "github:siddharthvaddem/openscreen";
|
|
#
|
|
# { inputs, ... }: {
|
|
# imports = [ inputs.openscreen.homeManagerModules.default ];
|
|
# programs.openscreen.enable = true;
|
|
# }
|
|
self:
|
|
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
let
|
|
cfg = config.programs.openscreen;
|
|
in
|
|
{
|
|
options.programs.openscreen = {
|
|
enable = lib.mkEnableOption "OpenScreen screen recorder";
|
|
|
|
package = lib.mkOption {
|
|
type = lib.types.package;
|
|
default = self.packages.${pkgs.stdenv.hostPlatform.system}.openscreen;
|
|
defaultText = lib.literalExpression "inputs.openscreen.packages.\${pkgs.stdenv.hostPlatform.system}.openscreen";
|
|
description = "The OpenScreen package to use.";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
home.packages = [ cfg.package ];
|
|
};
|
|
}
|