still trying to set up helix

This commit is contained in:
Aria Nolan 2023-10-09 21:35:30 -04:00
parent bb8c20d6a4
commit b78ad12e00
3 changed files with 47 additions and 41 deletions

View file

@ -4,15 +4,15 @@
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-utils": [ "flake-utils": [
"helix-master", "helix",
"flake-utils" "flake-utils"
], ],
"nixpkgs": [ "nixpkgs": [
"helix-master", "helix",
"nixpkgs" "nixpkgs"
], ],
"rust-overlay": [ "rust-overlay": [
"helix-master", "helix",
"rust-overlay" "rust-overlay"
] ]
}, },
@ -64,11 +64,13 @@
"type": "github" "type": "github"
} }
}, },
"helix-master": { "helix": {
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs", "nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
@ -107,22 +109,6 @@
} }
}, },
"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=",
@ -140,19 +126,19 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"helix-master": "helix-master", "helix": "helix",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs"
} }
}, },
"rust-overlay": { "rust-overlay": {
"inputs": { "inputs": {
"flake-utils": [ "flake-utils": [
"helix-master", "helix",
"flake-utils" "flake-utils"
], ],
"nixpkgs": [ "nixpkgs": [
"helix-master", "helix",
"nixpkgs" "nixpkgs"
] ]
}, },

View file

@ -4,23 +4,20 @@
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"; helix = {
url = "github:helix-editor/helix/master";
inputs.nixpkgs.follows = "nixpkgs";
};
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, helix-master, ... }: outputs = inputs @ { nixpkgs, home-manager, ... }:
let let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
# pkgs = import nixpkgs {
# inherit system;
# config = {
# allowUnfree = true;
# };
# };
in { in {
homeConfigurations."tacocat" = home-manager.lib.homeManagerConfiguration { homeConfigurations."tacocat" = home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
@ -35,7 +32,7 @@
# Optionally use extraSpecialArgs # Optionally use extraSpecialArgs
# to pass through arguments to home.nix # to pass through arguments to home.nix
extraSpecialArgs = {inherit inputs system helix-master;}; extraSpecialArgs = {inherit inputs system;};
}; };
}; };
} }

View file

@ -1,9 +1,9 @@
{ config, pkgs, helix-master, ... }: { config, pkgs, inputs, ... }:
{ {
programs.helix = { programs.helix = {
enable = true; enable = true;
package = helix-master.packages."x86_64-linux".default; package = inputs.helix.packages."x86_64-linux".default;
settings = { settings = {
theme = "rose_pine_moon"; theme = "rose_pine_moon";
editor = { editor = {
@ -15,22 +15,45 @@
auto-format = false; auto-format = false;
idle-timeout = 400; idle-timeout = 400;
color-modes = true; color-modes = true;
# gutters = [ "diff" "diagnostics" "line-numbers" "spacer" ]; soft-wrap.enable = true;
# gutters.layout = [ "diff" "diagnostics" "line-numbers" "spacer" ];
whitespace = { whitespace = {
render = { render = {
space = "all"; space = "none";
tab = "none"; tab = "none";
newline = "none"; newline = "none";
}; };
}; };
indent-guides = { indent-guides = {
render = true; render = true;
character = ""; character = "";
}; };
}; };
}; };
languages = {
language = [{
name = "nix";
scope = "flake.nix";
roots = [ "flake.nix" "flake.lock" ];
injection-regex = "nix";
auto-format = false;
file-types = [ "nix" ];
comment-token = "#";
indent = {
tab-width = 2;
unit = " ";
};
language-servers = [ "${pkgs.nil}" ];
formatter = {
command = "${pkgs.nixpkgs-fmt}";
};
}];
# grammar = [{
# name = "nix";
# source = {
# git = "https://github.com/nix-community/tree-sitter-nix";
# rev = "66e3e9ce9180ae08fc57372061006ef83f0abde7";
# };
# }];
};
}; };
} }