Compare commits

..

1 commit

Author SHA1 Message Date
d816faa25b
feat(nvim): setup for ipynb dev work
All checks were successful
/ check (push) Successful in 26s
/ build (audiomenu) (push) Successful in 1s
/ build (docs) (push) Successful in 2s
/ build (jpassmenu) (push) Successful in 2s
/ build (nixosConfigurations.vm.config.system.build.toplevel) (push) Successful in 16s
/ build (nvim) (push) Successful in 11s
Setup:
- molten (run python code)
- otter (lsp in markdown codeblocks)
- jupytext (convert .ipynb files to .md files transparently)
- image (display images inside neovim (e.g. matplotlib graphs))
2024-10-06 14:28:25 +02:00
5 changed files with 32 additions and 39 deletions

9
.envrc
View file

@ -1,10 +1 @@
# update repo
if has jj; then
jj git fetch
elif has gix; then
gix fetch
elif has git; then
git fetch
fi
use flake

18
flake.lock generated
View file

@ -260,11 +260,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1728500571,
"narHash": "sha256-dOymOQ3AfNI4Z337yEwHGohrVQb4yPODCW9MDUyAc4w=",
"lastModified": 1728067476,
"narHash": "sha256-/uJcVXuBt+VFCPQIX+4YnYrHaubJSx4HoNsJVNRgANM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d51c28603def282a24fa034bcb007e2bcb5b5dd0",
"rev": "6e6b3dd395c3b1eb9be9f2d096383a8d05add030",
"type": "github"
},
"original": {
@ -292,11 +292,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1728603032,
"narHash": "sha256-RAKCcBXqF/xOaf7fR11dnIZwZ8SDyNcK3MyVgD0l1xQ=",
"lastModified": 1728145679,
"narHash": "sha256-qd1nr2b+WUiyzJva650LBX/3hDBru0ZSVxKHSm1BE0w=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "5cd8c9cf3104027b42ffe531fb68463ecb08ebc9",
"rev": "6594472fd275f6dcf5a9fba4a83d2f7fa2cf2b8a",
"type": "github"
},
"original": {
@ -388,11 +388,11 @@
},
"unstable": {
"locked": {
"lastModified": 1728492678,
"narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=",
"lastModified": 1728018373,
"narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7",
"rev": "bc947f541ae55e999ffdb4013441347d83b00feb",
"type": "github"
},
"original": {

View file

@ -172,7 +172,12 @@ in
lint = {
enable = true;
lintersByFt = {
latex = [ "chktex" ];
rust = [ "typos" ];
latex = [
"chktex"
"typos"
];
markdown = [ "typos" ];
nix = [ "statix" ];
sh = [ "dash" ];
zsh = [ "zsh" ];
@ -181,16 +186,14 @@ in
lsp = {
enable = true;
servers = {
bashls = {
enable = true;
package = pkgs.unstable.bash-language-server;
};
bashls.enable = true;
bashls.package = pkgs.unstable.bash-language-server;
# clangd.enable = true; # Adds ~2GiB
# html.enable = true; # Not writing html
html.enable = true;
jsonls.enable = true;
marksman.enable = true;
nixd.enable = true;
nil_ls = {
nil-ls = {
enable = true;
settings.nix.flake = {
autoArchive = true;
@ -198,11 +201,12 @@ in
};
};
pyright.enable = true;
# ruff-lsp.enable = true;
ruff.enable = true;
taplo.enable = true;
# texlab.enable = true; # Not writing TeX rn
typos_lsp.enable = true;
# typst_lsp.enable = true; # Not using it either
typos-lsp.enable = true;
typst-lsp.enable = true;
};
};
lspkind = {

View file

@ -61,8 +61,8 @@
pkgs.unstable.taplo
pkgs.unstable.typos
pkgs.unstable.yamlfmt
(pkgs.unstable.python3.withPackages (p: [ p.jupytext ]))
];
extraPython3Packages = p: [ p.jupytext ];
extraConfigLuaPre =
# lua
''

View file

@ -74,17 +74,15 @@ in
};
environment.etc = keysFromGithub;
services = {
# Enable printer autodiscovery if printing is enabled
avahi = {
inherit (config.services.printing) enable;
nssmdns4 = true;
openFirewall = true;
};
openssh.authorizedKeysFiles = builtins.map (path: "/etc/${path}") (
builtins.attrNames keysFromGithub
);
jupyter.enable = cfg.dev.enable;
services.openssh.authorizedKeysFiles = builtins.map (path: "/etc/${path}") (
builtins.attrNames keysFromGithub
);
# Enable printer autodiscovery if printing is enabled
services.avahi = {
inherit (config.services.printing) enable;
nssmdns4 = true;
openFirewall = true;
};
users.defaultUserShell = pkgs.zsh;
# Open ports for spotifyd