switch to cap based home configs
This commit is contained in:
parent
50ee9aac83
commit
49b6f5bde0
64 changed files with 2064 additions and 1779 deletions
|
|
@ -1,153 +1,158 @@
|
|||
{
|
||||
config,
|
||||
flakes,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
ff-pkgs = flakes.firefox-addons.packages.${pkgs.system};
|
||||
lock-false = {
|
||||
Value = false;
|
||||
Status = "locked";
|
||||
};
|
||||
# lock-true = {
|
||||
# Value = true;
|
||||
# Status = "locked";
|
||||
# };
|
||||
in
|
||||
{
|
||||
|
||||
home.file."${config.programs.firefox.profilesPath}/main/chrome".source =
|
||||
"${flakes.firefox-sidebar-css}";
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
||||
extraPolicies = {
|
||||
DisableFormHistory = true;
|
||||
OfferToSaveLogins = false;
|
||||
PasswordManagerEnabled = false;
|
||||
AppAutoUpdate = false;
|
||||
DisableFirefoxStudies = true;
|
||||
DisablePocket = true;
|
||||
DisableTelemetry = true;
|
||||
UserMessaging = {
|
||||
WhatsNew = true;
|
||||
ExtensionRecommendations = false;
|
||||
FeatureRecommendations = false;
|
||||
UrlbarInterventions = false;
|
||||
SkipOnboarding = true;
|
||||
MoreFromMozilla = false;
|
||||
Locked = true;
|
||||
};
|
||||
FirefoxHome = {
|
||||
Search = true;
|
||||
TopSites = false;
|
||||
SponsoredTopSites = false;
|
||||
Highlights = false;
|
||||
Pocket = false;
|
||||
SponsoredPocket = false;
|
||||
Snippets = false;
|
||||
Locked = false;
|
||||
};
|
||||
FirefoxSuggest = {
|
||||
WebSuggestions = false;
|
||||
SponsoredSuggestions = false;
|
||||
ImproveSuggest = false;
|
||||
Locked = true;
|
||||
};
|
||||
# TODO: https://github.com/TheRealGramdalf/nixos/blob/83f4339b121175f47940314bf5811080ac42c316/users/games/firefox/privacy.nix
|
||||
_: {
|
||||
custom.program.firefox.requirements = [ "graphical" ];
|
||||
custom.program.firefox.home-config =
|
||||
{
|
||||
config,
|
||||
flakes,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
ff-pkgs = flakes.firefox-addons.packages.${pkgs.system};
|
||||
lock-false = {
|
||||
Value = false;
|
||||
Status = "locked";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
profiles.default = {
|
||||
id = 0;
|
||||
name = "profile_0";
|
||||
isDefault = true;
|
||||
settings = {
|
||||
# specify profile-specific preferences here; check about:config for options
|
||||
"browser.newtabpage.activity-stream.feeds.section.highlights" = false;
|
||||
"browser.startup.page" = 3; # Restore previous tabs
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
"extensions.pocket.enabled" = lock-false;
|
||||
"browser.tabs.closeWindowWithLastTab" = lock-false;
|
||||
"sidebar.position_start" = false; # sidebar on the right
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
};
|
||||
|
||||
userChrome = builtins.readFile ./userChrome.css;
|
||||
userContent = builtins.readFile ./userChrome.css;
|
||||
|
||||
extensions.packages = with ff-pkgs; [
|
||||
bitwarden
|
||||
ublock-origin
|
||||
sidebery
|
||||
sponsorblock
|
||||
# vimium
|
||||
];
|
||||
|
||||
bookmarks = {
|
||||
force = true;
|
||||
settings = [
|
||||
{
|
||||
keyword = "!w";
|
||||
url = "https://www.wikipedia.org/w/index.php?title=Special:Search&search=%s";
|
||||
}
|
||||
{
|
||||
keyword = "!m";
|
||||
url = "https://www.google.com/maps?q=%s";
|
||||
}
|
||||
{
|
||||
keyword = "!git";
|
||||
url = "https://github.com/search?q=%s&type=code";
|
||||
}
|
||||
{
|
||||
keyword = "!std";
|
||||
url = "https://std.rs%s";
|
||||
}
|
||||
{
|
||||
keyword = "!rust";
|
||||
url = "https://docs.rs/releases/search?query=%s";
|
||||
}
|
||||
{
|
||||
keyword = "!np";
|
||||
url = "https://search.nixos.org/packages?query=%s";
|
||||
}
|
||||
{
|
||||
keyword = "!nf";
|
||||
url = "https://search.nixos.org/flakes?query=%s";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# extensions.settings = {
|
||||
# "${ff-pkgs.sidebery.addonId}".settings = {
|
||||
# sidebar = {
|
||||
# # panels = with builtins; with lib; listToAttrs (map ffContainerToSideberryPanel (attrsToList containers));
|
||||
# # nav = [ "Personal" "Programming"];
|
||||
# };
|
||||
# # https://github.com/Dash-L/nixconfig/blob/c30f6d1486a3fe2b3793ab0cb13a88edefe83b7a/home/firefox.nix#L82
|
||||
# settings = {
|
||||
# pinnedTabsPosition = "top";
|
||||
# hideEmptyPanels = false;
|
||||
# activateAfterClosing = "prev";
|
||||
# activateAfterClosingStayInPanel = true;
|
||||
# newTabCtxReopen = true;
|
||||
# };
|
||||
# };
|
||||
# lock-true = {
|
||||
# Value = true;
|
||||
# Status = "locked";
|
||||
# };
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
||||
extraPolicies = {
|
||||
DisableFormHistory = true;
|
||||
OfferToSaveLogins = false;
|
||||
PasswordManagerEnabled = false;
|
||||
AppAutoUpdate = false;
|
||||
DisableFirefoxStudies = true;
|
||||
DisablePocket = true;
|
||||
DisableTelemetry = true;
|
||||
UserMessaging = {
|
||||
WhatsNew = true;
|
||||
ExtensionRecommendations = false;
|
||||
FeatureRecommendations = false;
|
||||
UrlbarInterventions = false;
|
||||
SkipOnboarding = true;
|
||||
MoreFromMozilla = false;
|
||||
Locked = true;
|
||||
};
|
||||
FirefoxHome = {
|
||||
Search = true;
|
||||
TopSites = false;
|
||||
SponsoredTopSites = false;
|
||||
Highlights = false;
|
||||
Pocket = false;
|
||||
SponsoredPocket = false;
|
||||
Snippets = false;
|
||||
Locked = false;
|
||||
};
|
||||
FirefoxSuggest = {
|
||||
WebSuggestions = false;
|
||||
SponsoredSuggestions = false;
|
||||
ImproveSuggest = false;
|
||||
Locked = true;
|
||||
};
|
||||
# TODO: https://github.com/TheRealGramdalf/nixos/blob/83f4339b121175f47940314bf5811080ac42c316/users/games/firefox/privacy.nix
|
||||
};
|
||||
|
||||
xdg.mimeApps = {
|
||||
defaultApplications."x-scheme-handler/http" = [
|
||||
"firefox.desktop"
|
||||
];
|
||||
defaultApplications."x-scheme-handler/https" = [
|
||||
"firefox.desktop"
|
||||
];
|
||||
defaultApplications."text/html" = [ "firefox.desktop" ];
|
||||
defaultApplications."x-scheme-handler/about" = [ "firefox.desktop" ];
|
||||
defaultApplications."x-scheme-handler/unknown" = [ "firefox.desktop" ];
|
||||
};
|
||||
};
|
||||
|
||||
profiles.default = {
|
||||
id = 0;
|
||||
name = "profile_0";
|
||||
isDefault = true;
|
||||
settings = {
|
||||
# specify profile-specific preferences here; check about:config for options
|
||||
"browser.newtabpage.activity-stream.feeds.section.highlights" = false;
|
||||
"browser.startup.page" = 3; # Restore previous tabs
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
"extensions.pocket.enabled" = lock-false;
|
||||
"browser.tabs.closeWindowWithLastTab" = lock-false;
|
||||
"sidebar.position_start" = false; # sidebar on the right
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
};
|
||||
|
||||
userChrome = builtins.readFile ./userChrome.css;
|
||||
userContent = builtins.readFile ./userChrome.css;
|
||||
|
||||
extensions.packages = with ff-pkgs; [
|
||||
bitwarden
|
||||
ublock-origin
|
||||
sidebery
|
||||
sponsorblock
|
||||
# vimium
|
||||
];
|
||||
|
||||
bookmarks = {
|
||||
force = true;
|
||||
settings = [
|
||||
{
|
||||
keyword = "!w";
|
||||
url = "https://www.wikipedia.org/w/index.php?title=Special:Search&search=%s";
|
||||
}
|
||||
{
|
||||
keyword = "!m";
|
||||
url = "https://www.google.com/maps?q=%s";
|
||||
}
|
||||
{
|
||||
keyword = "!git";
|
||||
url = "https://github.com/search?q=%s&type=code";
|
||||
}
|
||||
{
|
||||
keyword = "!std";
|
||||
url = "https://std.rs%s";
|
||||
}
|
||||
{
|
||||
keyword = "!rust";
|
||||
url = "https://docs.rs/releases/search?query=%s";
|
||||
}
|
||||
{
|
||||
keyword = "!np";
|
||||
url = "https://search.nixos.org/packages?query=%s";
|
||||
}
|
||||
{
|
||||
keyword = "!nho";
|
||||
url = "https://home-manager-options.extranix.com/?query=%s";
|
||||
}
|
||||
{
|
||||
keyword = "!no";
|
||||
url = "https://search.nixos.org/options?query=%s";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# extensions.settings = {
|
||||
# "${ff-pkgs.sidebery.addonId}".settings = {
|
||||
# sidebar = {
|
||||
# # panels = with builtins; with lib; listToAttrs (map ffContainerToSideberryPanel (attrsToList containers));
|
||||
# # nav = [ "Personal" "Programming"];
|
||||
# };
|
||||
# # https://github.com/Dash-L/nixconfig/blob/c30f6d1486a3fe2b3793ab0cb13a88edefe83b7a/home/firefox.nix#L82
|
||||
# settings = {
|
||||
# pinnedTabsPosition = "top";
|
||||
# hideEmptyPanels = false;
|
||||
# activateAfterClosing = "prev";
|
||||
# activateAfterClosingStayInPanel = true;
|
||||
# newTabCtxReopen = true;
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
};
|
||||
};
|
||||
|
||||
xdg.mimeApps = {
|
||||
defaultApplications."x-scheme-handler/http" = [
|
||||
"firefox.desktop"
|
||||
];
|
||||
defaultApplications."x-scheme-handler/https" = [
|
||||
"firefox.desktop"
|
||||
];
|
||||
defaultApplications."text/html" = [ "firefox.desktop" ];
|
||||
defaultApplications."x-scheme-handler/about" = [ "firefox.desktop" ];
|
||||
defaultApplications."x-scheme-handler/unknown" = [ "firefox.desktop" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue