refactor: standardize config structure and consolidate modules
- Standardized apps/ directory by renaming all entry points (e.g., home.nix) to default.nix and updating imports to use directory paths. - Consolidated system/ logic into modules/system/, eliminating the top-level system/ directory and redundant wrappers. - Merged subsidiary utility scripts (e.g., hakase-popup.nix, switch-wallpaper.nix) into their parent default.nix files for better cohesion. - Cleaned up unused files and updated all module references to reflect the new structure.
This commit is contained in:
@@ -0,0 +1,146 @@
|
||||
{
|
||||
pkgs,
|
||||
myConfig,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.textfox.homeManagerModules.default
|
||||
./textfox.nix
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
pywalfox-native
|
||||
tridactyl-native
|
||||
];
|
||||
|
||||
home.file.".config/tridactyl/tridactylrc".text = ''
|
||||
set focusbypass true
|
||||
set smoothscroll true
|
||||
bind J tabnext
|
||||
bind K tabprev
|
||||
unbind <C-e>
|
||||
'';
|
||||
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
languagePacks = ["en-US"];
|
||||
nativeMessagingHosts = [
|
||||
pkgs.pywalfox-native
|
||||
pkgs.tridactyl-native
|
||||
];
|
||||
|
||||
profiles = {
|
||||
youtube = import ./profiles/youtube.nix {inherit pkgs myConfig;};
|
||||
hakase = {
|
||||
search.force = true;
|
||||
isDefault = true;
|
||||
search.default = "ddg";
|
||||
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
ublock-origin
|
||||
bitwarden
|
||||
tridactyl
|
||||
# pywalfox
|
||||
];
|
||||
|
||||
bookmarks = {
|
||||
force = true;
|
||||
settings = [
|
||||
{
|
||||
name = "Toolbar Bookmarks";
|
||||
toolbar = true;
|
||||
bookmarks = myConfig.firefox.bookmarks;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
settings = {
|
||||
# --- Privacy & Hardening ---
|
||||
"browser.contentblocking.category" = "strict";
|
||||
"privacy.trackingprotection.enabled" = true;
|
||||
"privacy.resistFingerprinting" = true; # Note: Spoofs timezone and caps FPS to 60
|
||||
"geo.enabled" = false;
|
||||
"media.peerconnection.enabled" = false; # Prevents WebRTC IP leaks
|
||||
"network.dns.disablePrefetch" = true;
|
||||
"network.prefetch-next" = false;
|
||||
|
||||
# --- NixOS / Hyprland Integration ---
|
||||
"widget.use-xdg-desktop-portal.file-picker" = 1; # Use native file picker
|
||||
|
||||
# --- UI & Behavior ---
|
||||
"accessibility.typeaheadfind" = false;
|
||||
"browser.compactmode.show" = true;
|
||||
"browser.tabs.closeWindowWithLastTab" = false;
|
||||
"extensions.pocket.enabled" = false;
|
||||
"extensions.screenshots.disabled" = true;
|
||||
"browser.topsites.contile.enabled" = false;
|
||||
"browser.formfill.enable" = false;
|
||||
"browser.search.suggest.enabled" = false;
|
||||
"browser.search.suggest.enabled.private" = false;
|
||||
"browser.urlbar.suggest.searches" = false;
|
||||
"browser.urlbar.showSearchSuggestionsFirst" = false;
|
||||
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
|
||||
"browser.newtabpage.activity-stream.feeds.snippets" = false;
|
||||
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
|
||||
"browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = false;
|
||||
"browser.newtabpage.activity-stream.section.highlights.includeDownloads" = false;
|
||||
"browser.newtabpage.activity-stream.section.highlights.includeVisited" = false;
|
||||
"browser.newtabpage.activity-stream.showSponsored" = false;
|
||||
"browser.newtabpage.activity-stream.system.showSponsored" = false;
|
||||
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
|
||||
|
||||
# --- Homepage & Navigation ---
|
||||
"browser.startup.homepage" = "https://dash.sakamoto.dev";
|
||||
"browser.newtabpage.pinned" = myConfig.firefox.newtabpage;
|
||||
|
||||
# --- DNS over HTTPS (Quad9) ---
|
||||
"network.trr.mode" = 2; # Use DoH with system fallback
|
||||
"network.trr.uri" = "https://dns.quad9.net/dns-query";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
policies = {
|
||||
DisableTelemetry = true;
|
||||
DisableFirefoxStudies = true;
|
||||
EnableTrackingProtection = {
|
||||
Value = true;
|
||||
Locked = false;
|
||||
Cryptomining = true;
|
||||
Fingerprinting = true;
|
||||
};
|
||||
DisablePocket = true;
|
||||
DisableFirefoxAccounts = true;
|
||||
DisableAccounts = true;
|
||||
DisableFirefoxScreenshots = true;
|
||||
OverrideFirstRunPage = "";
|
||||
OverridePostUpdatePage = "";
|
||||
DontCheckDefaultBrowser = true;
|
||||
DisplayBookmarksToolbar = "always";
|
||||
SearchBar = "unified";
|
||||
|
||||
# Power User Messaging
|
||||
UserMessaging = {
|
||||
ExtensionRecommendations = false;
|
||||
SkipOnboarding = true;
|
||||
FeatureRecommendations = false;
|
||||
UrlbarInterventions = false;
|
||||
WhatsNew = false;
|
||||
};
|
||||
|
||||
# ExtensionSettings = {
|
||||
# "uBlock0@raymondhill.net" = {
|
||||
# install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
||||
# installation_mode = "force_installed";
|
||||
# };
|
||||
# "{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
|
||||
# install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi";
|
||||
# installation_mode = "force_installed";
|
||||
# };
|
||||
# "tridactyl.vim@cmcaine.co.uk" = {
|
||||
# install_url = "https://addons.mozilla.org/firefox/downloads/latest/tridactyl-vim/latest.xpi";
|
||||
# installation_mode = "force_installed";
|
||||
# };
|
||||
# };
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user