diff --git a/flake.lock b/flake.lock index 6afa025..bcae00b 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,91 @@ { "nodes": { + "crane": { + "inputs": { + "flake-compat": "flake-compat", + "flake-utils": [ + "helix-master", + "flake-utils" + ], + "nixpkgs": [ + "helix-master", + "nixpkgs" + ], + "rust-overlay": [ + "helix-master", + "rust-overlay" + ] + }, + "locked": { + "lastModified": 1688772518, + "narHash": "sha256-ol7gZxwvgLnxNSZwFTDJJ49xVY5teaSvF7lzlo3YQfM=", + "owner": "ipetkov", + "repo": "crane", + "rev": "8b08e96c9af8c6e3a2b69af5a7fa168750fcf88e", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1689068808, + "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "helix-master": { + "inputs": { + "crane": "crane", + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1696869489, + "narHash": "sha256-zwUcHjc/LykPQb2LBTiYM3QgGuY6BkeLb7R+ZFVeHRo=", + "owner": "helix-editor", + "repo": "helix", + "rev": "a8574805617d86304232b47d84fd7c7f4f773520", + "type": "github" + }, + "original": { + "owner": "helix-editor", + "ref": "master", + "repo": "helix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -21,6 +107,22 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1690272529, + "narHash": "sha256-MakzcKXEdv/I4qJUtq/k/eG+rVmyOZLnYNC2w1mB59Y=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "ef99fa5c5ed624460217c31ac4271cfb5cb2502c", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1696604326, "narHash": "sha256-YXUNI0kLEcI5g8lqGMb0nh67fY9f2YoJsILafh6zlMo=", @@ -38,8 +140,49 @@ }, "root": { "inputs": { + "helix-master": "helix-master", "home-manager": "home-manager", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" + } + }, + "rust-overlay": { + "inputs": { + "flake-utils": [ + "helix-master", + "flake-utils" + ], + "nixpkgs": [ + "helix-master", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1690424156, + "narHash": "sha256-Bpml+L280tHTQpwpC5/BJbU4HSvEzMvW8IZ4gAXimhE=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "f335a0213504c7e6481c359dc1009be9cf34432c", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index 42205cc..c5aac7f 100644 --- a/flake.nix +++ b/flake.nix @@ -4,13 +4,14 @@ inputs = { # Specify the source of Home Manager and Nixpkgs. nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + helix-master.url = "github:helix-editor/helix/master"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = inputs @ { nixpkgs, home-manager, ... }: + outputs = inputs @ { nixpkgs, home-manager, helix-master, ... }: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; @@ -29,11 +30,12 @@ modules = [ ./home.nix ./shell + ./programs ]; # Optionally use extraSpecialArgs # to pass through arguments to home.nix - extraSpecialArgs = {inherit inputs system;}; + extraSpecialArgs = {inherit inputs system helix-master;}; }; }; } diff --git a/home.nix b/home.nix index d507b62..8c9ca45 100644 --- a/home.nix +++ b/home.nix @@ -6,7 +6,7 @@ homeDirectory = "/home/tacocat"; stateVersion = "23.11"; sessionVariables = { - EDITOR = "lvim"; + EDITOR = "hx"; }; packages = with pkgs; [ wineWowPackages.unstable diff --git a/programs/default.nix b/programs/default.nix index 82c0af1..1aaec6e 100644 --- a/programs/default.nix +++ b/programs/default.nix @@ -1,5 +1,6 @@ { imports = [ ./kitty.nix + ./helix.nix ]; } diff --git a/programs/helix.nix b/programs/helix.nix new file mode 100644 index 0000000..f49b47c --- /dev/null +++ b/programs/helix.nix @@ -0,0 +1,36 @@ +{ config, pkgs, helix-master, ... }: + +{ + programs.helix = { + enable = true; + package = helix-master.packages."x86_64-linux".default; + settings = { + theme = "rose_pine_moon"; + editor = { + line-number = "relative"; + lsp.display-messages = true; + scrolloff = 5; + middle-click-paste = false; + cursorline = true; + auto-format = false; + idle-timeout = 400; + color-modes = true; +# gutters = [ "diff" "diagnostics" "line-numbers" "spacer" ]; +# gutters.layout = [ "diff" "diagnostics" "line-numbers" "spacer" ]; + whitespace = { + render = { + space = "all"; + tab = "none"; + newline = "none"; + }; + }; + + indent-guides = { + render = true; + character = "▏"; + }; + + }; + }; + }; +}