diff --git a/README.md b/README.md index 470954e..a7fd9a6 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,9 @@ This repository contains a Nix flake configuration for setting up a development To use this configuration with Home Manager: 1. Make sure you have Nix installed -2. Run `home-manager switch` to apply the configuration +2. + a) Run `home-manager switch` to apply the configuration + b) Run with `nix run nixpkgs#home-manager -- switch --flake https://gitea.tylerbohrer.dev/tyler/my-default-nix-home` The configuration will set up: - Default shell to zsh @@ -82,4 +84,4 @@ All supported languages include their respective language servers for enhanced I htop is included for process monitoring and system resource tracking. ### tmux Integration -Uses the tmux package from jakehamilton/tmux repository for enhanced tmux functionality. \ No newline at end of file +Uses the tmux package from jakehamilton/tmux repository for enhanced tmux functionality. diff --git a/flake.nix b/flake.nix index 7f1e0ed..3b7219c 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "Home Manager configuration with tmux, helix, zsh, starship, alacritty, git, ssh for WSL, Linux, and Mac M1 with Docker and conditional language support"; + description = "My Nix flake for cross-platform development environment"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; @@ -7,51 +7,27 @@ url = "github:nix-community/home-manager/release-23.11"; }; flake-utils.url = "github:numtide/flake-utils"; - tmux = { - url = "github:jakehamilton/tmux"; - inputs.nixpkgs.follows = "nixpkgs"; + my-repo = { + url = "https://gitea.tylerbohrer.dev/tyler/my-default-nix-home"; }; }; - outputs = { self, nixpkgs, home-manager, flake-utils, tmux }: + outputs = { self, nixpkgs, home-manager, flake-utils, my-repo }: flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-darwin" "x86_64-windows" ] (system: let - pkgs = import nixpkgs { + pkgs = import nixpkgs { inherit system; config = { allowUnfree = true; }; }; - in { - # Development shell with all our tools - devShells.default = pkgs.mkShell { - buildInputs = with pkgs; [ - tmux - helix - zsh - git - openssh - alacritty - starship - htop - docker-client - docker-compose - odin - ols - harper - gcc - gnumake - ]; + homeConfig = import ./home-manager/home.nix { + inherit pkgs; + tmuxPackage = my-repo.packages.${system}.tmux; }; - - # Home Manager configuration - homeConfigurations."tylerbohrer" = home-manager.lib.homeManagerConfiguration { - inherit pkgs; - modules = [ - (import ./home-manager/home.nix { - inherit pkgs; - tmuxPackage = tmux.packages.${system}.tmux; - }) - ]; + in { + packages.default = homeConfig; + checks = { + home-manager = homeConfig; }; }); } \ No newline at end of file diff --git a/home-manager/home.nix b/home-manager/home.nix index 150cf10..70c7d32 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -234,21 +234,41 @@ in # Create Helix config with language servers for all activated languages home.file.".config/helix/config.toml".text = '' # Helix Configuration with Language Servers - + [editor] - theme = "onedark" + theme="peachpuff" + + [editor.file-picker] + hidden = true + + [editor] + line-number = "relative" + + [editor.cursor-shape] + insert = "bar" + normal = "block" + select = "underline" [editor.lsp] enable = true auto-start = true - # Default language servers (always active) - [[languages.odin]] - language-server = { name = "ols", command = "ols" } - - [[languages.harper]] - language-server = { name = "harper", command = "harper-ls" } - + [language-server.harper-ls] + command = "harper-ls" + args = ["--stdio"] + + [language-server.harper-ls.config.harper-ls.linters] + SpellCheck = false + SentenceCapitalization = false + + [language-server.ols] + command = "ols" + args = [] + + [[language]] + name = "odin" + language-servers = ["ols", "harper-ls"] + # Dynamically added language servers based on user selection ${builtins.concatStringsSep "\n" (generateLanguageServerConfig)} ''; @@ -273,4 +293,4 @@ in mkdir -p $HOME/.config/helix ''; }; -} \ No newline at end of file +}