add steam & nvim

This commit is contained in:
DACHXY 2024-12-18 16:22:07 +08:00
parent 3175158f84
commit 601513bc9e
34 changed files with 306 additions and 128 deletions

View file

@ -1,7 +1,10 @@
let configDir = ../config;
in {
home.file = {
".config/nvim".source = "${configDir}/nvim";
".config/nvim" = {
source = "${configDir}/nvim";
recursive = true;
};
".config/wallpapers".source = "${configDir}/wallpapers";
".config/kitty".source = "${configDir}/kitty";
".config/neofetch".source = "${configDir}/neofetch";

View file

@ -28,6 +28,7 @@
#XDG_BIN_HOME = "\${HOME}/.local/bin";
XDG_DATA_HOME = "\${HOME}/.local/share";
GTK_IM_MODULE = "";
XDG_DATA_DIRS = "\${XDG_DATA_DIRS}:/usr/share:/var/lib/flatpak/exports/share:\${HOME}/.local/share/flatpak/exports/share";
# GPU
LIBVA_DRIVER_NAME = "nvidia";

View file

@ -5,17 +5,17 @@
pkgs.vscode
pkgs.discord
pkgs.firefox
# Dev stuff
pkgs.gcc
pkgs.go
pkgs.lua
pkgs.nodePackages.pnpm
(pkgs.python3.withPackages
(python-pkgs: [ python-pkgs.pip python-pkgs.requests ]))
pkgs.rustup
pkgs.pkgsCross.mingwW64.stdenv.cc
pkgs.pkgsCross.mingwW64.windows.pthreads
pkgs.postman
# Work stuff
pkgs.libreoffice-qt

View file

@ -1,4 +1,13 @@
{ inputs, pkgs, ... }:
{
programs = {
neovim = {
enable = true;
withNodeJs = true;
extraLuaPackages = ps: [ ps.magick ];
extraPackages = [ pkgs.imagemagick ];
};
};
}

View file

@ -1,75 +0,0 @@
{ pkgs, ... }:
let
treesitterWithGrammars = (pkgs.vimPlugins.nvim-treesitter.withPlugins (p: [
p.bash
p.comment
p.css
p.dockerfile
p.fish
p.gitattributes
p.gitignore
p.go
p.gomod
p.gowork
p.hcl
p.javascript
p.jq
p.json5
p.json
p.lua
p.make
p.markdown
p.nix
p.python
p.rust
p.toml
p.typescript
p.vue
p.yaml
]));
treesitter-parsers = pkgs.symlinkJoin {
name = "treesitter-parsers";
paths = treesitterWithGrammars.dependencies;
};
in
{
home.packages = with pkgs; [
ripgrep
fd
lua-language-server
rust-analyzer-unwrapped
black
gh
];
programs.neovim = {
enable = true;
package = pkgs.neovim;
vimAlias = true;
coc.enable = false;
withNodeJs = true;
plugins = [
treesitterWithGrammars
];
};
home.file."./.config/nvim/" = {
source = ../../../config/nvim;
recursive = true;
};
home.file."./.config/nvim/init.lua".text = ''
require("config.lazy")
vim.opt.runtimepath:append("${treesitter-parsers}")
'';
# Treesitter is configured as a locally developed module in lazy.nvim
# we hardcode a symlink here so that we can refer to it in our lazy config
home.file."./.local/share/nvim/nix/nvim-treesitter/" = {
recursive = true;
source = treesitterWithGrammars;
};
}

View file

@ -1,10 +0,0 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p patchelf
# Fixes linking for NixOS
# ./fx_loader.sh ~/.local/share/nvim/mason/packages/rust-analyzer/rust-analyzer
for binary in ${@}; do
patchelf \
--set-interpreter "$(cat ${NIX_CC}/nix-support/dynamic-linker)" \
"${binary}"
done