From 00be6c602da1de1e8d8131842aaeb70555f84e08 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 28 Jul 2024 19:48:00 -0400 Subject: [PATCH] thelio76: split out apps --- config/apps/firefox.nix | 55 +++++++++++++++++++++++ config/apps/vscode.nix | 25 +++++++++++ config/users/alex/default.nix | 85 +++-------------------------------- 3 files changed, 87 insertions(+), 78 deletions(-) create mode 100644 config/apps/firefox.nix create mode 100644 config/apps/vscode.nix diff --git a/config/apps/firefox.nix b/config/apps/firefox.nix new file mode 100644 index 0000000..7ef00b9 --- /dev/null +++ b/config/apps/firefox.nix @@ -0,0 +1,55 @@ +{ pkgs, firefox-addons, ... }: +{ + enable = true; + profiles.default = { + settings = { + "browser.newtabpage.activity-stream.default.sites" = "https://www.wikipedia.org/"; + "browser.newtabpage.activity-stream.discoverystream.saveToPocketCard.enabled" = false; + "browser.newtabpage.activity-stream.discoverystream.sendToPocket.enabled" = false; + "browser.newtabpage.activity-stream.feeds.section.topstories" = false; + "browser.newtabpage.activity-stream.feeds.system.topstories" = false; + "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts" = false; + "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.havePinned" = "duckduckgo"; + "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.searchEngines" = "duckduckgo"; + "browser.newtabpage.activity-stream.section.highlights.includePocket" = false; + "browser.newtabpage.activity-stream.showSponsored" = false; + "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; + "browser.newtabpage.activity-stream.system.showSponsored" = false; + "browser.newtabpage.pinned" = [{ + url = "https://duckduckgo.com"; + label = "@duckduckgo"; + searchTopSite = true; + }]; + "browser.topsites.contile.cachedTiles" = [ ]; + "browser.topsites.contile.enabled" = false; # man fuck this shit, its the api that gets FF newpage shortcuts like FB, expedia, ... + "browser.urlbar.suggest.quicksuggest.sponsored" = false; + "extensions.autoDisableScopes" = 0; + }; + extensions = with firefox-addons; [ + darkreader + multi-account-containers + simple-tab-groups + ublock-origin + umatrix + ]; + search = { + force = true; + default = "DuckDuckGo"; + 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" ]; + }; + }; + order = [ "DuckDuckGo" "Nix Packages" "Wikipedia" "Google" "Amazon" ]; + }; + }; +} diff --git a/config/apps/vscode.nix b/config/apps/vscode.nix new file mode 100644 index 0000000..6cc5bfe --- /dev/null +++ b/config/apps/vscode.nix @@ -0,0 +1,25 @@ +{ pkgs, ... }: +{ + programs.vscode = { + enable = true; + extensions = with pkgs.vscode-extensions; [ + eamodio.gitlens + jnoortheen.nix-ide + scalameta.metals + kamikillerto.vscode-colorize + file-icons.file-icons + ]; + userSettings = { + "security.workspace.trust.untrustedFiles" = "open"; + "workbench.colorTheme" = "Default Dark Modern"; + "workbench.iconTheme" = "file-icons"; + "files.autoSave" = "afterDelay"; + "editor.formatOnSave" = true; + "nix.formatterPath" = "nixpkgs-fmt"; + "colorize.languages" = [ + "javascript" + "nix" + ]; + }; + }; +} diff --git a/config/users/alex/default.nix b/config/users/alex/default.nix index 5640063..956f984 100644 --- a/config/users/alex/default.nix +++ b/config/users/alex/default.nix @@ -51,6 +51,11 @@ yt-dlp ]; + imports = [ + ../../apps/firefox.nix + ../../apps/vscode.nix + ]; + # WM/DE config gtk = { enable = true; @@ -350,8 +355,8 @@ enable = true; backend = "glx"; - activeOpacity = 0.9; - inactiveOpacity = 0.6; + activeOpacity = 1; + inactiveOpacity = 0.75; shadow = true; vSync = true; @@ -382,60 +387,6 @@ "git-override" = "git add . && git commit --amend --no-edit && git push --force-with-lease"; }; }; - firefox = { - enable = true; - profiles.default = { - settings = { - "browser.newtabpage.activity-stream.default.sites" = "https://www.wikipedia.org/"; - "browser.newtabpage.activity-stream.discoverystream.saveToPocketCard.enabled" = false; - "browser.newtabpage.activity-stream.discoverystream.sendToPocket.enabled" = false; - "browser.newtabpage.activity-stream.feeds.section.topstories" = false; - "browser.newtabpage.activity-stream.feeds.system.topstories" = false; - "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts" = false; - "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.havePinned" = "duckduckgo"; - "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.searchEngines" = "duckduckgo"; - "browser.newtabpage.activity-stream.section.highlights.includePocket" = false; - "browser.newtabpage.activity-stream.showSponsored" = false; - "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; - "browser.newtabpage.activity-stream.system.showSponsored" = false; - "browser.newtabpage.pinned" = [{ - url = "https://duckduckgo.com"; - label = "@duckduckgo"; - searchTopSite = true; - }]; - "browser.topsites.contile.cachedTiles" = [ ]; - "browser.topsites.contile.enabled" = false; # man fuck this shit, its the api that gets FF newpage shortcuts like FB, expedia, ... - "browser.urlbar.suggest.quicksuggest.sponsored" = false; - "extensions.autoDisableScopes" = 0; - }; - extensions = with firefox-addons; [ - darkreader - multi-account-containers - simple-tab-groups - ublock-origin - umatrix - ]; - search = { - force = true; - default = "DuckDuckGo"; - 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" ]; - }; - }; - order = [ "DuckDuckGo" "Nix Packages" "Wikipedia" "Google" "Amazon" ]; - }; - }; - }; git = { enable = true; userEmail = "alexmat2on@protonmail.com"; @@ -472,28 +423,6 @@ }; }; }; - vscode = { - enable = true; - extensions = with pkgs.vscode-extensions; [ - eamodio.gitlens - jnoortheen.nix-ide - scalameta.metals - kamikillerto.vscode-colorize - file-icons.file-icons - ]; - userSettings = { - "security.workspace.trust.untrustedFiles" = "open"; - "workbench.colorTheme" = "Default Dark Modern"; - "workbench.iconTheme" = "file-icons"; - "files.autoSave" = "afterDelay"; - "editor.formatOnSave" = true; - "nix.formatterPath" = "nixpkgs-fmt"; - "colorize.languages" = [ - "javascript" - "nix" - ]; - }; - }; }; # This value determines the Home Manager release that your