Refactor codebase to use nix modules

This commit is contained in:
Julia Lange 2024-04-14 05:40:02 -07:00
parent a4735423b4
commit ffada2703c
114 changed files with 1018 additions and 744 deletions

View file

@ -0,0 +1,9 @@
{ config, pkgs, ... }:
{
imports = [
./feh
./mpv
./zathura
];
}

View file

@ -0,0 +1,13 @@
{ config, pkgs, lib, ... }:
{
options.feh = {
enable = lib.mkEnableOption "Enables feh";
};
config = lib.mkIf config.feh.enable {
programs.feh = {
enable = true;
};
};
}

View file

@ -0,0 +1,22 @@
{ config, pkgs, lib, ... }:
{
options.mpv = {
enable = lib.mkEnableOption "Enables mpv";
};
config = lib.mkIf config.mpv.enable {
home.packages = with pkgs; [
yt-dlp
];
programs.mpv = {
enable = true;
config = {
volume-max = 150;
force-window = "yes";
script-opts = "ytdl_hook-ytdl_path=yt-dlp";
ytdl-format = "bestvideo[height<=?1080][vcodec!=vp9]+bestaudio/best";
};
};
};
}

View file

@ -0,0 +1,13 @@
{ config, pkgs, lib, ... }:
{
options.zathura = {
enable = lib.mkEnableOption "Enables zathura";
};
config = lib.mkIf config.zathura.enable {
programs.zathura = {
enable = true;
};
};
}