Compare commits

..

8 commits

22 changed files with 165 additions and 91 deletions

View file

@ -42,7 +42,7 @@ in
services.blocky = { services.blocky = {
enable = true; enable = true;
# SRC: https://0xerr0r.github.io/blocky/main/configuration/ # REF: https://0xerr0r.github.io/blocky/main/configuration/
settings = { settings = {
bootstrapDns = "tcp+udp:1.1.1.1"; bootstrapDns = "tcp+udp:1.1.1.1";
connectIPVersion = "v4"; connectIPVersion = "v4";
@ -62,7 +62,7 @@ in
blockTTL = "1m"; blockTTL = "1m";
blockType = "zeroIP"; blockType = "zeroIP";
loading = { loading = {
refreshPeriod = "1h"; refreshPeriod = "24h";
strategy = "blocking"; strategy = "blocking";
downloads = { downloads = {
timeout = "5m"; timeout = "5m";

View file

@ -561,6 +561,38 @@
"type": "github" "type": "github"
} }
}, },
"nvimDressing": {
"flake": false,
"locked": {
"lastModified": 1726594554,
"narHash": "sha256-EtLYhAwoSoHyGiGrHAVYL4/CqcgO4rSbV6otO3V08hM=",
"owner": "stevearc",
"repo": "dressing.nvim",
"rev": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2",
"type": "github"
},
"original": {
"owner": "stevearc",
"repo": "dressing.nvim",
"type": "github"
}
},
"nvimGen": {
"flake": false,
"locked": {
"lastModified": 1728201978,
"narHash": "sha256-rBUltJdluSseNUiTfjBZyuBwrGrASWbW1ROVdcAW6ug=",
"owner": "David-Kunz",
"repo": "gen.nvim",
"rev": "83f1d6b6ffa6a6f32f6a93a33adc853f27541a94",
"type": "github"
},
"original": {
"owner": "David-Kunz",
"repo": "gen.nvim",
"type": "github"
}
},
"nvimGitsigns": { "nvimGitsigns": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -625,22 +657,6 @@
"type": "github" "type": "github"
} }
}, },
"nvimOllama": {
"flake": false,
"locked": {
"lastModified": 1717906114,
"narHash": "sha256-8tW5tp2GiYw+PnR7rqiKfykLW/yqvGOtqauZCgEeQCg=",
"owner": "nomnivore",
"repo": "ollama.nvim",
"rev": "45e58779fecde7ac5b8f62800bbe7180d4b48507",
"type": "github"
},
"original": {
"owner": "nomnivore",
"repo": "ollama.nvim",
"type": "github"
}
},
"nvimPlenary": { "nvimPlenary": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -775,11 +791,12 @@
"nvimCloseBuffers": "nvimCloseBuffers", "nvimCloseBuffers": "nvimCloseBuffers",
"nvimColorizer": "nvimColorizer", "nvimColorizer": "nvimColorizer",
"nvimDevicons": "nvimDevicons", "nvimDevicons": "nvimDevicons",
"nvimDressing": "nvimDressing",
"nvimGen": "nvimGen",
"nvimGitsigns": "nvimGitsigns", "nvimGitsigns": "nvimGitsigns",
"nvimGruvboxMaterial": "nvimGruvboxMaterial", "nvimGruvboxMaterial": "nvimGruvboxMaterial",
"nvimIndentoMatic": "nvimIndentoMatic", "nvimIndentoMatic": "nvimIndentoMatic",
"nvimLspconfig": "nvimLspconfig", "nvimLspconfig": "nvimLspconfig",
"nvimOllama": "nvimOllama",
"nvimPlenary": "nvimPlenary", "nvimPlenary": "nvimPlenary",
"nvimTelescope": "nvimTelescope", "nvimTelescope": "nvimTelescope",
"nvimTodo": "nvimTodo", "nvimTodo": "nvimTodo",

View file

@ -67,6 +67,14 @@
url = "github:nvim-tree/nvim-web-devicons"; url = "github:nvim-tree/nvim-web-devicons";
flake = false; flake = false;
}; };
nvimDressing = {
url = "github:stevearc/dressing.nvim";
flake = false;
};
nvimGen = {
url = "github:David-Kunz/gen.nvim";
flake = false;
};
nvimGitsigns = { nvimGitsigns = {
url = "github:lewis6991/gitsigns.nvim"; url = "github:lewis6991/gitsigns.nvim";
flake = false; flake = false;
@ -83,10 +91,6 @@
url = "github:neovim/nvim-lspconfig"; url = "github:neovim/nvim-lspconfig";
flake = false; flake = false;
}; };
nvimOllama = {
url = "github:nomnivore/ollama.nvim";
flake = false;
};
nvimPlenary = { nvimPlenary = {
url = "github:nvim-lua/plenary.nvim"; url = "github:nvim-lua/plenary.nvim";
flake = false; flake = false;
@ -264,7 +268,7 @@
util = import ./lib/Util.nix { inherit lib; }; util = import ./lib/Util.nix { inherit lib; };
mkCommonHome = mkCommonHome =
username: homeDirectory: system: modules: username: system:
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
pkgsStable = nixpkgsStable.legacyPackages.${system}; pkgsStable = nixpkgsStable.legacyPackages.${system};
@ -291,11 +295,8 @@
./home/HomeManager.nix ./home/HomeManager.nix
{ {
home.hm = { home.hm = {
inherit username homeDirectory; inherit username;
enable = true; enable = true;
package = {
core.enable = true;
};
}; };
} }
@ -310,23 +311,20 @@
} }
inputs.stylix.homeManagerModules.stylix inputs.stylix.homeManagerModules.stylix
] ++ modules ++ (self.findFiles ./config); ] ++ (self.findFiles ./home/user/${system}/${username}) ++ (self.findFiles ./config);
}; };
}; };
x86LinuxHome = username: modules: mkCommonHome username "/home/${username}" "x86_64-linux" modules;
x86LinuxRoot = mkCommonHome "root" "/root" "x86_64-linux" [ ];
in in
nixpkgs.lib.foldl' (acc: h: acc // h) { } [ nixpkgs.lib.foldl' (acc: h: acc // h) { } (
x86LinuxRoot map (
(x86LinuxHome "voronind" [ system:
{ nixpkgs.lib.foldl' (acc: h: acc // h) { } (
home.hm.package = { map (username: mkCommonHome username system) (
common.enable = true; builtins.attrNames (builtins.readDir ./home/user/${system})
}; )
} )
]) ) (builtins.attrNames (builtins.readDir ./home/user))
]; );
# Android. # Android.
nixOnDroidConfigurations.default = nixOnDroidConfigurations.default =

