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,20 +15,20 @@
../../git
../../gnome
../../gui
../../helix
../../mercurial
../../vim
../../zsh
];
fileSystems."/" = { options = [ "compress=zstd" ]; };
fileSystems."/" = {options = ["compress=zstd"];};
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.binfmt.emulatedSystems = ["aarch64-linux"];
boot.plymouth = {
enable = true;
logo = ./boot.png;
@ -37,17 +44,19 @@
hardware.trackpoint.enable = true;
hardware.keyboard.qmk.enable = true;
services.udev.packages = [ pkgs.qmk-udev-rules ];
services.udev.packages = [pkgs.qmk-udev-rules];
programs.ccache.enable = true;
hardware.opengl.extraPackages = with pkgs; [ libva ];
hardware.opengl.extraPackages = with pkgs; [libva];
programs.steam.enable = true;
nixpkgs.config.allowUnfree = true;
home-manager.users.cyryl = { ... }: {
imports = [ ../../home-manager/programs/kitty.nix ];
home-manager.users.cyryl = {...}: {
imports = [
../../home-manager/programs/kitty.nix
];
home.packages =
(with inputs.nixpkgs-master.legacyPackages."${system}"; [ bisq-desktop ])
++ (with pkgs; [ lutris ])
++ (with inputs.endless-sky.legacyPackages."${system}"; [ endless-sky ]);
(with inputs.nixpkgs-master.legacyPackages."${system}"; [bisq-desktop])
++ (with pkgs; [lutris])
++ (with inputs.endless-sky.legacyPackages."${system}"; [endless-sky]);
};
}

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;
};
};
};
}