From 61bb7ce84f3eee95c671d4ed4b1034e7e754ae2b Mon Sep 17 00:00:00 2001 From: Johannes Hendrik Gerard van der Weide Date: Wed, 10 Apr 2024 14:43:48 +0200 Subject: [PATCH] Added nixvim (broken) --- README.md | 14 +- flake.lock | 336 ++++++++++++++++++++++++++++++++++++++ flake.nix | 28 ++++ nix/colorScheme.nix | 25 +++ pkgs/vim/colorScheme.nix | 29 ++++ pkgs/vim/default.nix | 8 + pkgs/vim/file_browser.nix | 10 ++ pkgs/vim/lsp.nix | 29 ++++ pkgs/vim/startup.nix | 97 +++++++++++ pkgs/vim/telescope.nix | 5 + 10 files changed, 574 insertions(+), 7 deletions(-) create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 nix/colorScheme.nix create mode 100644 pkgs/vim/colorScheme.nix create mode 100644 pkgs/vim/default.nix create mode 100644 pkgs/vim/file_browser.nix create mode 100644 pkgs/vim/lsp.nix create mode 100644 pkgs/vim/startup.nix create mode 100644 pkgs/vim/telescope.nix diff --git a/README.md b/README.md index eb65f70..7807e9b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# HertogPackages +# HermitPackages -Here be nix flake packages for Hertog's use do not touch, - -or do.... - - -read the LICENSE for details \ No newline at end of file +Here be nix flake packages mostly just for Hertog's use do not touch, + +or do.... + + +read the LICENSE for details diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..79ac5c0 --- /dev/null +++ b/flake.lock @@ -0,0 +1,336 @@ +{ + "nodes": { + "base16-schemes": { + "flake": false, + "locked": { + "lastModified": 1696158499, + "narHash": "sha256-5yIHgDTPjoX/3oDEfLSQ0eJZdFL1SaCfb9d6M0RmOTM=", + "owner": "tinted-theming", + "repo": "base16-schemes", + "rev": "a9112eaae86d9dd8ee6bb9445b664fba2f94037a", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-schemes", + "type": "github" + } + }, + "devshell": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1711099426, + "narHash": "sha256-HzpgM/wc3aqpnHJJ2oDqPBkNsqWbW0WfWUO8lKu8nGk=", + "owner": "numtide", + "repo": "devshell", + "rev": "2d45b54ca4a183f2fdcf4b19c895b64fbf620ee8", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "flake-compat": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712014858, + "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "nixvim", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712645849, + "narHash": "sha256-67v20E0gH7nvAaMsah2oRIocnxGO25fATUyzQHIywxQ=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "40a99619da804a78a0b166e5c6911108c059c3a8", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nix-colors": { + "inputs": { + "base16-schemes": "base16-schemes", + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1707825078, + "narHash": "sha256-hTfge2J2W+42SZ7VHXkf4kjU+qzFqPeC9k66jAUBMHk=", + "owner": "misterio77", + "repo": "nix-colors", + "rev": "b01f024090d2c4fc3152cd0cf12027a7b8453ba1", + "type": "github" + }, + "original": { + "owner": "misterio77", + "repo": "nix-colors", + "type": "github" + } + }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1711763326, + "narHash": "sha256-sXcesZWKXFlEQ8oyGHnfk4xc9f2Ip0X/+YZOq3sKviI=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "36524adc31566655f2f4d55ad6b875fb5c1a4083", + "type": "github" + }, + "original": { + "owner": "lnl7", + "repo": "nix-darwin", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1712439257, + "narHash": "sha256-aSpiNepFOMk9932HOax0XwNxbA38GOUVOiXfUVPOrck=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "ff0dbd94265ac470dda06a657d5fe49de93b4599", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1697935651, + "narHash": "sha256-qOfWjQ2JQSQL15KLh6D7xQhx0qgZlYZTYlcEiRuAMMw=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "e1e11fdbb01113d85c7f41cada9d2847660e3902", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixvim": { + "inputs": { + "devshell": "devshell", + "flake-compat": "flake-compat", + "flake-parts": "flake-parts", + "home-manager": "home-manager", + "nix-darwin": "nix-darwin", + "nixpkgs": [ + "nixpkgs" + ], + "pre-commit-hooks": "pre-commit-hooks" + }, + "locked": { + "lastModified": 1712680011, + "narHash": "sha256-mIjbuLm99jsj3Kk32aoy+4KjBmF1XTAqrV0+ZTtvrus=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "f1df1548346a2c1f5bb7983a92bf817d76c45c13", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixvim", + "type": "github" + } + }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat_2", + "flake-utils": "flake-utils_2", + "gitignore": "gitignore", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ], + "nixpkgs-stable": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712579741, + "narHash": "sha256-igpsH+pa6yFwYOdah3cFciCk8gw+ytniG9quf5f/q84=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "70f504012f0a132ac33e56988e1028d88a48855c", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, + "root": { + "inputs": { + "nix-colors": "nix-colors", + "nixpkgs": "nixpkgs", + "nixvim": "nixvim" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..19672e3 --- /dev/null +++ b/flake.nix @@ -0,0 +1,28 @@ +{ + description = "hermitpkgs nix flake for qeustionable usecases"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nix-colors.url = "github:misterio77/nix-colors"; + nixvim = { + url = "github:nix-community/nixvim"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { + nixpkgs, + nix-colors, + nixvim, + ... + }: + let + system = "x86_64-linux"; + in { + packages.${system} = { + vim = nixvim.legacyPackages.${system}.makeNixvimWithModule { + module = import ./pkgs/vim; + }; + }; + }; +} diff --git a/nix/colorScheme.nix b/nix/colorScheme.nix new file mode 100644 index 0000000..ced78c1 --- /dev/null +++ b/nix/colorScheme.nix @@ -0,0 +1,25 @@ +{ + colorScheme = { + slug = "red"; + name = "Hermit Red"; + author = "@hertog@tech.lgbt"; + palette = { + base00 = "#120002"; # Default Background + base01 = "#190003"; # Lighter Background (Used for status bars, line number and folding marks) + base02 = "#230004"; # Selection Background + base03 = "#340005"; # Comments, Invisibles, Line Highlighting + base04 = "#480006"; # Dark Foreground (Used for status bars) + base05 = "#670009"; # Default Foreground, Caret, Delimiters, Operators + base06 = "#8C000C"; # Light Foreground (Not often used) + base07 = "#B00010"; # Light Background (Not often used) + base08 = "#D90016"; # Variables, XML Tags, Markup Link Text, Markup Lists, Diff Deleted + base09 = "#F2B3B3"; # Integers, Boolean, Constants, XML Attributes, Markup Link Url + base0A = "#EA8080"; # Classes, Markup Bold, Search Text Background + base0B = "#E14D4D"; # Strings, Inherited Class, Markup Code, Diff Inserted + base0C = "#DA0026"; # Support, Regular Expressions, Escape Characters, Markup Quotes + base0D = "#D40000"; # Functions, Methods, Attribute IDs, Headings + base0E = "#C10000"; # Keywords, Storage, Selector, Markup Italic, Diff Changed + base0F = "#A70000"; # Deprecated, Opening/Closing Embedded Language Tags, e.g. + }; + }; +} diff --git a/pkgs/vim/colorScheme.nix b/pkgs/vim/colorScheme.nix new file mode 100644 index 0000000..c87fa71 --- /dev/null +++ b/pkgs/vim/colorScheme.nix @@ -0,0 +1,29 @@ +{ config, nix-colors, inputs, ... }: +let + config = import ../../nix/colorScheme.nix; +in +{ + colorschemes = { + base16 = { + enable = true; + customColorScheme = { + base00 = "${config.colorScheme.palette.base00}"; + base01 = "${config.colorScheme.palette.base01}"; + base02 = "${config.colorScheme.palette.base02}"; + base03 = "${config.colorScheme.palette.base03}"; + base04 = "${config.colorScheme.palette.base04}"; + base05 = "${config.colorScheme.palette.base05}"; + base06 = "${config.colorScheme.palette.base06}"; + base07 = "${config.colorScheme.palette.base07}"; + base08 = "${config.colorScheme.palette.base08}"; + base09 = "${config.colorScheme.palette.base09}"; + base0A = "${config.colorScheme.palette.base0A}"; + base0B = "${config.colorScheme.palette.base0B}"; + base0C = "${config.colorScheme.palette.base0C}"; + base0D = "${config.colorScheme.palette.base0D}"; + base0E = "${config.colorScheme.palette.base0E}"; + base0F = "${config.colorScheme.palette.base0F}"; + }; + }; + }; +} diff --git a/pkgs/vim/default.nix b/pkgs/vim/default.nix new file mode 100644 index 0000000..9e26dbf --- /dev/null +++ b/pkgs/vim/default.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ./startup.nix + ./telescope.nix + ./lsp.nix + ./colorScheme.nix + ]; +} diff --git a/pkgs/vim/file_browser.nix b/pkgs/vim/file_browser.nix new file mode 100644 index 0000000..f67fc58 --- /dev/null +++ b/pkgs/vim/file_browser.nix @@ -0,0 +1,10 @@ +{ + plugins.telescope = { + enable = true; + extensions = { + filebrowser = { + enable = true; + }; + }; + }; +} diff --git a/pkgs/vim/lsp.nix b/pkgs/vim/lsp.nix new file mode 100644 index 0000000..fb7d355 --- /dev/null +++ b/pkgs/vim/lsp.nix @@ -0,0 +1,29 @@ +{ + plugins.lsp = { + enable = true; + servers = { + # Nix + nixd = { + enable = true; + autostart = true; + }; + # Rust + rust-analyzer = { + enable = true; + autostart = true; + installRustc = true; + installCargo = true; + }; + # Godot + gdscript = { + enable = true; + autostart = true; + }; + # Markdown + marksman = { + enable = true; + autostart = true; + }; + }; + }; +} diff --git a/pkgs/vim/startup.nix b/pkgs/vim/startup.nix new file mode 100644 index 0000000..8805d49 --- /dev/null +++ b/pkgs/vim/startup.nix @@ -0,0 +1,97 @@ +{ + plugins.startup = { + enable = true; + extraOptions= { + keygen_church = { + type = "text"; + title = "PRAISE THE CODE"; + defaultColor = "#FF0000"; + highlight = ""; + margin = 5; + align = "center"; + content = [ + " █ " + " ▓ █ ▓ " + " ░█░ " + " █ " + " ▓ █ ▓ " + " █ ▓ █ ▓ █ " + " ▓ █ ▒ █ ▓ █ ▓ █ ▒ █ ▓ " + " ▒ ▓ █ ▒ ▓ █ ▓ █ ▓ █ ▓ ▒ █ ▓ ▒ " + " ░ ▒ ▓ █ ▒ ▓ █ ▓ █ ▓ █ ▓ ▒ █ ▓ ▒ ░ " + "░ ░ ▒ ▓ █ ▒ ▓ █ ▓ █ ▓ █ ▓ ▒ █ ▓ ▒ ░ ░" + " ▓ █ ▓ █ ▓ █ ▓ " + " ▓ ▓ ▓ ▓ ▓ ▓ " + " ▒ ▓ ▒ ▓ ▓ ▓ ▒ ▓ ▒ " + " ░▒▓▒░ ▒ ▒ ▒ ░▒▓▒░ " + " ▓ ▓ ░░░▒░░░ ▓ ▓ " + " ▓ ▒ ▒ ▒ ▓ " + " ▒ ░░░░▒▒▒▒▒░░░░ ▒ " + " ▒ ▒ ▒ " + " ░ ▓▒░░▒░░▒▓ ░ " + " ░ ▒ ▒ ░ " + " ▒ ▒ " + " ▒ ▒ " + " ▒▒▒ " + ]; + oldfilesAmount = 0; + }; + praise = { + type = "text"; + content = ["PRAISE THE CODE"]; + align = "center"; + highlight = ""; + defautlColor = "#CCCCCC"; + }; + piano = { + type = "text"; + align = "center"; + highlight = ""; + defaultColor = "#FF0000"; + content = [ + "░▓░▓░░▓░▓░▓░░▓░▓░░▓░▓░▓░░" + "░░░░░░░░░░░░░░░░░░░░░░░░░" + ]; + }; + body = { + type = "mapping"; + align = "center"; + foldSection = false; + title = "Commands"; + margin = 0; + content = [ + [ "READ AS IS WRITTEN" "Telescope find_files" "f" ] # Requires telescope + [ "THE OLD CODE REMAINS" "Telescope oldfiles" "r" ] # Requires telescope + [ "WANDER THROUGH THE ARCHIVES" "Telescope file_browser" "b" ] # Requires telescope and file_browser + [ "REMEMBER ALL THAT HAS BEEN" "Telescope git_commits" "l" ] # Requires telescope + [ "AWAIT ALL THAT WILL" "Telescope git_status" "s" ] # Requires telescope + [ "RECORD FOR THOSE TO COME" "lua require'startup'.new_file()" "n" ] + ]; + highlight = ""; + default_color = "#BF0000"; + }; + options = { + mappingKeys = true; + disableStatuslines = true; + cursonColum = 0.5; + paddings = [ 10 1 1 0]; + }; + mappings = { + executeCommand = ""; + openFile = "o"; + openFileSplit = ""; + openSection = ""; + openHelp = "?"; + }; + colors = { + background = "#000000"; + }; + parts = [ + "keygen_church" + "praise" + "body" + "piano" + ]; + }; + }; +} diff --git a/pkgs/vim/telescope.nix b/pkgs/vim/telescope.nix new file mode 100644 index 0000000..68a5112 --- /dev/null +++ b/pkgs/vim/telescope.nix @@ -0,0 +1,5 @@ +{ + plugins.telescope = { + enable = true; + }; +}