started to configure helix

This commit is contained in:
Aria Nolan 2023-10-09 18:08:57 -04:00
parent 476f627eb7
commit bb8c20d6a4
5 changed files with 186 additions and 4 deletions

View file

@ -1,5 +1,91 @@
{ {
"nodes": { "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": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -21,6 +107,22 @@
} }
}, },
"nixpkgs": { "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": { "locked": {
"lastModified": 1696604326, "lastModified": 1696604326,
"narHash": "sha256-YXUNI0kLEcI5g8lqGMb0nh67fY9f2YoJsILafh6zlMo=", "narHash": "sha256-YXUNI0kLEcI5g8lqGMb0nh67fY9f2YoJsILafh6zlMo=",
@ -38,8 +140,49 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"helix-master": "helix-master",
"home-manager": "home-manager", "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"
} }
} }
}, },

View file

@ -4,13 +4,14 @@
inputs = { inputs = {
# Specify the source of Home Manager and Nixpkgs. # Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
helix-master.url = "github:helix-editor/helix/master";
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
outputs = inputs @ { nixpkgs, home-manager, ... }: outputs = inputs @ { nixpkgs, home-manager, helix-master, ... }:
let let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
@ -29,11 +30,12 @@
modules = [ modules = [
./home.nix ./home.nix
./shell ./shell
./programs
]; ];
# Optionally use extraSpecialArgs # Optionally use extraSpecialArgs
# to pass through arguments to home.nix # to pass through arguments to home.nix
extraSpecialArgs = {inherit inputs system;}; extraSpecialArgs = {inherit inputs system helix-master;};
}; };
}; };
} }

View file

@ -6,7 +6,7 @@
homeDirectory = "/home/tacocat"; homeDirectory = "/home/tacocat";
stateVersion = "23.11"; stateVersion = "23.11";
sessionVariables = { sessionVariables = {
EDITOR = "lvim"; EDITOR = "hx";
}; };
packages = with pkgs; [ packages = with pkgs; [
wineWowPackages.unstable wineWowPackages.unstable

View file

@ -1,5 +1,6 @@
{ {
imports = [ imports = [
./kitty.nix ./kitty.nix
./helix.nix
]; ];
} }

36
programs/helix.nix Normal file
View file

@ -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 = "";
};
};
};
};
}