View file

@ -17,6 +17,7 @@ let
stylix = import <config/Stylix.nix> args; stylix = import <config/Stylix.nix> args;
android = import ./android args; android = import ./android args;
package = import <package> args; package = import <package> args;
programs = import ./program args;
in in
# homePath = "/data/data/com.termux.nix/files/home"; # homePath = "/data/data/com.termux.nix/files/home";
{ {
@ -41,7 +42,7 @@ in
sessionVariables = import ./variable args; sessionVariables = import ./variable args;
stateVersion = const.droidStateVersion; stateVersion = const.droidStateVersion;
}; };
programs = import ./program args; programs = with programs; core;
}; };
}; };
} }

View file

@ -11,6 +11,7 @@ with lib;
let let
cfg = config.home.hm; cfg = config.home.hm;
package = import <package> args; package = import <package> args;
programs = import ./program args;
in in
{ {
options = { options = {
@ -50,13 +51,18 @@ in
sessionVariables = import ./variable args; sessionVariables = import ./variable args;
}; };
xdg = import ./xdg { inherit (cfg) homeDirectory; }; xdg = import ./xdg { inherit (cfg) homeDirectory; };
programs = import ./program args; programs = with programs; core;
dconf.settings = util.catSet (util.ls ./config/dconf) args; dconf.settings = util.catSet (util.ls ./config/dconf) args;
} }
(mkIf cfg.package.common.enable { home.packages = package.common; }) (mkIf cfg.package.common.enable { home.packages = package.common; })
(mkIf cfg.package.core.enable { home.packages = package.core; }) (mkIf cfg.package.core.enable { home.packages = package.core; })
(mkIf cfg.package.creative.enable { home.packages = package.creative; }) (mkIf cfg.package.creative.enable { home.packages = package.creative; })
(mkIf cfg.package.desktop.enable { home.packages = package.desktop; }) (mkIf cfg.package.desktop.enable {
home = {
packages = package.desktop;
programs = programs.desktop;
};
})
(mkIf cfg.package.dev.enable { home.packages = package.dev; }) (mkIf cfg.package.dev.enable { home.packages = package.dev; })
(mkIf cfg.package.extra.enable { home.packages = package.extra; }) (mkIf cfg.package.extra.enable { home.packages = package.extra; })
(mkIf cfg.package.gaming.enable { home.packages = package.gaming; }) (mkIf cfg.package.gaming.enable { home.packages = package.gaming; })

View file

