2024-05-22 15:32:40 +02:00
|
|
|
{config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
2024-11-03 16:27:36 +01:00
|
|
|
imports = [
|
|
|
|
./generic/mpv.nix
|
|
|
|
];
|
2024-05-22 15:32:40 +02:00
|
|
|
config = {
|
|
|
|
services.printing.enable = true;
|
|
|
|
|
2024-06-26 19:55:49 +02:00
|
|
|
sound.enable = false;
|
2024-05-22 15:32:40 +02:00
|
|
|
hardware.pulseaudio.enable = false;
|
|
|
|
security.rtkit.enable = true;
|
|
|
|
services.pipewire = {
|
|
|
|
enable = true;
|
|
|
|
alsa.enable = true;
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
pulse.enable = true;
|
|
|
|
|
|
|
|
# Enable audio interfaces renaming
|
|
|
|
wireplumber.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
2024-10-13 18:46:09 +02:00
|
|
|
kdePackages.kdeconnect-kde
|
2024-09-09 20:31:54 +02:00
|
|
|
pcmanfm
|
2024-11-23 19:52:48 +01:00
|
|
|
qimgv
|
2024-05-22 15:32:40 +02:00
|
|
|
];
|
|
|
|
|
2024-11-03 16:27:36 +01:00
|
|
|
programs.mpv = let
|
|
|
|
fetchMpvScript = {url, hash, scriptName}: pkgs.fetchurl {
|
|
|
|
inherit url hash;
|
|
|
|
name = "mpv-script-${scriptName}";
|
|
|
|
recursiveHash = true;
|
|
|
|
downloadToTemp = true;
|
|
|
|
postFetch = ''
|
|
|
|
mkdir -p $out/share/mpv/scripts
|
|
|
|
mv $downloadedFile $out/share/mpv/scripts/${scriptName}
|
|
|
|
'';
|
|
|
|
passthru.scriptName = scriptName;
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
enable = true;
|
|
|
|
scripts = [
|
|
|
|
pkgs.mpvScripts.sponsorblock
|
|
|
|
pkgs.mpvScripts.mpris
|
|
|
|
] ++ lib.map (script: fetchMpvScript {
|
|
|
|
url = "https://raw.githubusercontent.com/occivink/mpv-scripts/d0390c8e802c2e888ff4a2e1d5e4fb040f855b89/scripts/${script.name}";
|
|
|
|
hash = script.hash;
|
|
|
|
scriptName = script.name;
|
|
|
|
}) [
|
|
|
|
{ name = "crop.lua"; hash = "sha256-/uaTCtV8Aanvnxrt8afBbO4uu2xp8Ec6DxApMb+fg2s="; }
|
|
|
|
{ name = "encode.lua"; hash = "sha256-yK/DV0cpGhl4Uobl7xA1myZiECJpsShrHnsJftBqzAY="; }
|
|
|
|
];
|
|
|
|
settings = {
|
|
|
|
mpv = {
|
|
|
|
keep-open = "yes";
|
|
|
|
volume = "40";
|
|
|
|
osd-fractions = "yes";
|
|
|
|
background = "0.0/1.0";
|
|
|
|
alpha = "yes";
|
|
|
|
};
|
|
|
|
input = lib.mkMerge [
|
|
|
|
# mpv core
|
|
|
|
''
|
|
|
|
Alt+1 set window-scale 0.125
|
|
|
|
Alt+2 set window-scale 0.25
|
|
|
|
Alt+3 set window-scale 0.5
|
|
|
|
Alt+4 set window-scale 1
|
|
|
|
Alt+5 set window-scale 2
|
|
|
|
''
|
|
|
|
# crop.lua
|
|
|
|
''
|
|
|
|
c script-message-to crop start-crop hard
|
|
|
|
alt+c script-message-to crop start-crop soft
|
|
|
|
ctrl+shift+c script-message-to crop start-crop delogo
|
|
|
|
C script-message-to crop toggle-crop hard
|
|
|
|
''
|
|
|
|
# encode.lua
|
|
|
|
''
|
|
|
|
b script-message-to encode encode_default
|
|
|
|
alt+b script-message-to encode set-timestamp encode_default
|
|
|
|
''
|
|
|
|
];
|
|
|
|
script-opts = {
|
|
|
|
"encode_default.conf" = {
|
|
|
|
only_active_tracks = "no";
|
|
|
|
preserve_filters = "yes";
|
|
|
|
append_filder = "";
|
|
|
|
codec = "";
|
|
|
|
output_format = "$f_$n.$x";
|
|
|
|
output_dir = "/tmp";
|
|
|
|
detached = "no";
|
|
|
|
ffmpeg_command = lib.getExe pkgs.ffmpeg;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-05-22 15:32:40 +02:00
|
|
|
services.openssh.extraConfig = ''
|
|
|
|
X11Forwarding yes
|
|
|
|
'';
|
2024-07-06 02:38:47 +02:00
|
|
|
|
|
|
|
# Fonts
|
|
|
|
fonts.packages = with pkgs; [
|
|
|
|
corefonts
|
2024-08-08 09:22:37 +02:00
|
|
|
(nerdfonts.override { fonts = [ "Meslo" ]; })
|
2024-07-06 02:38:47 +02:00
|
|
|
roboto
|
|
|
|
];
|
2024-09-29 22:32:34 +02:00
|
|
|
|
|
|
|
# Pcmanfm configuration
|
|
|
|
environment.etc."xdg/pcmanfm/default/pcmanfm.conf".text = ''
|
|
|
|
[config]
|
|
|
|
bm_open_method=0
|
|
|
|
|
|
|
|
[volume]
|
|
|
|
mount_on_startup=0
|
|
|
|
mount_removable=0
|
|
|
|
autorun=0
|
|
|
|
|
|
|
|
[ui]
|
|
|
|
always_show_tabs=1
|
|
|
|
max_tab_chars=32
|
|
|
|
media_in_new_tab=0
|
|
|
|
desktop_folder_new_win=0
|
|
|
|
change_tab_on_drop=1
|
|
|
|
close_on_unmount=1
|
|
|
|
focus_previous=1
|
|
|
|
side_pane_mode=places
|
|
|
|
view_mode=list
|
|
|
|
show_hidden=1
|
|
|
|
sort=name;ascending;
|
|
|
|
toolbar=newwin;newtab;navigation;home;
|
|
|
|
show_statusbar=1
|
|
|
|
pathbar_mode_buttons=0
|
|
|
|
'';
|
|
|
|
|
|
|
|
environment.etc."xdg/libfm/libfm.conf".text = ''
|
|
|
|
[config]
|
|
|
|
single_click=0
|
|
|
|
use_trash=1
|
|
|
|
confirm_del=1
|
|
|
|
confirm_trash=1
|
|
|
|
advanced_mode=0
|
|
|
|
si_unit=0
|
|
|
|
force_startup_notify=1
|
|
|
|
backup_as_hidden=1
|
|
|
|
no_usb_trash=1
|
|
|
|
no_child_non_expandable=0
|
|
|
|
show_full_names=0
|
|
|
|
only_user_templates=0
|
|
|
|
drop_default_action=auto
|
|
|
|
terminal=${lib.optionalString (lib.elem pkgs.kitty config.environment.systemPackages) "kitty"}
|
|
|
|
archiver=file-roller
|
|
|
|
thumbnail_local=1
|
|
|
|
thumbnail_max=16384
|
|
|
|
|
|
|
|
[ui]
|
|
|
|
big_icon_size=48
|
|
|
|
small_icon_size=16
|
|
|
|
pane_icon_size=16
|
|
|
|
thumbnail_size=128
|
|
|
|
show_thumbnail=1
|
|
|
|
shadow_hidden=1
|
|
|
|
|
|
|
|
[places]
|
|
|
|
places_home=1
|
|
|
|
places_desktop=1
|
|
|
|
places_root=1
|
|
|
|
places_computer=1
|
|
|
|
places_trash=1
|
|
|
|
places_applications=1
|
|
|
|
places_network=1
|
|
|
|
places_unmounted=1
|
|
|
|
'';
|
2024-05-22 15:32:40 +02:00
|
|
|
};
|
2024-06-26 19:55:49 +02:00
|
|
|
}
|