User native home-manager module for mpv

This commit is contained in:
Artemis Tosini 2021-07-08 01:43:45 +00:00
parent 494e7d116b
commit 2959cfe6dc
Signed by: artemist
GPG key ID: ADFFE553DCBB831E
4 changed files with 36 additions and 7 deletions

@ -1 +1 @@
Subproject commit 23769994e8f7b212d9a257799173b120ed87736b
Subproject commit 06ee8ec8dfc4554c374052cd7b7083765748af99

View file

@ -8,17 +8,16 @@
useUserPackages = true;
useGlobalPkgs = true;
};
home-manager.users.artemis = { pkgs, ... }: {
home-manager.users.artemis = {
imports = [
./git.nix
./mpv.nix
./neovim
];
xdg.enable = true;
xdg.configFile = {
"alacritty/alacritty.yml".source = ./files/alacritty.yml;
"mpv/mpv.conf".source = ./files/mpv/mpv.conf;
"mpv/input.conf".source = ./files/mpv/input.conf;
"mimeapps.list".source = ./files/mimeapps.list;
"swaylock/config".text = ''
daemonize

30
home/mpv.nix Normal file
View file

@ -0,0 +1,30 @@
{ pkgs, ... }:
{
programs.mpv = {
enable = true;
config = {
slang = "eng,en";
alang = "eng,en";
hwdec = "vaapi";
vo = "gpu";
no-audio-display = "";
audio-normalize-downmix = "";
replaygain = "track";
};
# Don't make this profile default since not all machines can handle it
profiles.gpu-hq = {
scale = "ewa_lanczossharp";
cscale = "ewa_lanczossharp";
};
bindings = {
WHEEL_UP = "ignore";
WHEEL_DOWN = "ignore";
WHEEL_LEFT = "ignore";
WHEEL_RIGHT = "ignore";
k = "add sub-scale -0.1";
K = "add sub-scale +0.1";
};
};
}

View file

@ -77,9 +77,9 @@
hardware.opengl.extraPackages = with pkgs; [ vulkan-validation-layers ];
# Scanning
hardware.sane.enable = true;
users.users.artemis.extraGroups = [ "scanner" ];
# Home
home-manager.users.artemis.programs.mpv.defaultProfiles = [ "gpu-hq" ];
# NixOS
system.stateVersion = "19.09";
}