@ -5,14 +5,16 @@
util, util,
lib, lib,
pkgs, pkgs,
__findFile,
... ...
}@args: }@args:
with lib; with lib;
let let
cfg = config.home.nixos; cfg = config.home.nixos;
programs = import ./program args;
in in
{ {
imports = (util.ls ./user); imports = (util.ls <user>);
options = { options = {
home.nixos = { home.nixos = {
@ -41,7 +43,7 @@ in
extraActivationPath = with pkgs; [ openssh ]; extraActivationPath = with pkgs; [ openssh ];
}; };
xdg = import ./xdg { inherit (user) homeDirectory; }; xdg = import ./xdg { inherit (user) homeDirectory; };
programs = import ./program args; programs = with programs; core // desktop;
dconf.settings = util.catSet (util.ls ./config/dconf) args; dconf.settings = util.catSet (util.ls ./config/dconf) args;
}; };
} }

View file

@ -31,11 +31,12 @@ in
"${inputs.nvimCloseBuffers}" "${inputs.nvimCloseBuffers}"
"${inputs.nvimColorizer}" "${inputs.nvimColorizer}"
"${inputs.nvimDevicons}" "${inputs.nvimDevicons}"
"${inputs.nvimDressing}"
"${inputs.nvimGen}"
"${inputs.nvimGitsigns}" "${inputs.nvimGitsigns}"
"${inputs.nvimGruvboxMaterial}" "${inputs.nvimGruvboxMaterial}"
"${inputs.nvimIndentoMatic}" "${inputs.nvimIndentoMatic}"
"${inputs.nvimLspconfig}" "${inputs.nvimLspconfig}"
"${inputs.nvimOllama}"
"${inputs.nvimPlenary}" "${inputs.nvimPlenary}"
"${inputs.nvimTelescope}" "${inputs.nvimTelescope}"
"${inputs.nvimTodo}" "${inputs.nvimTodo}"
@ -66,8 +67,9 @@ in
./module/plugin/Align.nix ./module/plugin/Align.nix
./module/plugin/Treesitter.nix ./module/plugin/Treesitter.nix
./module/plugin/Fold.nix ./module/plugin/Fold.nix
./module/plugin/Ollama.nix ./module/plugin/Gen.nix
./module/plugin/Colorizer.nix ./module/plugin/Colorizer.nix
./module/plugin/Dressing.nix
./module/plugin/lsp/Go.nix ./module/plugin/lsp/Go.nix
./module/plugin/lsp/Haskell.nix ./module/plugin/lsp/Haskell.nix
./module/plugin/lsp/Lua.nix ./module/plugin/lsp/Lua.nix

View file

@ -22,6 +22,10 @@ let
transparent = { transparent = {
bg = lib.generators.mkLuaInline "clear"; bg = lib.generators.mkLuaInline "clear";
}; };
border = {
bg = lib.generators.mkLuaInline "clear";
fg = "#${color.accent}";
};
in in
{ {
text = '' text = ''
@ -29,15 +33,23 @@ in
group = vim.api.nvim_create_augroup('Color', {}), group = vim.api.nvim_create_augroup('Color', {}),
pattern = "*", pattern = "*",
callback = function () callback = function ()
-- Backgrounds. -- Background.
${mkHighlight "CursorLine" bg} ${mkHighlight "CursorLine" bg}
${mkHighlight "TelescopeSelection" bg} ${mkHighlight "Pmenu" bg}
${mkHighlight "PmenuExtra" bg}
-- Selection. -- Selection.
${mkHighlight "Visual" selection} ${mkHighlight "Visual" selection}
${mkHighlight "PmenuSel" selection}
${mkHighlight "TelescopeSelection" selection}
-- Transparent. -- Transparent.
${mkHighlight "NormalFloat" transparent} ${mkHighlight "NormalFloat" transparent}
-- Border.
${mkHighlight "FloatBorder" border}
${mkHighlight "FloatTitle" border}
${mkHighlight "TelescopeBorder" border}
end end
}) })
''; '';

View file

@ -12,6 +12,8 @@
end end
vim.notify = bequiet vim.notify = bequiet
vim.api.nvim_out_write = bequiet
vim.api.nvim_err_write = bequiet
vim.api.nvim_err_writeln = bequiet vim.api.nvim_err_writeln = bequiet
''; '';
} }

View file

@ -1,7 +1,7 @@
{ ... }: { ... }:
{ {
text = '' text = ''
rekey_normal("<Leader>p", ":<c-u>lua require('ollama').prompt()<cr>") rekey_normal("<Leader>p", ":Gen<cr>")
rekey_visual("<Leader>p", ":<c-u>lua require('ollama').prompt()<cr>") rekey_visual("<Leader>p", ":Gen<cr>")
''; '';
} }

