diff --git a/overlay.nix b/overlay.nix index 95dd943..bc5bfb3 100644 --- a/overlay.nix +++ b/overlay.nix @@ -121,6 +121,8 @@ in rec { patches = [ ./profiles/nix/nix.patch ./profiles/nix/expr-context.patch ] ++ oa.patches or [ ]; }); + nil = prev.nil.overrideAttrs (_: { doCheck = false; doInstallCheck = false; }); + mako = prev.mako.overrideAttrs (_: { postInstall = "sed 's|Exec=.*|Exec=/run/current-system/sw/bin/systemctl --user start mako|' -i $out/share/dbus-1/services/fr.emersion.mako.service"; diff --git a/profiles/applications/helix.nix b/profiles/applications/helix.nix new file mode 100644 index 0000000..731e500 --- /dev/null +++ b/profiles/applications/helix.nix @@ -0,0 +1,138 @@ +{ config, pkgs, ... }: { + defaultApplications.editor = { + cmd = "${pkgs.helix}/bin/helix"; + desktop = "helix"; + }; + home-manager.users.balsoft = { + xdg.configFile."helix/languages.toml".text = '' + [[language]] + name = "nix" + formatter = { command = "nixfmt", args = [] } + ''; + programs.helix = { + enable = true; + settings = { + theme = "base16"; + editor.lsp.display-messages = true; + keys = { + insert = { + up = "no_op"; + down = "no_op"; + left = "no_op"; + right = "no_op"; + pageup = "no_op"; + pagedown = "no_op"; + home = "no_op"; + end = "no_op"; + }; + normal = { + "A-q" = [ + "goto_prev_paragraph" + "goto_next_paragraph" + "trim_selections" + ":reflow 80" + "collapse_selection" + ]; + "A-h" = "select_prev_sibling"; + "A-j" = "shrink_selection"; + "A-k" = "expand_selection"; + "A-l" = "select_next_sibling"; + "V" = [ "select_mode" "extend_to_line_bounds" ]; + }; + }; + }; + themes.base16 = + with (builtins.mapAttrs (_: v: "#${v}") config.themes.colors); rec { + "ui.menu" = { bg = base01; }; + "ui.menu.selected" = { + bg = base00; + modifiers = [ "reversed" ]; + }; + "ui.linenr" = { + fg = base02; + bg = base00; + }; + "ui.popup" = { modifiers = [ "reversed" ]; }; + "ui.linenr.selected" = { + fg = base05; + bg = base00; + modifiers = [ "bold" ]; + }; + "ui.selection" = { + fg = base00; + bg = base0D; + }; + "ui.selection.primary" = { modifiers = [ "reversed" ]; }; + "comment" = { fg = base03; }; + "ui.statusline" = { + fg = base05; + bg = base02; + }; + "ui.statusline.inactive" = { + fg = base02; + bg = base05; + }; + "ui.help" = { + fg = base01; + bg = base05; + }; + "ui.cursor" = { modifiers = [ "reversed" ]; }; + "ui.cursor.insert" = { + bg = base01; + modifiers = [ "reversed" ]; + }; + "variable" = base05; + "variable.builtin" = { + fg = base06; + modifiers = [ "bold" ]; + }; + "constant.numeric" = base0C; + "constant" = base0A; + "constant.builtin" = base0A; + "constant.character" = { + fg = base0C; + modifiers = [ "bold" ]; + }; + "attributes" = base0A; + "type" = { + fg = base05; + modifiers = [ "bold" ]; + }; + "ui.cursor.match" = { bg = base01; }; + "string" = base0B; + "variable.other.member" = base0B; + "constant.character.escape" = base0E; + "function" = base05; + "constructor" = base0A; + "special" = base0F; + "keyword" = { + fg = base0D; + modifiers = [ "bold" ]; + }; + "markup.heading" = { + fg = base0A; + modifiers = [ "bold" ]; + }; + "label" = base0B; + "namespace" = base0F; + "diff.plus" = base0B; + "diff.delta" = base0A; + "diff.minus" = base08; + "diagnostic" = { + modifiers = [ "italic" ]; + underline = { style = "line"; }; + }; + "diagnostic.error" = { fg = base08; } // diagnostic; + "diagnostic.warning" = { fg = base09; } // diagnostic; + "ui.gutter" = { bg = base00; }; + "info" = base0D; + "hint" = base02; + "debug" = base02; + "warning" = base09; + "error" = base08; + "indent" = "none"; + "highlight" = base09; + }; + }; + }; +} diff --git a/profiles/applications/packages.nix b/profiles/applications/packages.nix index 7f4241b..bb91724 100644 --- a/profiles/applications/packages.nix +++ b/profiles/applications/packages.nix @@ -12,6 +12,7 @@ # steam haskellPackages.hoogle nixfmt + nil nixpkgs-fmt stdman libqalculate diff --git a/roles/desktop.nix b/roles/desktop.nix index d4f5ae2..3024546 100644 --- a/roles/desktop.nix +++ b/roles/desktop.nix @@ -19,7 +19,8 @@ alacritty # cantata # emacs - vscodium + # vscodium + helix firefox geary github