mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-04 03:52:10 +02:00
@@ -1,236 +1,206 @@
|
|||||||
{ pkgs, ... }: {
|
{ pkgs, config, ... }:
|
||||||
programs.firefox = {
|
let
|
||||||
enable = true;
|
accent = "#${config.lib.stylix.colors.base0D}";
|
||||||
package = pkgs.firefox-esr;
|
background = "#${config.lib.stylix.colors.base00}";
|
||||||
|
foreground = "#${config.lib.stylix.colors.base05}";
|
||||||
|
muted = "#${config.lib.stylix.colors.base03}";
|
||||||
|
|
||||||
profiles = {
|
settings = ''
|
||||||
default = {
|
{
|
||||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
"config": {
|
||||||
ublock-origin
|
"title" : "Welcome Home",
|
||||||
vimium
|
"openLinksInNewTab": false,
|
||||||
sponsorblock
|
"locale": "fr-FR",
|
||||||
youtube-recommended-videos
|
"colors": {
|
||||||
scroll_anywhere
|
"primary": "${accent}",
|
||||||
newtab-adapter
|
"background": "${background}",
|
||||||
plasma-integration
|
"foreground": "${foreground}",
|
||||||
];
|
"muted": "#${muted}"
|
||||||
};
|
},
|
||||||
|
"folders": [
|
||||||
settings = {
|
{
|
||||||
|
"name": "Bookmarks",
|
||||||
webgl.disabled = true;
|
"links": [
|
||||||
"layers.acceleration.force-enabled" = true;
|
{"title": "MyNixOs", "url": "https://mynixos.com", "icon": ""},
|
||||||
toolkit.legacyUserProfileCustomizations.stylesheets = true;
|
{"title": "Github", "url": "https://github.com", "icon": ""},
|
||||||
|
{"title": "Proton", "url": "https://mail.proton.me/u/0/inbox", "icon": ""},
|
||||||
# ----------------------------------------------
|
{"title": "Cloudflare One", "url": "https://one.dash.cloudflare.com/", "icon": ""},
|
||||||
# Browser
|
{"title": "Chat GPT", "url": "https://chat.openai.com/", "icon": ""},
|
||||||
# ----------------------------------------------
|
{"title": "Nixvim", "url": "https://nix-community.github.io/nixvim/", "icon": ""},
|
||||||
|
{"title": "Hyprland Wiki", "url": "https://wiki.hyprland.org/", "icon": ""},
|
||||||
browser.aboutConfig.showWarning = false;
|
{"title": "Youtube", "url": "https://youtube.com", "icon": ""},
|
||||||
|
{"title": "Figma", "url": "https://figma.com", "icon": ""},
|
||||||
browser.uidensity = 1;
|
{"title": "Server", "url": "https://home.anotherhadi.com", "icon": ""}
|
||||||
compactmode.show = true;
|
]
|
||||||
tabs.warnOnClose = false;
|
},
|
||||||
|
{
|
||||||
aboutwelcome.enabled = false;
|
"name": "Work",
|
||||||
bookmarks.restore_default_bookmarks = false;
|
"links": [
|
||||||
contentblocking.category = "standard";
|
{"title": "Outlook", "url": "https://outlook.office.com/mail/", "icon": ""},
|
||||||
ctrlTab.sortByRecentlyUsed = true;
|
{"title": "Office", "url": "https://www.office.com/?auth=2", "icon": ""},
|
||||||
|
{"title": "Teams", "url": "https://teams.microsoft.com/_", "icon": ""}
|
||||||
newtabpage = {
|
]
|
||||||
enabled = false;
|
|
||||||
|
|
||||||
activity-stream = {
|
|
||||||
showSearch = false;
|
|
||||||
newtabpage.activity-stream.showSponsored = false;
|
|
||||||
newtabpage.activity-stream.showSponsoredTopSites = false;
|
|
||||||
newtabpage.activity-stream.showWeather = false;
|
|
||||||
newtabpage.activity-stream.system.showSponsored = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# ----------------------------------------------
|
|
||||||
# Sensors
|
|
||||||
# ----------------------------------------------
|
|
||||||
|
|
||||||
device.sensors.enabled = false;
|
|
||||||
device.sensors.motion.enabled = false;
|
|
||||||
extensions.pocket.enabled = false;
|
|
||||||
|
|
||||||
geo.enabled = false;
|
|
||||||
|
|
||||||
# ----------------------------------------------
|
|
||||||
# Network
|
|
||||||
# ----------------------------------------------
|
|
||||||
|
|
||||||
network.trr.custom_uri = "https://dns.quad9.net/dns-query";
|
|
||||||
network.trr.uri = "https://dns.quad9.net/dns-query";
|
|
||||||
|
|
||||||
# ----------------------------------------------
|
|
||||||
# Privacy
|
|
||||||
# ----------------------------------------------
|
|
||||||
|
|
||||||
privacy = {
|
|
||||||
bounceTrackingProtection.hasMigratedUserActivationData = true;
|
|
||||||
donottrackheader.enabled = true;
|
|
||||||
fingerprintingProtection = true;
|
|
||||||
globalprivacycontrol.enabled = true;
|
|
||||||
globalprivacycontrol.was_ever_enabled = true;
|
|
||||||
resistFingerprinting = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# ----------------------------------------------
|
|
||||||
# Services
|
|
||||||
# ----------------------------------------------
|
|
||||||
|
|
||||||
services.sync.engine.addons = false;
|
|
||||||
services.sync.nextSync = 0;
|
|
||||||
|
|
||||||
signon.firefoxRelay.feature = "disabled";
|
|
||||||
signon.generation.enabled = "false";
|
|
||||||
};
|
|
||||||
|
|
||||||
userChrome = ''
|
|
||||||
/* Base color for the theme, dependent on whether it's a light theme or not */
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
:root {
|
|
||||||
--accent-color: #11111b;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
@media (prefers-color-scheme: light) {
|
homepage = pkgs.buildNpmPackage {
|
||||||
:root {
|
pname = "homepage";
|
||||||
--accent-color: #dce0e8;
|
version = "0.0.0";
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*====== Aesthetics ======*/
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "anotherhadi";
|
||||||
|
repo = "homepage";
|
||||||
|
rev = "b77d35ed3596eb451bd2ec78063d7cc6e73c773d";
|
||||||
|
hash = "sha256-j/40922kfAh6zqJ4IRYpr66YXNNYsxuXwZ0aiJFJea0=";
|
||||||
|
};
|
||||||
|
|
||||||
#navigator-toolbox {
|
# npmDepsHash = lib.fakeHash;
|
||||||
border-bottom: none !important;
|
npmDepsHash = "sha256-bG+CHTq2Rst3JMxsjAC81KhK+G7WwsTVD1eyP87g0z4=";
|
||||||
}
|
|
||||||
|
|
||||||
#titlebar {
|
buildPhase = ''
|
||||||
background: var(--accent-color) !important;
|
npm install
|
||||||
}
|
cp ${
|
||||||
|
pkgs.writeText "src/routes/config.json" settings
|
||||||
|
} src/routes/config.json
|
||||||
|
npm run build
|
||||||
|
mkdir $out
|
||||||
|
mv build $out
|
||||||
|
'';
|
||||||
|
|
||||||
/* Sets the toolbar color */
|
meta = {
|
||||||
toolbar#nav-bar {
|
description = "homepage";
|
||||||
background: var(--accent-color) !important;
|
homepage = "https://github.com/anotherhadi/homepage";
|
||||||
box-shadow: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Sets the URL bar color */
|
|
||||||
#urlbar {
|
|
||||||
background: var(--accent-color) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#urlbar-background {
|
|
||||||
background: var(--accent-color) !important;
|
|
||||||
border: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#urlbar-input-container {
|
|
||||||
border: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*====== UI Settings ======*/
|
|
||||||
|
|
||||||
:root {
|
|
||||||
--navbarWidth: 500px;
|
|
||||||
/* Set width of navbar */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If the window is wider than 1000px, use flex layout */
|
|
||||||
@media (min-width: 1000px) {
|
|
||||||
#navigator-toolbox {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Url bar */
|
|
||||||
#nav-bar {
|
|
||||||
order: 2;
|
|
||||||
width: var(--navbarWidth);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Tab bar */
|
|
||||||
#titlebar {
|
|
||||||
order: 1;
|
|
||||||
width: calc(100vw - var(--navbarWidth) - 1px);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Bookmarks bar */
|
|
||||||
#PersonalToolbar {
|
|
||||||
order: 3;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Fix urlbar sometimes being misaligned */
|
|
||||||
:root[uidensity="compact"] #urlbar {
|
|
||||||
--urlbar-toolbar-height: 39.60px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
:root[uidensity="touch"] #urlbar {
|
|
||||||
--urlbar-toolbar-height: 49.00px !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*====== Simplifying interface ======*/
|
|
||||||
|
|
||||||
/* Autohide back button when disabled */
|
|
||||||
#back-button,
|
|
||||||
#forward-button,
|
|
||||||
/* Remove UI elements */
|
|
||||||
#identity-box,
|
|
||||||
/* Site information */
|
|
||||||
#tracking-protection-icon-container,
|
|
||||||
/* Shield icon */
|
|
||||||
#page-action-buttons> :not(#urlbar-zoom-button, #star-button-box),
|
|
||||||
/* All url bar icons except for zoom level and bookmarks */
|
|
||||||
#urlbar-go-button,
|
|
||||||
/* Search URL magnifying glass */
|
|
||||||
#alltabs-button,
|
|
||||||
/* Menu to display all tabs at the end of tabs bar */
|
|
||||||
.titlebar-buttonbox-container
|
|
||||||
|
|
||||||
/* Minimize, maximize, and close buttons */
|
|
||||||
{
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#nav-bar {
|
|
||||||
box-shadow: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Remove "padding" left and right from tabs */
|
|
||||||
.titlebar-spacer {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Fix URL bar overlapping elements */
|
|
||||||
#urlbar-container {
|
|
||||||
min-width: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Remove gap after pinned tabs */
|
|
||||||
#tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs])>#tabbrowser-arrowscrollbox>.tabbrowser-tab[first-visible-unpinned-tab] {
|
|
||||||
margin-inline-start: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Hide the hamburger menu */
|
|
||||||
#PanelUI-menu-button {
|
|
||||||
padding: 0px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#PanelUI-menu-button .toolbarbutton-icon {
|
|
||||||
width: 0px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#PanelUI-menu-button .toolbarbutton-badge-stack {
|
|
||||||
padding: 0px !important;
|
|
||||||
}'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
in {
|
||||||
|
stylix.targets.firefox.profileNames = [ "default" ];
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
policies = {
|
||||||
|
DisableTelemetry = true;
|
||||||
|
DisableFirefoxStudies = true;
|
||||||
|
DisablePocket = true;
|
||||||
|
OverrideFirstRunPage = "";
|
||||||
|
OverridePostUpdatePage = "";
|
||||||
|
DontCheckDefaultBrowser = true;
|
||||||
|
DisableFirefoxAccounts = true;
|
||||||
|
DisableAccounts = true;
|
||||||
|
"AutofillAddressEnabled" = false;
|
||||||
|
"AutofillCreditCardEnabled" = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
profiles."default" = {
|
||||||
|
id = 0;
|
||||||
|
isDefault = true;
|
||||||
|
name = "default";
|
||||||
|
settings = {
|
||||||
|
"app.normandy.first_run" = false;
|
||||||
|
|
||||||
|
"browser.bookmarks.addedImportButton" = false;
|
||||||
|
"browser.toolbars.bookmarks.visibility" = "always";
|
||||||
|
"browser.warnOnQuitShortcut" = false;
|
||||||
|
"datareporting.healthreport.uploadEnabled" = false;
|
||||||
|
"signon.rememberSignons" = false;
|
||||||
|
|
||||||
|
"browser.startup.homepage" = "${homepage}/build/index.html";
|
||||||
|
"browser.search.region" = "FR";
|
||||||
|
"browser.search.isUS" = false;
|
||||||
|
"distribution.searchplugins.defaultLocale" = "fr-FR";
|
||||||
|
"general.useragent.locale" = "fr-FR";
|
||||||
|
"browser.bookmarks.showMobileBookmarks" = true;
|
||||||
|
"browser.newtabpage.pinned" = [{
|
||||||
|
title = "Homepage";
|
||||||
|
url = "${homepage}/build/index.html";
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
bookmarks = [
|
||||||
|
{
|
||||||
|
name = "Homepage";
|
||||||
|
url = "${homepage}/build/index.html";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "wikipedia";
|
||||||
|
tags = [ "wiki" ];
|
||||||
|
keyword = "wiki";
|
||||||
|
url =
|
||||||
|
"https://en.wikipedia.org/wiki/Special:Search?search=%s&go=Go";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "kernel.org";
|
||||||
|
url = "https://www.kernel.org";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "Nix sites";
|
||||||
|
toolbar = true;
|
||||||
|
bookmarks = [
|
||||||
|
{
|
||||||
|
name = "homepage";
|
||||||
|
url = "https://nixos.org/";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "wiki";
|
||||||
|
tags = [ "wiki" "nix" ];
|
||||||
|
url = "https://wiki.nixos.org/";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
extensions = with pkgs.nur.repos.rycee.firefox-addons; [ privacy-badger ];
|
||||||
|
search = {
|
||||||
|
order = [ "google" "duckduckgo" "wikipedia" ];
|
||||||
|
engines = {
|
||||||
|
"Nix Packages" = {
|
||||||
|
urls = [{
|
||||||
|
template = "https://search.nixos.org/packages";
|
||||||
|
params = [
|
||||||
|
{
|
||||||
|
name = "type";
|
||||||
|
value = "packages";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "query";
|
||||||
|
value = "{searchTerms}";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}];
|
||||||
|
|
||||||
|
icon =
|
||||||
|
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||||
|
definedAliases = [ "@np" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
"NixOS Wiki" = {
|
||||||
|
urls = [{
|
||||||
|
template =
|
||||||
|
"https://wiki.nixos.org/index.php?search={searchTerms}";
|
||||||
|
}];
|
||||||
|
iconUpdateURL = "https://wiki.nixos.org/favicon.png";
|
||||||
|
updateInterval = 24 * 60 * 60 * 1000; # every day
|
||||||
|
definedAliases = [ "@nw" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
"Bing".metaData.hidden = true;
|
||||||
|
"Google".metaData.alias =
|
||||||
|
"@g"; # builtin engines only support specifying one additional alias
|
||||||
|
};
|
||||||
|
default = "DuckDuckGo";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# profiles = {
|
||||||
|
# default = {
|
||||||
|
# extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||||
|
# ublock-origin
|
||||||
|
# vimium
|
||||||
|
# sponsorblock
|
||||||
|
# youtube-recommended-videos
|
||||||
|
# scroll_anywhere
|
||||||
|
# newtab-adapter
|
||||||
|
# plasma-integration
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
# My homepage is generated using https://github.com/anotherhadi/homepage
|
# My homepage is generated using https://github.com/anotherhadi/homepage
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }:
|
||||||
let
|
let
|
||||||
|
|
||||||
accent = "#${config.lib.stylix.colors.base0D}";
|
accent = "#${config.lib.stylix.colors.base0D}";
|
||||||
background = "#${config.lib.stylix.colors.base00}";
|
background = "#${config.lib.stylix.colors.base00}";
|
||||||
foreground = "#${config.lib.stylix.colors.base05}";
|
foreground = "#${config.lib.stylix.colors.base05}";
|
||||||
|
|||||||
@@ -23,10 +23,10 @@
|
|||||||
"image/jpeg" = "imv.desktop";
|
"image/jpeg" = "imv.desktop";
|
||||||
"image/jpg" = "imv.desktop";
|
"image/jpg" = "imv.desktop";
|
||||||
"image/webp" = "imv.desktop";
|
"image/webp" = "imv.desktop";
|
||||||
"image/gif" = "org.qutebrowser.qutebrowser.desktop";
|
"image/gif" = "firefox.desktop";
|
||||||
"x-scheme-handler/http" = "org.qutebrowser.qutebrowser.desktop";
|
"x-scheme-handler/http" = "firefox.desktop";
|
||||||
"x-scheme-handler/https" = "org.qutebrowser.qutebrowser.desktop";
|
"x-scheme-handler/https" = "firefox.desktop";
|
||||||
"text/html" = "org.qutebrowser.qutebrowser.desktop";
|
"text/html" = "firefox.desktop";
|
||||||
"application/pdf" = "zathura.desktop";
|
"application/pdf" = "zathura.desktop";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user