diff options
Diffstat (limited to 'modules/media/screen-recording/default.nix')
| -rw-r--r-- | modules/media/screen-recording/default.nix | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/modules/media/screen-recording/default.nix b/modules/media/screen-recording/default.nix deleted file mode 100644 index 768ec22..0000000 --- a/modules/media/screen-recording/default.nix +++ /dev/null @@ -1,73 +0,0 @@ -# Screen recording script using wf-recorder and slurp -{ - config, - lib, - pkgs, - ... -}: -let - cfg = config.media.screen-recording; - - screenRecordingScript = pkgs.writeShellApplication { - name = "screen-recording"; - runtimeInputs = [ - config.terminal.bash.package - config.media.slurp.package - config.media.wf-recorder.package - ]; - text = builtins.readFile ./screen-recording.sh; - }; - - screenRecordingCompletion = - pkgs.runCommand "screen-recording-completion" - { - nativeBuildInputs = [ pkgs.installShellFiles ]; - } - '' - mkdir -p $out/share/zsh/site-functions - installShellCompletion zsh --name _screen-recording ${pkgs.writeText "screen-recording.zsh" (builtins.readFile ./screen-recording.zsh)} - ''; - - scriptPkg = pkgs.symlinkJoin { - name = "screen-recording"; - paths = [ - screenRecordingScript - screenRecordingCompletion - ]; - meta = screenRecordingScript.meta or { }; - }; -in -{ - options.media.screen-recording = { - enable = lib.mkEnableOption "Screen recording script using wf-recorder and slurp"; - - package = lib.mkOption { - type = lib.types.package; - readOnly = true; - default = scriptPkg; - description = "The screen-recording script package."; - }; - }; - - config = lib.mkMerge [ - (lib.mkIf cfg.enable { - home.packages = [ scriptPkg ]; - - assertions = import ./assertions.nix { inherit config lib; }; - - home.file.".local/share/icons/hicolor/scalable/apps/obs.svg" = { - source = ../../../assets/icons/apps/obs.svg; - }; - }) - (lib.mkIf (cfg.enable && config.terminal.kitty.enable) { - xdg.desktopEntries.screen-recording = { - name = "Screen Recording"; - exec = "${lib.getExe config.terminal.kitty.package} --class screen-recording -e ${lib.getExe scriptPkg}"; - icon = "obs"; - categories = [ "Utility" ]; - terminal = false; - type = "Application"; - }; - }) - ]; -} |
