Compare commits

..

No commits in common. "a4b2bfd667c72faf08d25206f9b2ab6944ff5894" and "0781453676c6a5d89edd21af6b629a87724566b3" have entirely different histories.

22 changed files with 91 additions and 165 deletions

View file

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

View file

@ -561,38 +561,6 @@
"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": {
"flake": false,
"locked": {
@ -657,6 +625,22 @@
"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": {
"flake": false,
"locked": {
@ -791,12 +775,11 @@
"nvimCloseBuffers": "nvimCloseBuffers",
"nvimColorizer": "nvimColorizer",
"nvimDevicons": "nvimDevicons",
"nvimDressing": "nvimDressing",
"nvimGen": "nvimGen",
"nvimGitsigns": "nvimGitsigns",
"nvimGruvboxMaterial": "nvimGruvboxMaterial",
"nvimIndentoMatic": "nvimIndentoMatic",
"nvimLspconfig": "nvimLspconfig",
"nvimOllama": "nvimOllama",
"nvimPlenary": "nvimPlenary",
"nvimTelescope": "nvimTelescope",
"nvimTodo": "nvimTodo",

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -0,0 +1,18 @@
{ 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,10 +5,9 @@
defaults = {
mappings = {
i = {
["<Tab>"] = "move_selection_previous",
["<S-Tab>"] = "move_selection_next",
},
},
["<C-?>"] = "which_key",
}
}
},
extensions = { },
pickers = { },

View file

@ -60,11 +60,5 @@
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,14 +1,8 @@
{
secret,
lib,
config,
...
}@args:
{ secret, ... }@args:
let
bash = import ./bash args;
in
{
core = {
home-manager.enable = true;
gpg = {
@ -21,13 +15,10 @@ in
};
};
firefox = import ./firefox args;
bash = {
enable = true;
initExtra = bash.bashrc;
};
};
desktop = {
firefox = import ./firefox args;
};
}

View file

@ -16,16 +16,12 @@ let
searchEngines = [
(mkSearchEngine "s" "SearX" "https://search.voronind.com/search?q={searchTerms}")
(mkSearchEngine "gh" "GitHub" "https://github.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 "ru" "RuTracker" "https://rutracker.org/forum/tracker.php?nm={searchTerms}")
(mkSearchEngine "re" "Reddit" "https://www.reddit.com/search/?q={searchTerms}")
(mkSearchEngine "no" "NixOS Options" "https://search.nixos.org/options?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 "hm" "Home Manager" "https://home-manager-options.extranix.com/?query={searchTerms}")
];
extensions = {

View file

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

View file

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