helix: added flake input added initial configuration and enable it on main machine
This commit is contained in:
parent
bfcc79bed7
commit
1073297f5a
|
@ -55,6 +55,11 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
helix = {
|
||||||
|
url = "github:helix-editor/helix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
# GPG default configuration
|
# GPG default configuration
|
||||||
gpg-base-conf = {
|
gpg-base-conf = {
|
||||||
url = "github:drduh/config";
|
url = "github:drduh/config";
|
||||||
|
|
|
@ -1,55 +1,145 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
|
inputs,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
system,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf mkEnableOption;
|
inherit (lib) mkIf mkEnableOption;
|
||||||
cfg = config.wyrdgard.apps.cli-apps.helix;
|
cfg = config.wyrdgard.apps.cli-apps.helix;
|
||||||
|
|
||||||
|
cachix-url = "https://helix.cachix.org";
|
||||||
|
cachix-key = "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=";
|
||||||
|
|
||||||
|
helix-pkg = inputs.helix.packages.${system}.default;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.wyrdgard.apps.cli-apps.helix = {
|
options.wyrdgard.apps.cli-apps.helix = {
|
||||||
enable = mkEnableOption "Whether to enable nixvim or not (Default true)";
|
enable = mkEnableOption "Whether to enable nixvim or not";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment = {
|
environment = {
|
||||||
systemPackages = with pkgs; [ helix ];
|
systemPackages = [ helix-pkg ];
|
||||||
};
|
};
|
||||||
|
|
||||||
wyrdgard.home = {
|
wyrdgard = {
|
||||||
extraOptions = {
|
home = {
|
||||||
programs.helix = {
|
extraOptions = {
|
||||||
enable = true;
|
programs.helix = {
|
||||||
settings = {
|
enable = true;
|
||||||
theme = "autumn_night_transparent";
|
package = helix-pkg;
|
||||||
editor.cursor-shape = {
|
defaultEditor = true;
|
||||||
normal = "block";
|
settings = {
|
||||||
insert = "bar";
|
theme = "tokyonight";
|
||||||
select = "underline";
|
editor = {
|
||||||
|
line-number = "relative";
|
||||||
|
|
||||||
|
lsp = {
|
||||||
|
display-inlay-hints = true;
|
||||||
|
display-messages = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
cursor-shape = {
|
||||||
|
normal = "block";
|
||||||
|
insert = "bar";
|
||||||
|
select = "underline";
|
||||||
|
};
|
||||||
|
|
||||||
|
indent-guides = {
|
||||||
|
render = true;
|
||||||
|
character = "|";
|
||||||
|
};
|
||||||
|
|
||||||
|
statusline = {
|
||||||
|
left = [
|
||||||
|
"mode"
|
||||||
|
"spinner"
|
||||||
|
];
|
||||||
|
center = [ "file-name" ];
|
||||||
|
right = [
|
||||||
|
"workspace-diagnostics"
|
||||||
|
"diagnostics"
|
||||||
|
"selections"
|
||||||
|
"position"
|
||||||
|
"total-line-numbers"
|
||||||
|
"spacer"
|
||||||
|
"file-encoding"
|
||||||
|
"file-line-ending"
|
||||||
|
"file-type"
|
||||||
|
];
|
||||||
|
separator = "│";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
keys = {
|
||||||
|
normal = {
|
||||||
|
space = {
|
||||||
|
space = "file_picker";
|
||||||
|
};
|
||||||
|
|
||||||
|
C-j = [
|
||||||
|
"move_line_down"
|
||||||
|
"move_line_down"
|
||||||
|
"move_line_down"
|
||||||
|
"move_line_down"
|
||||||
|
"move_line_down"
|
||||||
|
];
|
||||||
|
C-k = [
|
||||||
|
"move_line_up"
|
||||||
|
"move_line_up"
|
||||||
|
"move_line_up"
|
||||||
|
"move_line_up"
|
||||||
|
"move_line_up"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
languages.language = [
|
languages = {
|
||||||
{
|
language = [
|
||||||
name = "nix";
|
{
|
||||||
auto-format = true;
|
name = "nix";
|
||||||
formatter.command = "${pkgs.nixfmt}/bin/nixfmt";
|
auto-format = true;
|
||||||
}
|
formatter.command = "${pkgs.nixfmt-rfc-style}/bin/nixfmt";
|
||||||
{
|
language-servers = [
|
||||||
name = "rust";
|
"nixd"
|
||||||
auto-format = true;
|
"nil"
|
||||||
formatter.command = "cargo fmt";
|
];
|
||||||
}
|
}
|
||||||
];
|
{
|
||||||
themes = {
|
# provided by the dev environment in the rust shell
|
||||||
autumn_night_transparent = {
|
name = "rust";
|
||||||
"inherits" = "autumn_night";
|
auto-format = true;
|
||||||
"ui.background" = { };
|
formatter.command = "cargo fmt";
|
||||||
|
language-servers = [ "rust-analyzer" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
language-server = {
|
||||||
|
nil = {
|
||||||
|
command = "${pkgs.nil}/bin/nil";
|
||||||
|
};
|
||||||
|
nixd = {
|
||||||
|
command = "${pkgs.nixd}/bin/nixd";
|
||||||
|
};
|
||||||
|
marksman = {
|
||||||
|
command = "${pkgs.marksman}/bin/marksman";
|
||||||
|
};
|
||||||
|
omnisharp = {
|
||||||
|
command = "${pkgs.omnisharp-roslyn}/bin/OmniSharp";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nix.extra-substituters.${cachix-url} = {
|
||||||
|
key = cachix-key;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ in
|
||||||
apps = {
|
apps = {
|
||||||
_1password = enabled;
|
_1password = enabled;
|
||||||
obs-studio = enabled;
|
obs-studio = enabled;
|
||||||
|
cli-apps.helix = enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
desktop.hyprland = {
|
desktop.hyprland = {
|
||||||
|
|
Loading…
Reference in a new issue