do some moving

This commit is contained in:
Schrottkatze 2025-03-27 20:06:54 +01:00
parent 9379b9c61b
commit 49298541e5
Signed by: schrottkatze
SSH key fingerprint: SHA256:FPOYVeBy3QP20FEM42uWF1Wa/Qhlk+L3S2+Wuau/Auo
40 changed files with 13 additions and 16 deletions

56
modules/media/default.nix Normal file
View file

@ -0,0 +1,56 @@
{
pkgs,
pkgs-stable,
config,
lib,
...
}: let
cfg = config.jade.desktop.media;
in
with lib; {
imports = [
./obs.nix
./fonts.nix
];
options.jade.desktop.media.videoEditing = mkEnableOption "Enable Video editing software";
config = {
home-manager.users.jade = {pkgs, ...}: {
imports = [./typst.nix];
home.packages = with pkgs; [
# creative software basics
pastel
krita
gimp
drawing
inkscape-with-extensions
pixelorama
rawtherapee
scribus
audacity
openscad-unstable
openscad-lsp
imagemagick
ffmpeg_7-full
onlyoffice-bin_latest
# viewers
pkgs-stable.font-manager
yt-dlp
syncplay
vlc
mpv
kdePackages.okular
nomacs
jellyfin-media-player
(mkIf cfg.videoEditing kdePackages.kdenlive)
(mkIf cfg.videoEditing glaxnimate)
];
};
};
}

48
modules/media/fonts.nix Normal file
View file

@ -0,0 +1,48 @@
{pkgs, ...}: {
nixpkgs.config.packageOverrides = pkgs: {
google-fonts = pkgs.google-fonts.overrideAttrs (oldAttrs: {
src = pkgs.fetchFromGitHub {
owner = "google";
repo = "fonts";
rev = "8a0041ea7b92e339a7ce13e4e1dadcc85cb8f5df";
sha256 = "sha256-9TzeihEKIEDRtDuv+NmLWjTpoGnBR+RP/jIBfB1O06U=";
};
installPhase = oldAttrs.installPhase + "mv $out/share/fonts/truetype $out/share/fonts/ttf";
});
};
fonts = {
packages = with pkgs; [
nerd-fonts.fira-code
nerd-fonts.departure-mono
google-fonts
montserrat
noto-fonts
atkinson-hyperlegible
arkpandora_ttf
liberation_ttf
caladea
carlito
garamond-libre
ocr-a
amiri
libertine
inter
b612
departure-mono
];
fontDir.enable = true;
};
home-manager.users.jade = {...}: {
fonts.fontconfig = {
enable = true;
defaultFonts = {
emoji = [];
monospace = [];
sansSerif = ["Atkinson Hyperlegible"];
serif = [];
};
};
};
}

33
modules/media/obs.nix Normal file
View file

@ -0,0 +1,33 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.jade.desktop.media.obs;
in
with lib; {
options.jade.desktop.media.obs = mkEnableOption "Enable OBS";
config = mkIf cfg {
# OBS stuffs
environment.systemPackages = [
(pkgs.wrapOBS {
plugins = with pkgs.obs-studio-plugins; [
wlrobs
obs-backgroundremoval
obs-pipewire-audio-capture
];
})
];
boot = {
extraModulePackages = with config.boot.kernelPackages; [
v4l2loopback
];
extraModprobeConfig = ''
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
'';
};
};
}

43
modules/media/typst.nix Normal file
View file

@ -0,0 +1,43 @@
{
pkgs,
typst-within,
...
}: let
packages = {
typst-configs = pkgs.fetchFromGitea {
domain = "forge.katzen.cafe";
owner = "schrottkatze";
repo = "typst-configs";
rev = "9a5bd5256ace2a56de51b89793f191b4eecce1dc"; #:REV:- rev = "%REV%";-:#
sha256 = "sha256-E+5fJULNxM0XcbimuENqIJC24ZwPRMSHnG97ncBtEGw="; #:SHA:- sha256 = "%SHA%";-:#
};
flow = pkgs.fetchFromGitHub {
owner = "MultisampledNight";
repo = "flow";
rev = "f5c653c706d80145165ec684b217b803a0246e8c";
sha256 = "sha256-tXfogxo1DGmsrwjOhF2h+60825P6NVcgQGN6Q1tspZA=";
};
};
mkTypstPath = name: ".local/share/typst/packages/local/${name}/0.1.0";
in {
home.file = {
typst-configs = {
target = mkTypstPath "typst-configs";
source = packages.typst-configs;
recursive = true;
};
flow = {
target = mkTypstPath "flow";
source = packages.flow;
recursive = true;
};
};
# home.packages = [typst-within.packages."x86_64-linux".default];
home.packages = [
pkgs.typst
# `typed` dependencies
pkgs.mupdf
pkgs.inotify-tools
];
}