-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(nixvim): add otter, spectre, render-markdown #55
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,8 @@ | |
1. [Troubleshooting](5-troubleshooting) | ||
1. [`Write error: disk full;` during `nixos-install`](write-error-disk-full-during-nixos-install) | ||
1. [Impurities](6-impurities) | ||
1. [Currently known impurities](61-currently-known-impurities) | ||
1. [Notes](62-notes) | ||
1. [References](7-references) | ||
|
||
## 1. About ❄️ | ||
|
@@ -136,9 +138,23 @@ mount -o remount,size=15G /tmp | |
|
||
## 6. Impurities 💩 | ||
|
||
- Currently **none**! 🚀🚀 | ||
I heavily dislike using the `--impure` flag, which is unfortunately required | ||
in certain use cases, and I go really out of my way to patch stuff and | ||
avoid using it. | ||
|
||
## 7. References 📚 | ||
### 6.1 Currently known impurities | ||
|
||
- **none**! 🚀🚀 | ||
|
||
### 6.2 Notes | ||
|
||
- [shadow-nix](https://github.com/NicolasGuilloux/shadow-nix) and all its | ||
forks rely on impure imports of hashes, so I am maintaining my own fork | ||
[tsandrini/shadow-nix](https://github.com/tsandrini/shadow-nix) | ||
- I was previously using [devenv](https://devenv.sh/), however, it still doesn't | ||
work really well in a pure mode, so switched to a simple devshell instead. | ||
|
||
## 7. Resources 📚 | ||
|
||
The whole nix ecosystem is in its foundations a revolutionary piece of | ||
software and once you get the hang of it you feel like you’ve really | ||
|
@@ -164,3 +180,31 @@ manual.org?) | |
- [Github code search: thanks to how the nix lang works the code search should be of a huge help, included an example](https://github.com/search?q=pkgs.writeShellScriptBin+language%3ANix&type=code&l=Nix) | ||
- [This is where flake-parts finally clicked for me, huge thanks to viperml~~](https://github.com/viperML/dotfiles) | ||
- [dc-tec/nixvim awesome nixvim config that got me started](https://github.com/dc-tec/nixvim/) | ||
|
||
## 8. Credits & Special thanks | ||
|
||
To reiterate the previous [Resources](7-resources) section, here are also some | ||
explicit shoutouts & thanks to the people from whom I have at some point in time | ||
taken some piece of code or have been inspired from. Huge thanks ❤️ | ||
|
||
### 8.1 Major help | ||
|
||
These are people that are engrained in the nix community and whose work I/we | ||
use on a daily basis. I hope they will hapilly continue to be a part of the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nitpick (documentation): Fix typo: 'hapilly' should be 'happily' |
||
nix community and I thank them for all of their contributions. | ||
|
||
[edolstra](https://github.com/edolstra) | ||
-- [grahamc](https://github.com/grahamc) | ||
-- [domenkozar](https://github.com/domenkozar) | ||
-- [Mic92](https://github.com/Mic92) | ||
-- [hlissner](https://github.com/hlissner) | ||
-- [viperML](https://github.com/viperML) | ||
-- [roberth](https://github.com/roberth) | ||
-- [fufexan](https://github.com/fufexan) | ||
-- [NobbZ](https://github.com/NobbZ) | ||
tsandrini marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### 8.2 Additional help with ideas & code snippets | ||
|
||
[balsoft](https://github.com/balsoft) | ||
-- [dc-tec](https://github.com/dc-tec) | ||
-- [notusknot](https://github.com/notusknot/) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,7 +138,13 @@ | |
# NOTE for wireguard | ||
networking.wireguard.enable = true; | ||
networking.firewall = { | ||
allowedUDPPorts = [ 51820 ]; | ||
allowedUDPPorts = [ | ||
51820 | ||
4321 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚨 question (security): Explain the purpose of opening port 4321 in the firewall configuration Port 4321 has been added to both allowed UDP and TCP ports in the firewall configuration. Could you provide more information about the service or application that requires this port to be open? This change could have security implications, so it's important to understand its necessity. |
||
]; | ||
allowedTCPPorts = [ | ||
4321 | ||
]; | ||
}; | ||
|
||
# If you intend to route all your traffic through the wireguard tunnel, the | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# --- flake-parts/modules/nixvim/plugins/editor/render-markdown.nix | ||
# | ||
# Author: tsandrini <[email protected]> | ||
# URL: https://github.com/tsandrini/tensorfiles | ||
# License: MIT | ||
# | ||
# 888 .d888 d8b 888 | ||
# 888 d88P" Y8P 888 | ||
# 888 888 888 | ||
# 888888 .d88b. 88888b. .d8888b .d88b. 888d888 888888 888 888 .d88b. .d8888b | ||
# 888 d8P Y8b 888 "88b 88K d88""88b 888P" 888 888 888 d8P Y8b 88K | ||
# 888 88888888 888 888 "Y8888b. 888 888 888 888 888 888 88888888 "Y8888b. | ||
# Y88b. Y8b. 888 888 X88 Y88..88P 888 888 888 888 Y8b. X88 | ||
# "Y888 "Y8888 888 888 88888P' "Y88P" 888 888 888 888 "Y8888 88888P' | ||
{ localFlake }: | ||
{ | ||
config, | ||
lib, | ||
pkgs, | ||
... | ||
}: | ||
let | ||
inherit (lib) | ||
mkIf | ||
mkMerge | ||
mkEnableOption | ||
; | ||
# inherit (localFlake.lib.modules) mkOverrideAtNixvimModuleLevel; | ||
|
||
cfg = config.tensorfiles.nixvim.plugins.editor.render-markdown; | ||
# _ = mkOverrideAtNixvimModuleLevel; | ||
|
||
in | ||
{ | ||
options.tensorfiles.nixvim.plugins.editor.render-markdown = { | ||
enable = mkEnableOption '' | ||
TODO | ||
''; | ||
}; | ||
|
||
config = mkIf cfg.enable (mkMerge [ | ||
# |----------------------------------------------------------------------| # | ||
{ | ||
extraPlugins = with pkgs.vimPlugins; [ | ||
render-markdown | ||
]; | ||
|
||
extraConfigLua = '' | ||
require('render-markdown').setup() | ||
''; | ||
} | ||
# |----------------------------------------------------------------------| # | ||
]); | ||
|
||
meta.maintainers = with localFlake.lib.maintainers; [ tsandrini ]; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# --- flake-parts/modules/nixvim/plugins/editor/spectre.nix | ||
# | ||
# Author: tsandrini <[email protected]> | ||
# URL: https://github.com/tsandrini/tensorfiles | ||
# License: MIT | ||
# | ||
# 888 .d888 d8b 888 | ||
# 888 d88P" Y8P 888 | ||
# 888 888 888 | ||
# 888888 .d88b. 88888b. .d8888b .d88b. 888d888 888888 888 888 .d88b. .d8888b | ||
# 888 d8P Y8b 888 "88b 88K d88""88b 888P" 888 888 888 d8P Y8b 88K | ||
# 888 88888888 888 888 "Y8888b. 888 888 888 888 888 888 88888888 "Y8888b. | ||
# Y88b. Y8b. 888 888 X88 Y88..88P 888 888 888 888 Y8b. X88 | ||
# "Y888 "Y8888 888 888 88888P' "Y88P" 888 888 888 888 "Y8888 88888P' | ||
{ localFlake }: | ||
{ | ||
config, | ||
lib, | ||
... | ||
}: | ||
let | ||
inherit (lib) | ||
mkIf | ||
mkMerge | ||
mkEnableOption | ||
; | ||
inherit (localFlake.lib.modules) mkOverrideAtNixvimModuleLevel; | ||
|
||
cfg = config.tensorfiles.nixvim.plugins.editor.spectre; | ||
_ = mkOverrideAtNixvimModuleLevel; | ||
in | ||
{ | ||
options.tensorfiles.nixvim.plugins.editor.spectre = { | ||
enable = mkEnableOption '' | ||
TODO | ||
''; | ||
|
||
withKeymaps = | ||
mkEnableOption '' | ||
Enable the related included keymaps. | ||
'' | ||
// { | ||
default = true; | ||
}; | ||
}; | ||
|
||
config = mkIf cfg.enable (mkMerge [ | ||
# |----------------------------------------------------------------------| # | ||
{ | ||
plugins.spectre = { | ||
enable = _ true; | ||
}; | ||
} | ||
# |----------------------------------------------------------------------| # | ||
(mkIf cfg.withKeymaps { | ||
keymaps = [ | ||
{ | ||
mode = "n"; | ||
key = "<leader>R"; | ||
action = "<cmd>Spectre<CR>"; | ||
options = { | ||
silent = true; | ||
desc = "Search & Replace"; | ||
}; | ||
} | ||
]; | ||
}) | ||
# |----------------------------------------------------------------------| # | ||
]); | ||
|
||
meta.maintainers = with localFlake.lib.maintainers; [ tsandrini ]; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (documentation): Update table of contents to reflect new section title
The section '7. References' has been renamed to '7. Resources'. This change should be reflected in the table of contents for consistency.