format all

This commit is contained in:
Kopatz
2025-10-30 21:59:31 +01:00
parent b1dda4d037
commit 8a78e618bb
188 changed files with 3526 additions and 1825 deletions

View File

@@ -1,4 +1,12 @@
{ osConfig, config, pkgs, inputs, lib, ... }: {
{
osConfig,
config,
pkgs,
inputs,
lib,
...
}:
{
config = lib.mkIf osConfig.custom.graphical.code.enable rec {
#home.activation.makeVSCodeConfigWritable =
# let

View File

@@ -1,4 +1,9 @@
{ config, pkgs, inputs, ... }:
{
config,
pkgs,
inputs,
...
}:
{
programs.direnv = {
enable = true;

View File

@@ -1,3 +1,4 @@
{ ... }: {
{ ... }:
{
home.file.".config/Vencord/themes/theme.css".source = ./BasicBackground.theme.css;
}

View File

@@ -1,6 +1,13 @@
{ lib, osConfig, pkgs, ... }:
let enable = osConfig.custom.graphical.i3.enable || osConfig.custom.graphical.hyprland.enable;
in {
{
lib,
osConfig,
pkgs,
...
}:
let
enable = osConfig.custom.graphical.i3.enable || osConfig.custom.graphical.hyprland.enable;
in
{
config = lib.mkIf enable {
services.dunst = {
enable = true;

View File

@@ -1,10 +1,13 @@
{ lib, pkgs, ... }: {
{ lib, pkgs, ... }:
{
programs.fastfetch = {
enable = true;
settings = {
#logo = { source = ../test.sixel; type = "raw"; width = 40; height = 40; };
display = { separator = ""; };
display = {
separator = "";
};
# https://www.nerdfonts.com/cheat-sheet
modules = [

View File

@@ -121,7 +121,7 @@
# some PDFs are not rendered correctly due to missing functions.
"pdfjs.enableScripting" = false;
# copied these from a blog
# copied these from a blog
"browser.newtabpage.activity-stream.feeds.telemetry" = false;
"browser.newtabpage.activity-stream.feeds.asrouterfeed" = false;
"browser.newtabpage.activity-stream.telemetry" = false;

View File

@@ -17,8 +17,7 @@
# Firefox 83 introduced sponsored top sites
# (https://support.mozilla.org/en-US/kb/sponsor-privacy), which are sponsored ads
# displayed as suggestions in the URL bar.
"services.sync.prefs.sync.browser.newtabpage.activity-stream.showSponsoredTopSite" =
false;
"services.sync.prefs.sync.browser.newtabpage.activity-stream.showSponsoredTopSite" = false;
# Disable about:config warning.
# No details
"browser.aboutConfig.showWarning" = false;
@@ -40,7 +39,7 @@
# time about their experience with Firefox.
"browser.selfsupport.url" = "";
# Content of the new tab page
#
#
"browser.newtabpage.enhanced" = false;
# Disable the new tab page (blank page)
"browser.newtabpage.enabled" = false;

View File

@@ -1,226 +1,231 @@
{ pkgs, lib, osConfig, ... }:
{
pkgs,
lib,
osConfig,
...
}:
let
base16 = osConfig.stylix.base16Scheme;
merge = lib.foldr (a: b: a // b) { };
betterfox = ''
/****************************************************************************
* SECTION: FASTFOX *
****************************************************************************/
/** GENERAL ***/
user_pref("content.notify.interval", 100000);
/****************************************************************************
* SECTION: FASTFOX *
****************************************************************************/
/** GENERAL ***/
user_pref("content.notify.interval", 100000);
/** GFX ***/
user_pref("gfx.canvas.accelerated.cache-size", 512);
user_pref("gfx.content.skia-font-cache-size", 20);
/** GFX ***/
user_pref("gfx.canvas.accelerated.cache-size", 512);
user_pref("gfx.content.skia-font-cache-size", 20);
/** DISK CACHE ***/
user_pref("browser.cache.disk.enable", false);
/** DISK CACHE ***/
user_pref("browser.cache.disk.enable", false);
/** MEMORY CACHE ***/
user_pref("browser.sessionhistory.max_total_viewers", 4);
/** MEMORY CACHE ***/
user_pref("browser.sessionhistory.max_total_viewers", 4);
/** MEDIA CACHE ***/
user_pref("media.memory_cache_max_size", 65536);
user_pref("media.cache_readahead_limit", 7200);
user_pref("media.cache_resume_threshold", 3600);
/** MEDIA CACHE ***/
user_pref("media.memory_cache_max_size", 65536);
user_pref("media.cache_readahead_limit", 7200);
user_pref("media.cache_resume_threshold", 3600);
/** IMAGE CACHE ***/
user_pref("image.mem.decode_bytes_at_a_time", 32768);
/** IMAGE CACHE ***/
user_pref("image.mem.decode_bytes_at_a_time", 32768);
/** NETWORK ***/
user_pref("network.http.max-connections", 1800);
user_pref("network.http.max-persistent-connections-per-server", 10);
user_pref("network.http.max-urgent-start-excessive-connections-per-host", 5);
user_pref("network.http.pacing.requests.enabled", false);
user_pref("network.dnsCacheExpiration", 3600);
user_pref("network.ssl_tokens_cache_capacity", 10240);
/** NETWORK ***/
user_pref("network.http.max-connections", 1800);
user_pref("network.http.max-persistent-connections-per-server", 10);
user_pref("network.http.max-urgent-start-excessive-connections-per-host", 5);
user_pref("network.http.pacing.requests.enabled", false);
user_pref("network.dnsCacheExpiration", 3600);
user_pref("network.ssl_tokens_cache_capacity", 10240);
/** SPECULATIVE LOADING ***/
user_pref("network.http.speculative-parallel-limit", 0);
user_pref("network.dns.disablePrefetch", true);
user_pref("network.dns.disablePrefetchFromHTTPS", true);
user_pref("browser.urlbar.speculativeConnect.enabled", false);
user_pref("browser.places.speculativeConnect.enabled", false);
user_pref("network.prefetch-next", false);
user_pref("network.predictor.enabled", false);
/** SPECULATIVE LOADING ***/
user_pref("network.http.speculative-parallel-limit", 0);
user_pref("network.dns.disablePrefetch", true);
user_pref("network.dns.disablePrefetchFromHTTPS", true);
user_pref("browser.urlbar.speculativeConnect.enabled", false);
user_pref("browser.places.speculativeConnect.enabled", false);
user_pref("network.prefetch-next", false);
user_pref("network.predictor.enabled", false);
/** EXPERIMENTAL ***/
user_pref("layout.css.grid-template-masonry-value.enabled", true);
/** EXPERIMENTAL ***/
user_pref("layout.css.grid-template-masonry-value.enabled", true);
/****************************************************************************
* SECTION: SECUREFOX *
****************************************************************************/
/** TRACKING PROTECTION ***/
user_pref("browser.contentblocking.category", "strict");
user_pref("privacy.trackingprotection.allow_list.baseline.enabled", true);
user_pref("privacy.trackingprotection.allow_list.convenience.enabled", true);
user_pref("browser.download.start_downloads_in_tmp_dir", true);
user_pref("browser.helperApps.deleteTempFileOnExit", true);
user_pref("browser.uitour.enabled", false);
user_pref("privacy.globalprivacycontrol.enabled", true);
/****************************************************************************
* SECTION: SECUREFOX *
****************************************************************************/
/** TRACKING PROTECTION ***/
user_pref("browser.contentblocking.category", "strict");
user_pref("privacy.trackingprotection.allow_list.baseline.enabled", true);
user_pref("privacy.trackingprotection.allow_list.convenience.enabled", true);
user_pref("browser.download.start_downloads_in_tmp_dir", true);
user_pref("browser.helperApps.deleteTempFileOnExit", true);
user_pref("browser.uitour.enabled", false);
user_pref("privacy.globalprivacycontrol.enabled", true);
/** OCSP & CERTS / HPKP ***/
user_pref("security.OCSP.enabled", 0);
user_pref("security.pki.crlite_mode", 2);
user_pref("security.csp.reporting.enabled", false);
/** OCSP & CERTS / HPKP ***/
user_pref("security.OCSP.enabled", 0);
user_pref("security.pki.crlite_mode", 2);
user_pref("security.csp.reporting.enabled", false);
/** SSL / TLS ***/
user_pref("security.ssl.treat_unsafe_negotiation_as_broken", true);
user_pref("browser.xul.error_pages.expert_bad_cert", true);
user_pref("security.tls.enable_0rtt_data", false);
/** SSL / TLS ***/
user_pref("security.ssl.treat_unsafe_negotiation_as_broken", true);
user_pref("browser.xul.error_pages.expert_bad_cert", true);
user_pref("security.tls.enable_0rtt_data", false);
/** DISK AVOIDANCE ***/
user_pref("browser.privatebrowsing.forceMediaMemoryCache", true);
user_pref("browser.sessionstore.interval", 60000);
/** DISK AVOIDANCE ***/
user_pref("browser.privatebrowsing.forceMediaMemoryCache", true);
user_pref("browser.sessionstore.interval", 60000);
/** SHUTDOWN & SANITIZING ***/
user_pref("browser.privatebrowsing.resetPBM.enabled", true);
user_pref("privacy.history.custom", true);
/** SHUTDOWN & SANITIZING ***/
user_pref("browser.privatebrowsing.resetPBM.enabled", true);
user_pref("privacy.history.custom", true);
/** SEARCH / URL BAR ***/
user_pref("browser.urlbar.trimHttps", true);
user_pref("browser.urlbar.untrimOnUserInteraction.featureGate", true);
user_pref("browser.search.separatePrivateDefault.ui.enabled", true);
user_pref("browser.search.suggest.enabled", false);
user_pref("browser.urlbar.quicksuggest.enabled", false);
user_pref("browser.urlbar.groupLabels.enabled", false);
user_pref("browser.formfill.enable", false);
user_pref("network.IDN_show_punycode", true);
/** SEARCH / URL BAR ***/
user_pref("browser.urlbar.trimHttps", true);
user_pref("browser.urlbar.untrimOnUserInteraction.featureGate", true);
user_pref("browser.search.separatePrivateDefault.ui.enabled", true);
user_pref("browser.search.suggest.enabled", false);
user_pref("browser.urlbar.quicksuggest.enabled", false);
user_pref("browser.urlbar.groupLabels.enabled", false);
user_pref("browser.formfill.enable", false);
user_pref("network.IDN_show_punycode", true);
/** PASSWORDS ***/
user_pref("signon.formlessCapture.enabled", false);
user_pref("signon.privateBrowsingCapture.enabled", false);
user_pref("network.auth.subresource-http-auth-allow", 1);
user_pref("editor.truncate_user_pastes", false);
/** PASSWORDS ***/
user_pref("signon.formlessCapture.enabled", false);
user_pref("signon.privateBrowsingCapture.enabled", false);
user_pref("network.auth.subresource-http-auth-allow", 1);
user_pref("editor.truncate_user_pastes", false);
/** MIXED CONTENT + CROSS-SITE ***/
user_pref("security.mixed_content.block_display_content", true);
user_pref("pdfjs.enableScripting", false);
/** MIXED CONTENT + CROSS-SITE ***/
user_pref("security.mixed_content.block_display_content", true);
user_pref("pdfjs.enableScripting", false);
/** EXTENSIONS ***/
user_pref("extensions.enabledScopes", 5);
/** EXTENSIONS ***/
user_pref("extensions.enabledScopes", 5);
/** HEADERS / REFERERS ***/
user_pref("network.http.referer.XOriginTrimmingPolicy", 2);
/** HEADERS / REFERERS ***/
user_pref("network.http.referer.XOriginTrimmingPolicy", 2);
/** CONTAINERS ***/
user_pref("privacy.userContext.ui.enabled", true);
/** CONTAINERS ***/
user_pref("privacy.userContext.ui.enabled", true);
/** SAFE BROWSING ***/
user_pref("browser.safebrowsing.downloads.remote.enabled", false);
/** SAFE BROWSING ***/
user_pref("browser.safebrowsing.downloads.remote.enabled", false);
/** MOZILLA ***/
user_pref("permissions.default.desktop-notification", 2);
user_pref("permissions.default.geo", 2);
user_pref("geo.provider.network.url", "https://beacondb.net/v1/geolocate");
user_pref("browser.search.update", false);
user_pref("permissions.manager.defaultsUrl", "");
user_pref("extensions.getAddons.cache.enabled", false);
/** MOZILLA ***/
user_pref("permissions.default.desktop-notification", 2);
user_pref("permissions.default.geo", 2);
user_pref("geo.provider.network.url", "https://beacondb.net/v1/geolocate");
user_pref("browser.search.update", false);
user_pref("permissions.manager.defaultsUrl", "");
user_pref("extensions.getAddons.cache.enabled", false);
/** TELEMETRY ***/
user_pref("datareporting.policy.dataSubmissionEnabled", false);
user_pref("datareporting.healthreport.uploadEnabled", false);
user_pref("toolkit.telemetry.unified", false);
user_pref("toolkit.telemetry.enabled", false);
user_pref("toolkit.telemetry.server", "data:,");
user_pref("toolkit.telemetry.archive.enabled", false);
user_pref("toolkit.telemetry.newProfilePing.enabled", false);
user_pref("toolkit.telemetry.shutdownPingSender.enabled", false);
user_pref("toolkit.telemetry.updatePing.enabled", false);
user_pref("toolkit.telemetry.bhrPing.enabled", false);
user_pref("toolkit.telemetry.firstShutdownPing.enabled", false);
user_pref("toolkit.telemetry.coverage.opt-out", true);
user_pref("toolkit.coverage.opt-out", true);
user_pref("toolkit.coverage.endpoint.base", "");
user_pref("browser.newtabpage.activity-stream.feeds.telemetry", false);
user_pref("browser.newtabpage.activity-stream.telemetry", false);
user_pref("datareporting.usage.uploadEnabled", false);
/** TELEMETRY ***/
user_pref("datareporting.policy.dataSubmissionEnabled", false);
user_pref("datareporting.healthreport.uploadEnabled", false);
user_pref("toolkit.telemetry.unified", false);
user_pref("toolkit.telemetry.enabled", false);
user_pref("toolkit.telemetry.server", "data:,");
user_pref("toolkit.telemetry.archive.enabled", false);
user_pref("toolkit.telemetry.newProfilePing.enabled", false);
user_pref("toolkit.telemetry.shutdownPingSender.enabled", false);
user_pref("toolkit.telemetry.updatePing.enabled", false);
user_pref("toolkit.telemetry.bhrPing.enabled", false);
user_pref("toolkit.telemetry.firstShutdownPing.enabled", false);
user_pref("toolkit.telemetry.coverage.opt-out", true);
user_pref("toolkit.coverage.opt-out", true);
user_pref("toolkit.coverage.endpoint.base", "");
user_pref("browser.newtabpage.activity-stream.feeds.telemetry", false);
user_pref("browser.newtabpage.activity-stream.telemetry", false);
user_pref("datareporting.usage.uploadEnabled", false);
/** EXPERIMENTS ***/
user_pref("app.shield.optoutstudies.enabled", false);
user_pref("app.normandy.enabled", false);
user_pref("app.normandy.api_url", "");
/** EXPERIMENTS ***/
user_pref("app.shield.optoutstudies.enabled", false);
user_pref("app.normandy.enabled", false);
user_pref("app.normandy.api_url", "");
/** CRASH REPORTS ***/
user_pref("breakpad.reportURL", "");
user_pref("browser.tabs.crashReporting.sendReport", false);
/** CRASH REPORTS ***/
user_pref("breakpad.reportURL", "");
user_pref("browser.tabs.crashReporting.sendReport", false);
/****************************************************************************
* SECTION: PESKYFOX *
****************************************************************************/
/** MOZILLA UI ***/
user_pref("browser.privatebrowsing.vpnpromourl", "");
user_pref("extensions.getAddons.showPane", false);
user_pref("extensions.htmlaboutaddons.recommendations.enabled", false);
user_pref("browser.discovery.enabled", false);
user_pref("browser.shell.checkDefaultBrowser", false);
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false);
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false);
user_pref("browser.preferences.moreFromMozilla", false);
user_pref("browser.aboutConfig.showWarning", false);
user_pref("browser.aboutwelcome.enabled", false);
user_pref("browser.profiles.enabled", true);
/****************************************************************************
* SECTION: PESKYFOX *
****************************************************************************/
/** MOZILLA UI ***/
user_pref("browser.privatebrowsing.vpnpromourl", "");
user_pref("extensions.getAddons.showPane", false);
user_pref("extensions.htmlaboutaddons.recommendations.enabled", false);
user_pref("browser.discovery.enabled", false);
user_pref("browser.shell.checkDefaultBrowser", false);
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false);
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false);
user_pref("browser.preferences.moreFromMozilla", false);
user_pref("browser.aboutConfig.showWarning", false);
user_pref("browser.aboutwelcome.enabled", false);
user_pref("browser.profiles.enabled", true);
/** THEME ADJUSTMENTS ***/
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
user_pref("browser.compactmode.show", true);
user_pref("browser.privateWindowSeparation.enabled", false); // WINDOWS
/** THEME ADJUSTMENTS ***/
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
user_pref("browser.compactmode.show", true);
user_pref("browser.privateWindowSeparation.enabled", false); // WINDOWS
/** AI ***/
user_pref("browser.ml.enable", false);
user_pref("browser.ml.chat.enabled", false);
/** AI ***/
user_pref("browser.ml.enable", false);
user_pref("browser.ml.chat.enabled", false);
/** FULLSCREEN NOTICE ***/
user_pref("full-screen-api.transition-duration.enter", "0 0");
user_pref("full-screen-api.transition-duration.leave", "0 0");
user_pref("full-screen-api.warning.timeout", 0);
/** FULLSCREEN NOTICE ***/
user_pref("full-screen-api.transition-duration.enter", "0 0");
user_pref("full-screen-api.transition-duration.leave", "0 0");
user_pref("full-screen-api.warning.timeout", 0);
/** URL BAR ***/
user_pref("browser.urlbar.trending.featureGate", false);
/** URL BAR ***/
user_pref("browser.urlbar.trending.featureGate", false);
/** NEW TAB PAGE ***/
user_pref("browser.newtabpage.activity-stream.default.sites", "");
user_pref("browser.newtabpage.activity-stream.showSponsoredTopSites", false);
user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false);
user_pref("browser.newtabpage.activity-stream.showSponsored", false);
user_pref("browser.newtabpage.activity-stream.showSponsoredCheckboxes", false);
/** NEW TAB PAGE ***/
user_pref("browser.newtabpage.activity-stream.default.sites", "");
user_pref("browser.newtabpage.activity-stream.showSponsoredTopSites", false);
user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false);
user_pref("browser.newtabpage.activity-stream.showSponsored", false);
user_pref("browser.newtabpage.activity-stream.showSponsoredCheckboxes", false);
/** POCKET ***/
user_pref("extensions.pocket.enabled", false);
/** POCKET ***/
user_pref("extensions.pocket.enabled", false);
/** DOWNLOADS ***/
user_pref("browser.download.manager.addToRecentDocs", false);
/** DOWNLOADS ***/
user_pref("browser.download.manager.addToRecentDocs", false);
/** PDF ***/
user_pref("browser.download.open_pdf_attachments_inline", true);
/** PDF ***/
user_pref("browser.download.open_pdf_attachments_inline", true);
/** TAB BEHAVIOR ***/
user_pref("browser.bookmarks.openInTabClosesMenu", false);
user_pref("browser.menu.showViewImageInfo", true);
user_pref("findbar.highlightAll", true);
user_pref("layout.word_select.eat_space_to_next_word", false);
/** TAB BEHAVIOR ***/
user_pref("browser.bookmarks.openInTabClosesMenu", false);
user_pref("browser.menu.showViewImageInfo", true);
user_pref("findbar.highlightAll", true);
user_pref("layout.word_select.eat_space_to_next_word", false);
/****************************************************************************
* START: MY OVERRIDES *
****************************************************************************/
// visit https://github.com/yokoffing/Betterfox/wiki/Common-Overrides
// visit https://github.com/yokoffing/Betterfox/wiki/Optional-Hardening
// Enter your personal overrides below this line:
/****************************************************************************
* START: MY OVERRIDES *
****************************************************************************/
// visit https://github.com/yokoffing/Betterfox/wiki/Common-Overrides
// visit https://github.com/yokoffing/Betterfox/wiki/Optional-Hardening
// Enter your personal overrides below this line:
/****************************************************************************
* SECTION: SMOOTHFOX *
****************************************************************************/
// visit https://github.com/yokoffing/Betterfox/blob/main/Smoothfox.js
// Enter your scrolling overrides below this line:
/****************************************************************************
* SECTION: SMOOTHFOX *
****************************************************************************/
// visit https://github.com/yokoffing/Betterfox/blob/main/Smoothfox.js
// Enter your scrolling overrides below this line:
/****************************************************************************
* END: BETTERFOX *
****************************************************************************/
/****************************************************************************
* END: BETTERFOX *
****************************************************************************/
'';
search = {
default = "ddg";
@@ -232,49 +237,63 @@ user_pref("layout.word_select.eat_space_to_next_word", false);
"ebay".metaData.hidden = true;
"ddg" = {
urls = [{
template = "https://duckduckgo.com";
params = [{
name = "q";
value = "{searchTerms}";
}];
}];
urls = [
{
template = "https://duckduckgo.com";
params = [
{
name = "q";
value = "{searchTerms}";
}
];
}
];
definedAliases = [ ",d" ];
};
"Nix Packages" = {
urls = [{
template = "https://search.nixos.org/packages";
params = [
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}];
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
definedAliases = [ ",n" ];
};
"Wikipedia" = {
urls = [{
template = "https://en.wikipedia.org/wiki/Special:Search";
params = [{
name = "search";
value = "{searchTerms}";
}];
}];
urls = [
{
template = "https://en.wikipedia.org/wiki/Special:Search";
params = [
{
name = "search";
value = "{searchTerms}";
}
];
}
];
definedAliases = [ ",w" ];
};
"GitHub" = {
urls = [{
template = "https://github.com/search";
params = [{
name = "q";
value = "{searchTerms}";
}];
}];
urls = [
{
template = "https://github.com/search";
params = [
{
name = "q";
value = "{searchTerms}";
}
];
}
];
definedAliases = [ ",gh" ];
};
};
@@ -313,8 +332,7 @@ in
"ebay@search.mozilla.org".installation_mode = "blocked";
"wikipedia@search.mozilla.org".installation_mode = "blocked";
"{5cd68d86-8324-4ab2-9e0d-3afcc60bee5f}" = {
install_url =
"https://addons.mozilla.org/firefox/downloads/latest/animated-pekora-dark-theme/latest.xpi";
install_url = "https://addons.mozilla.org/firefox/downloads/latest/animated-pekora-dark-theme/latest.xpi";
installation_mode = "force_installed";
};
};
@@ -323,16 +341,18 @@ in
default = {
name = "privacy-friendly";
extraConfig = betterfox;
settings = merge ([
(import ./config/preferences.nix)
(import ./config/browser-features.nix)
(import ./config/privacy.nix)
(import ./config/tracking.nix)
(import ./config/tracking-webaudio.nix)
(import ./config/security.nix)
(import ./config/speed.nix)
] ++ lib.optionals osConfig.custom.hardware.nvidia.enable
[ (import ./config/nvidia-fixes.nix) ]);
settings = merge (
[
(import ./config/preferences.nix)
(import ./config/browser-features.nix)
(import ./config/privacy.nix)
(import ./config/tracking.nix)
(import ./config/tracking-webaudio.nix)
(import ./config/security.nix)
(import ./config/speed.nix)
]
++ lib.optionals osConfig.custom.hardware.nvidia.enable [ (import ./config/nvidia-fixes.nix) ]
);
userChrome = ''
/* Hide tab bar. Used with Sidebery */
#TabsToolbar {
@@ -358,7 +378,7 @@ in
--toolbar-bg-color: #${base16.base01};
}
'';
# Changes the extension storage backend from IDB to json, wipes all data when switching
# Changes the extension storage backend from IDB to json, wipes all data when switching
extensions.force = true;
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
clearurls
@@ -375,15 +395,17 @@ in
enable-webaudio = {
name = "privacy-but-enable-webaudio";
id = 2;
settings = merge ([
(import ./config/preferences.nix)
(import ./config/browser-features.nix)
(import ./config/privacy.nix)
(import ./config/tracking.nix)
(import ./config/security.nix)
(import ./config/speed.nix)
] ++ lib.optionals osConfig.custom.hardware.nvidia.enable
[ (import ./config/nvidia-fixes.nix) ]);
settings = merge (
[
(import ./config/preferences.nix)
(import ./config/browser-features.nix)
(import ./config/privacy.nix)
(import ./config/tracking.nix)
(import ./config/security.nix)
(import ./config/speed.nix)
]
++ lib.optionals osConfig.custom.hardware.nvidia.enable [ (import ./config/nvidia-fixes.nix) ]
);
userChrome = ''
/* Hide tab bar. Used with Sidebery */
#TabsToolbar {
@@ -413,10 +435,13 @@ in
visibility: collapse !important;
}
'';
settings = merge
([ (import ./config/preferences.nix) (import ./config/speed.nix) ]
++ lib.optionals osConfig.custom.hardware.nvidia.enable
[ (import ./config/nvidia-fixes.nix) ]);
settings = merge (
[
(import ./config/preferences.nix)
(import ./config/speed.nix)
]
++ lib.optionals osConfig.custom.hardware.nvidia.enable [ (import ./config/nvidia-fixes.nix) ]
);
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
clearurls
darkreader
@@ -435,8 +460,15 @@ in
genericName = "Web Browser";
exec = "firefox -P privacy-but-enable-webaudio %U";
terminal = false;
categories = [ "Application" "Network" "WebBrowser" ];
mimeType = [ "text/html" "text/xml" ];
categories = [
"Application"
"Network"
"WebBrowser"
];
mimeType = [
"text/html"
"text/xml"
];
};
};
}

View File

@@ -1,4 +1,10 @@
{ lib, config, osConfig, pkgs, ... }:
{
lib,
config,
osConfig,
pkgs,
...
}:
let
merge = lib.foldr (a: b: a // b) { };
search = {
@@ -11,49 +17,63 @@ let
"eBay".metaData.hidden = true;
"DuckDuckGo" = {
urls = [{
template = "https://duckduckgo.com";
params = [{
name = "q";
value = "{searchTerms}";
}];
}];
urls = [
{
template = "https://duckduckgo.com";
params = [
{
name = "q";
value = "{searchTerms}";
}
];
}
];
definedAliases = [ ",d" ];
};
"Nix Packages" = {
urls = [{
template = "https://search.nixos.org/packages";
params = [
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}];
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
definedAliases = [ ",n" ];
};
"Wikipedia" = {
urls = [{
template = "https://en.wikipedia.org/wiki/Special:Search";
params = [{
name = "search";
value = "{searchTerms}";
}];
}];
urls = [
{
template = "https://en.wikipedia.org/wiki/Special:Search";
params = [
{
name = "search";
value = "{searchTerms}";
}
];
}
];
definedAliases = [ ",w" ];
};
"GitHub" = {
urls = [{
template = "https://github.com/search";
params = [{
name = "q";
value = "{searchTerms}";
}];
}];
urls = [
{
template = "https://github.com/search";
params = [
{
name = "q";
value = "{searchTerms}";
}
];
}
];
definedAliases = [ ",gh" ];
};
};
@@ -86,25 +106,28 @@ in
"ebay@search.mozilla.org".installation_mode = "blocked";
"wikipedia@search.mozilla.org".installation_mode = "blocked";
"{5cd68d86-8324-4ab2-9e0d-3afcc60bee5f}" = {
install_url =
"https://addons.mozilla.org/firefox/downloads/latest/animated-pekora-dark-theme/latest.xpi";
install_url = "https://addons.mozilla.org/firefox/downloads/latest/animated-pekora-dark-theme/latest.xpi";
installation_mode = "force_installed";
};
};
};
profiles.default = {
inherit search;
settings = merge ([
(import ../firefox/config/preferences.nix)
(import ../firefox/config/browser-features.nix)
(import ../firefox/config/privacy.nix)
(import ../firefox/config/tracking.nix)
(import ../firefox/config/tracking-webaudio.nix)
(import ../firefox/config/security.nix)
(import ../firefox/config/speed.nix)
(import ./floorp-config.nix)
] ++ lib.optionals osConfig.custom.hardware.nvidia.enable
[ (import ../firefox/config/nvidia-fixes.nix) ]);
settings = merge (
[
(import ../firefox/config/preferences.nix)
(import ../firefox/config/browser-features.nix)
(import ../firefox/config/privacy.nix)
(import ../firefox/config/tracking.nix)
(import ../firefox/config/tracking-webaudio.nix)
(import ../firefox/config/security.nix)
(import ../firefox/config/speed.nix)
(import ./floorp-config.nix)
]
++ lib.optionals osConfig.custom.hardware.nvidia.enable [
(import ../firefox/config/nvidia-fixes.nix)
]
);
userChrome = ''
/* Hide tab bar. Used with Sidebery */
#TabsToolbar {

View File

@@ -1,4 +1,9 @@
{ config, pkgs, inputs, ... }:
{
config,
pkgs,
inputs,
...
}:
{
home.file.".gitconfig" = {
enable = true;

View File

@@ -1,4 +1,11 @@
{ config, osConfig, pkgs, inputs, lib, ... }:
{
config,
osConfig,
pkgs,
inputs,
lib,
...
}:
let
cfg = osConfig.custom.graphical.hyprland;
isPc = osConfig.networking.hostName == "kop-pc";
@@ -16,7 +23,13 @@ let
hyprctl --instance 0 "dispatch exec hyprlock"
'';
scale = if isLaptop then "1.33333" else "1";
monitor1 = if isPc then "DP-1" else if isLaptop then "eDP-1" else "eDP-1";
monitor1 =
if isPc then
"DP-1"
else if isLaptop then
"eDP-1"
else
"eDP-1";
monitor2 = "HDMI-A-1";
in
{
@@ -38,32 +51,35 @@ in
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor =
if isPc then [
"${monitor2},1920x1080@60,0x0,${scale}"
"${monitor1},2560x1440@144,1920x0,${scale}"
"Unknown-1,disable"
] else if isLaptop then [
# laptop
"eDP-1,2256x1504@60,0x0,${scale}"
#"DP-3,1920x1080@60,1920x0,1"
#",preferred,auto,1,mirror,eDP-1"
",preferred,auto,auto"
] else
if isPc then
[
"${monitor2},1920x1080@60,0x0,${scale}"
"${monitor1},2560x1440@144,1920x0,${scale}"
"Unknown-1,disable"
]
else if isLaptop then
[
# laptop
"eDP-1,2256x1504@60,0x0,${scale}"
#"DP-3,1920x1080@60,1920x0,1"
#",preferred,auto,1,mirror,eDP-1"
",preferred,auto,auto"
]
else
[
# Default
",preferred,auto,auto"
];
workspace =
lib.lists.optionals (osConfig.networking.hostName == "kop-pc") [
"1,monitor:${monitor1}"
"2,monitor:${monitor1}"
"3,monitor:${monitor1}"
"4,monitor:${monitor1}"
"5,monitor:${monitor1}"
"9,monitor:${monitor2}"
"10,monitor:${monitor2}"
];
workspace = lib.lists.optionals (osConfig.networking.hostName == "kop-pc") [
"1,monitor:${monitor1}"
"2,monitor:${monitor1}"
"3,monitor:${monitor1}"
"4,monitor:${monitor1}"
"5,monitor:${monitor1}"
"9,monitor:${monitor2}"
"10,monitor:${monitor2}"
];
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
@@ -74,13 +90,16 @@ in
# source = ~/.config/hypr/myColors.conf
# Some default env vars.
env =
[ "XCURSOR_SIZE,24" "NIXOS_OZONE_WL,1" "GDK_SCALE,${scale}" ]
++ lib.optionals osConfig.custom.hardware.nvidia.enable [
"LIBVA_DRIVER_NAME,nvidia"
"GBM_BACKEND,nvidia-drm"
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
];
env = [
"XCURSOR_SIZE,24"
"NIXOS_OZONE_WL,1"
"GDK_SCALE,${scale}"
]
++ lib.optionals osConfig.custom.hardware.nvidia.enable [
"LIBVA_DRIVER_NAME,nvidia"
"GBM_BACKEND,nvidia-drm"
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
];
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input = {
@@ -93,7 +112,9 @@ in
follow_mouse = 1;
float_switch_override_focus = 2;
touchpad = { natural_scroll = true; };
touchpad = {
natural_scroll = true;
};
accel_profile = "flat";
sensitivity = 0;
@@ -124,9 +145,9 @@ in
render = {
new_render_scheduling = true;
};
misc = {
vfr = true;
middle_click_paste = false;
misc = {
vfr = true;
middle_click_paste = false;
enable_anr_dialog = false;
disable_hyprland_logo = true;
};
@@ -169,8 +190,7 @@ in
dwindle = {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile =
true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
pseudotile = true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true; # you probably want this
};
@@ -212,8 +232,9 @@ in
wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy";
wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste";
grimblast = "${pkgs.grimblast}/bin/grimblast";
saved-screenshot-cmd = ''${grimblast} --freeze save area $OUT && notify-send "Saved screenshot to $OUT" -h string:image-path:$OUT && echo "file://$(realpath $OUT)" | wl-copy -t text/uri-list
'';
saved-screenshot-cmd = ''
${grimblast} --freeze save area $OUT && notify-send "Saved screenshot to $OUT" -h string:image-path:$OUT && echo "file://$(realpath $OUT)" | wl-copy -t text/uri-list
'';
pdfgrep = "${pkgs.pdfgrep}/bin/pdfgrep";
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
#swaylock = "${pkgs.swaylock}/bin/swaylock";
@@ -241,10 +262,8 @@ in
''$mainMod, R, exec, hyprctl hyprpaper reload ,"$(ls -d ~/synced/default/dinge/Bg/* | shuf -n 1)"''
"$mainMod, W, exec, hyprctl hyprpaper reload ,${config.stylix.image}"
" , Print, exec, hyprshade off && ${grimblast} --freeze copy area && hyprshade auto"
''
$mainMod, Print, exec, export OUT=/tmp/$(date +'%s_grim.png') && ${saved-screenshot-cmd}''
''
Shift_L, Print, exec, export OUT=~/Pictures/$(date +'%s_grim.png') && ${saved-screenshot-cmd}''
''$mainMod, Print, exec, export OUT=/tmp/$(date +'%s_grim.png') && ${saved-screenshot-cmd}''
''Shift_L, Print, exec, export OUT=~/Pictures/$(date +'%s_grim.png') && ${saved-screenshot-cmd}''
#"$mainMod, G, exec, ${peek}" # record gif
"$mainMod, SPACE, exec, ${rofi} -modi drun -show drun -config ~/.config/rofi/rofidmenu.rasi"
" , XF86AudioPlay, exec, ${playerctl} play-pause"
@@ -359,12 +378,14 @@ in
"dex --autostart --environment Hyprland"
"${pkgs.hypridle}/bin/hypridle &"
#"${pkgs.dunst}/bin/dunst &"
] ++ lib.lists.optionals (osConfig.networking.hostName == "kop-pc") [
]
++ lib.lists.optionals (osConfig.networking.hostName == "kop-pc") [
"[workspace 9 silent] sleep 2 && discord"
"[workspace 9 silent] sleep 2 && discordcanary"
"[workspace 10 silent] firefox"
"xrandr --monitor ${monitor1} --primary"
] ++ [
]
++ [
"sleep 3 && ${pkgs.waybar}/bin/waybar &"
"${restartPortals}"
];

View File

@@ -1,4 +1,11 @@
{ config, osConfig, pkgs, inputs, lib, ... }:
{
config,
osConfig,
pkgs,
inputs,
lib,
...
}:
with lib;
let
cfg = osConfig.custom.graphical.hyprland.videobridge;

View File

@@ -1,6 +1,15 @@
{ config, osConfig, pkgs, inputs, lib, ... }:
let cfg = osConfig.custom.graphical.hyprland;
in {
{
config,
osConfig,
pkgs,
inputs,
lib,
...
}:
let
cfg = osConfig.custom.graphical.hyprland;
in
{
config = lib.mkIf cfg.enable {
programs.hyprlock.enable = true;
programs.hyprlock.settings = {
@@ -34,7 +43,7 @@ in {
## shadow_passes = 2;
##};
##
### DATE
### DATE
##label = {
## monitor = "";
## text = "cmd[update:43200000] echo \"$(date +\"%A, %d %B %Y\")\"";

View File

@@ -1,36 +1,47 @@
{ osConfig, pkgs, lib, ... }:
{
osConfig,
pkgs,
lib,
...
}:
let cfg = osConfig.custom.graphical.hyprland;
in {
config = lib.mkIf cfg.enable
{
home.file.".config/hypr/hyprshade.toml".source = ../../.config/hypr/hyprshade.toml;
wayland.windowManager.hyprland.settings.exec-once = [ "${pkgs.hyprshade}/bin/hyprshade auto" ];
systemd.user = {
let
cfg = osConfig.custom.graphical.hyprland;
in
{
config = lib.mkIf cfg.enable {
home.file.".config/hypr/hyprshade.toml".source = ../../.config/hypr/hyprshade.toml;
wayland.windowManager.hyprland.settings.exec-once = [ "${pkgs.hyprshade}/bin/hyprshade auto" ];
systemd.user = {
services.hyprshade = {
Install.WantedBy = [ "graphical-session.target" ];
services.hyprshade = {
Install.WantedBy = [ "graphical-session.target" ];
Unit = {
ConditionEnvironment = "HYPRLAND_INSTANCE_SIGNATURE";
Description = "Apply screen filter";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
Type = "oneshot";
ExecStart = "${pkgs.hyprshade}/bin/hyprshade auto";
};
Unit = {
ConditionEnvironment = "HYPRLAND_INSTANCE_SIGNATURE";
Description = "Apply screen filter";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
timers.hyprshade = {
Install.WantedBy = [ "timers.target" ];
Unit = { Description = "Apply screen filter on schedule"; };
Timer.OnCalendar = [ "*-*-* 06:00:00" "*-*-* 19:00:00" ];
Service = {
Type = "oneshot";
ExecStart = "${pkgs.hyprshade}/bin/hyprshade auto";
};
};
timers.hyprshade = {
Install.WantedBy = [ "timers.target" ];
Unit = {
Description = "Apply screen filter on schedule";
};
Timer.OnCalendar = [
"*-*-* 06:00:00"
"*-*-* 19:00:00"
];
};
};
};
}

View File

@@ -1,6 +1,15 @@
{ config, osConfig, pkgs, inputs, lib, ... }:
let cfg = osConfig.custom.graphical.hyprland;
in {
{
config,
osConfig,
pkgs,
inputs,
lib,
...
}:
let
cfg = osConfig.custom.graphical.hyprland;
in
{
config = lib.mkIf cfg.enable {
wayland.windowManager.hyprland = {
plugins = [ pkgs.hyprlandPlugins.hyprspace ];
@@ -9,16 +18,18 @@ in {
"$mainMod, TAB, overview:toggle"
"$mainMod SHIFT, TAB, overview:toggle, all"
];
plugin = [{
overview = {
affectStrut = false;
hideTopLayers = true;
panelHeight = 250;
showEmptyWorkspace = false;
showNewWorkspace = true;
disableBlur = true;
};
}];
plugin = [
{
overview = {
affectStrut = false;
hideTopLayers = true;
panelHeight = 250;
showEmptyWorkspace = false;
showNewWorkspace = true;
disableBlur = true;
};
}
];
};
};
};

View File

@@ -1,7 +1,16 @@
{ config, osConfig, pkgs, inputs, lib, ... }:
{
config,
osConfig,
pkgs,
inputs,
lib,
...
}:
with lib;
let cfg = osConfig.custom.graphical.hyprland;
in {
let
cfg = osConfig.custom.graphical.hyprland;
in
{
config =
let
# styles from https://github.com/khaneliman/khanelinix/blob/8375f8cfbe5bfd87565b4dc34c9d30630c17336d/modules/home/desktop/addons/waybar/default.nix
@@ -37,25 +46,43 @@ in {
#"hyprland/window"
];
modules-center = [ ];
modules-right = [ "group/stats" "group/other" ];
modules-right = [
"group/stats"
"group/other"
];
"group/stats" = {
"orientation" = "horizontal";
"modules" = [ "network" "cpu" "memory" "temperature" ]
++ lib.optionals osConfig.custom.hardware.nvidia.enable [ "custom/nvidia" ]
++ lib.optionals osConfig.custom.hardware.amd-gpu.enable [ "custom/amd-gpu" ]
++ lib.optionals osConfig.services.power-profiles-daemon.enable [ "power-profiles-daemon" ];
"modules" = [
"network"
"cpu"
"memory"
"temperature"
]
++ lib.optionals osConfig.custom.hardware.nvidia.enable [ "custom/nvidia" ]
++ lib.optionals osConfig.custom.hardware.amd-gpu.enable [ "custom/amd-gpu" ]
++ lib.optionals osConfig.services.power-profiles-daemon.enable [ "power-profiles-daemon" ];
};
"group/other" = {
"orientation" = "horizontal";
"modules" =
[ "tray" "backlight" "pulseaudio" "mpris" "battery" "clock" ];
"modules" = [
"tray"
"backlight"
"pulseaudio"
"mpris"
"battery"
"clock"
];
};
"cpu" = {
"format" = " {usage}%";
"tooltip" = true;
};
"disk" = { "format" = " {percentage_used}%"; };
"memory" = { "format" = "󰍛 {}%"; };
"disk" = {
"format" = " {percentage_used}%";
};
"memory" = {
"format" = "󰍛 {}%";
};
"idle_inhibitor" = {
"format" = "{icon} ";
@@ -95,7 +122,10 @@ in {
"phone" = "";
"portable" = "";
"car" = "";
"default" = [ "" "" ];
"default" = [
""
""
];
};
"scroll-step" = 1;
"on-click" = "${pkgs.pavucontrol}/bin/pavucontrol";
@@ -110,18 +140,30 @@ in {
"temperature".critical-threshold = 80;
"temperature".format = "{temperatureC}°C ";
"temperature".interval = 5;
"temperature".hwmon-path =
lib.mkIf (osConfig.networking.hostName == "framework")
"/sys/class/hwmon/hwmon6/temp1_input";
"temperature".hwmon-path = lib.mkIf (
osConfig.networking.hostName == "framework"
) "/sys/class/hwmon/hwmon6/temp1_input";
"backlight".format = "{percent}% {icon}";
"backlight".states = [ 0 50 ];
"backlight".format-icons = [ "" "" ];
"backlight".states = [
0
50
];
"backlight".format-icons = [
""
""
];
"battery".states.good = 95;
"battery".interval = 5;
"battery".states.warning = 30;
"battery".states.critical = 15;
"battery".format = "{capacity}% / {power:.2}W {icon}";
"battery".format-icons = [ "" "" "" "" "" ];
"battery".format-icons = [
""
""
""
""
""
];
"clock" = {
format = "{:%F %H:%M}";
tooltip-format = "<tt><small>{calendar}</small></tt>";
@@ -148,7 +190,9 @@ in {
"default" = "";
"mpv" = "🎵";
};
"status-icons" = { "paused" = ""; };
"status-icons" = {
"paused" = "";
};
};
"power-profiles-daemon" = {
"format" = "{icon}";
@@ -217,8 +261,7 @@ in {
"class<firefox-beta>" = "";
"class<firefox-developer-edition>" = "";
"class<firefox> title<.*github.*>" = "";
"class<firefox> title<.*twitch|youtube|plex|tntdrama|bally sports.*>" =
"";
"class<firefox> title<.*twitch|youtube|plex|tntdrama|bally sports.*>" = "";
"class<kitty>" = "";
"class<org.wezfurlong.wezterm>" = "";
"class<mediainfo-gui>" = "󱂷";
@@ -247,8 +290,7 @@ in {
};
};
};
style =
"${theme}${style}${notificationsStyle}${powerStyle}${statsStyle}${workspacesStyle}";
style = "${theme}${style}${notificationsStyle}${powerStyle}${statsStyle}${workspacesStyle}";
};
};
}

View File

@@ -1,6 +1,14 @@
{ osConfig, pkgs, config, lib, ... }:
let cfg = osConfig.custom.graphical.i3;
in {
{
osConfig,
pkgs,
config,
lib,
...
}:
let
cfg = osConfig.custom.graphical.i3;
in
{
config = lib.mkIf cfg.enable {
home.file.".config/i3" = {
recursive = true;
@@ -55,10 +63,12 @@ in {
module-margin = 1;
modules-left = "i3 xwindow";
modules-center = "";
modules-right = [ "music network memory cpu cpu-wattage cpu-temp" ]
++ lib.optionals osConfig.custom.hardware.nvidia.enable [ "nvidia-gpu" ]
++ lib.optionals osConfig.custom.hardware.amd-gpu.enable [ "amd-gpu" ]
++ [ "pulseaudio date tray" ];
modules-right = [
"music network memory cpu cpu-wattage cpu-temp"
]
++ lib.optionals osConfig.custom.hardware.nvidia.enable [ "nvidia-gpu" ]
++ lib.optionals osConfig.custom.hardware.amd-gpu.enable [ "amd-gpu" ]
++ [ "pulseaudio date tray" ];
cursor-click = "pointer";
cursor-scroll = "ns-resize";
enable-ipc = true;
@@ -69,8 +79,10 @@ in {
# override-redirect = true;
};
"module/i3" =
let padding = 2;
in {
let
padding = 2;
in
{
type = "internal/i3";
pin-workspaces = true;
show-urgent = true;

View File

@@ -1,4 +1,10 @@
{ config, pkgs, inputs, lib, ... }:
{
config,
pkgs,
inputs,
lib,
...
}:
{
programs.kitty = {
enable = true;

View File

@@ -1,4 +1,9 @@
{ config, pkgs, inputs, ... }:
{
config,
pkgs,
inputs,
...
}:
{
programs.lf = {
enable = true;

View File

@@ -1,4 +1,9 @@
{ config, pkgs, inputs, ... }:
{
config,
pkgs,
inputs,
...
}:
{
programs.mpv = {
enable = true;

View File

@@ -1,3 +1,5 @@
{
plugins.nvim-autopairs = { enable = true; };
plugins.nvim-autopairs = {
enable = true;
};
}

View File

@@ -1 +1,5 @@
{ plugins.barbar = { enable = true; }; } # tab bar up top
{
plugins.barbar = {
enable = true;
};
} # tab bar up top

View File

@@ -10,15 +10,25 @@
};
};
cmp-buffer = { enable = true; };
cmp-buffer = {
enable = true;
};
cmp-emoji = { enable = true; };
cmp-emoji = {
enable = true;
};
cmp-nvim-lsp = { enable = true; };
cmp-nvim-lsp = {
enable = true;
};
cmp-path = { enable = true; };
cmp-path = {
enable = true;
};
cmp_luasnip = { enable = true; };
cmp_luasnip = {
enable = true;
};
cmp = {
enable = true;
@@ -48,11 +58,29 @@
completion = {
scrollbar = true;
sidePadding = 0;
border = [ "" "" "" "" "" "" "" "" ];
border = [
""
""
""
""
""
""
""
""
];
};
settings.documentation = {
border = [ "" "" "" "" "" "" "" "" ];
border = [
""
""
""
""
""
""
""
""
];
};
};
@@ -65,8 +93,7 @@
"<C-f>" = "cmp.mapping.scroll_docs(4)";
"<C-Space>" = "cmp.mapping.complete()";
"<C-e>" = "cmp.mapping.close()";
"<CR>" =
"cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = false })";
"<CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = false })";
"<Tab>" =
# lua
''
@@ -96,7 +123,11 @@
};
formatting = {
fields = [ "abbr" "kind" "menu" ];
fields = [
"abbr"
"kind"
"menu"
];
format =
# lua
''

View File

@@ -11,7 +11,7 @@
number = true;
relativenumber = true;
showmode = false; #already shown in lightline
showmode = false; # already shown in lightline
autoindent = true;
clipboard = "unnamedplus";
@@ -65,7 +65,7 @@
options.desc = "Format the current buffer";
}
# Git
# Git
{
mode = "n";
key = "<leader>g";
@@ -159,7 +159,7 @@
options.desc = "Escape terminal mode";
}
# Trouble
# Trouble
{
key = "<leader>dt";
action = "<CMD>TroubleToggle<CR>";
@@ -205,18 +205,18 @@
key = "<leader>rI";
action = ":Refactor inline_func ";
options.desc = "Inline function";
}
}
# hop
{
{
key = "f";
action.__raw = ''
function()
require'hop'.hint_char1({
--direction = require'hop.hint'.HintDirection.AFTER_CURSOR,
current_line_only = false,
case_insensitive = true,
})
end
function()
require'hop'.hint_char1({
--direction = require'hop.hint'.HintDirection.AFTER_CURSOR,
current_line_only = false,
case_insensitive = true,
})
end
'';
options.remap = true;
}
@@ -229,7 +229,7 @@
current_line_only = false
})
end
'';
'';
options.remap = true;
}
];

View File

@@ -1,47 +1,59 @@
{ lib, pkgs, osConfig, ... }:
{
lib,
pkgs,
osConfig,
...
}:
# https://nix-community.github.io/nixvim/NeovimOptions/index.html
let
cfg = osConfig.custom.nixvimPlugins;
args = { inherit lib pkgs; };
importFile = file:
let config = import file;
in if builtins.isFunction config then config args else config;
configs = map importFile ([
./config.nix
] ++ lib.optionals cfg [
./auto-pairs.nix
./autosave.nix
./blankline.nix
./barbar.nix
./cmp.nix
./fidget.nix
./refactoring.nix
./git.nix
./lightline.nix
./lsp.nix
./images.nix
./none-ls.nix
./nvim-tree.nix
importFile =
file:
let
config = import file;
in
if builtins.isFunction config then config args else config;
configs = map importFile (
[
./config.nix
]
++ lib.optionals cfg [
./auto-pairs.nix
./autosave.nix
./blankline.nix
./barbar.nix
./cmp.nix
./fidget.nix
./refactoring.nix
./git.nix
./lightline.nix
./lsp.nix
./images.nix
./none-ls.nix
./nvim-tree.nix
#./neo-tree.nix
./telescope.nix
./toggleterm.nix
./treesitter.nix
./trouble.nix
./which_key.nix
./wilder.nix
./typst-preview.nix
./markdown.nix
./hop.nix
./colorizer.nix
./surround.nix
./vimwiki.nix
]);
merged =
builtins.foldl' (acc: elem: lib.recursiveUpdate acc elem) { } configs;
./telescope.nix
./toggleterm.nix
./treesitter.nix
./trouble.nix
./which_key.nix
./wilder.nix
./typst-preview.nix
./markdown.nix
./hop.nix
./colorizer.nix
./surround.nix
./vimwiki.nix
]
);
merged = builtins.foldl' (acc: elem: lib.recursiveUpdate acc elem) { } configs;
in
{
home.sessionVariables = { EDITOR = "nvim"; };
home.packages = with pkgs; [ nixfmt-rfc-style ]; # nixd config option to set nixpkgs-fmt should work, but it doesn't
home.sessionVariables = {
EDITOR = "nvim";
};
home.packages = with pkgs; [ nixfmt-rfc-style ]; # nixd config option to set nixpkgs-fmt should work, but it doesn't
programs.nixvim = merged;
}

View File

@@ -1,7 +1,11 @@
{
plugins = {
diffview = { enable = true; };
lazygit = { enable = true; };
diffview = {
enable = true;
};
lazygit = {
enable = true;
};
#neogit = {
# enable = true;
# settings.integrations = { diffview = true; };

View File

@@ -1 +1,5 @@
{ plugins.lightline = { enable = true; }; } #status line at the bottom
{
plugins.lightline = {
enable = true;
};
} # status line at the bottom

View File

@@ -4,16 +4,18 @@
inlayHints.enable = true;
servers = {
bashls.enable = true;
#ccls.enable = true;
#ccls.enable = true;
clangd.enable = true;
cssls.enable = true;
gopls.enable = true;
clojure_lsp.enable = true;
qmlls =
{
enable = true;
settings.cmd = [ "qmlls" "-E" ];
};
qmlls = {
enable = true;
settings.cmd = [
"qmlls"
"-E"
];
};
nixd = {
enable = true;
settings = {
@@ -33,7 +35,7 @@
};
tinymist.enable = true; # typst
};
keymaps= [
keymaps = [
{
key = "gd";
lspBufAction = "definition";

View File

@@ -2,7 +2,10 @@
plugins.render-markdown = {
enable = true;
settings = {
file_types = [ "markdown" "vimwiki"];
file_types = [
"markdown"
"vimwiki"
];
};
};
}

View File

@@ -17,7 +17,6 @@
};
};
# default keybinds
# window = {
# mappings = {

View File

@@ -1,3 +1,5 @@
{
plugins = { refactoring.enable = true; };
plugins = {
refactoring.enable = true;
};
}

View File

@@ -16,6 +16,8 @@
options.desc = "List buffers";
};
};
extensions.fzf-native = { enable = true; };
extensions.fzf-native = {
enable = true;
};
};
}

View File

@@ -2,5 +2,7 @@
opts = {
timeoutlen = 500;
};
plugins.which-key = { enable = true; };
plugins.which-key = {
enable = true;
};
}

View File

@@ -1,6 +1,10 @@
{
plugins.wilder = {
enable = true;
modes = [ ":" "/" "?" ];
modes = [
":"
"/"
"?"
];
};
}

View File

@@ -1,4 +1,9 @@
{ config, pkgs, inputs, ... }:
{
config,
pkgs,
inputs,
...
}:
{
home.file.".config/nvim" = {
enable = true;

View File

@@ -1,3 +1,13 @@
{ osConfig, pkgs, lib, inputs, ... }:
let cfg = osConfig.custom.services.opensnitch;
in { config = lib.mkIf cfg.enable { services.opensnitch-ui.enable = true; }; }
{
osConfig,
pkgs,
lib,
inputs,
...
}:
let
cfg = osConfig.custom.services.opensnitch;
in
{
config = lib.mkIf cfg.enable { services.opensnitch-ui.enable = true; };
}

View File

@@ -1,8 +1,15 @@
{ config, pkgs, inputs, lib, ... }:
{
config,
pkgs,
inputs,
lib,
...
}:
with config.stylix.fonts;
let
mkLiteral = name: "${name}";
mkRgba = opacity: color:
mkRgba =
opacity: color:
let
c = config.lib.stylix.colors;
r = c."${color}-rgb-r";
@@ -11,8 +18,7 @@ let
in
"rgba ( ${r}, ${g}, ${b}, ${opacity} % )";
mkRgb = mkRgba "100";
rofiOpacity =
builtins.toString (builtins.ceil (config.stylix.opacity.popups * 100));
rofiOpacity = builtins.toString (builtins.ceil (config.stylix.opacity.popups * 100));
rofiTheme = {
background = mkRgba rofiOpacity "base00";
lightbg = mkRgba rofiOpacity "base01";
@@ -68,7 +74,9 @@ in
enable = true;
text = ''
* {
${builtins.concatStringsSep "\n" (lib.mapAttrsToList (name: value: "${name}: ${value};") rofiTheme)}
${builtins.concatStringsSep "\n" (
lib.mapAttrsToList (name: value: "${name}: ${value};") rofiTheme
)}
}
'';
};

View File

@@ -1,4 +1,10 @@
{ osConfig, pkgs, config, lib, ... }:
{
osConfig,
pkgs,
config,
lib,
...
}:
let
cfg = osConfig.custom.graphical.stylix;
base16 = config.stylix.base16Scheme;
@@ -14,7 +20,7 @@ in
enable = true;
addCss = false;
};
gtk.flatpakSupport.enable = true; #edits ~/.themes/adw-gtk3
gtk.flatpakSupport.enable = true; # edits ~/.themes/adw-gtk3
};
};

View File

@@ -1,4 +1,9 @@
{ config, pkgs, inputs, ... }:
{
config,
pkgs,
inputs,
...
}:
{
home = {
pointerCursor = {

View File

@@ -1,26 +1,32 @@
{ pkgs, config, osConfig, lib, ... }:
{
config = lib.mkIf osConfig.custom.hardware.vr.enable
{
xdg.configFile."openxr/1/active_runtime.json".source = "${pkgs.monado}/share/openxr/1/openxr_monado.json";
xdg.configFile."openvr/openvrpaths.vrpath".text = ''
{
"config" :
[
"~/.local/share/Steam/config"
],
"external_drivers" : null,
"jsonid" : "vrpathreg",
"log" :
[
"~/.local/share/Steam/logs"
],
"runtime" :
[
"${pkgs.opencomposite}/lib/opencomposite"
],
"version" : 1
}
'';
};
pkgs,
config,
osConfig,
lib,
...
}:
{
config = lib.mkIf osConfig.custom.hardware.vr.enable {
xdg.configFile."openxr/1/active_runtime.json".source =
"${pkgs.monado}/share/openxr/1/openxr_monado.json";
xdg.configFile."openvr/openvrpaths.vrpath".text = ''
{
"config" :
[
"~/.local/share/Steam/config"
],
"external_drivers" : null,
"jsonid" : "vrpathreg",
"log" :
[
"~/.local/share/Steam/logs"
],
"runtime" :
[
"${pkgs.opencomposite}/lib/opencomposite"
],
"version" : 1
}
'';
};
}

View File

@@ -1,4 +1,10 @@
{ config, pkgs, inputs, ... }: {
{
config,
pkgs,
inputs,
...
}:
{
programs.fzf = {
enable = true;
enableZshIntegration = true;
@@ -17,12 +23,10 @@
save = 100000;
};
shellAliases = {
# TODO: gifsicle -O3 --lossy=30 noita-20240328-191617-1612416266-00316616.gif -o noita-20240328-191617-1612416266.gif
backupNoita =
"cp -r ~/.local/share/Steam/steamapps/compatdata/881100/pfx/drive_c/users/steamuser/AppData/LocalLow/Nolla_Games_Noita/* ~/synced/default/dont_remotebackup/noita_save";
# TODO: gifsicle -O3 --lossy=30 noita-20240328-191617-1612416266-00316616.gif -o noita-20240328-191617-1612416266.gif
backupNoita = "cp -r ~/.local/share/Steam/steamapps/compatdata/881100/pfx/drive_c/users/steamuser/AppData/LocalLow/Nolla_Games_Noita/* ~/synced/default/dont_remotebackup/noita_save";
checkTime = "(cd ~/synced/work_drive/TS && nix run)";
checkWaylandWindowsKDE =
"qdbus org.kde.KWin /KWin org.kde.KWin.showDebugConsole";
checkWaylandWindowsKDE = "qdbus org.kde.KWin /KWin org.kde.KWin.showDebugConsole";
collectGarbage = "nh clean all";
edit = "cd ~/projects/github/nix-config && nvim .";
ll = "ls -l";
@@ -36,14 +40,10 @@
dev = "nix-shell --run zsh";
rmt = "trash put";
bat = "bat -P --style plain";
cdf =
"cd $(fd --type d --exclude node_modules --exclude bin --exclude target --exclude .cache . | fzf)";
cpu_performance =
"echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor";
cpu_powersave =
"echo powersave | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor";
cpu_schedutil =
"echo schedutil | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor";
cdf = "cd $(fd --type d --exclude node_modules --exclude bin --exclude target --exclude .cache . | fzf)";
cpu_performance = "echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor";
cpu_powersave = "echo powersave | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor";
cpu_schedutil = "echo schedutil | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor";
cpu_freq = ''watch -n 1 "cat /proc/cpuinfo | grep \"^[c]pu MHz\""'';
gpu_monitor = "nvidia-smi dmon -s puct";
nix-shell = "nix-shell --command zsh";