diff --git a/nixcfgs/flake.lock b/nixcfgs/flake.lock index a4df938..7ec669c 100644 --- a/nixcfgs/flake.lock +++ b/nixcfgs/flake.lock @@ -1,5 +1,26 @@ { "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nur", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -90,6 +111,41 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1760038930, + "narHash": "sha256-Oncbh0UmHjSlxO7ErQDM3KM0A5/Znfofj2BSzlHLeVw=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "0b4defa2584313f3b781240b29d61f6f9f7e0df3", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nur": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1760244049, + "narHash": "sha256-NTF95tGxmhrBQiREvxLK928ovkzJloEsuHLhwN2GDCY=", + "owner": "nix-community", + "repo": "NUR", + "rev": "5fbc6ffa12c03d608618fc1986cf9fdab44fc5d5", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, "plasma-manager": { "inputs": { "home-manager": [ @@ -120,6 +176,7 @@ "nix-darwin": "nix-darwin", "nix-flatpak": "nix-flatpak", "nixpkgs": "nixpkgs", + "nur": "nur", "plasma-manager": "plasma-manager" } }, diff --git a/nixcfgs/flake.nix b/nixcfgs/flake.nix index d8adb53..d728bd3 100644 --- a/nixcfgs/flake.nix +++ b/nixcfgs/flake.nix @@ -19,6 +19,7 @@ inputs.nixpkgs.follows = "nixpkgs"; inputs.home-manager.follows = "home-manager"; }; + nur.url = "github:nix-community/NUR"; }; outputs = { @@ -28,8 +29,14 @@ nix-darwin, home-manager, plasma-manager, + nur, ... } @ inputs: let + overlays = [ nur.overlays.default ]; + forSystem = system: import nixpkgs { + inherit system overlays; + config.allowUnfree = true; + }; specialArgs = {inherit inputs;}; in { nixosConfigurations.zp = nixpkgs.lib.nixosSystem { @@ -57,7 +64,7 @@ ]; }; homeConfigurations.js0ny = home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages."x86_64-linux"; + pkgs = forSystem "x86_64-linux"; extraSpecialArgs = specialArgs; modules = [ ./users/js0ny diff --git a/nixcfgs/modules/nixos/firefox.nix b/nixcfgs/modules/nixos/firefox.nix index c90b7b5..ee55d3c 100644 --- a/nixcfgs/modules/nixos/firefox.nix +++ b/nixcfgs/modules/nixos/firefox.nix @@ -1,8 +1,4 @@ -{ - pkgs, - config, - ... -}: { +{...}: { programs.firefox = { enable = true; diff --git a/nixcfgs/users/js0ny/default.nix b/nixcfgs/users/js0ny/default.nix index 6a377d9..cfdd294 100644 --- a/nixcfgs/users/js0ny/default.nix +++ b/nixcfgs/users/js0ny/default.nix @@ -4,7 +4,8 @@ nix-flatpak, plasma-manager, ... -}: { +}: +{ imports = [ ./packages/cli.nix ./packages/gui.nix @@ -15,6 +16,9 @@ ./programs/shell.nix ./programs/vscode.nix ./programs/git.nix + ./programs/firefox.nix + ./programs/distrobox.nix + # ./programs/floorp.nix ../../modules/home/dev/c.nix ../../modules/home/dev/java.nix ../../modules/home/dev/nix.nix @@ -23,7 +27,7 @@ ../../modules/home/programs/fzf.nix ../../modules/home/programs/lsd.nix ../../modules/home/programs/nvim.nix - ../../modules/home/programs/rime.nix + # ../../modules/home/programs/rime.nix ../../modules/home/programs/starship.nix ../../modules/home/programs/zed-editor.nix ../../modules/home/programs/zoxide.nix diff --git a/nixcfgs/users/js0ny/packages/gui.nix b/nixcfgs/users/js0ny/packages/gui.nix index 3ab2ef6..25eb6a5 100644 --- a/nixcfgs/users/js0ny/packages/gui.nix +++ b/nixcfgs/users/js0ny/packages/gui.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ home.packages = with pkgs; [ kitty ghostty @@ -25,5 +26,8 @@ vivaldi kdePackages.kdeconnect-kde picard + qutebrowser + ryubing + qbittorrent ]; } diff --git a/nixcfgs/users/js0ny/programs/firefox.nix b/nixcfgs/users/js0ny/programs/firefox.nix index b39c9f3..91080ca 100644 --- a/nixcfgs/users/js0ny/programs/firefox.nix +++ b/nixcfgs/users/js0ny/programs/firefox.nix @@ -1,5 +1,86 @@ {pkgs, ...}: { programs.firefox = { enable = true; + profiles.default = { + search.engines = { + archwiki = { + name = "ArchWiki"; + urls = [ + { + template = "https://wiki.archlinux.org/index.php?search={searchTerms}"; + } + ]; + icon = "https://archlinux.org/favicon.ico"; + definedAliases = ["@aw"]; + }; + aur = { + name = "Arch User Repository"; + urls = [ + { + template = "https://aur.archlinux.org/?K={searchTerms}"; + } + ]; + icon = "https://archlinux.org/favicon.ico"; + definedAliases = ["@aur"]; + }; + arch-packages = { + name = "ArchLinux Packages"; + urls = [{template = "https://archlinux.org/?q={searchTerms}";}]; + icon = "https://archlinux.org/favicon.ico"; + definedAliases = ["@pac"]; + }; + chatgpt = { + name = "ChatGPT"; + urls = [{template = "https://chatgpt.com/?q={searchTerms}";}]; + icon = "https://chatgpt.com/favicon.ico"; + definedAliases = ["@gpt"]; + }; + scoop = { + name = "scoop"; + urls = [{template = "https://scoop.sh/#/apps?q={searchTerms}";}]; + icon = "https://scoop.sh/favicon.ico"; + definedAliases = ["@sc"]; + }; + perplexity = { + name = "Perplexity"; + urls = [{template = "https://www.perplexity.ai/?q={searchTerms}";}]; + icon = "https://perplexity.ai/favicon.ico"; + definedAliases = ["@pplx"]; + }; + winget = { + name = "Windows Package Manager"; + urls = [{template = "https://winget.ragerworks.com/search/all/{searchTerms}";}]; + icon = "https://microsoft.com/favicon.ico"; + definedAliases = ["@win"]; + }; + github = { + name = "GitHub Repository"; + urls = [{template = "https://github.com/search?type=repositories&q={searchTerms}";}]; + icon = "https://github.com/favicon.ico"; + definedAliases = ["@gh"]; + }; + }; + extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [ + darkreader + rsshub-radar + proton-pass + surfingkeys + web-archives + # immersive-translate + tampermonkey + stylus + foxy-gestures + google-container + refined-github + downthemall + material-icons-for-github + single-file + return-youtube-dislikes + steam-database + bilisponsorblock + sponsorblock + buster-captcha-solver + ]; + }; }; } diff --git a/nixcfgs/users/js0ny/programs/floorp.nix b/nixcfgs/users/js0ny/programs/floorp.nix new file mode 100644 index 0000000..1d884aa --- /dev/null +++ b/nixcfgs/users/js0ny/programs/floorp.nix @@ -0,0 +1,139 @@ +{pkgs, ...}: { + programs.floorp = { + enable = true; + package = pkgs.floorp; + policies = { + DisableTelemetry = true; + BlockAboutConfig = false; + DisableFirefoxScreenshots = true; + DontCheckDefaultBrowser = true; + + ExtensionSettings = with builtins; let + extension = short: uuid: { + name = uuid; + value = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/${short}/latest.xpi"; + installation_mode = "force_installed"; + }; + }; + in + listToAttrs [ + (extension "ublock-origin" "uBlock0@raymondhill.net") + (extension "multi-account-containers" "@testpilot-containers") + (extension "side-view" "@webcompat@mozilla.org") + (extension "clearurls" "{74145f27-f039-47ce-a470-a662b129930a}") + ]; + + SearchEngines = { + Default = "DuckDuckGo"; + Add = [ + { + Alias = "@np"; + Description = "Search in NixOS Packages"; + IconURL = "https://nixos.org/favicon.ico"; + Method = "GET"; + Name = "NixOS Packages"; + URLTemplate = "https://search.nixos.org/packages?from=0&size=200&sort=relevance&type=packages&query={searchTerms}"; + } + { + Alias = "@no"; + Description = "Search in NixOS Options"; + IconURL = "https://nixos.org/favicon.ico"; + Method = "GET"; + Name = "NixOS Options"; + URLTemplate = "https://search.nixos.org/options?from=0&size=200&sort=relevance&type=packages&query={searchTerms}"; + } + { + Alias = "@hm"; + Description = "Search in Home Manager Options"; + IconURL = "https://nixos.org/favicon.ico"; + Method = "GET"; + Name = "Home Manager options"; + URLTemplate = "https://home-manager-options.extranix.com/?query={searchTerms}"; + } + ]; + }; + }; + profiles.default = { + search.engines = { + archwiki = { + name = "ArchWiki"; + urls = [ + { + template = "https://wiki.archlinux.org/index.php?search={searchTerms}"; + } + ]; + icon = "https://archlinux.org/favicon.ico"; + definedAliases = ["@aw"]; + }; + aur = { + name = "Arch User Repository"; + urls = [ + { + template = "https://aur.archlinux.org/?K={searchTerms}"; + } + ]; + icon = "https://archlinux.org/favicon.ico"; + definedAliases = ["@aur"]; + }; + arch-packages = { + name = "ArchLinux Packages"; + urls = [{template = "https://archlinux.org/?q={searchTerms}";}]; + icon = "https://archlinux.org/favicon.ico"; + definedAliases = ["@pac"]; + }; + chatgpt = { + name = "ChatGPT"; + urls = [{template = "https://chatgpt.com/?q={searchTerms}";}]; + icon = "https://chatgpt.com/favicon.ico"; + definedAliases = ["@gpt"]; + }; + scoop = { + name = "scoop"; + urls = [{template = "https://scoop.sh/#/apps?q={searchTerms}";}]; + icon = "https://scoop.sh/favicon.ico"; + definedAliases = ["@sc"]; + }; + perplexity = { + name = "Perplexity"; + urls = [{template = "https://www.perplexity.ai/?q={searchTerms}";}]; + icon = "https://perplexity.ai/favicon.ico"; + definedAliases = ["@pplx"]; + }; + winget = { + name = "Windows Package Manager"; + urls = [{template = "https://winget.ragerworks.com/search/all/{searchTerms}";}]; + icon = "https://microsoft.com/favicon.ico"; + definedAliases = ["@win"]; + }; + github = { + name = "GitHub Repository"; + urls = [{template = "https://github.com/search?type=repositories&q={searchTerms}";}]; + icon = "https://github.com/favicon.ico"; + definedAliases = ["@gh"]; + }; + }; + extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [ + darkreader + rsshub-radar + proton-pass + surfingkeys + web-archives + # immersive-translate + tampermonkey + stylus + foxy-gestures + google-container + refined-github + downthemall + material-icons-for-github + single-file + return-youtube-dislikes + steam-database + bilisponsorblock + sponsorblock + buster-captcha-solver + ]; + }; + }; +} diff --git a/nixcfgs/users/js0ny/programs/gnome.nix b/nixcfgs/users/js0ny/programs/gnome.nix index 072ef51..4630165 100644 --- a/nixcfgs/users/js0ny/programs/gnome.nix +++ b/nixcfgs/users/js0ny/programs/gnome.nix @@ -48,7 +48,7 @@ favorite-apps = [ "org.kde.dolphin.desktop" "com.mitchellh.ghostty.desktop" - "chromium-browser.desktop" + "firefox.desktop" "code.desktop" ]; }; diff --git a/nixcfgs/users/js0ny/programs/plasma.nix b/nixcfgs/users/js0ny/programs/plasma.nix index 6a704d3..414b352 100644 --- a/nixcfgs/users/js0ny/programs/plasma.nix +++ b/nixcfgs/users/js0ny/programs/plasma.nix @@ -66,7 +66,7 @@ General = { launchers = [ "applications:org.kde.dolphin.desktop" - "applications:chromium-browser.desktop" + "applications:firefox.desktop" "applications:com.mitchellh.ghostty.desktop" ]; }; @@ -88,7 +88,6 @@ }; }; } - "org.kde.plasma.digitalclock" "org.kde.plasma.showdesktop" ]; }