From ce0ddc8356d74187d33b9546b4f9518e823b3b22 Mon Sep 17 00:00:00 2001 From: xeovalyte Date: Tue, 15 Oct 2024 11:51:42 +0200 Subject: [PATCH] Changed configuration --- hosts/laptop/home.nix | 5 +++-- modules/home/cli/common/helix.nix | 29 +++++++++++++++++++++++++++++ modules/home/gui/common/firefox.nix | 6 +++++- modules/scripts/save_image.nix | 25 +++++++++++++++++++++++++ 4 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 modules/scripts/save_image.nix diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index d693c8c..cec66cd 100644 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -52,7 +52,6 @@ unstable.vesktop unstable.blender loupe - unstable.surrealist unstable.rnote # Office @@ -67,7 +66,9 @@ # Development unstable.drawio - unstable.ghostwriter + + # Scripts + (import ../../modules/scripts/save_image.nix { inherit pkgs; }) ]; # Enable home-manager diff --git a/modules/home/cli/common/helix.nix b/modules/home/cli/common/helix.nix index df4e1f0..759a87e 100644 --- a/modules/home/cli/common/helix.nix +++ b/modules/home/cli/common/helix.nix @@ -6,8 +6,20 @@ unstable.svls unstable.nil unstable.nixpkgs-fmt + unstable.vale-ls + unstable.vale ]; + home.file.".config/vale/.vale.ini".text = '' + StylesPath = ~/.local/share/vale/styles + + MinAlertLevel = suggestion + Packages = Readability + + [*] + BasedOnStyles = Vale + ''; + programs.helix = { enable = true; package = pkgs.unstable.helix; @@ -31,6 +43,11 @@ command = "svls"; }; + # Vale + language-server.vale = { + command = "vale-ls"; + }; + language = [ { name = "verilog"; @@ -40,6 +57,18 @@ name = "nix"; language-servers = [ "svls" ]; } + { + name = "html"; + language-servers = [ "vscode-html-language-server" "tailwindcss-ls" ]; + } + { + name = "css"; + language-servers = [ "vscode-html-language-server" "tailwindcss-ls" ]; + } + { + name = "markdown"; + language-servers = [ "vale" ]; + } ]; }; themes = { diff --git a/modules/home/gui/common/firefox.nix b/modules/home/gui/common/firefox.nix index d3f142f..9019361 100644 --- a/modules/home/gui/common/firefox.nix +++ b/modules/home/gui/common/firefox.nix @@ -26,7 +26,7 @@ DisableFirefoxAccounts = true; DisableAccounts = true; DontCheckDefaultBrowser = true; - DisplayBookmarksToolbar = "never"; + DisplayBookmarksToolbar = "newpage"; ExtensionSettings = { "nl-NL@dictionaries.addons.mozilla.org" = { install_url = "https://addons.mozilla.org/firefox/downloads/latest/woordenboek-nederlands/latest.xpi"; @@ -44,6 +44,10 @@ install_url = "https://addons.mozilla.org/firefox/downloads/latest/pwas-for-firefox/latest.xpi"; installation_mode = "force_installed"; }; + "markdown-viewer@outofindex.com" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/markdown-viewer-chrome/latest.xpi"; + installation_mode = "force_installed"; + }; }; }; profiles.xeovalyte = { diff --git a/modules/scripts/save_image.nix b/modules/scripts/save_image.nix new file mode 100644 index 0000000..c43459e --- /dev/null +++ b/modules/scripts/save_image.nix @@ -0,0 +1,25 @@ +{ pkgs, ... }: + +pkgs.writeShellScriptBin "saveimage" '' + # Check if an argument is provided + if [ -z "$1" ]; then + echo "Usage: $0 " + exit 1 + fi + + # Create the assets directory if it doesn't exist + mkdir -p assets + + # Set the output path in the assets directory + OUTPUT_PATH="assets/$1.png" + + # Save the clipboard image to the specified file in assets directory + wl-paste --type image/png > "$OUTPUT_PATH" + + # Check if the file was successfully saved + if [ $? -eq 0 ]; then + echo "Image saved to $OUTPUT_PATH" + else + echo "Failed to save the image" + fi +''