mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 02:28:37 +02:00
Updated flake and wrote a module for micro
This commit is contained in:
Generated
+17
@@ -67,6 +67,22 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"microPlugins-vivify": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1770382657,
|
||||
"narHash": "sha256-yWmIgT90mC9PhzyH/itDbRMmRTiZiwW+Yo0dsHW7ni8=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "3c5cb25facf3fc4143bfea9323a60eda65ef8485",
|
||||
"revCount": 8,
|
||||
"type": "git",
|
||||
"url": "https://codeberg.org/gibbert/micro-vivify"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://codeberg.org/gibbert/micro-vivify"
|
||||
}
|
||||
},
|
||||
"nixos-grub-themes": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
@@ -158,6 +174,7 @@
|
||||
"inputs": {
|
||||
"caelestia-shell": "caelestia-shell",
|
||||
"home-manager": "home-manager",
|
||||
"microPlugins-vivify": "microPlugins-vivify",
|
||||
"nixos-grub-themes": "nixos-grub-themes",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
url = "github:caelestia-dots/shell";
|
||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
};
|
||||
microPlugins-vivify = {
|
||||
url = "git+https://codeberg.org/gibbert/micro-vivify";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
# never got nixvim to wokrs. ):
|
||||
# nixvim = {
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
../../modules/home-manager/thunderbird.nix # email client
|
||||
../../modules/home-manager/eza.nix # ls replacement
|
||||
../../modules/home-manager/vivify.nix # neovim markdown viewer (has also config for qutebrowser
|
||||
#../../modules/home-manager/micro.nix # micro text editor. Not main editor (used for testing for notewrapper)
|
||||
|
||||
../../modules/other/desktopEntries.nix # creates .desktop files
|
||||
];
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
programs.micro = {
|
||||
enable = true;
|
||||
package = pkgs-unstable.micro-full;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
home.file.".config/micro/plug/vivify" = {
|
||||
enable = true;
|
||||
source = inputs.microPlugins-vivify;
|
||||
recursive = true;
|
||||
force = true;
|
||||
};
|
||||
home.file.".config/micro/init.lua" = {
|
||||
enable = true;
|
||||
force = true;
|
||||
text = ''
|
||||
local buffer = import("micro/buffer")
|
||||
local shell = import("micro/shell")
|
||||
|
||||
function vivifyOpen(buf)
|
||||
local cursor = buf:GetActiveCursor()
|
||||
local line = cursor.Loc.Y + 1
|
||||
|
||||
shell.ExecCommand("viv", string.format("%s:%d", buf.AbsPath, line))
|
||||
end
|
||||
|
||||
function onBufferOpen(buf)
|
||||
if os.getenv("MICRO_VIVIFY") ~= "1" then
|
||||
return
|
||||
end
|
||||
|
||||
-- only run for real files (not help/log/etc)
|
||||
if buf.Type.Kind == buffer.BTDefault then
|
||||
vivifyOpen(buf)
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user