Added vpn passthrough, refactored dotfiles, separate linked-dotfiles directory
This commit is contained in:
parent
6b30de0255
commit
7f49c2aeaf
@ -15,6 +15,7 @@ sudo nixos-rebuild switch --flake .#nate
|
||||
sudo nixos-rebuild switch --flake .#luci
|
||||
sudo nixos-rebuild switch --flake .#jaci
|
||||
sudo nixos-rebuild switch --flake .#scrappy
|
||||
sudo nixos-rebuild switch --flake .#frame12
|
||||
|
||||
# Test configuration without switching
|
||||
sudo nixos-rebuild test --flake .
|
||||
|
||||
12
flake.lock
generated
12
flake.lock
generated
@ -98,11 +98,11 @@
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1758690382,
|
||||
"narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=",
|
||||
"lastModified": 1759831965,
|
||||
"narHash": "sha256-vgPm2xjOmKdZ0xKA6yLXPJpjOtQPHfaZDRtH+47XEBo=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e643668fd71b949c53f8626614b21ff71a07379d",
|
||||
"rev": "c9b6fb798541223bbb396d287d16f43520250518",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -114,11 +114,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1758791193,
|
||||
"narHash": "sha256-F8WmEwFoHsnix7rt290R0rFXNJiMbClMZyIC/e+HYf0=",
|
||||
"lastModified": 1759735786,
|
||||
"narHash": "sha256-a0+h02lyP2KwSNrZz4wLJTu9ikujNsTWIC874Bv7IJ0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "25e53aa156d47bad5082ff7618f5feb1f5e02d01",
|
||||
"rev": "20c4598c84a671783f741e02bf05cbfaf4907cff",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@ -69,7 +69,6 @@ in
|
||||
|
||||
power_manager = {
|
||||
enable = true;
|
||||
useFlake = true;
|
||||
};
|
||||
|
||||
main_user = {
|
||||
|
||||
@ -1,123 +0,0 @@
|
||||
###
|
||||
### Configuration for languages
|
||||
###
|
||||
|
||||
[[language]]
|
||||
name = "go"
|
||||
language-servers = ["gopls"]
|
||||
|
||||
[[language]]
|
||||
name = "markdown"
|
||||
language-servers = ["marksman"]
|
||||
|
||||
# Change dart format to 120 lines
|
||||
[[language]]
|
||||
name = "dart"
|
||||
formatter = {command = "dart", args = ["format", "-l", "120"]}
|
||||
language-servers = ["dart"]
|
||||
|
||||
[[language]]
|
||||
name = "nix"
|
||||
language-servers = ["nil"]
|
||||
|
||||
[[language]]
|
||||
name = "zig"
|
||||
language-servers = ["zls"]
|
||||
|
||||
[language.debugger]
|
||||
name = "codelldb-dap"
|
||||
transport = "tcp"
|
||||
command = "codelldb"
|
||||
args = []
|
||||
port-arg = "--port {}"
|
||||
|
||||
[[language.debugger.templates]]
|
||||
name = "launch"
|
||||
request = "launch"
|
||||
completion = [ { name = "binary", completion = "filename" } ]
|
||||
args = { console = "internalConsole", program = "{0}" }
|
||||
|
||||
[[language.debugger.templates]]
|
||||
name = "attach"
|
||||
request = "attach"
|
||||
completion = [ "pid" ]
|
||||
args = { console = "internalConsole", pid = "{0}" }
|
||||
|
||||
[[language.debugger.templates]]
|
||||
name = "gdbserver attach"
|
||||
request = "attach"
|
||||
completion = [ { name = "lldb connect url", default = "connect://localhost:3333" }, { name = "file", completion = "filename" }, "pid" ]
|
||||
args = { console = "internalConsole", attachCommands = [ "platform select remote-gdb-server", "platform connect {0}", "file {1}", "attach {2}" ] }
|
||||
|
||||
## cyo custom def
|
||||
[[language]]
|
||||
name = "cyano"
|
||||
scope = "source.cyo"
|
||||
file-types = ["cyo"]
|
||||
language-servers = ["ltex-ls"]
|
||||
|
||||
[language-server.ltex-ls]
|
||||
command = "ltex-ls"
|
||||
|
||||
###
|
||||
### Configuration for LSP-AI
|
||||
###
|
||||
### Link here:
|
||||
### https://github.com/SilasMarvin/lsp-ai
|
||||
###
|
||||
|
||||
# [language-server.lsp-ai]
|
||||
# command
|
||||
|
||||
# [language-server.lsp-ai.config.memory]
|
||||
# file_store = { }
|
||||
|
||||
# [language-server.lsp-ai.config.models.sonnet]
|
||||
# type = "anthropic"
|
||||
# chat_endpoint = "https://api.anthropic.com/v1/messages"
|
||||
# model = "claude-3-5-sonnet-20241022"
|
||||
# auth_token_env_var_name = "ANTHROPIC_API_KEY"
|
||||
|
||||
# [language-server.lsp-ai.config.models.haiku]
|
||||
# type = "anthropic"
|
||||
# chat_endpoint = "https://api.anthropic.com/v1/messages"
|
||||
# model = "claude-3-5-haiku-20241022"
|
||||
# auth_token_env_var_name = "ANTHROPIC_API_KEY"
|
||||
|
||||
# [[language-server.lsp-ai.config.chat]]
|
||||
# trigger = "!C"
|
||||
# action_display_name = "Chat (Sonnet )"
|
||||
# model = "sonnet"
|
||||
# parameters = { max_context = 4096, max_tokens = 4096, system = "You are a code assistant chatbot. The user will ask you for assistance coding and you will do you best to answer succinctly and accurately" }
|
||||
|
||||
# [[language-server.lsp-ai.config.chat]]
|
||||
# trigger = "!C"
|
||||
# action_display_name = "Chat (Haiku )"
|
||||
# model = "haiku"
|
||||
# parameters = { max_context = 4096, max_tokens = 4096, system = "You are a code assistant chatbot. The user will ask you for assistance coding and you will do you best to answer succinctly and accurately" }
|
||||
|
||||
# [[language-server.lsp-ai.config.actions]]
|
||||
# action_display_name = "Complete (Sonnet )"
|
||||
# model = "sonnet"
|
||||
# parameters = { max_context = 4096, max_tokens = 4096, messages = [{ role = "user", content = "{CODE}" }], system = "You are an AI coding assistant. Your task is to complete code snippets. The user's cursor position is marked by \"<CURSOR>\". Follow these steps:\n\n1. Analyze the code context and the cursor position.\n2. Provide your chain of thought reasoning, wrapped in <reasoning> tags. Include thoughts about the cursor position, what needs to be completed, and any necessary formatting.\n3. Determine the appropriate code to complete the current thought, including finishing partial words or lines.\n4. Replace \"<CURSOR>\" with the necessary code, ensuring proper formatting and line breaks.\n5. Wrap your code solution in <answer> tags.\n\nYour response should always include both the reasoning and the answer. Pay special attention to completing partial words or lines before adding new lines of code.\n\n<examples>\n<example>\nUser input:\n--main.py--\n# A function that reads in user inpu<CURSOR>\n\nResponse:\n<reasoning>\n1. The cursor is positioned after \"inpu\" in a comment describing a function that reads user input.\n2. We need to complete the word \"input\" in the comment first.\n3. After completing the comment, we should add a new line before defining the function.\n4. The function should use Python's built-in `input()` function to read user input.\n5. We'll name the function descriptively and include a return statement.\n</reasoning>\n\n<answer>t\ndef read_user_input():\n user_input = input(\"Enter your input: \")\n return user_input\n</answer>\n</example>\n\n<example>\nUser input:\n--main.py--\ndef fibonacci(n):\n if n <= 1:\n return n\n else:\n re<CURSOR>\n\n\nResponse:\n<reasoning>\n1. The cursor is positioned after \"re\" in the 'else' clause of a recursive Fibonacci function.\n2. We need to complete the return statement for the recursive case.\n3. The \"re\" already present likely stands for \"return\", so we'll continue from there.\n4. The Fibonacci sequence is the sum of the two preceding numbers.\n5. We should return the sum of fibonacci(n-1) and fibonacci(n-2).\n</reasoning>\n\n<answer>turn fibonacci(n-1) + fibonacci(n-2)</answer>\n</example>\n</examples>"}
|
||||
# post_process = { extractor = "(?s)<answer>(.*?)</answer>" }
|
||||
|
||||
|
||||
# [[language-server.lsp-ai.config.actions]]
|
||||
# action_display_name = "Complete (Haiku )"
|
||||
# model = "haiku"
|
||||
# parameters = { max_context = 4096, max_tokens = 4096, messages = [{ role = "user", content = "{CODE}" }], system = "You are an AI coding assistant. Your task is to complete code snippets. The user's cursor position is marked by \"<CURSOR>\". Follow these steps:\n\n1. Analyze the code context and the cursor position.\n2. Provide your chain of thought reasoning, wrapped in <reasoning> tags. Include thoughts about the cursor position, what needs to be completed, and any necessary formatting.\n3. Determine the appropriate code to complete the current thought, including finishing partial words or lines.\n4. Replace \"<CURSOR>\" with the necessary code, ensuring proper formatting and line breaks.\n5. Wrap your code solution in <answer> tags.\n\nYour response should always include both the reasoning and the answer. Pay special attention to completing partial words or lines before adding new lines of code.\n\n<examples>\n<example>\nUser input:\n--main.py--\n# A function that reads in user inpu<CURSOR>\n\nResponse:\n<reasoning>\n1. The cursor is positioned after \"inpu\" in a comment describing a function that reads user input.\n2. We need to complete the word \"input\" in the comment first.\n3. After completing the comment, we should add a new line before defining the function.\n4. The function should use Python's built-in `input()` function to read user input.\n5. We'll name the function descriptively and include a return statement.\n</reasoning>\n\n<answer>t\ndef read_user_input():\n user_input = input(\"Enter your input: \")\n return user_input\n</answer>\n</example>\n\n<example>\nUser input:\n--main.py--\ndef fibonacci(n):\n if n <= 1:\n return n\n else:\n re<CURSOR>\n\n\nResponse:\n<reasoning>\n1. The cursor is positioned after \"re\" in the 'else' clause of a recursive Fibonacci function.\n2. We need to complete the return statement for the recursive case.\n3. The \"re\" already present likely stands for \"return\", so we'll continue from there.\n4. The Fibonacci sequence is the sum of the two preceding numbers.\n5. We should return the sum of fibonacci(n-1) and fibonacci(n-2).\n</reasoning>\n\n<answer>turn fibonacci(n-1) + fibonacci(n-2)</answer>\n</example>\n</examples>"}
|
||||
# post_process = { extractor = "(?s)<answer>(.*?)</answer>" }
|
||||
|
||||
# [[language-server.lsp-ai.config.actions]]
|
||||
# action_display_name = "Refactor (Sonnet )"
|
||||
# model = "sonnet"
|
||||
# parameters = { max_context = 4096, max_tokens = 4096, messages = [{ role = "user", content = "{SELECTED_TEXT}" }], system = "You are an AI coding assistant specializing in code refactoring. Your task is to analyze the given code snippet and provide a refactored version. Follow these steps:\n\n1. Analyze the code context and structure.\n2. Identify areas for improvement, such as code efficiency, readability, or adherence to best practices.\n3. Provide your chain of thought reasoning, wrapped in <reasoning> tags. Include your analysis of the current code and explain your refactoring decisions.\n4. Rewrite the entire code snippet with your refactoring applied.\n5. Wrap your refactored code solution in <answer> tags.\n\nYour response should always include both the reasoning and the refactored code.\n\n<examples>\n<example>\nUser input:\ndef calculate_total(items):\n total = 0\n for item in items:\n total = total + item['price'] * item['quantity']\n return total\n\n\nResponse:\n<reasoning>\n1. The function calculates the total cost of items based on price and quantity.\n2. We can improve readability and efficiency by:\n a. Using a more descriptive variable name for the total.\n b. Utilizing the sum() function with a generator expression.\n c. Using augmented assignment (+=) if we keep the for loop.\n3. We'll implement the sum() function approach for conciseness.\n4. We'll add a type hint for better code documentation.\n</reasoning>\n<answer>\nfrom typing import List, Dict\n\ndef calculate_total(items: List[Dict[str, float]]) -> float:\n return sum(item['price'] * item['quantity'] for item in items)\n</answer>\n</example>\n\n<example>\nUser input:\ndef is_prime(n):\n if n < 2:\n return False\n for i in range(2, n):\n if n % i == 0:\n return False\n return True\n\n\nResponse:\n<reasoning>\n1. This function checks if a number is prime, but it's not efficient for large numbers.\n2. We can improve it by:\n a. Adding an early return for 2, the only even prime number.\n b. Checking only odd numbers up to the square root of n.\n c. Using a more efficient range (start at 3, step by 2).\n3. We'll also add a type hint for better documentation.\n4. The refactored version will be more efficient for larger numbers.\n</reasoning>\n<answer>\nimport math\n\ndef is_prime(n: int) -> bool:\n if n < 2:\n return False\n if n == 2:\n return True\n if n % 2 == 0:\n return False\n \n for i in range(3, int(math.sqrt(n)) + 1, 2):\n if n % i == 0:\n return False\n return True\n</answer>\n</example>\n</examples>" }
|
||||
# post_process = { extractor = "(?s)<answer>(.*?)</answer>" }
|
||||
|
||||
# [[language-server.lsp-ai.config.actions]]
|
||||
# action_display_name = "Refactor (Haiku )"
|
||||
# model = "haiku"
|
||||
# parameters = { max_context = 4096, max_tokens = 4096, messages = [{ role = "user", content = "{SELECTED_TEXT}" }], system = "You are an AI coding assistant specializing in code refactoring. Your task is to analyze the given code snippet and provide a refactored version. Follow these steps:\n\n1. Analyze the code context and structure.\n2. Identify areas for improvement, such as code efficiency, readability, or adherence to best practices.\n3. Provide your chain of thought reasoning, wrapped in <reasoning> tags. Include your analysis of the current code and explain your refactoring decisions.\n4. Rewrite the entire code snippet with your refactoring applied.\n5. Wrap your refactored code solution in <answer> tags.\n\nYour response should always include both the reasoning and the refactored code.\n\n<examples>\n<example>\nUser input:\ndef calculate_total(items):\n total = 0\n for item in items:\n total = total + item['price'] * item['quantity']\n return total\n\n\nResponse:\n<reasoning>\n1. The function calculates the total cost of items based on price and quantity.\n2. We can improve readability and efficiency by:\n a. Using a more descriptive variable name for the total.\n b. Utilizing the sum() function with a generator expression.\n c. Using augmented assignment (+=) if we keep the for loop.\n3. We'll implement the sum() function approach for conciseness.\n4. We'll add a type hint for better code documentation.\n</reasoning>\n<answer>\nfrom typing import List, Dict\n\ndef calculate_total(items: List[Dict[str, float]]) -> float:\n return sum(item['price'] * item['quantity'] for item in items)\n</answer>\n</example>\n\n<example>\nUser input:\ndef is_prime(n):\n if n < 2:\n return False\n for i in range(2, n):\n if n % i == 0:\n return False\n return True\n\n\nResponse:\n<reasoning>\n1. This function checks if a number is prime, but it's not efficient for large numbers.\n2. We can improve it by:\n a. Adding an early return for 2, the only even prime number.\n b. Checking only odd numbers up to the square root of n.\n c. Using a more efficient range (start at 3, step by 2).\n3. We'll also add a type hint for better documentation.\n4. The refactored version will be more efficient for larger numbers.\n</reasoning>\n<answer>\nimport math\n\ndef is_prime(n: int) -> bool:\n if n < 2:\n return False\n if n == 2:\n return True\n if n % 2 == 0:\n return False\n \n for i in range(3, int(math.sqrt(n)) + 1, 2):\n if n % i == 0:\n return False\n return True\n</answer>\n</example>\n</examples>" }
|
||||
# post_process = { extractor = "(?s)<answer>(.*?)</answer>" }
|
||||
|
||||
@ -1,131 +0,0 @@
|
||||
|
||||
# Based on onedarker.toml https://github.com/helix-editor/helix/blob/master/runtime/themes/onedarker.toml
|
||||
# Original Author : nuid32 <lvkuzvesov@proton.me>
|
||||
# Recoloring: Akselmo <akselmo@akselmo.dev>
|
||||
|
||||
"attribute" = { fg = "orange" }
|
||||
"comment" = { fg = "light-gray", modifiers = ["italic"] }
|
||||
"constant" = { fg = "cyan", modifiers = ["bold"] }
|
||||
"constant.numeric" = { fg = "orange", modifiers=["bold"]}
|
||||
"constant.builtin" = { fg = "blue", modifiers = ["bold"] }
|
||||
"constant.character.escape" = { fg = "yellow" }
|
||||
"constructor" = { fg = "blue", modifiers=["bold"]}
|
||||
"function" = { fg = "purple", modifiers = ["bold"] }
|
||||
"function.method" = { fg = "purple", modifiers = ["bold"] }
|
||||
"function.builtin" = { fg = "cyan" }
|
||||
"function.macro" = { fg = "purple", modifiers = ["bold"] }
|
||||
"function.special" = { fg = "magenta", modifiers = ["bold"] }
|
||||
"keyword" = { fg = "blue", modifiers=["bold"]}
|
||||
"keyword.control" = { fg = "light-green", modifiers= ["italic"] }
|
||||
"keyword.control.import" = { fg = "magenta" }
|
||||
"keyword.directive" = { fg = "yellow", modifiers=["bold"] }
|
||||
"keyword.storage" = {fg ="blue", modifiers=["bold"]}
|
||||
"keyword.storage.type" = { fg = "blue", modifiers=["bold"]}
|
||||
"keyword.storage.modifier" = { fg="purple", modifiers=["italic"]}
|
||||
"keyword.function" = {fg = "blue", modifiers=["bold"]}
|
||||
"label" = { fg = "purple" }
|
||||
"namespace" = { fg = "cyan" }
|
||||
"operator" = { fg = "light-green" }
|
||||
"punctuation" = { fg = "light-green" }
|
||||
"keyword.operator" = { fg = "light-green" }
|
||||
"special" = { fg = "magenta", modifiers=["italic"] }
|
||||
"string" = { fg = "green" }
|
||||
"type" = { fg = "cyan" }
|
||||
"variable" = { fg = "white" }
|
||||
"variable.builtin" = { fg = "yellow", modifiers = ["italic"] }
|
||||
"variable.parameter" = { fg = "orange" }
|
||||
"variable.other.member" = { fg = "orange" }
|
||||
"string.special" = { fg = "yellow"}
|
||||
"string.symbol" = { fg = "magenta"}
|
||||
|
||||
"markup.heading" = { fg = "blue", modifiers = ["bold"] }
|
||||
"markup.heading.marker" = {fg = "cyan"}
|
||||
"markup.raw.inline" = { fg = "green" }
|
||||
"markup.raw.block" = { fg = "yellow" }
|
||||
"markup.bold" = { modifiers = ["bold"] }
|
||||
"markup.italic" = { modifiers = ["italic"] }
|
||||
"markup.strikethrough" = { modifiers = ["crossed_out"] }
|
||||
"markup.list.unchecked" = { fg = "red" }
|
||||
"markup.list.checked" = { fg = "green"}
|
||||
"markup.quote" = { fg = "green" }
|
||||
"markup.link.url" = { fg = "blue", modifiers = ["underlined"]}
|
||||
"markup.link.text" = { fg = "white" }
|
||||
"markup.link.label" = { fg = "purple" }
|
||||
|
||||
"diff.plus" = "green"
|
||||
"diff.delta" = "orange"
|
||||
"diff.minus" = "red"
|
||||
|
||||
|
||||
"diagnostic.info".underline = { color = "blue", style = "curl" }
|
||||
"diagnostic.hint".underline = { color = "green", style = "curl" }
|
||||
"diagnostic.warning".underline = { color = "orange", style = "curl" }
|
||||
"diagnostic.error".underline = { color = "red", style = "curl" }
|
||||
|
||||
"info" = { fg = "blue", modifiers = ["bold"] }
|
||||
"hint" = { fg = "green", modifiers = ["bold"] }
|
||||
"warning" = { fg = "orange", modifiers = ["bold"] }
|
||||
"error" = { fg = "red", modifiers = ["bold"] }
|
||||
|
||||
"ui.background" = { bg = "background" }
|
||||
"ui.virtual" = { fg = "faint-gray" }
|
||||
"ui.virtual.indent-guide" = { fg = "faint-gray" }
|
||||
"ui.virtual.whitespace" = { fg = "faint-gray" }
|
||||
"ui.virtual.ruler" = { bg = "gray" }
|
||||
|
||||
"ui.cursor" = { fg = "white", modifiers = ["reversed"] }
|
||||
"ui.cursor.primary" = { fg = "white", modifiers = ["reversed"] }
|
||||
"ui.cursor.match" = { fg = "blue", modifiers = ["underlined"]}
|
||||
|
||||
"ui.selection" = { bg = "selection" }
|
||||
"ui.cursorline" = { bg = "dark-background" }
|
||||
|
||||
"ui.gutter" = {bg="dark-background"}
|
||||
"ui.linenr" = { fg = "linenr" }
|
||||
"ui.linenr.selected" = { bg = "light-green", fg="background" }
|
||||
|
||||
"ui.statusline" = { fg = "white", bg = "light-background" }
|
||||
"ui.statusline.inactive" = { fg = "light-gray", bg = "light-background" }
|
||||
"ui.statusline.normal" = { fg = "light-background", bg = "purple", modifiers = ["bold"] }
|
||||
"ui.statusline.insert" = { fg = "light-background", bg = "orange" , modifiers = ["bold"] }
|
||||
"ui.statusline.select" = { fg = "light-background", bg = "green" , modifiers = ["bold"] }
|
||||
"ui.text" = { fg = "white" }
|
||||
"ui.text.focus" = { fg = "blue", bg = "gray", modifiers = ["bold"] }
|
||||
|
||||
"ui.help" = { fg = "white", bg = "gray" }
|
||||
"ui.debug" = { fg = "red" }
|
||||
"ui.debug.active" = { bg ="red", fg="dark-background" }
|
||||
"ui.highlight.frameline" = { bg = "dark-background", fg="red", modifiers=["bold"] }
|
||||
"ui.popup" = { bg = "light-background" }
|
||||
"ui.window" = { fg = "gray" }
|
||||
"ui.menu" = { fg = "white", bg = "gray" }
|
||||
"ui.menu.selected" = { fg = "background", bg = "blue" }
|
||||
"ui.menu.scroll" = { fg = "white", bg = "light-gray" }
|
||||
"ui.virtual.inlay-hint" = { fg = "light-gray", bg = "virtual-background", modifiers = ["italic"] }
|
||||
"ui.virtual.jump-label" = {fg="light-green", bg = "virtual-background", modifiers = ["bold"]}
|
||||
|
||||
"ui.bufferline" = { fg = "white", bg = "background" }
|
||||
"ui.bufferline.active" = { fg = "background", bg = "light-green", modifiers=["bold"] }
|
||||
|
||||
|
||||
[palette]
|
||||
|
||||
selection = "#144364"
|
||||
blue = "#33bbff"
|
||||
red = "#ff3344"
|
||||
purple = "#838fff"
|
||||
green = "#00ee00"
|
||||
orange = "#ff9233"
|
||||
cyan = "#33ffff"
|
||||
white = "#FFFFFF"
|
||||
dark-background = "#191919"
|
||||
background = "#202020"
|
||||
light-background = "#282828"
|
||||
virtual-background = "#252525"
|
||||
gray = "#353535"
|
||||
faint-gray = "#454545"
|
||||
light-gray = "#808080"
|
||||
linenr = "#E0E0E0"
|
||||
light-green = "#33ffa0"
|
||||
magenta = "#d970ff"
|
||||
yellow = "#ffe033"
|
||||
@ -17,12 +17,13 @@
|
||||
],
|
||||
|
||||
"modules-center": [
|
||||
"custom/signal",
|
||||
"custom/steam",
|
||||
"custom/spotify",
|
||||
"custom/firefox",
|
||||
// "custom/signal",
|
||||
// "custom/steam",
|
||||
// "custom/spotify",
|
||||
// "custom/firefox",
|
||||
"custom/slack",
|
||||
"custom/files",
|
||||
"custom/vpn",
|
||||
],
|
||||
|
||||
"modules-right": [
|
||||
@ -36,7 +37,7 @@
|
||||
"custom/keyboard-layout",
|
||||
"battery",
|
||||
"backlight",
|
||||
"custom/neewer",
|
||||
// "custom/neewer",
|
||||
"tray",
|
||||
//"custom/weather",
|
||||
"custom/power",
|
||||
@ -313,6 +314,15 @@
|
||||
"tooltip": false,
|
||||
},
|
||||
|
||||
"custom/vpn": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/scripts/waybar-vpn.sh status",
|
||||
"interval": 5,
|
||||
"on-click": "~/.config/waybar/scripts/waybar-vpn.sh toggle",
|
||||
"tooltip": true
|
||||
},
|
||||
|
||||
"custom/launcher": {
|
||||
"format":" ",
|
||||
"on-click": "exec wofi -c ~/.config/wofi/config -I",
|
||||
68
nate-work/linked-dotfiles/waybar/scripts/vpn.sh
Executable file
68
nate-work/linked-dotfiles/waybar/scripts/vpn.sh
Executable file
@ -0,0 +1,68 @@
|
||||
#!/usr/bin/env bash
|
||||
# vpn-proxy-toggle.sh
|
||||
|
||||
VM_USER="nate"
|
||||
VM_IP="192.168.122.241"
|
||||
SOCKS_PORT=1080
|
||||
PID_FILE="/tmp/vpn-socks.pid"
|
||||
|
||||
start_proxy() {
|
||||
# Check if already running
|
||||
if pgrep -f "ssh -D $SOCKS_PORT" > /dev/null; then
|
||||
echo "Proxy already running"
|
||||
return 1
|
||||
fi
|
||||
|
||||
ssh -D $SOCKS_PORT -f -N $VM_USER@$VM_IP
|
||||
|
||||
# Get the PID of the SSH process we just started
|
||||
sleep 0.5
|
||||
pgrep -f "ssh -D $SOCKS_PORT" > "$PID_FILE"
|
||||
|
||||
# Configure system proxy
|
||||
gsettings set org.gnome.system.proxy mode 'manual'
|
||||
gsettings set org.gnome.system.proxy.socks host 'localhost'
|
||||
gsettings set org.gnome.system.proxy.socks port $SOCKS_PORT
|
||||
|
||||
echo "VPN proxy started on localhost:$SOCKS_PORT"
|
||||
}
|
||||
|
||||
stop_proxy() {
|
||||
if ! pgrep -f "ssh -D $SOCKS_PORT" > /dev/null; then
|
||||
echo "Proxy not running"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Find and kill SSH process
|
||||
pkill -f "ssh -D $SOCKS_PORT"
|
||||
rm -f "$PID_FILE"
|
||||
|
||||
# Disable system proxy
|
||||
gsettings set org.gnome.system.proxy mode 'none'
|
||||
|
||||
echo "VPN proxy stopped"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start_proxy
|
||||
;;
|
||||
stop)
|
||||
stop_proxy
|
||||
;;
|
||||
restart)
|
||||
stop_proxy
|
||||
start_proxy
|
||||
;;
|
||||
status)
|
||||
if pgrep -f "ssh -D $SOCKS_PORT" > /dev/null; then
|
||||
echo "Proxy running on localhost:$SOCKS_PORT"
|
||||
else
|
||||
echo "Proxy not running"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
32
nate-work/linked-dotfiles/waybar/scripts/waybar-vpn.sh
Executable file
32
nate-work/linked-dotfiles/waybar/scripts/waybar-vpn.sh
Executable file
@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
PID_FILE="/tmp/vpn-socks.pid"
|
||||
VPN_SCRIPT="$HOME/.config/waybar/scripts/vpn.sh"
|
||||
|
||||
get_status() {
|
||||
if pgrep -f "ssh -D 1080" > /dev/null 2>&1; then
|
||||
echo '{"text": " ", "class": "connected", "tooltip": "VPN Connected (Click to disconnect)"}'
|
||||
else
|
||||
echo '{"text": " ", "class": "disconnected", "tooltip": "VPN Disconnected (Click to connect)"}'
|
||||
fi
|
||||
}
|
||||
|
||||
toggle() {
|
||||
if pgrep -f "ssh -D 1080" > /dev/null 2>&1; then
|
||||
"$VPN_SCRIPT" stop
|
||||
else
|
||||
"$VPN_SCRIPT" start
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
status)
|
||||
get_status
|
||||
;;
|
||||
toggle)
|
||||
toggle
|
||||
;;
|
||||
*)
|
||||
get_status
|
||||
;;
|
||||
esac
|
||||
@ -307,6 +307,11 @@
|
||||
padding: 0px 5px 0px 5px;
|
||||
}
|
||||
|
||||
#custom-vpn {
|
||||
color: @lavender;
|
||||
padding: 0px 5px 0px 5px;
|
||||
}
|
||||
|
||||
#wiggle {
|
||||
animation-name: blink-warning;
|
||||
}
|
||||
@ -86,7 +86,7 @@
|
||||
gotools
|
||||
go-tools
|
||||
govulncheck
|
||||
golangci-lint
|
||||
unstable.golangci-lint
|
||||
go-swag
|
||||
delve
|
||||
trivy
|
||||
@ -102,6 +102,7 @@
|
||||
### LSP's
|
||||
gopls
|
||||
nil
|
||||
typescript-language-server
|
||||
nodePackages_latest.bash-language-server
|
||||
openscad-lsp
|
||||
vscode-langservers-extracted # provides eslint, markdown, json, css, and html lsp
|
||||
@ -343,6 +344,8 @@
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
"helix".source = config.lib.file.mkOutOfStoreSymlink "/home/nate/nixos/shared/dotfiles/helix";
|
||||
"waybar".source = config.lib.file.mkOutOfStoreSymlink "/home/nate/nixos/nate-work/linked-dotfiles/waybar";
|
||||
"gtk-4.0/assets".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/assets";
|
||||
"gtk-4.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk.css";
|
||||
"gtk-4.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk-dark.css";
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# Theme
|
||||
theme = "revontuli"
|
||||
theme = "catppuccin_macchiato"
|
||||
|
||||
[keys.normal]
|
||||
|
||||
67
shared/dotfiles/helix/languages.toml
Normal file
67
shared/dotfiles/helix/languages.toml
Normal file
@ -0,0 +1,67 @@
|
||||
###
|
||||
### Configuration for languages
|
||||
###
|
||||
|
||||
[[language]]
|
||||
name = "go"
|
||||
language-servers = ["gopls"]
|
||||
|
||||
[[language]]
|
||||
name = "markdown"
|
||||
language-servers = ["marksman"]
|
||||
|
||||
# Change dart format to 120 lines
|
||||
[[language]]
|
||||
name = "dart"
|
||||
formatter = {command = "dart", args = ["format", "-l", "120"]}
|
||||
language-servers = ["dart"]
|
||||
|
||||
[[language]]
|
||||
name = "nix"
|
||||
language-servers = ["nil"]
|
||||
|
||||
#
|
||||
# Zig configuration
|
||||
#
|
||||
[[language]]
|
||||
name = "zig"
|
||||
language-servers = ["zls"]
|
||||
|
||||
[language.debugger]
|
||||
name = "codelldb-dap"
|
||||
transport = "tcp"
|
||||
command = "codelldb"
|
||||
args = []
|
||||
port-arg = "--port {}"
|
||||
|
||||
[[language.debugger.templates]]
|
||||
name = "launch"
|
||||
request = "launch"
|
||||
completion = [ { name = "binary", completion = "filename" } ]
|
||||
args = { console = "internalConsole", program = "{0}" }
|
||||
|
||||
[[language.debugger.templates]]
|
||||
name = "attach"
|
||||
request = "attach"
|
||||
completion = [ "pid" ]
|
||||
args = { console = "internalConsole", pid = "{0}" }
|
||||
|
||||
[[language.debugger.templates]]
|
||||
name = "gdbserver attach"
|
||||
request = "attach"
|
||||
completion = [ { name = "lldb connect url", default = "connect://localhost:3333" }, { name = "file", completion = "filename" }, "pid" ]
|
||||
args = { console = "internalConsole", attachCommands = [ "platform select remote-gdb-server", "platform connect {0}", "file {1}", "attach {2}" ] }
|
||||
|
||||
#
|
||||
# cyo custom def
|
||||
#
|
||||
[[language]]
|
||||
name = "cyano"
|
||||
scope = "source.cyo"
|
||||
file-types = ["cyo"]
|
||||
# Spell checker
|
||||
language-servers = ["ltex-ls"]
|
||||
|
||||
[language-server.ltex-ls]
|
||||
command = "ltex-ls"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user