mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-11 02:56:27 +00:00
feat: cubyz
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
overlays = [
|
||||
niri.overlays.niri
|
||||
(final: prev: {
|
||||
cubyz-bin = prev.callPackage ./overlays/cubyz-bin { };
|
||||
matugen = matugen.packages.${prev.system}.default;
|
||||
gccdiag = prev.callPackage ./overlays/gccdiag { };
|
||||
gbmonctl = prev.callPackage ./overlays/gbmonctl { };
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
hlsearch = false;
|
||||
incsearch = true;
|
||||
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
|
||||
updatetime = 50;
|
||||
|
||||
fillchars.eob = " ";
|
||||
@@ -82,16 +85,117 @@
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
keymaps = [
|
||||
{
|
||||
key = "s";
|
||||
mode = [
|
||||
"n"
|
||||
"x"
|
||||
"o"
|
||||
];
|
||||
action.__raw = "function() require('flash').jump() end";
|
||||
options.desc = "Flash";
|
||||
}
|
||||
{
|
||||
key = "S";
|
||||
mode = [
|
||||
"n"
|
||||
"x"
|
||||
"o"
|
||||
];
|
||||
action.__raw = "function() require('flash').treesitter() end";
|
||||
options.desc = "Flash Treesitter";
|
||||
}
|
||||
{
|
||||
key = "r";
|
||||
mode = "o";
|
||||
action.__raw = "function() require('flash').remote() end";
|
||||
options.desc = "Remote Flash";
|
||||
}
|
||||
{
|
||||
key = "R";
|
||||
mode = [
|
||||
"o"
|
||||
"x"
|
||||
];
|
||||
action.__raw = "function() require('flash').treesitter_search() end";
|
||||
options.desc = "Treesitter Search";
|
||||
}
|
||||
{
|
||||
key = "<c-s>";
|
||||
mode = [
|
||||
"c"
|
||||
];
|
||||
action.__raw = "function() require('flash').toggle() end";
|
||||
options.desc = "Toggle Flash Search";
|
||||
}
|
||||
];
|
||||
vim.keymap.set({'n', 'x', 'o'}, 's', '<Plug>(leap)')
|
||||
vim.keymap.set('n', 'S', '<Plug>(leap-from-window)')
|
||||
*/
|
||||
keymaps = [
|
||||
{
|
||||
key = "s";
|
||||
mode = [
|
||||
"n"
|
||||
"x"
|
||||
"o"
|
||||
];
|
||||
action.__raw = ''
|
||||
function()
|
||||
require('leap').leap({
|
||||
windows = { vim.api.nvim_get_current_win() },
|
||||
inclusive = true
|
||||
})
|
||||
end
|
||||
'';
|
||||
options.desc = "Leap";
|
||||
}
|
||||
{
|
||||
key = "R";
|
||||
mode = [
|
||||
"x"
|
||||
"o"
|
||||
];
|
||||
action.__raw = ''
|
||||
function ()
|
||||
require('leap.treesitter').select {
|
||||
-- To increase/decrease the selection in a clever-f-like manner,
|
||||
-- with the trigger key itself (vRRRRrr...). The default keys
|
||||
-- (<enter>/<backspace>) also work, so feel free to skip this.
|
||||
opts = require('leap.user').with_traversal_keys('R', 'r')
|
||||
}
|
||||
end
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
plugins = {
|
||||
which-key.enable = true;
|
||||
schemastore.enable = true;
|
||||
todo-comments.enable = true;
|
||||
origami.enable = false;
|
||||
nvim-surround.enable = true;
|
||||
flash = {
|
||||
fidget.enable = true;
|
||||
leap = {
|
||||
enable = true;
|
||||
settings.modes.search.enabled = true;
|
||||
};
|
||||
/*
|
||||
flash = {
|
||||
enable = true;
|
||||
settings = {
|
||||
label = {
|
||||
exclude = "jJxXqQ";
|
||||
rainbow.enabled = true;
|
||||
};
|
||||
search = {
|
||||
mode = "exact";
|
||||
trigger = ";";
|
||||
};
|
||||
};
|
||||
};
|
||||
*/
|
||||
treesitter-context = {
|
||||
enable = false; # TODO: looks weird with Neovide
|
||||
settings.line_numbers = false;
|
||||
|
||||
@@ -72,7 +72,12 @@ hi! TabLineFill guibg={{colors.primary.default.hex}} guifg={{colors.on_primary.d
|
||||
|
||||
hi! SpecialKey guifg={{colors.primary.default.hex}}
|
||||
hi! Directory guifg={{colors.primary.default.hex}}
|
||||
hi! Search guifg={{colors.on_tertiary.default.hex}} guibg={{colors.tertiary.default.hex}}
|
||||
|
||||
hi! Search guifg={{colors.on_primary.default.hex}} guibg={{colors.primary.default.hex}}
|
||||
hi! link IncSearch Search
|
||||
hi! link CurSearch Search
|
||||
hi! link LeapMatch Search
|
||||
hi! link LeapLabel Search
|
||||
|
||||
hi! CmpItemKindCopilot guifg={{colors.cyan.default.hex}}
|
||||
hi! CmpItemKindNpm guifg={{colors.red.default.hex}}
|
||||
|
||||
@@ -28,15 +28,18 @@ in
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
steam
|
||||
cubyz-bin
|
||||
oversteer
|
||||
obs-studio
|
||||
/*(lutris.override {
|
||||
extraLibraries =
|
||||
pkgs: with pkgs; [
|
||||
libgudev
|
||||
libvdpau
|
||||
];
|
||||
})*/
|
||||
/*
|
||||
(lutris.override {
|
||||
extraLibraries =
|
||||
pkgs: with pkgs; [
|
||||
libgudev
|
||||
libvdpau
|
||||
];
|
||||
})
|
||||
*/
|
||||
rpcs3
|
||||
bottles
|
||||
wineWow64Packages.stagingFull
|
||||
|
||||
56
overlays/cubyz-bin/default.nix
Normal file
56
overlays/cubyz-bin/default.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
autoPatchelfHook,
|
||||
makeWrapper,
|
||||
libx11,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cubyz-bin";
|
||||
version = "0.0.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/PixelGuys/Cubyz/releases/download/${version}/Linux-x86_64.tar.gz";
|
||||
hash = "sha256-Rmh17XpO/CtLDobc8Jb4ojhtM7fUN+ungbVzQlIvE7U=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
buildInputs = [ libx11 ];
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/opt
|
||||
cp -R Cubyz $out/opt/Cubyz
|
||||
makeWrapper $out/opt/Cubyz/Cubyz $out/bin/cubyz --run "cd $out/opt/Cubyz"
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
preFixup =
|
||||
let
|
||||
libPath = lib.makeLibraryPath [
|
||||
libx11
|
||||
];
|
||||
in
|
||||
''
|
||||
patchelf \
|
||||
--set-rpath "${libPath}" \
|
||||
$out/opt/Cubyz/Cubyz
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Voxel sandbox game with a large render distance, procedurally generated content and some cool graphical effects.";
|
||||
homepage = "https://github.com/PixelGuys/Cubyz";
|
||||
maintainers = with maintainers; [ theaninova ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user