diff --git a/home.nix b/home.nix index 14fdfe8..d321d71 100644 --- a/home.nix +++ b/home.nix @@ -1,7 +1,6 @@ { inputs, pkgs, - lib, ... }: { @@ -15,301 +14,6 @@ programs.plasma = { enable = true; }; - # terminalTools - programs.bash.enable = true; - programs.ripgrep.enable = true; - - # browser - /* - programs.firefox = { - enable = true; - profiles.default = { - search = { - force = true; - default = "searxng"; - privateDefault = "searxng"; - engines = - let - mkEngineForceFavicon = aliases: queryUrl: iconUrl: { - definedAliases = aliases; - icon = iconUrl; - urls = [ { template = queryUrl; } ]; - }; - mkEngine = - aliases: queryUrl: iconExt: - (mkEngineForceFavicon aliases queryUrl ( - let - noPath = lib.strings.concatStrings ( - lib.strings.intersperse "/" (lib.lists.take 3 (lib.strings.splitString "/" queryUrl)) - ); - in - "${noPath}/favicon.${iconExt}" - )); - mkModrinth = - aliases: type: mkEngine aliases "https://modrinth.com/discover/${type}?q={searchTerms}" "ico"; - in - { - # Degoog Engine - "degoog" = - (mkEngineForceFavicon [ - "@deg" - "@degoog" - ] "http://localhost:4444/search?q={searchTerms}" "http://localhost:4444/public/favicon/favicon.ico") - // { - name = "degoog"; - }; - - "searxng" = - (mkEngineForceFavicon - [ - "@sx" - "@sxng" - "@sear" - ] - "http://localhost:8888/search?q={searchTerms}" - "http://localhost:8888/static/themes/simple/img/favicon.png" - ) - // { - name = "searxng"; - }; - # Dev - "GitHub Repos" = - mkEngineForceFavicon [ "@gh" "@github" ] - "https://github.com/search?type=repositories&q={searchTerms}" - "https://github.githubassets.com/favicons/favicon-dark.svg"; - - "SourceGraph" = mkEngine [ - "@sg" - "@sourcegraph" - ] "https://sourcegraph.com/search?q={searchTerms}" "png"; - - ## Web - "MDN Web Docs" = mkEngine [ - "@mdn" - ] "https://developer.mozilla.org/en-US/search?q={searchTerms}" "ico"; - "Can I Use" = mkEngineForceFavicon [ - "@ciu" - "@baseline" - ] "https://caniuse.com/?search={searchTerms}" "https://caniuse.com/img/favicon-128.png"; - "NPM" = mkEngine [ "@npm" ] "https://www.npmx.dev/search?q={searchTerms}" "ico"; - "Iconify" = mkEngine [ - "@iconify" - "@icons" - ] "https://icon-sets.iconify.design/?query={searchTerms}" "ico"; - "Astro" = mkEngineForceFavicon [ - "@astro" - ] "https://a.stro.cc/{searchTerms}" "https://docs.astro.build/favicon.svg"; - "Porkbun" = mkEngine [ "@porkbun" ] "https://porkbun.com/checkout/search?q={searchTerms}" "ico"; - "Http.Cat" = mkEngine [ "@cat" "@hcat" "@httpcat" ] "https://http.cat/{searchTerms}" "ico"; - - ## Rust - "Crates.io" = mkEngine [ - "@crates" - "@cratesio" - "@cargo" - ] "https://crates.io/search?q={searchTerms}" "ico"; - "Rust Docs" = - mkEngineForceFavicon [ "@rust" "@rustdocs" "@ruststd" ] - "https://doc.rust-lang.org/std/index.html?search={searchTerms}" - "https://doc.rust-lang.org/static.files/favicon-2c020d218678b618.svg"; - "Docsrs" = mkEngine [ "@docsrs" ] "https://docs.rs/releases/search?query={searchTerms}" "ico"; - - ## Python - "PyPI" = mkEngineForceFavicon [ - "@pypi" - "@pip" - ] "https://pypi.org/search/?q={searchTerms}" "https://pypi.org/static/images/favicon.35549fe8.ico"; - - ## .NET - "NuGet" = mkEngine [ "@nuget" ] "https://www.nuget.org/packages?q={searchTerms}" "ico"; - - ## Linux Stuff - "Kernel Docs" = mkEngine [ - "@lnx" - "@linux" - "@kernel" - ] "https://www.kernel.org/doc/html/latest/search.html?q={searchTerms}" "ico"; - "Arch Wiki" = mkEngine [ - "@aw" - "@arch" - ] "https://wiki.archlinux.org/index.php?title=Special%3ASearch&search={searchTerms}" "ico"; - "Nerd Fonts" = - mkEngineForceFavicon [ "@nf" "@nerdfonts" ] "https://www.nerdfonts.com/cheat-sheet?q={searchTerms}" - "https://www.nerdfonts.com/assets/img/favicon.ico"; - - ### Haskell - "Hoogle Base" = mkEngine [ - "@h" - "@hoogle" - ] "https://hoogle.haskell.org/?scope=package%3Abase&hoogle={searchTerms}" "png"; - "Hoogle All" = mkEngine [ - "@ha" - "@hoogall" - ] "https://hoogle.haskell.org/?hoogle={searchTerms}" "png"; - - ### Nix - "Nix Packages" = mkEngine [ - "@nixpkgs" - ] "https://search.nixos.org/packages?channel=unstable&size=500&query={searchTerms}" "png"; - "NixOS Options" = mkEngine [ - "@nixos" - ] "https://search.nixos.org/options?channel=unstable&size=500&query={searchTerms}" "png"; - "NixOS Wiki" = mkEngine [ "@nixwiki" ] "https://nixos.wiki/index.php?search={searchTerms}" "png"; - "Home Manager Options" = - mkEngineForceFavicon [ "@hm" ] - "https://home-manager-options.extranix.com/?release=master&query={searchTerms}" - "https://home-manager-options.extranix.com/images/favicon.png"; - "Noogle" = mkEngine [ - "@noogle" - "@nixlib" - ] "https://noogle.dev/q?limit=100&term={searchTerms}" "png"; - "SourceGraph Nix" = - mkEngine [ "@sgn" "@yoink" ] - "https://sourcegraph.com/search?q=lang:Nix+-repo:NixOS/*+-repo:nix-community/*+{searchTerms}" - "png"; - "Nixpkgs Issues" = - mkEngineForceFavicon [ "@nixissues" ] - "https://github.com/NixOS/nixpkgs/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen+{searchTerms}" - "https://github.githubassets.com/favicons/favicon-dark.svg"; - "NixVim Options" = - mkEngineForceFavicon [ "@nixvim" ] - "https://nix-community.github.io/nixvim/search/?option_scope=0&query={searchTerms}" - "https://nix-community.github.io/nixvim/search/favicon.ico"; - - # Media - "youtube" = mkEngine [ "@yt" ] "https://www.youtube.com/results?search_query={searchTerms}" "ico"; - "Spotify" = - mkEngineForceFavicon [ "@sp" "@spotify" ] "https://open.spotify.com/search/{searchTerms}" - "https://open.spotifycdn.com/cdn/images/favicon16.1c487bff.png"; - "Netflix" = mkEngine [ "@nfx" ] "https://www.netflix.com/search?q={searchTerms}" "ico"; - "IMDb" = mkEngine [ "@imdb" ] "https://www.imdb.com/find?q={searchTerms}" "ico"; - - # Minecraft - "Modrinth" = mkModrinth [ "@mr" ] "mods"; - "Modrinth Resource Packs" = mkModrinth [ "@mrr" ] "resourcepacks"; - "Modrinth Data Packs" = mkModrinth [ "@mrd" ] "datapacks"; - - # Misc - "Firefox Add-ons" = mkEngine [ - "@addons" - ] "https://addons.mozilla.org/en-US/firefox/search/?q={searchTerms}" "ico"; - "Urban Dictionary" = mkEngine [ - "@ud" - "@urban" - ] "https://www.urbandictionary.com/define.php?term={searchTerms}" "ico"; - "Google Translate" = mkEngine [ - "@translate" - ] "https://translate.google.com/?sl=auto&tl=en&text={searchTerms}&op=translate" "ico"; - - # Overrides - "History".metaData.alias = "@h"; - "Bookmarks".metaData.alias = "@b"; - "Tabs".metaData.alias = "@t"; - "bing".metaData.hidden = true; - "amazondotcom-us".metaData.alias = "@amz"; - "google".metaData.alias = "@g"; - "wikipedia".metaData.alias = "@w"; - "ddg".metaData.alias = "@ddg"; - }; # end of let-in for search - }; # programs.firefox.profiles.default.search - }; # programs.firefox.profiles.default - policies = { - ExtensionSettings = { - "uBlock0@raymondhill.net" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/uBlock0@raymondhill.net/latest.xpi"; - installation_mode = "force_installed"; - }; # uBlock settings - "{a9c2ad37-e940-4892-8dce-cd73c6cbbc0c}" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/{a9c2ad37-e940-4892-8dce-cd73c6cbbc0c}/latest.xpi"; - installation_mode = "force_installed"; - }; # Feedbro settings - }; # programs.firefox.policies.ExtensionSettings - }; # programs.firefox.policies - }; # programs.firefox - */ - # Neovim config with nixvim - # neovim folder - # nixvim file - # other files - /* - programs.nixvim = { - enable = true; - defaultEditor = true; - viAlias = true; - vimAlias = true; - colorschemes.catppuccin.enable = true; - colorschemes.catppuccin.autoLoad = true; - plugins.lspconfig.enable = true; - plugins.treesitter = { - enable = true; - settings = { - highlight.enable = true; - }; - }; - lsp = { - servers.ruff.enable = true; # Python - servers.rust_analyzer.enable = true; # Rust - servers.tinymist.enable = true; - servers.html.enable = true; - servers.typos_lsp.enable = true; # Language typos - servers.emmet_language_server.enable = true; # Emmet - }; - plugins.lspsaga.enable = true; - plugins.web-devicons.enable = true; - plugins.dropbar.enable = true; - plugins.guess-indent.enable = true; - plugins.conform-nvim = { - enable = true; - autoInstall.enable = true; - settings.formatters_by_ft = { - nix = [ "nixfmt" ]; - python = [ "ruff_format" ]; - rust = [ "rustfmt" ]; - typst = [ "typstyle" ]; - html = [ "prettier" ]; - typescriptreact = [ "oxfmt" ]; - lua = [ "stylua" ]; - css = [ "prettier" ]; - java = [ "google-java-format" ]; - }; - luaConfig.post = '' - vim.api.nvim_create_user_command("Format", function(args) - local range = nil - if args.count ~= -1 then - local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1] - range = { - start = { args.line1, 0 }, - ["end"] = { args.line2, end_line:len() }, - } - end - require("conform").format({ async = true, lsp_format = "fallback", range = range }) - end, { range = true }) - ''; - }; - plugins.cmp = { - enable = true; - autoEnableSources = true; # Scans the settings.sources array, enabling if available - settings = { - sources = [ - { name = "nvim_lsp"; } - { name = "path"; } - { name = "buffer"; } - { name = "spell"; } - ]; - - mapping = { - "" = "cmp.mapping.confirm({ select = true })"; - "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; - "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; - }; - }; - }; - plugins.toggleterm = { - enable = true; - settings.open_mapping = "[[]]"; - }; - }; - */ # Compilers, whatever # dev tools? diff --git a/homeManagerModules/development/default.nix b/homeManagerModules/development/default.nix new file mode 100644 index 0000000..156a710 --- /dev/null +++ b/homeManagerModules/development/default.nix @@ -0,0 +1 @@ +{...}:{} diff --git a/homeManagerModules/development/gcc.nix b/homeManagerModules/development/gcc.nix new file mode 100644 index 0000000..e69de29 diff --git a/homeManagerModules/development/java.nix b/homeManagerModules/development/java.nix new file mode 100644 index 0000000..e69de29 diff --git a/homeManagerModules/development/npm.nix b/homeManagerModules/development/npm.nix new file mode 100644 index 0000000..e69de29 diff --git a/homeManagerModules/development/rust.nix b/homeManagerModules/development/rust.nix new file mode 100644 index 0000000..e69de29 diff --git a/homeManagerModules/terminal/bash.nix b/homeManagerModules/terminal/bash.nix new file mode 100644 index 0000000..6cd6ac0 --- /dev/null +++ b/homeManagerModules/terminal/bash.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + programs.bash.enable = true; +} diff --git a/homeManagerModules/terminal/default.nix b/homeManagerModules/terminal/default.nix index 3161b86..e9661c4 100644 --- a/homeManagerModules/terminal/default.nix +++ b/homeManagerModules/terminal/default.nix @@ -1,4 +1,8 @@ { ... }: { - imports = [ ./yazi.nix ]; + imports = [ + ./bash.nix + ./ripgrep.nix + ./yazi.nix + ]; } diff --git a/homeManagerModules/terminal/ripgrep.nix b/homeManagerModules/terminal/ripgrep.nix new file mode 100644 index 0000000..65b1ca6 --- /dev/null +++ b/homeManagerModules/terminal/ripgrep.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + programs.ripgrep.enable = true; +}