re-add helix, adding its cache

This commit is contained in:
Cyryl Płotnicki 2024-04-21 14:15:40 +01:00
parent a58e359c1c
commit 6a6070431d
3 changed files with 97 additions and 12 deletions

View file

@ -1,4 +1,11 @@
{ config, pkgs, inputs, lib, system, ... }: {
{
config,
pkgs,
inputs,
lib,
system,
...
}: {
networking.hostName = "foryog";
imports = [
@ -8,6 +15,7 @@
../../git
../../gnome
../../gui
../../helix
../../mercurial
../../vim
../../zsh
@ -18,8 +26,7 @@
services.restic.backups.home-to-b2 = {
repository = lib.mkForce "b2:cyplo-restic-foureighty:/";
};
boot.kernelParams =
[ "initcall_debug" ''dyndbg="file suspend.c +p"'' "no_console_suspend" ];
boot.kernelParams = ["initcall_debug" ''dyndbg="file suspend.c +p"'' "no_console_suspend"];
boot.tmp.cleanOnBoot = true;
boot.binfmt.emulatedSystems = ["aarch64-linux"];
boot.plymouth = {
@ -44,7 +51,9 @@
nixpkgs.config.allowUnfree = true;
home-manager.users.cyryl = {...}: {
imports = [ ../../home-manager/programs/kitty.nix ];
imports = [
../../home-manager/programs/kitty.nix
];
home.packages =
(with inputs.nixpkgs-master.legacyPackages."${system}"; [bisq-desktop])
++ (with pkgs; [lutris])

16
nixos/helix/default.nix Normal file
View file

@ -0,0 +1,16 @@
{
config,
pkgs,
lib,
...
}: {
nix.settings = {
trusted-substituters = [
"https://helix.cachix.org"
];
extra-trusted-public-keys = [
"helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
];
};
home-manager.users.cyryl = {...}: {imports = [./home.nix];};
}

60
nixos/helix/home.nix Normal file
View file

@ -0,0 +1,60 @@
{
lib,
inputs,
system,
...
}: let
alejandra = lib.getExe inputs.alejandra.packages.${system}.default;
nil = lib.getExe inputs.nil.packages.${system}.default;
helixPackage = inputs.helix.packages.${system}.default;
helix = lib.getExe helixPackage;
in {
home.sessionVariables = {
EDITOR = lib.mkForce helix;
VISUAL = lib.mkForce helix;
};
programs.zsh.sessionVariables = {
EDITOR = lib.mkForce helix;
VISUAL = lib.mkForce helix;
};
systemd.user.sessionVariables = {
EDITOR = lib.mkForce helix;
VISUAL = lib.mkForce helix;
};
programs.helix = {
enable = true;
package = helixPackage;
languages = {
language = [
{
name = "nix";
auto-format = true;
language-servers = ["nil"];
formatter = {
command = alejandra;
args = ["-q"];
};
}
];
language-server.nil = {
command = nil;
config.nil.nix = {
maxMemoryMB = 8192;
flake.autoEvalInputs = true;
};
};
};
settings = {
theme = "solarized_dark";
editor = {
auto-save = true;
auto-pairs = false;
file-picker.hidden = false;
lsp.display-messages = true;
line-number = "relative";
soft-wrap.enable = true;
};
};
};
}