2022-09-25 03:45:44 +00:00
|
|
|
{ dotfiles, config, options, lib, pkgs, ... }:
|
2021-11-27 11:21:08 +00:00
|
|
|
|
2022-02-02 04:25:03 +00:00
|
|
|
let
|
|
|
|
yt-dlp-for-audio-config = pkgs.writeText "yt-dlp-for-audio-config" ''
|
|
|
|
# Don't overwrite for cautious individuals.
|
|
|
|
--no-overwrite
|
|
|
|
|
|
|
|
# To make sure all audio-related.
|
|
|
|
--extract-audio
|
|
|
|
--format bestaudio
|
|
|
|
--audio-format opus
|
|
|
|
|
|
|
|
--output '%(track_number,playlist_autonumber)d-%(track,title)s.%(ext)s'
|
|
|
|
--download-archive archive
|
|
|
|
|
|
|
|
# Add all sorts of metadata.
|
|
|
|
--embed-thumbnail
|
|
|
|
--add-metadata
|
|
|
|
'';
|
|
|
|
yt-dlp-for-audio = pkgs.writeScriptBin "yt-dlp-audio" ''
|
|
|
|
${pkgs.yt-dlp}/bin/yt-dlp --config-location "${yt-dlp-for-audio-config}" $@
|
|
|
|
'';
|
2022-09-25 03:45:44 +00:00
|
|
|
getDotfiles = path: "${dotfiles}/${path}";
|
2022-08-06 06:05:34 +00:00
|
|
|
|
|
|
|
musicDir = config.xdg.userDirs.music;
|
|
|
|
playlistsDir = "${musicDir}/playlists";
|
2022-11-19 03:05:31 +00:00
|
|
|
in
|
|
|
|
{
|
2021-12-08 04:18:37 +00:00
|
|
|
home.packages = with pkgs; [
|
2022-09-02 00:37:56 +00:00
|
|
|
songrec
|
2022-01-12 02:46:25 +00:00
|
|
|
vscodium-fhs
|
2022-05-15 03:19:33 +00:00
|
|
|
neovim
|
2022-02-02 04:25:03 +00:00
|
|
|
yt-dlp-for-audio
|
2021-12-25 13:56:50 +00:00
|
|
|
];
|
2021-12-08 04:18:37 +00:00
|
|
|
|
2021-11-29 09:56:24 +00:00
|
|
|
fonts.fontconfig.enable = true;
|
2022-07-20 09:41:27 +00:00
|
|
|
|
|
|
|
# We're disabling it since the default Atuin integration is
|
|
|
|
# blocking the Wezterm's shell integration by fetching another
|
|
|
|
# instance of bash-preexec.
|
|
|
|
programs.atuin.enableBashIntegration = false;
|
2022-07-18 23:07:53 +00:00
|
|
|
programs.bash.bashrcExtra = ''
|
|
|
|
source ${pkgs.wezterm}/etc/profile.d/wezterm.sh
|
2022-07-20 09:41:27 +00:00
|
|
|
|
|
|
|
if [[ :$SHELLOPTS: =~ :(vi|emacs): ]]; then
|
|
|
|
eval "$(${config.programs.atuin.package}/bin/atuin init bash)"
|
|
|
|
fi
|
2022-07-18 23:07:53 +00:00
|
|
|
'';
|
2021-11-29 09:56:24 +00:00
|
|
|
|
2022-08-06 06:05:34 +00:00
|
|
|
# My Git credentials.
|
2022-09-10 05:08:30 +00:00
|
|
|
programs.git = {
|
2021-11-29 05:30:57 +00:00
|
|
|
enable = true;
|
2021-12-08 04:18:37 +00:00
|
|
|
package = pkgs.gitFull;
|
2021-11-29 05:30:57 +00:00
|
|
|
lfs.enable = true;
|
2022-01-12 02:46:25 +00:00
|
|
|
userName = "Gabriel Arazas";
|
2022-12-11 00:05:03 +00:00
|
|
|
userEmail = "foodogsquared@foodogsquared.one";
|
2023-01-24 03:00:59 +00:00
|
|
|
signing.key = "ADE0C41DAB221FCC";
|
2022-05-20 06:47:09 +00:00
|
|
|
extraConfig = {
|
|
|
|
# This is taken from the official Git book, for future references.
|
|
|
|
sendemail = {
|
2022-12-11 00:05:03 +00:00
|
|
|
smtpserver = "smtp.mailbox.org";
|
2022-05-20 06:47:09 +00:00
|
|
|
smtpencryption = "tls";
|
|
|
|
smtpserverport = 587;
|
2022-12-11 00:05:03 +00:00
|
|
|
smtpuser = "foodogsquared@mailbox.org";
|
2022-05-20 06:47:09 +00:00
|
|
|
};
|
2022-08-10 04:36:26 +00:00
|
|
|
|
2023-01-24 03:00:59 +00:00
|
|
|
alias = {
|
|
|
|
unstage = "reset HEAD --";
|
|
|
|
quick-rebase = "rebase --interactive --autostash --committer-date-is-author-date";
|
|
|
|
};
|
|
|
|
|
2022-08-10 04:36:26 +00:00
|
|
|
init.defaultBranch = "main";
|
|
|
|
|
|
|
|
# Shorthand for popular forges ala-Nix flake URL inputs. It's just a fun
|
|
|
|
# little part of the config.
|
|
|
|
url = {
|
2022-08-11 01:44:32 +00:00
|
|
|
"https://github.com/".insteadOf = [ "gh:" "github:" ];
|
|
|
|
"https://gitlab.com/".insteadOf = [ "gl:" "gitlab:" ];
|
|
|
|
"https://gitlab.gnome.org/".insteadOf = [ "gnome:" ];
|
|
|
|
"https://invent.kde.org/".insteadOf = [ "kde:" ];
|
2022-08-19 08:52:28 +00:00
|
|
|
"https://git.sr.ht/".insteadOf = [ "sh:" "sourcehut:" ];
|
2022-08-27 05:40:56 +00:00
|
|
|
"https://git.savannah.nongnu.org/git/".insteadOf = [ "sv:" "savannah:" ];
|
2022-08-10 04:36:26 +00:00
|
|
|
};
|
2022-05-20 06:47:09 +00:00
|
|
|
};
|
2021-11-27 08:04:01 +00:00
|
|
|
};
|
2021-11-29 09:56:24 +00:00
|
|
|
|
2023-01-28 16:00:55 +00:00
|
|
|
# My GitHub CLI setup.
|
|
|
|
programs.gh = {
|
|
|
|
enable = true;
|
|
|
|
extensions = with pkgs; [
|
|
|
|
gh-eco
|
|
|
|
gh-dash
|
|
|
|
];
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
git_protocol = "ssh";
|
2023-02-05 08:40:23 +00:00
|
|
|
prompt = "enabled";
|
|
|
|
|
|
|
|
aliases = {
|
|
|
|
pc = "pr checkout";
|
|
|
|
pv = "pr view";
|
|
|
|
};
|
2023-01-28 16:00:55 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-12-08 04:18:37 +00:00
|
|
|
# My music player setup, completely configured with Nix!
|
2022-08-06 06:05:34 +00:00
|
|
|
programs.beets = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
library = "${musicDir}/library.db";
|
|
|
|
plugins = [
|
|
|
|
"acousticbrainz"
|
2022-09-10 05:08:30 +00:00
|
|
|
"fetchart"
|
|
|
|
"fromfilename"
|
2022-08-06 06:05:34 +00:00
|
|
|
"chroma"
|
|
|
|
"deezer"
|
|
|
|
"edit"
|
|
|
|
"export"
|
|
|
|
"fuzzy"
|
2022-09-10 05:08:30 +00:00
|
|
|
"mbsync"
|
2022-08-06 06:05:34 +00:00
|
|
|
"playlist"
|
|
|
|
"scrub"
|
|
|
|
"smartplaylist"
|
|
|
|
];
|
2022-08-07 02:40:37 +00:00
|
|
|
ignore_hidden = true;
|
2022-08-06 06:05:34 +00:00
|
|
|
directory = musicDir;
|
2022-08-07 02:40:37 +00:00
|
|
|
ui.color = true;
|
2022-08-06 06:05:34 +00:00
|
|
|
|
|
|
|
import = {
|
2022-08-07 02:40:37 +00:00
|
|
|
move = true;
|
|
|
|
link = false;
|
|
|
|
resume = true;
|
|
|
|
incremental = true;
|
|
|
|
group_albums = true;
|
2022-08-06 06:05:34 +00:00
|
|
|
log = "beets.log";
|
|
|
|
};
|
|
|
|
|
|
|
|
match = {
|
|
|
|
required = "year label";
|
2022-08-07 02:40:37 +00:00
|
|
|
ignore_video_tracks = true;
|
2022-08-06 06:05:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Plugins configuration.
|
|
|
|
fuzzy.prefix = "-";
|
2022-08-07 02:40:37 +00:00
|
|
|
scrub.auto = true;
|
2022-08-06 06:05:34 +00:00
|
|
|
smartplaylist = {
|
|
|
|
relative_to = musicDir;
|
|
|
|
playlist_dir = playlistsDir;
|
|
|
|
playlists = [
|
|
|
|
{
|
|
|
|
name = "all.m3u8";
|
|
|
|
query = "";
|
|
|
|
}
|
2023-01-12 07:18:33 +00:00
|
|
|
{
|
|
|
|
name = "released-in-$year.m3u8";
|
|
|
|
query = "year:2000..2021";
|
|
|
|
}
|
2022-08-06 06:05:34 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-01-12 02:46:25 +00:00
|
|
|
services.mopidy = {
|
2021-12-08 04:18:37 +00:00
|
|
|
enable = true;
|
2022-01-12 02:46:25 +00:00
|
|
|
extensionPackages = with pkgs; [
|
2022-02-02 04:25:03 +00:00
|
|
|
mopidy-beets
|
|
|
|
mopidy-funkwhale
|
|
|
|
mopidy-internetarchive
|
|
|
|
mopidy-iris
|
|
|
|
mopidy-local
|
2022-01-12 02:46:25 +00:00
|
|
|
mopidy-mpd
|
|
|
|
mopidy-mpris
|
2022-02-02 04:25:03 +00:00
|
|
|
mopidy-youtube
|
2022-01-12 02:46:25 +00:00
|
|
|
];
|
2022-01-30 23:57:38 +00:00
|
|
|
|
2022-05-20 06:47:09 +00:00
|
|
|
settings = {
|
2022-02-02 04:25:03 +00:00
|
|
|
http = {
|
|
|
|
hostname = "0.0.0.0";
|
|
|
|
};
|
|
|
|
|
|
|
|
file = {
|
|
|
|
enabled = true;
|
|
|
|
media_dirs = [
|
|
|
|
"$XDG_MUSIC_DIR|Music"
|
2022-07-09 02:49:41 +00:00
|
|
|
"~/library/music|Library"
|
2022-02-02 04:25:03 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
internetarchive = {
|
|
|
|
enabled = true;
|
|
|
|
browse_limit = 150;
|
|
|
|
search_limit = 150;
|
|
|
|
collections = [
|
|
|
|
"fav-foo-dogsquared"
|
|
|
|
"audio"
|
|
|
|
"etree"
|
|
|
|
"audio_music"
|
|
|
|
"audio_foreign"
|
|
|
|
];
|
|
|
|
};
|
2022-08-06 06:05:34 +00:00
|
|
|
|
|
|
|
m3u = {
|
|
|
|
enabled = true;
|
|
|
|
base_dir = musicDir;
|
|
|
|
playlists_dir = playlistsDir;
|
|
|
|
default_encoding = "utf-8";
|
|
|
|
default_extension = ".m3u8";
|
|
|
|
};
|
2022-02-02 04:25:03 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-09-02 00:37:56 +00:00
|
|
|
programs.ncmpcpp = {
|
|
|
|
enable = true;
|
|
|
|
mpdMusicDir = musicDir;
|
|
|
|
};
|
|
|
|
|
2022-08-06 06:05:34 +00:00
|
|
|
# My preferred file indexing service.
|
2022-01-30 23:57:38 +00:00
|
|
|
services.recoll = {
|
|
|
|
enable = true;
|
2022-08-06 06:05:34 +00:00
|
|
|
startAt = "daily";
|
2022-01-30 23:57:38 +00:00
|
|
|
settings = {
|
|
|
|
topdirs = "~/Downloads ~/Documents ~/library";
|
|
|
|
"skippedNames+" = "node_modules";
|
|
|
|
|
|
|
|
"~/library/projects" = {
|
|
|
|
"skippedNames+" = ".editorconfig .gitignore result flake.lock go.sum";
|
|
|
|
};
|
|
|
|
|
|
|
|
"~/library/projects/software" = {
|
|
|
|
"skippedNames+" = "target result";
|
|
|
|
};
|
|
|
|
};
|
2021-12-08 04:18:37 +00:00
|
|
|
};
|
|
|
|
|
2021-11-29 09:56:24 +00:00
|
|
|
# My custom modules.
|
2022-01-09 05:38:59 +00:00
|
|
|
profiles = {
|
2021-12-02 14:02:29 +00:00
|
|
|
dev = {
|
|
|
|
enable = true;
|
|
|
|
shell.enable = true;
|
2022-04-30 12:30:22 +00:00
|
|
|
extras.enable = true;
|
2021-12-02 14:02:29 +00:00
|
|
|
};
|
2021-12-25 13:56:50 +00:00
|
|
|
editors.emacs.enable = true;
|
2021-11-30 01:03:05 +00:00
|
|
|
desktop = {
|
|
|
|
enable = true;
|
|
|
|
graphics.enable = true;
|
|
|
|
audio.enable = true;
|
2021-12-19 09:39:18 +00:00
|
|
|
multimedia.enable = true;
|
2021-11-30 01:03:05 +00:00
|
|
|
};
|
2021-12-11 05:37:27 +00:00
|
|
|
research.enable = true;
|
2021-11-29 09:56:24 +00:00
|
|
|
};
|
2022-01-09 05:38:59 +00:00
|
|
|
|
2022-08-06 06:05:34 +00:00
|
|
|
services.bleachbit = {
|
|
|
|
enable = true;
|
2022-10-11 23:02:24 +00:00
|
|
|
cleaners = [
|
|
|
|
"bash.history"
|
|
|
|
"winetricks.temporary_files"
|
|
|
|
"wine.tmp"
|
|
|
|
"discord.history"
|
|
|
|
"google_earth.temporary_files"
|
|
|
|
"google_toolbar.search_history"
|
|
|
|
"thumbnails.cache"
|
|
|
|
"zoom.logs"
|
|
|
|
];
|
2022-08-06 06:05:34 +00:00
|
|
|
withChatCleanup = true;
|
|
|
|
};
|
2022-03-10 02:12:03 +00:00
|
|
|
|
2022-07-14 00:00:33 +00:00
|
|
|
systemd.user.sessionVariables = {
|
2022-02-05 10:58:42 +00:00
|
|
|
MANPAGER = "nvim +Man!";
|
|
|
|
EDITOR = "nvim";
|
|
|
|
};
|
|
|
|
|
2022-02-02 04:25:03 +00:00
|
|
|
# WHOA! Even browsers with extensions can be declarative!
|
|
|
|
programs.brave = {
|
|
|
|
enable = true;
|
|
|
|
extensions = [
|
|
|
|
{ id = "dbepggeogbaibhgnhhndojpepiihcmeb"; } # Vimium
|
|
|
|
{ id = "ekhagklcjbdpajgpjgmbionohlpdbjgc"; } # Zotero connector
|
|
|
|
{ id = "jfnifeihccihocjbfcfhicmmgpjicaec"; } # GSConnect
|
2022-12-10 10:47:02 +00:00
|
|
|
{ id = "aapbdbdomjkkjkaonfhkkikfgjllcleb"; } # Google Translate
|
2022-02-02 04:25:03 +00:00
|
|
|
{ id = "egpjdkipkomnmjhjmdamaniclmdlobbo"; } # Firenvim
|
|
|
|
{ id = "gknkbkaapnhpmkcgkmdekdffgcddoiel"; } # Open Access Button
|
|
|
|
{ id = "fpnmgdkabkmnadcjpehmlllkndpkmiak"; } # Wayback Machine
|
2022-02-05 10:58:42 +00:00
|
|
|
{ id = "gphhapmejobijbbhgpjhcjognlahblep"; } # GNOME Shell integration
|
2022-12-10 10:47:02 +00:00
|
|
|
{ id = "haebnnbpedcbhciplfhjjkbafijpncjl"; } # TinEye Reverse Image Search
|
|
|
|
{ id = "dhdgffkkebhmkfjojejmpbldmpobfkfo"; } # Tampermonkey
|
2022-10-11 23:02:24 +00:00
|
|
|
{ id = "kkmlkkjojmombglmlpbpapmhcaljjkde"; } # Zhongwen
|
2022-12-11 10:11:31 +00:00
|
|
|
{ id = "nngceckbapebfimnlniiiahkandclblb"; } # Bitwarden
|
2023-01-12 07:18:33 +00:00
|
|
|
{ id = "oldceeleldhonbafppcapldpdifcinji"; } # LanguageTool checker
|
2022-02-02 04:25:03 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2022-07-05 14:30:33 +00:00
|
|
|
home.stateVersion = "22.11";
|
2022-05-20 06:47:09 +00:00
|
|
|
|
2022-01-12 02:46:25 +00:00
|
|
|
xdg.userDirs = {
|
|
|
|
enable = true;
|
|
|
|
createDirectories = true;
|
|
|
|
};
|
2022-07-05 14:28:03 +00:00
|
|
|
|
|
|
|
# All of the personal configurations.
|
|
|
|
xdg.configFile = {
|
2022-07-07 16:30:54 +00:00
|
|
|
"doom".source = getDotfiles "emacs";
|
|
|
|
"kitty".source = getDotfiles "kitty";
|
|
|
|
"lf".source = getDotfiles "lf";
|
|
|
|
"nvim".source = getDotfiles "nvim";
|
|
|
|
"wezterm".source = getDotfiles "wezterm";
|
2022-07-05 14:28:03 +00:00
|
|
|
};
|
2021-11-27 08:04:01 +00:00
|
|
|
}
|