View file

@ -0,0 +1,6 @@
{ ... }:
{
text = ''
require("dressing").setup({ })
'';
}

View file

@ -0,0 +1,8 @@
{ config, ... }:
{
text = ''
require("gen").setup {
model = "${config.setting.ollama.primaryModel}"
}
'';
}

View file

@ -1,18 +0,0 @@
{ config, ... }:
{
text = ''
require("ollama").setup {
model = "${config.setting.ollama.primaryModel}",
url = "http://127.0.0.1:11434",
-- View the actual default prompts in ./lua/ollama/prompts.lua
prompts = {
-- Sample_Prompt = {
-- prompt = "This is a sample prompt that receives $input and $sel(ection), among others.",
-- input_label = "> ",
-- model = "mistral",
-- action = "display",
-- }
}
}
'';
}

View file

@ -5,9 +5,10 @@
defaults = { defaults = {
mappings = { mappings = {
i = { i = {
["<C-?>"] = "which_key", ["<Tab>"] = "move_selection_previous",
} ["<S-Tab>"] = "move_selection_next",
} },
},
}, },
extensions = { }, extensions = { },
pickers = { }, pickers = { },

View file

@ -60,5 +60,11 @@
nix hash to-sri --type sha256 $(nix-prefetch-url "''${url}") nix hash to-sri --type sha256 $(nix-prefetch-url "''${url}")
} }
# Run nix locally with no builders.
# Usage: nix_local <COMMAND>
function nix_local() {
nix --option max-jobs $(_core_count) --builders "" --substituters https://cache.nixos.org ''${@}
}
''; '';
} }

View file

@ -1,8 +1,14 @@
{ secret, ... }@args: {
secret,
lib,
config,
...
}@args:
let let
bash = import ./bash args; bash = import ./bash args;
in in
{ {
core = {
home-manager.enable = true; home-manager.enable = true;
gpg = { gpg = {
@ -15,10 +21,13 @@ in
}; };
}; };
firefox = import ./firefox args;
bash = { bash = {
enable = true; enable = true;
initExtra = bash.bashrc; initExtra = bash.bashrc;
}; };
};
desktop = {
firefox = import ./firefox args;
};
} }

View file

@ -16,12 +16,16 @@ let
searchEngines = [ searchEngines = [
(mkSearchEngine "s" "SearX" "https://search.voronind.com/search?q={searchTerms}") (mkSearchEngine "s" "SearX" "https://search.voronind.com/search?q={searchTerms}")
(mkSearchEngine "ru" "RuTracker" "https://rutracker.org/forum/tracker.php?nm={searchTerms}") (mkSearchEngine "gh" "GitHub" "https://github.com/search?q={searchTerms}")
(mkSearchEngine "re" "Reddit" "https://www.reddit.com/search/?q={searchTerms}") (mkSearchEngine "ghc" "GitHub Code" "https://github.com/search?q={searchTerms}&type=code")
(mkSearchEngine "hm" "Home Manager"
"https://home-manager-options.extranix.com/?query={searchTerms}"
)
(mkSearchEngine "no" "NixOS Options" "https://search.nixos.org/options?query={searchTerms}") (mkSearchEngine "no" "NixOS Options" "https://search.nixos.org/options?query={searchTerms}")
(mkSearchEngine "np" "NixOS Packages" "https://search.nixos.org/packages?query={searchTerms}") (mkSearchEngine "np" "NixOS Packages" "https://search.nixos.org/packages?query={searchTerms}")
(mkSearchEngine "re" "Reddit" "https://www.reddit.com/search/?q={searchTerms}")
(mkSearchEngine "ru" "RuTracker" "https://rutracker.org/forum/tracker.php?nm={searchTerms}")
(mkSearchEngine "so" "Stack Overflow" "https://stackoverflow.com/search?tab=votes&q={searchTerms}") (mkSearchEngine "so" "Stack Overflow" "https://stackoverflow.com/search?tab=votes&q={searchTerms}")
(mkSearchEngine "hm" "Home Manager" "https://home-manager-options.extranix.com/?query={searchTerms}")
]; ];
extensions = { extensions = {

View file

@ -0,0 +1,9 @@
{ ... }:
{
home.hm = {
homeDirectory = "/root";
package = {
core.enable = true;
};
};
}

View file

@ -0,0 +1,9 @@
{ ... }:
{
home.hm = {
homeDirectory = "/home/voronind";
package = {
core.enable = true;
};
};
}