mirror of
https://github.com/nmasur/dotfiles
synced 2025-04-24 05:42:25 +00:00
Compare commits
4 Commits
3cad3d2fb0
...
0df8af607d
Author | SHA1 | Date | |
---|---|---|---|
|
0df8af607d | ||
|
61d9b103b0 | ||
|
71d0d3ca14 | ||
|
d5b0405b99 |
@ -49,6 +49,7 @@ nixpkgs.lib.nixosSystem {
|
|||||||
# mullvad.enable = true;
|
# mullvad.enable = true;
|
||||||
nixlang.enable = true;
|
nixlang.enable = true;
|
||||||
dotfiles.enable = true;
|
dotfiles.enable = true;
|
||||||
|
yt-dlp.enable = true;
|
||||||
|
|
||||||
gaming = {
|
gaming = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
./obsidian.nix
|
./obsidian.nix
|
||||||
./qbittorrent.nix
|
./qbittorrent.nix
|
||||||
./nautilus.nix
|
./nautilus.nix
|
||||||
|
./yt-dlp.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -16,13 +16,20 @@
|
|||||||
sxiv # Image viewer
|
sxiv # Image viewer
|
||||||
mupdf # PDF viewer
|
mupdf # PDF viewer
|
||||||
zathura # PDF viewer
|
zathura # PDF viewer
|
||||||
yt-dlp # Video downloader
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Set default for opening PDFs
|
# Set default for opening PDFs
|
||||||
xdg.mimeApps.defaultApplications."application/pdf" =
|
xdg.mimeApps = {
|
||||||
[ "zathura.desktop" ];
|
associations.added = {
|
||||||
xdg.mimeApps.defaultApplications."image/*" = [ "sxiv.desktop" ];
|
"application/pdf" = [ "pwmt.zathura-cb.desktop" ];
|
||||||
|
"image/*" = [ "sxiv.desktop" ];
|
||||||
|
};
|
||||||
|
associations.removed = { "application/pdf" = [ "mupdf.desktop" ]; };
|
||||||
|
defaultApplications = {
|
||||||
|
"application/pdf" = [ "pwmt.zathura-cb.desktop" ];
|
||||||
|
"image/*" = [ "sxiv.desktop" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
35
modules/common/applications/yt-dlp.nix
Normal file
35
modules/common/applications/yt-dlp.nix
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
options = {
|
||||||
|
yt-dlp = {
|
||||||
|
enable = lib.mkEnableOption {
|
||||||
|
description = "Enable YouTube downloader.";
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf (config.yt-dlp.enable) {
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
programs.yt-dlp = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = "";
|
||||||
|
settings = {
|
||||||
|
no-continue = true; # Always re-download each fragment
|
||||||
|
no-overwrites = true; # Don't overwrite existing files
|
||||||
|
download-archive = "archive.log"; # Log of archives
|
||||||
|
embed-metadata = true;
|
||||||
|
embed-thumbnail = true;
|
||||||
|
embed-subs = true;
|
||||||
|
sub-langs = "en.*";
|
||||||
|
concurrent-fragments = 4; # Parallel download chunks
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.fish.shellAbbrs.yt = "yt-dlp";
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -34,6 +34,14 @@ in {
|
|||||||
programs.kitty.settings.scrollback_pager = lib.mkForce ''
|
programs.kitty.settings.scrollback_pager = lib.mkForce ''
|
||||||
${neovim}/bin/nvim -c 'setlocal nonumber nolist showtabline=0 foldcolumn=0|Man!' -c "autocmd VimEnter * normal G" -'';
|
${neovim}/bin/nvim -c 'setlocal nonumber nolist showtabline=0 foldcolumn=0|Man!' -c "autocmd VimEnter * normal G" -'';
|
||||||
|
|
||||||
|
xdg.desktopEntries.nvim = {
|
||||||
|
name = "Neovim wrapper";
|
||||||
|
exec = "kitty nvim %F";
|
||||||
|
};
|
||||||
|
xdg.mimeApps = {
|
||||||
|
defaultApplications."text/markdown" = [ "nvim.desktop" ];
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# # Used for icons in Vim
|
# # Used for icons in Vim
|
||||||
|
@ -10,6 +10,10 @@
|
|||||||
networking.interfaces.wlp4s0.useDHCP = true;
|
networking.interfaces.wlp4s0.useDHCP = true;
|
||||||
|
|
||||||
networking.firewall.allowPing = lib.mkIf config.server true;
|
networking.firewall.allowPing = lib.mkIf config.server true;
|
||||||
|
networking.hosts = {
|
||||||
|
"192.168.0.120" = [ "tempest" ];
|
||||||
|
"192.168.0.218" = [ "swan" ];
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -32,6 +32,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.${config.user}.xdg = {
|
home-manager.users.${config.user}.xdg = {
|
||||||
|
|
||||||
|
# Allow Nix to manage the default applications list
|
||||||
|
mimeApps.enable = true;
|
||||||
|
|
||||||
|
# Set directories for application defaults
|
||||||
userDirs = {
|
userDirs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
createDirectories = true;
|
createDirectories = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user