155 lines
4.1 KiB
Nix
155 lines
4.1 KiB
Nix
inputs: {
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
imports = [(import ./modules inputs)];
|
|
|
|
programs.direnv = {
|
|
enable = lib.mkDefault true;
|
|
nix-direnv.enable = lib.mkDefault true;
|
|
stdlib = ''
|
|
: ''${XDG_CACHE_HOME:=$HOME/.cache}
|
|
declare -A direnv_layout_dirs
|
|
direnv_layout_dir() {
|
|
echo "''${direnv_layout_dirs[$PWD]:=$(
|
|
echo -n "$XDG_CACHE_HOME"/direnv/layouts/
|
|
echo -n "$PWD" | shasum | cut -d ' ' -f 1
|
|
)}"
|
|
}
|
|
'';
|
|
};
|
|
|
|
programs.chromium = {
|
|
package = lib.mkDefault (pkgs.ungoogled-chromium.override {
|
|
commandLineArgs = lib.concatStringsSep " " [
|
|
"--force-dark-mode"
|
|
"--enable-features=UseOzonePlatform,WebUIDarkMode,VaapiVideoDecoder"
|
|
"--ozone-platform=wayland"
|
|
"--ignore-gpu-blocklist"
|
|
"--enable-gpu-rasterization"
|
|
"--enable-zero-copy"
|
|
];
|
|
});
|
|
};
|
|
|
|
programs.mpv = {
|
|
config = {
|
|
profile = lib.mkDefault "gpu-hq";
|
|
ytdl-format = lib.mkDefault "bestvideo+bestaudio";
|
|
};
|
|
scripts = with pkgs.mpvScripts; [
|
|
mpris
|
|
];
|
|
};
|
|
|
|
home.packages = with pkgs; [
|
|
wget
|
|
httpie
|
|
|
|
jq
|
|
ripgrep
|
|
lsd
|
|
|
|
# for fish-done
|
|
libnotify
|
|
notify-desktop
|
|
];
|
|
|
|
home.sessionVariables = {TERM = "xterm-256color";};
|
|
|
|
programs.fish = {
|
|
enable = true;
|
|
shellAliases = {
|
|
ls = "lsd";
|
|
l = "ls -l";
|
|
la = "ls -a";
|
|
lla = "ls -la";
|
|
lt = "ls --tree";
|
|
};
|
|
plugins = [
|
|
{
|
|
name = "done";
|
|
src = inputs.done;
|
|
}
|
|
{
|
|
name = "bobthefish";
|
|
src = inputs.bobthefish;
|
|
}
|
|
];
|
|
shellInit = ''
|
|
if not set -q NIX_PATH
|
|
set --prepend fish_function_path ${pkgs.fishPlugins.foreign-env}/share/fish/vendor_functions.d
|
|
fenv source $HOME/.nix-profile/etc/profile.d/nix.sh
|
|
set -e fish_function_path[1]
|
|
end
|
|
'';
|
|
interactiveShellInit = ''
|
|
set TERM xterm-256color
|
|
|
|
set -U __done_min_cmd_duration 2000
|
|
|
|
set -U fish_key_bindings fish_default_key_bindings
|
|
set -g theme_nerd_fonts yes
|
|
set -g theme_display_date no
|
|
|
|
eval (${pkgs.direnv}/bin/direnv hook fish)
|
|
'';
|
|
};
|
|
|
|
programs.firefox = {
|
|
package = lib.mkDefault (pkgs.librewolf.override {
|
|
cfg = {
|
|
enableGnomeExtensions = true;
|
|
pipewireSupport = true;
|
|
};
|
|
});
|
|
|
|
extensions = lib.optionals (pkgs ? nur.repos.rycee.firefox-addons) (with pkgs.nur.repos.rycee.firefox-addons; [
|
|
darkreader
|
|
bitwarden
|
|
violentmonkey
|
|
canvasblocker
|
|
sponsorblock
|
|
stylus
|
|
vimium
|
|
]);
|
|
|
|
profiles.default = {
|
|
settings = {
|
|
"browser.startup.homepage" = "https://wizbos.club";
|
|
|
|
# Make the browser usable, if I wanted autism privacy, I would use TOR browser.
|
|
"privacy.resistFingerprinting" = false;
|
|
"webgl.disabled" = false;
|
|
"privacy.clearOnShutdown.history" = false;
|
|
"privacy.clearOnShutdown.cookies" = false;
|
|
"privacy.clearOnShutdown.sessions" = false;
|
|
"privacy.clearOnShutdown.cache" = false;
|
|
"places.history.enabled" = true;
|
|
"network.dns.disableIPv6" = false;
|
|
"media.peerconnection.ice.no_host" = false;
|
|
|
|
# Make Jitsi work sanely
|
|
"media.setsinkid.enabled" = true;
|
|
"privacy.webrtc.legacyGlobalIndicator" = false;
|
|
"privacy.webrtc.hideGlobalIndicator" = true;
|
|
|
|
# good tweaks
|
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
|
"layers.acceleration.force-enabled" = true;
|
|
"gfx.webrender.all" = true;
|
|
"svg.context-properties.content.enabled" = true;
|
|
|
|
"reader.color_scheme" = "dark";
|
|
|
|
# # LibreWolf ruins the user agent making sites unusable without RFP, so use the user agent from RFP manually. This also seems sane for compatibility when using Firefox.
|
|
# "general.useragent.override" = "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0";
|
|
# set the user agent to a _realistic_ user agent because cloudflare keeps sniffing my balls
|
|
"general.useragent.override" = "Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0";
|
|
};
|
|
};
|
|
};
|
|
}
|