diff --git a/config/home.nix b/config/home.nix index 95b1e3f..680397e 100644 --- a/config/home.nix +++ b/config/home.nix @@ -53,14 +53,11 @@ in { csharp-ls cups curl - dbeaver-bin discord - dolphin-emu dotnet-sdk_8 dotnetPackages.Nuget dunst easytag - ffmpeg firefox flac flameshot diff --git a/config/packages/default.nix b/config/packages/default.nix index 0e0f4a5..bc6215b 100644 --- a/config/packages/default.nix +++ b/config/packages/default.nix @@ -8,6 +8,5 @@ ./neovim ./picom ./polybar - ./yt-dlp ]; } diff --git a/config/packages/neovim/init.lua b/config/packages/neovim/init.lua index 0ca4f94..3cde446 100644 --- a/config/packages/neovim/init.lua +++ b/config/packages/neovim/init.lua @@ -50,7 +50,29 @@ vim.opt.ttyfast = true -- Do not add a newline at the end of the file vim.opt.fixeol = false -vim.cmd [[packadd packer.nvim]] +local data_dir = vim.fn.has('nvim') == 1 and vim.fn.stdpath('data') .. '/site' or '~/.vim' + +-- Ensure packer is installed +local install_path = vim.fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' +if vim.fn.empty(vim.fn.glob(install_path)) > 0 then + vim.fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) + vim.cmd [[packadd packer.nvim]] +end + +-- Use a protected call so we don't error out on first use +local status_ok, packer = pcall(require, "packer") +if not status_ok then + return +end + +-- Have packer use a popup window +packer.init { + display = { + open_fn = function() + return require('packer.util').float { border = 'rounded' } + end, + }, +} return require('packer').startup(function(use) -- Packer can manage itself @@ -75,6 +97,7 @@ return require('packer').startup(function(use) use 'github/copilot.vim' use {'CopilotC-Nvim/CopilotChat.nvim', branch = 'canary'} end) +vim.cmd [[packadd packer.nvim]] -- Copilot Chat local prompts = require('CopilotChat.prompts') diff --git a/config/packages/yt-dlp/config b/config/packages/yt-dlp/config deleted file mode 100644 index 77467f2..0000000 --- a/config/packages/yt-dlp/config +++ /dev/null @@ -1,22 +0,0 @@ -# Output format: album/tracks.format --o "%(album,playlist_title)U/%(track_number,playlist_index)s - %(title)U.%(ext)s" ---windows-filenames -# --restrict-filenames - -# Extract audio --f bestaudio ---extract-audio ---audio-format mp3 - -# Thumbnail squared ---convert-thumbnails png ---ppa "ThumbnailsConvertor+ffmpeg_o:-c:v png -vf crop=\"'if(gt(ih,iw),iw,ih)':'if(gt(iw,ih),ih,iw)'\"" ---embed-thumbnail - -# Metadata, with playlist number as track number if the latter is missing ---embed-metadata ---parse-metadata "playlist_index:%(track_number)s" - -# Misc ---no-overwrites ---concurrent-fragments 4 diff --git a/config/packages/yt-dlp/default.nix b/config/packages/yt-dlp/default.nix deleted file mode 100644 index e89916e..0000000 --- a/config/packages/yt-dlp/default.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - home.file."/home/vylpes/.config/yt-dlp/config".source = ./config; -} diff --git a/docs/Neovim.md b/docs/Neovim.md deleted file mode 100644 index f15497f..0000000 --- a/docs/Neovim.md +++ /dev/null @@ -1,13 +0,0 @@ -# Neovim - -Neovim is mostly configured in the flake, we just need to install packer -separately, although this is only required to do once. - -## Installation - -Run the following command in the terminal - -```bash -git clone --depth 1 https://github.com/wbthomason/packer.nvim\ - ~/.local/share/nvim/site/pack/packer/start/packer.nvim -``` diff --git a/flake.lock b/flake.lock index 7490bf9..54ad83d 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1726989464, - "narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", + "lastModified": 1726818100, + "narHash": "sha256-z2V74f5vXqkN5Q+goFlhbFXY/dNaBAyeLpr2bxu4Eic=", "owner": "nix-community", "repo": "home-manager", - "rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", + "rev": "1bbc1a5a1f4de7401c92db85b2119ed21bb4139d", "type": "github" }, "original": { @@ -23,11 +23,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1729691686, - "narHash": "sha256-BAuPWW+9fa1moZTU+jFh+1cUtmsuF8asgzFwejM4wac=", + "lastModified": 1726838390, + "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "32e940c7c420600ef0d1ef396dc63b04ee9cad37", + "rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101", "type": "github" }, "original": { diff --git a/system/shared.nix b/system/shared.nix index 5105a21..6bd3de5 100644 --- a/system/shared.nix +++ b/system/shared.nix @@ -114,6 +114,10 @@ gcm = "git commit -m"; gco = "git checkout"; + yt-mp3 = "yt-dlp -xi --audio-format mp3"; + yt-mp3-meta = "yt-dlp -xi --audio-format mp3 --parse-metadata \"playlist_index:%(track_number)s\" --add-metadata"; + yt-mp3-meta-cookies = "yt-dlp -xi --audio-format mp3 --parse-metadata \"playlist_index:%(track_number)s\" --add-metadata --cookies-from-browser firefox"; + s = "swallow"; }; };