mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-12 03:26:17 +00:00
feat: cubyz
This commit is contained in:
@@ -47,6 +47,7 @@
|
|||||||
overlays = [
|
overlays = [
|
||||||
niri.overlays.niri
|
niri.overlays.niri
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
|
cubyz-bin = prev.callPackage ./overlays/cubyz-bin { };
|
||||||
matugen = matugen.packages.${prev.system}.default;
|
matugen = matugen.packages.${prev.system}.default;
|
||||||
gccdiag = prev.callPackage ./overlays/gccdiag { };
|
gccdiag = prev.callPackage ./overlays/gccdiag { };
|
||||||
gbmonctl = prev.callPackage ./overlays/gbmonctl { };
|
gbmonctl = prev.callPackage ./overlays/gbmonctl { };
|
||||||
|
|||||||
@@ -21,6 +21,9 @@
|
|||||||
hlsearch = false;
|
hlsearch = false;
|
||||||
incsearch = true;
|
incsearch = true;
|
||||||
|
|
||||||
|
ignorecase = true;
|
||||||
|
smartcase = true;
|
||||||
|
|
||||||
updatetime = 50;
|
updatetime = 50;
|
||||||
|
|
||||||
fillchars.eob = " ";
|
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 = {
|
plugins = {
|
||||||
which-key.enable = true;
|
which-key.enable = true;
|
||||||
schemastore.enable = true;
|
schemastore.enable = true;
|
||||||
todo-comments.enable = true;
|
todo-comments.enable = true;
|
||||||
origami.enable = false;
|
origami.enable = false;
|
||||||
nvim-surround.enable = true;
|
nvim-surround.enable = true;
|
||||||
flash = {
|
fidget.enable = true;
|
||||||
|
leap = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.modes.search.enabled = true;
|
|
||||||
};
|
};
|
||||||
|
/*
|
||||||
|
flash = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
label = {
|
||||||
|
exclude = "jJxXqQ";
|
||||||
|
rainbow.enabled = true;
|
||||||
|
};
|
||||||
|
search = {
|
||||||
|
mode = "exact";
|
||||||
|
trigger = ";";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
*/
|
||||||
treesitter-context = {
|
treesitter-context = {
|
||||||
enable = false; # TODO: looks weird with Neovide
|
enable = false; # TODO: looks weird with Neovide
|
||||||
settings.line_numbers = false;
|
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! SpecialKey guifg={{colors.primary.default.hex}}
|
||||||
hi! Directory 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! CmpItemKindCopilot guifg={{colors.cyan.default.hex}}
|
||||||
hi! CmpItemKindNpm guifg={{colors.red.default.hex}}
|
hi! CmpItemKindNpm guifg={{colors.red.default.hex}}
|
||||||
|
|||||||
@@ -28,15 +28,18 @@ in
|
|||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
steam
|
steam
|
||||||
|
cubyz-bin
|
||||||
oversteer
|
oversteer
|
||||||
obs-studio
|
obs-studio
|
||||||
/*(lutris.override {
|
/*
|
||||||
extraLibraries =
|
(lutris.override {
|
||||||
pkgs: with pkgs; [
|
extraLibraries =
|
||||||
libgudev
|
pkgs: with pkgs; [
|
||||||
libvdpau
|
libgudev
|
||||||
];
|
libvdpau
|
||||||
})*/
|
];
|
||||||
|
})
|
||||||
|
*/
|
||||||
rpcs3
|
rpcs3
|
||||||
bottles
|
bottles
|
||||||
wineWow64Packages.stagingFull
|
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