From 2f4fa4afd629dbe3cce4723309a3f80275a7aa21 Mon Sep 17 00:00:00 2001 From: Geir Okkenhaug Jerstad Date: Tue, 2 Jul 2024 15:02:33 +0200 Subject: [PATCH] lsp on the workstation --- workstation/aliases.nix | 21 +++++++++++++++++++++ workstation/configuration.nix | 27 ++++++++++++++++++++++++--- workstation/tty.nix | 29 +++++++++++++++++++++++++++++ workstation/zsh.nix | 15 +++++++++++++++ 4 files changed, 89 insertions(+), 3 deletions(-) create mode 100644 workstation/aliases.nix create mode 100644 workstation/tty.nix create mode 100644 workstation/zsh.nix diff --git a/workstation/aliases.nix b/workstation/aliases.nix new file mode 100644 index 0000000..723b30d --- /dev/null +++ b/workstation/aliases.nix @@ -0,0 +1,21 @@ +{ config, pkgs, ... }: +{ + environment.systemPackages = with pkgs; [ + tldr + eza + bat + ripgrep + ]; + environment.shellAliases = { + vi = "nvim"; + vim = "nvim"; + h = "tldr"; + # oxidized + ls = "eza -l"; + cat = "bat"; + grep = "rg"; + top = "btm --color gruvbox"; + # some tools + + }; +} diff --git a/workstation/configuration.nix b/workstation/configuration.nix index b92381a..041154c 100644 --- a/workstation/configuration.nix +++ b/workstation/configuration.nix @@ -10,6 +10,9 @@ ./hardware-configuration.nix ./k8s.nix ./podman.nix + ./tty.nix + ./aliases.nix + ./zsh.nix ]; # Kernel @@ -118,7 +121,7 @@ # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ - foot kitty terminator zsh + foot kitty terminator dbus greetd.tuigreet wayland @@ -128,8 +131,26 @@ neofetch glances inxi htop bottom wget curl git - mc eza du-dust - ]; + mc eza du-dust ripgrep + nix-direnv + + # Languages + zig + python3 python3Packages.pip + guile + go gotools golint + rustup + # language servers + zls + python3Packages.python-lsp-server + gopls + luajitPackages.lua-lsp + nodePackages.bash-language-server + vimPlugins.cmp-nvim-lsp + ccls + gdb + + ]; # Some programs need SUID wrappers, can be configured further or are # started in user sessions. diff --git a/workstation/tty.nix b/workstation/tty.nix new file mode 100644 index 0000000..b09a9f6 --- /dev/null +++ b/workstation/tty.nix @@ -0,0 +1,29 @@ +{ pkgs, ... }: +{ + services.getty.greetingLine = ''\l''; + + console = { + earlySetup = true; + + # Joker palette + colors = [ + "1b161f" + "ff5555" + "54c6b5" + "d5aa2a" + "bd93f9" + "ff79c6" + "8be9fd" + "bfbfbf" + + "1b161f" + "ff6e67" + "5af78e" + "ffce50" + "caa9fa" + "ff92d0" + "9aedfe" + "e6e6e6" + ]; + }; +} diff --git a/workstation/zsh.nix b/workstation/zsh.nix new file mode 100644 index 0000000..6ec8588 --- /dev/null +++ b/workstation/zsh.nix @@ -0,0 +1,15 @@ +{ config, pkgs, ... }: +{ + environment.systemPackages = with pkgs; + [ + zsh + zsh-completions + nix-zsh-completions + starship + direnv + ]; + + programs.zsh.enable = true; + programs.zsh.syntaxHighlighting.enable = true; + programs.zsh.autosuggestions.enable = true; + }