Nix #3
20 changed files with 798 additions and 813 deletions
|
|
@ -32,16 +32,18 @@
|
||||||
cantarell-fonts
|
cantarell-fonts
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.variables = {
|
|
||||||
NIX_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (config.systemd.packages ++ config.environment.systemPackages);
|
|
||||||
PKG_CONFIG_PATH = pkgs.lib.makeLibraryPath (config.systemd.packages ++ config.environment.systemPackages);
|
|
||||||
};
|
|
||||||
nix.settings.experimental-features = "nix-command flakes";
|
nix.settings.experimental-features = "nix-command flakes";
|
||||||
programs.fish.enable = true;
|
programs.fish.enable = true;
|
||||||
programs.fish.promptInit = ''
|
programs.fish.promptInit = ''
|
||||||
${pkgs.any-nix-shell}/bin/any-nix-shell fish --info-right | source
|
${pkgs.any-nix-shell}/bin/any-nix-shell fish --info-right | source
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
programs.nix-ld.enable = true;
|
||||||
|
programs.nix-ld.libraries = with pkgs; [
|
||||||
|
jdk
|
||||||
|
zlib
|
||||||
|
];
|
||||||
|
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
services.upower.enable = true;
|
services.upower.enable = true;
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
|
|
@ -72,4 +74,8 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
programs.ssh.startAgent = true;
|
programs.ssh.startAgent = true;
|
||||||
|
|
||||||
|
virtualisation.virtualbox.host.enable = true;
|
||||||
|
users.extraGroups.vboxusers.members = [ "dashie" ];
|
||||||
|
virtualisation.virtualbox.guest.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
68
nix/flake.lock
generated
68
nix/flake.lock
generated
|
|
@ -107,6 +107,24 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-utils_2": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_3"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1705309234,
|
||||||
|
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
|
@ -345,6 +363,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1706487304,
|
||||||
|
"narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "90f456026d284c22b3e3497be980b2e47d0b28ac",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"Hyprspace": "Hyprspace",
|
"Hyprspace": "Hyprspace",
|
||||||
|
|
@ -353,7 +387,8 @@
|
||||||
"hyprland": "hyprland",
|
"hyprland": "hyprland",
|
||||||
"ironbar": "ironbar",
|
"ironbar": "ironbar",
|
||||||
"nix-flatpak": "nix-flatpak",
|
"nix-flatpak": "nix-flatpak",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"rust-overlay": "rust-overlay_2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
|
|
@ -378,6 +413,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"rust-overlay_2": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils_2",
|
||||||
|
"nixpkgs": "nixpkgs_3"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1713579131,
|
||||||
|
"narHash": "sha256-j/lrqFNzm7SdlBlKX43kA2Wp0OaGVOUjQGnER9//4Ao=",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1689347949,
|
"lastModified": 1689347949,
|
||||||
|
|
@ -408,6 +459,21 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"wlroots": {
|
"wlroots": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,9 @@
|
||||||
url = "github:JakeStanger/ironbar";
|
url = "github:JakeStanger/ironbar";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
rust-overlay = {
|
||||||
|
url = "https://github.com/oxalica/rust-overlay/archive/master.tar.gz";
|
||||||
|
};
|
||||||
|
|
||||||
anyrun.url = "github:Kirottu/anyrun";
|
anyrun.url = "github:Kirottu/anyrun";
|
||||||
anyrun.inputs.nixpkgs.follows = "nixpkgs";
|
anyrun.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
@ -35,10 +38,9 @@
|
||||||
};
|
};
|
||||||
overlays = [
|
overlays = [
|
||||||
# because allowing rust nightly is too hard by default....
|
# because allowing rust nightly is too hard by default....
|
||||||
(import (fetchTarball {
|
(import
|
||||||
url = "https://github.com/oxalica/rust-overlay/archive/master.tar.gz";
|
inputs.rust-overlay
|
||||||
sha256 = "sha256:1aaza47rqi74ypi77ksz396q9l7rrxfrdnhi2pfjb0yqmz7l69wl";
|
)
|
||||||
}))
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
base_imports = [
|
base_imports = [
|
||||||
|
|
|
||||||
|
|
@ -5,4 +5,8 @@
|
||||||
"amdgpu.ppfeaturemask=0xffffffff"
|
"amdgpu.ppfeaturemask=0xffffffff"
|
||||||
];
|
];
|
||||||
networking.hostName = "spaceship";
|
networking.hostName = "spaceship";
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
linuxKernel.packages.linux_zen.virtualbox
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
92
nix/override/cambalache.nix
Normal file
92
nix/override/cambalache.nix
Normal file
|
|
@ -0,0 +1,92 @@
|
||||||
|
{ stdenv
|
||||||
|
, lib
|
||||||
|
, pkgs
|
||||||
|
, fetchFromGitLab
|
||||||
|
, nix-update-script
|
||||||
|
}:
|
||||||
|
|
||||||
|
pkgs.python3.pkgs.buildPythonApplication rec {
|
||||||
|
pname = "cambalache";
|
||||||
|
version = "0.90.1";
|
||||||
|
|
||||||
|
format = "other";
|
||||||
|
|
||||||
|
# Did not fetch submodule since it is only for tests we don't run.
|
||||||
|
src = fetchFromGitLab {
|
||||||
|
domain = "gitlab.gnome.org";
|
||||||
|
owner = "jpu";
|
||||||
|
repo = pname;
|
||||||
|
rev = version;
|
||||||
|
sha256 = "sha256-YuRxqrGJvhMMZApD/tQSWkUg/nZnp/xryBJSjXCXO4w=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
meson
|
||||||
|
ninja
|
||||||
|
pkg-config
|
||||||
|
gobject-introspection # for setup hook
|
||||||
|
desktop-file-utils # for update-desktop-database
|
||||||
|
shared-mime-info # for update-mime-database
|
||||||
|
wrapGAppsHook
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonPath = with pkgs.python3.pkgs; [
|
||||||
|
pygobject3
|
||||||
|
lxml
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
glib
|
||||||
|
gtk3
|
||||||
|
gtk4
|
||||||
|
gtksourceview4
|
||||||
|
gtksourceview5
|
||||||
|
webkitgtk_4_1
|
||||||
|
webkitgtk_6_0
|
||||||
|
# For extra widgets support.
|
||||||
|
libadwaita
|
||||||
|
libhandy
|
||||||
|
];
|
||||||
|
|
||||||
|
# Prevent double wrapping.
|
||||||
|
dontWrapGApps = true;
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
patchShebangs postinstall.py
|
||||||
|
# those programs are used at runtime not build time
|
||||||
|
# https://gitlab.gnome.org/jpu/cambalache/-/blob/0.12.1/meson.build#L79-80
|
||||||
|
substituteInPlace ./meson.build \
|
||||||
|
--replace "find_program('broadwayd', required: true)" "" \
|
||||||
|
--replace "find_program('gtk4-broadwayd', required: true)" ""
|
||||||
|
'';
|
||||||
|
|
||||||
|
preFixup = ''
|
||||||
|
# Let python wrapper use GNOME flags.
|
||||||
|
makeWrapperArgs+=(
|
||||||
|
# For broadway daemons
|
||||||
|
--prefix PATH : "${lib.makeBinPath [ pkgs.gtk3 pkgs.gtk4 ]}"
|
||||||
|
"''${gappsWrapperArgs[@]}"
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
# Wrap a helper script in an unusual location.
|
||||||
|
wrapPythonProgramsIn "$out/${pkgs.python3.sitePackages}/cambalache/priv/merengue" "$out $pythonPath"
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
updateScript = nix-update-script { };
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "https://gitlab.gnome.org/jpu/cambalache";
|
||||||
|
description = "RAD tool for GTK 4 and 3 with data model first philosophy";
|
||||||
|
mainProgram = "cambalache";
|
||||||
|
maintainers = teams.gnome.members;
|
||||||
|
license = with licenses; [
|
||||||
|
lgpl21Only # Cambalache
|
||||||
|
gpl2Only # tools
|
||||||
|
];
|
||||||
|
platforms = platforms.unix;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -32,7 +32,6 @@ rustPlatform.buildRustPackage rec {
|
||||||
libadwaita
|
libadwaita
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
install -D --mode=444 $src/${pname}.desktop $out/share/applications/${pname}.desktop
|
install -D --mode=444 $src/${pname}.desktop $out/share/applications/${pname}.desktop
|
||||||
install -D --mode=444 $src/${pname}.svg $out/share/pixmaps/${pname}.svg
|
install -D --mode=444 $src/${pname}.svg $out/share/pixmaps/${pname}.svg
|
||||||
|
|
|
||||||
53
nix/override/reset.nix
Normal file
53
nix/override/reset.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
{ pkgs
|
||||||
|
, lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
toolchain = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.minimal);
|
||||||
|
rustPlatform = pkgs.makeRustPlatform {
|
||||||
|
cargo = toolchain;
|
||||||
|
rustc = toolchain;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
rustPlatform.buildRustPackage rec {
|
||||||
|
pname = "reset";
|
||||||
|
version = "1.1.1";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "Xetibo";
|
||||||
|
repo = "ReSet";
|
||||||
|
rev = "${version}";
|
||||||
|
hash = "sha256-nyEGhD4IlsJ1AqRZC7aP2vOuq4etvZ7BwTMxb4u7cxY=";
|
||||||
|
};
|
||||||
|
|
||||||
|
cargoHash = "sha256-lcNu8yEQiSTshXCwblBLYpSJWmErS53z+SviqaqlSnI=";
|
||||||
|
|
||||||
|
nativeBuildInputs = with pkgs;[
|
||||||
|
pkg-config
|
||||||
|
glib
|
||||||
|
wrapGAppsHook4
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = with pkgs;[
|
||||||
|
gtk4
|
||||||
|
libadwaita
|
||||||
|
pulseaudio
|
||||||
|
dbus
|
||||||
|
gdk-pixbuf
|
||||||
|
gnome.adwaita-icon-theme
|
||||||
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
install -D --mode=444 $src/${pname}.desktop $out/share/applications/${pname}.desktop
|
||||||
|
install -D --mode=444 $src/src/resources/icons/ReSet.svg $out/share/pixmaps/ReSet.svg
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "";
|
||||||
|
homepage = "https://github.com/Xetibo/ReSet";
|
||||||
|
changelog = "https://github.com/Xetibo/ReSet/releases/tag/${version}";
|
||||||
|
license = licenses.gpl3;
|
||||||
|
maintainers = with maintainers; [ DashieTM ];
|
||||||
|
mainProgram = "reset";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -17,13 +17,21 @@
|
||||||
deno
|
deno
|
||||||
python3
|
python3
|
||||||
typst
|
typst
|
||||||
|
typst-lsp
|
||||||
|
typstfmt
|
||||||
neovide
|
neovide
|
||||||
tree-sitter
|
tree-sitter
|
||||||
dotnet-runtime_8
|
dotnet-sdk
|
||||||
unzip
|
unzip
|
||||||
pkg-config
|
pkg-config
|
||||||
sqlite
|
sqlite
|
||||||
plantuml
|
plantuml
|
||||||
vscodium
|
vscodium
|
||||||
|
gradle
|
||||||
|
maven
|
||||||
|
jdt-language-server
|
||||||
|
adoptopenjdk-jre-bin
|
||||||
|
#vscode-extensions.vscjava.vscode-java-test
|
||||||
|
#vscode-extensions.vscjava.vscode-java-debug
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ in
|
||||||
playerctl
|
playerctl
|
||||||
ncspot
|
ncspot
|
||||||
poppler_utils
|
poppler_utils
|
||||||
|
neofetch
|
||||||
(callPackage
|
(callPackage
|
||||||
../override/oxinoti.nix
|
../override/oxinoti.nix
|
||||||
{ })
|
{ })
|
||||||
|
|
@ -65,6 +66,12 @@ in
|
||||||
(callPackage
|
(callPackage
|
||||||
../override/streamdeck.nix
|
../override/streamdeck.nix
|
||||||
{ })
|
{ })
|
||||||
|
(callPackage
|
||||||
|
../override/reset.nix
|
||||||
|
{ })
|
||||||
|
(callPackage
|
||||||
|
../override/cambalache.nix
|
||||||
|
{ })
|
||||||
];
|
];
|
||||||
|
|
||||||
home.username = "dashie";
|
home.username = "dashie";
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
wine
|
wine
|
||||||
];
|
];
|
||||||
|
|
||||||
|
hardware.xone.enable = true;
|
||||||
programs.steam.enable = true;
|
programs.steam.enable = true;
|
||||||
programs.gamemode.enable = true;
|
programs.gamemode.enable = true;
|
||||||
programs.gamemode = {
|
programs.gamemode = {
|
||||||
|
|
|
||||||
|
|
@ -60,12 +60,16 @@
|
||||||
nvim-lspconfig
|
nvim-lspconfig
|
||||||
nvim-notify
|
nvim-notify
|
||||||
nvim-spectre
|
nvim-spectre
|
||||||
nvim-treesitter
|
nvim-treesitter.withAllGrammars
|
||||||
nvim-treesitter-context
|
nvim-treesitter-context
|
||||||
nvim-treesitter-textobjects
|
nvim-treesitter-textobjects
|
||||||
nvim-ts-autotag
|
nvim-ts-autotag
|
||||||
nvim-ts-context-commentstring
|
nvim-ts-context-commentstring
|
||||||
nvim-web-devicons
|
nvim-web-devicons
|
||||||
|
nvim-jdtls
|
||||||
|
neotest
|
||||||
|
neotest-java
|
||||||
|
neotest-rust
|
||||||
persistence-nvim
|
persistence-nvim
|
||||||
plenary-nvim
|
plenary-nvim
|
||||||
telescope-fzf-native-nvim
|
telescope-fzf-native-nvim
|
||||||
|
|
@ -97,6 +101,18 @@
|
||||||
defaults = {
|
defaults = {
|
||||||
lazy = true,
|
lazy = true,
|
||||||
},
|
},
|
||||||
|
performance = {
|
||||||
|
rtp = {
|
||||||
|
disabled_plugins = {
|
||||||
|
"gzip",
|
||||||
|
"netrw",
|
||||||
|
"tarPlugin",
|
||||||
|
"tohtml",
|
||||||
|
"tutor",
|
||||||
|
"zipPlugin",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
dev = {
|
dev = {
|
||||||
-- reuse files from pkgs.vimPlugins.*
|
-- reuse files from pkgs.vimPlugins.*
|
||||||
path = "${lazyPath}",
|
path = "${lazyPath}",
|
||||||
|
|
@ -107,8 +123,6 @@
|
||||||
spec = {
|
spec = {
|
||||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
{ import = "lazyvim.plugins.extras.ui.alpha" },
|
{ import = "lazyvim.plugins.extras.ui.alpha" },
|
||||||
{ import = "plugins" },
|
|
||||||
{ import = "plugins.plugins" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.rust" },
|
{ import = "lazyvim.plugins.extras.lang.rust" },
|
||||||
{ import = "lazyvim.plugins.extras.lang.tailwind" },
|
{ import = "lazyvim.plugins.extras.lang.tailwind" },
|
||||||
{ import = "lazyvim.plugins.extras.lang.java" },
|
{ import = "lazyvim.plugins.extras.lang.java" },
|
||||||
|
|
@ -127,27 +141,15 @@
|
||||||
{ "nvim-telescope/telescope-fzf-native.nvim", enabled = true },
|
{ "nvim-telescope/telescope-fzf-native.nvim", enabled = true },
|
||||||
-- disable mason.nvim, use programs.neovim.extraPackages
|
-- disable mason.nvim, use programs.neovim.extraPackages
|
||||||
{ "williamboman/mason-lspconfig.nvim", enabled = false },
|
{ "williamboman/mason-lspconfig.nvim", enabled = false },
|
||||||
{ "williamboman/mason.nvim", enabled = false },
|
--{ "williamboman/mason.nvim", enabled = false },
|
||||||
-- import/override with your plugins
|
|
||||||
{ import = "plugins" },
|
|
||||||
-- treesitter handled by xdg.configFile."nvim/parser", put this line at the end of spec to clear ensure_installed
|
-- treesitter handled by xdg.configFile."nvim/parser", put this line at the end of spec to clear ensure_installed
|
||||||
{ "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = {} } },
|
{ "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = {} } },
|
||||||
|
{ import = "plugins" },
|
||||||
|
{ import = "plugins.plugins" },
|
||||||
},
|
},
|
||||||
install = { colorscheme = { "tokyonight" } },
|
install = { colorscheme = { "tokyonight" } },
|
||||||
checker = { enabled = true, notify = false },
|
checker = { enabled = true, notify = false },
|
||||||
change_detection = { enabled = true, notify = false },
|
change_detection = { enabled = true, notify = false },
|
||||||
performance = {
|
|
||||||
rtp = {
|
|
||||||
disabled_plugins = {
|
|
||||||
"gzip",
|
|
||||||
"netrw",
|
|
||||||
"tarPlugin",
|
|
||||||
"tohtml",
|
|
||||||
"tutor",
|
|
||||||
"zipPlugin",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
@ -157,14 +159,12 @@
|
||||||
let
|
let
|
||||||
parsers = pkgs.symlinkJoin {
|
parsers = pkgs.symlinkJoin {
|
||||||
name = "treesitter-parsers";
|
name = "treesitter-parsers";
|
||||||
paths = (pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins: with plugins; [
|
paths = (pkgs.vimPlugins.nvim-treesitter.withAllGrammars).dependencies;
|
||||||
c
|
|
||||||
lua
|
|
||||||
])).dependencies;
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
"${parsers}/parser";
|
"${parsers}/parser";
|
||||||
|
|
||||||
# Normal LazyVim config here, see https://github.com/LazyVim/starter/tree/main/lua
|
# Normal LazyVim config here, see https://github.com/LazyVim/starter/tree/main/lua
|
||||||
xdg.configFile."nvim/lua".source = ./lua;
|
xdg.configFile."nvim/lua".source = ./lua;
|
||||||
|
xdg.configFile."nvim/ftplugin".source = ./ftplugin;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
5
nix/programs/nvim/ftplugin/java.lua
Normal file
5
nix/programs/nvim/ftplugin/java.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
local config = {
|
||||||
|
cmd = { "jdtls" },
|
||||||
|
root_dir = vim.fs.dirname(vim.fs.find({ "gradlew", ".git", "mvnw" }, { upward = true })[1]),
|
||||||
|
}
|
||||||
|
require("jdtls").start_or_attach(config)
|
||||||
16
nix/programs/nvim/lua/config/autocmds.lua
Normal file
16
nix/programs/nvim/lua/config/autocmds.lua
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
-- nvimtree
|
||||||
|
local function open_nvim_tree(data)
|
||||||
|
local directory = vim.fn.isdirectory(data.file) == 1
|
||||||
|
|
||||||
|
if not directory then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
print("FUCK")
|
||||||
|
-- change to the directory
|
||||||
|
vim.cmd.cd(data.file)
|
||||||
|
|
||||||
|
-- open the tree
|
||||||
|
require("nvim-tree.api").tree.open()
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
|
||||||
|
|
@ -199,3 +199,4 @@ function Live_grep_from_project_git_root()
|
||||||
local opts = Get_git_root()
|
local opts = Get_git_root()
|
||||||
require("telescope.builtin").live_grep(opts)
|
require("telescope.builtin").live_grep(opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,12 +13,20 @@ local options = {
|
||||||
scrolljump = 5,
|
scrolljump = 5,
|
||||||
wrap = false,
|
wrap = false,
|
||||||
}
|
}
|
||||||
|
vim.filetype.add({
|
||||||
|
extension = {
|
||||||
|
typst = "typst",
|
||||||
|
typ = "typst",
|
||||||
|
},
|
||||||
|
})
|
||||||
vim.o.guifont = "JetBrainsMono Nerd Font:h14"
|
vim.o.guifont = "JetBrainsMono Nerd Font:h14"
|
||||||
vim.g.neovide_refresh_rate_idle = 180
|
vim.g.neovide_refresh_rate_idle = 180
|
||||||
vim.g.neovide_refresh_rate_idle = 5
|
vim.g.neovide_refresh_rate_idle = 5
|
||||||
vim.g.neovide_hide_mouse_when_typing = true
|
vim.g.neovide_hide_mouse_when_typing = true
|
||||||
vim.g.mkdp_browser = "/usr/bin/firefox"
|
vim.g.mkdp_browser = "/usr/bin/firefox"
|
||||||
vim.g.mkdp_auto_start = 1
|
vim.g.mkdp_auto_start = 1
|
||||||
|
vim.g.loaded_netrw = 1
|
||||||
|
vim.g.loaded_netrwPlugin = 1
|
||||||
vim.g.autoformat = false
|
vim.g.autoformat = false
|
||||||
for k, v in pairs(options) do
|
for k, v in pairs(options) do
|
||||||
vim.opt[k] = v
|
vim.opt[k] = v
|
||||||
|
|
|
||||||
|
|
@ -1,302 +0,0 @@
|
||||||
local Util = require("lazyvim.util")
|
|
||||||
|
|
||||||
return {
|
|
||||||
{
|
|
||||||
"LazyVim/LazyVim",
|
|
||||||
opts = {
|
|
||||||
colorscheme = "tokyonight-night",
|
|
||||||
-- colorscheme = "catppuccin-mocha",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
cmd = "Telescope",
|
|
||||||
keys = function()
|
|
||||||
return {}
|
|
||||||
end,
|
|
||||||
opts = {
|
|
||||||
defaults = {
|
|
||||||
layout_strategy = 'flex';
|
|
||||||
layout_config = {
|
|
||||||
flex = {
|
|
||||||
height = 0.95,
|
|
||||||
width = 0.95,
|
|
||||||
flip_columns = 100,
|
|
||||||
vertical = { preview_height = 0.5, preview_cutoff = 5 },
|
|
||||||
horizontal = { preview_width = 0.7, preview_cutoff = 99 },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"ThePrimeagen/harpoon",
|
|
||||||
lazy = true,
|
|
||||||
config = function()
|
|
||||||
require("telescope").load_extension("harpoon")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"iamcco/markdown-preview.nvim",
|
|
||||||
lazy = true,
|
|
||||||
event = "FileType markdown",
|
|
||||||
build = "cd app && yarn install",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-telescope/telescope-project.nvim",
|
|
||||||
lazy = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-telescope/telescope-file-browser.nvim",
|
|
||||||
lazy = true,
|
|
||||||
config = function()
|
|
||||||
require("telescope").load_extension("file_browser")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"jvgrootveld/telescope-zoxide",
|
|
||||||
lazy = true,
|
|
||||||
config = function()
|
|
||||||
local z_utils = require("telescope._extensions.zoxide.utils")
|
|
||||||
local t = require("telescope")
|
|
||||||
-- Configure the extension
|
|
||||||
t.setup({
|
|
||||||
extensions = {
|
|
||||||
zoxide = {
|
|
||||||
prompt_title = "[ Queries ]",
|
|
||||||
mappings = {
|
|
||||||
default = {
|
|
||||||
after_action = function(selection)
|
|
||||||
print("Update to (" .. selection.z_score .. ") " .. selection.path)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
["<C-s>"] = {
|
|
||||||
before_action = function(selection)
|
|
||||||
print("before C-s")
|
|
||||||
end,
|
|
||||||
action = function(selection)
|
|
||||||
vim.cmd("edit " .. selection.path)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
["<C-q>"] = { action = z_utils.create_basic_command("split") },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Load the extension
|
|
||||||
t.load_extension("zoxide")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"lervag/vimtex",
|
|
||||||
config = function()
|
|
||||||
vim.cmd("let g:vimtex_quickfix_mode=0")
|
|
||||||
vim.cmd("let g:vimtex_view_general_viewer = 'evince'")
|
|
||||||
vim.cmd("let g:vimtex_compiler_method = 'latexmk'")
|
|
||||||
vim.cmd(
|
|
||||||
"let g:vimtex_compiler_latexmk = {'options': ['-pdf', '-shell-escape', '-file-line-error', '--extra-mem-bot=10000000', '-synctex=1', '-interaction=nonstopmode',],}"
|
|
||||||
)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"rcarriga/nvim-notify",
|
|
||||||
opts = {
|
|
||||||
top_down = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"jbyuki/instant.nvim",
|
|
||||||
config = function()
|
|
||||||
vim.cmd("let g:instant_username = 'dashie'")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
opts = {
|
|
||||||
textobjects = {
|
|
||||||
select = {
|
|
||||||
enable = true,
|
|
||||||
lookahead = true,
|
|
||||||
keymaps = {
|
|
||||||
-- You can use the capture groups defined in textobjects.scm
|
|
||||||
["af"] = "@function.outer",
|
|
||||||
["if"] = "@function.inner",
|
|
||||||
["ac"] = "@class.outer",
|
|
||||||
["ic"] = "@class.inner",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"karb94/neoscroll.nvim",
|
|
||||||
config = function()
|
|
||||||
require("neoscroll").setup()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kaarmu/typst.vim",
|
|
||||||
lazy = true,
|
|
||||||
event = "FileType typst",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/which-key.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
opts = {
|
|
||||||
plugins = { spelling = true },
|
|
||||||
defaults = {
|
|
||||||
mode = { "n", "v" },
|
|
||||||
["g"] = { name = "+goto" },
|
|
||||||
["gz"] = { name = "+surround" },
|
|
||||||
["]"] = { name = "+next" },
|
|
||||||
["["] = { name = "+prev" },
|
|
||||||
["<leader><tab>"] = { name = "+tabs" },
|
|
||||||
["<leader>b"] = { name = "+buffer" },
|
|
||||||
["<leader>c"] = { name = "+code" },
|
|
||||||
["<leader>f"] = { name = "+file/find" },
|
|
||||||
["<leader>g"] = { name = "+git" },
|
|
||||||
["<leader>gh"] = { name = "+hunks" },
|
|
||||||
["<leader>q"] = { name = "+quit/session" },
|
|
||||||
["<leader>s"] = { name = "+search" },
|
|
||||||
["<leader>u"] = { name = "+ui" },
|
|
||||||
["<leader>w"] = { name = "+windows" },
|
|
||||||
["<leader>x"] = { name = "+diagnostics/quickfix" },
|
|
||||||
["<leader>h"] = { name = "+harpoon" },
|
|
||||||
["<leader>d"] = { name = "+DAP" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
local wk = require("which-key")
|
|
||||||
wk.setup(opts)
|
|
||||||
wk.register(opts.defaults)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"f-person/git-blame.nvim",
|
|
||||||
lazy = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"mg979/vim-visual-multi",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"barreiroleo/ltex_extra.nvim",
|
|
||||||
ft = { "markdown", "tex", "typst", "typ" },
|
|
||||||
lazy = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"smjonas/inc-rename.nvim",
|
|
||||||
lazy = true,
|
|
||||||
event = "BufEnter",
|
|
||||||
config = function()
|
|
||||||
require("inc_rename").setup({
|
|
||||||
cmd_name = "IncRename", -- the name of the command
|
|
||||||
hl_group = "Substitute", -- the highlight group used for highlighting the identifier's new name
|
|
||||||
preview_empty_name = true, -- whether an empty new name should be previewed; if false the command preview will be cancelled instead
|
|
||||||
show_message = true, -- whether to display a `Renamed m instances in n files` message after a rename operation
|
|
||||||
input_buffer_type = nil, -- the type of the external input buffer to use (the only supported value is currently "dressing")
|
|
||||||
post_hook = nil, -- callback to run after renaming, receives the result table (from LSP handler) as an argument
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
|
||||||
opts = {
|
|
||||||
window = {
|
|
||||||
position = "right",
|
|
||||||
mappings = {
|
|
||||||
["l"] = "none",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>fe",
|
|
||||||
function()
|
|
||||||
require("neo-tree.command").execute({ position = "right", toggle = true, dir = Util.root() })
|
|
||||||
end,
|
|
||||||
desc = "Explorer NeoTree (root dir)",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>fE",
|
|
||||||
function()
|
|
||||||
require("neo-tree.command").execute({ position = "right", toggle = true, dir = vim.loop.cwd() })
|
|
||||||
end,
|
|
||||||
desc = "Explorer NeoTree (cwd)",
|
|
||||||
},
|
|
||||||
{ "<A-f>", "<leader>fe", desc = "Explorer NeoTree (root dir)", remap = true },
|
|
||||||
{ "<A-F>", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/edgy.nvim",
|
|
||||||
opts = {
|
|
||||||
animate = {
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
left = {},
|
|
||||||
right = {
|
|
||||||
-- Neo-tree filesystem always takes half the screen height
|
|
||||||
{
|
|
||||||
title = "Neo-Tree",
|
|
||||||
ft = "neo-tree",
|
|
||||||
filter = function(buf)
|
|
||||||
return vim.b[buf].neo_tree_source == "filesystem"
|
|
||||||
end,
|
|
||||||
size = { height = 0.5 },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title = "Neo-Tree Git",
|
|
||||||
ft = "neo-tree",
|
|
||||||
filter = function(buf)
|
|
||||||
return vim.b[buf].neo_tree_source == "git_status"
|
|
||||||
end,
|
|
||||||
pinned = true,
|
|
||||||
open = "Neotree position=right git_status",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title = "Neo-Tree Buffers",
|
|
||||||
ft = "neo-tree",
|
|
||||||
filter = function(buf)
|
|
||||||
return vim.b[buf].neo_tree_source == "buffers"
|
|
||||||
end,
|
|
||||||
pinned = true,
|
|
||||||
open = "Neotree position=top buffers",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ft = "Outline",
|
|
||||||
pinned = true,
|
|
||||||
open = "SymbolsOutlineOpen",
|
|
||||||
},
|
|
||||||
-- any other neo-tree windows
|
|
||||||
"neo-tree",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"rcarriga/nvim-dap-ui",
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>dk",
|
|
||||||
function()
|
|
||||||
require("dap").down()
|
|
||||||
end,
|
|
||||||
desc = "Down",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>dl",
|
|
||||||
function()
|
|
||||||
require("dap").up()
|
|
||||||
end,
|
|
||||||
desc = "Up",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>d;",
|
|
||||||
function()
|
|
||||||
require("dap").run_last()
|
|
||||||
end,
|
|
||||||
desc = "Run Last",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -5,4 +5,5 @@ return {
|
||||||
{ { "folke/noice.nvim", enabled = false } },
|
{ { "folke/noice.nvim", enabled = false } },
|
||||||
{ { "nvimtools/none-ls.nvim", enabled = false } },
|
{ { "nvimtools/none-ls.nvim", enabled = false } },
|
||||||
{ { "nvimdev/dashboard-nvim", enabled = false } },
|
{ { "nvimdev/dashboard-nvim", enabled = false } },
|
||||||
|
{ { "nvim-neo-tree/neo-tree.nvim", enabled = false } },
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
opts = {
|
--opts = function()
|
||||||
ensure_installed = {},
|
-- return {
|
||||||
},
|
-- ensure_installed = {},
|
||||||
|
-- }
|
||||||
|
--end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
|
|
|
||||||
|
|
@ -181,32 +181,35 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
"nvim-tree/nvim-tree.lua",
|
||||||
opts = {
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
window = {
|
config = function()
|
||||||
position = "right",
|
require("nvim-tree").setup({
|
||||||
mappings = {
|
renderer = {
|
||||||
["l"] = "none",
|
group_empty = true,
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
view = {
|
||||||
|
side = "right",
|
||||||
},
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
"<leader>fe",
|
"<leader>fe",
|
||||||
function()
|
function()
|
||||||
require("neo-tree.command").execute({ position = "right", toggle = true, dir = Util.root() })
|
require("nvim-tree.api").tree.toggle()
|
||||||
end,
|
end,
|
||||||
desc = "Explorer NeoTree (root dir)",
|
desc = "Explorer NvimTree (root dir)",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>fE",
|
"<leader>fE",
|
||||||
function()
|
function()
|
||||||
require("neo-tree.command").execute({ position = "right", toggle = true, dir = vim.loop.cwd() })
|
require("nvim-tree.api").tree.toggle()
|
||||||
end,
|
end,
|
||||||
desc = "Explorer NeoTree (cwd)",
|
desc = "Explorer NvimTree (cwd)",
|
||||||
},
|
},
|
||||||
{ "<A-f>", "<leader>fe", desc = "Explorer NeoTree (root dir)", remap = true },
|
{ "<A-f>", "<leader>fe", desc = "Explorer NvimTree (root dir)", remap = true },
|
||||||
{ "<A-F>", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
|
{ "<A-F>", "<leader>fE", desc = "Explorer NvimTree (cwd)", remap = true },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -235,6 +238,21 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"nvim-neotest/neotest",
|
||||||
|
dependencies = {
|
||||||
|
"rcasia/neotest-java",
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
adapters = {
|
||||||
|
["neotest-java"] = {
|
||||||
|
ignore_wrapper = false, -- whether to ignore maven/gradle wrapper
|
||||||
|
junit_jar = "/home/dashie/.local/share/nvim/mason/bin/junit-standalone.jar",
|
||||||
|
-- default: .local/share/nvim/neotest-java/junit-platform-console-standalone-[version].jar
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"DashieTM/test_plugin",
|
"DashieTM/test_plugin",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
ncspot() {
|
ncspot() {
|
||||||
notify-send "$1"
|
|
||||||
notify-send "$2"
|
|
||||||
NUM=$(pactl list clients short | rg "ncspot" | awk -F 'PipeWire' ' { print $1 } ' | tr -d ' \t\n')
|
NUM=$(pactl list clients short | rg "ncspot" | awk -F 'PipeWire' ' { print $1 } ' | tr -d ' \t\n')
|
||||||
CHANGE=$(pactl list sink-inputs short | rg "$NUM" | awk -F ' ' ' { print $1 }' | tr -d ' \t\n')
|
CHANGE=$(pactl list sink-inputs short | rg "$NUM" | awk -F ' ' ' { print $1 }' | tr -d ' \t\n')
|
||||||
pactl set-sink-input-volume "$CHANGE" "$1"
|
pactl set-sink-input-volume "$CHANGE" "$1"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue