dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
modules/desktop/_wm/text.nix (2174B)
1## Text Editor
2{
3 util ? null,
4 files ? null,
5 ...
6}: {
7 nixos = {pkgs, ...}: {
8 environment.systemPackages = [
9 (pkgs.xed-editor.overrideAttrs (old: {
10 preFixup =
11 (old.preFixup or "")
12 + ''
13 gappsWrapperArgs+=(
14 --prefix GI_TYPELIB_PATH : "$out/lib/xed/girepository-1.0"
15 --prefix PYTHONPATH : "${pkgs.python3Packages.makePythonPath [pkgs.python3Packages.pycairo]}"
16 )
17 '';
18 }))
19 ];
20 };
21
22 home = {
23 config,
24 pkgs,
25 ...
26 }: {
27 xdg.mimeApps.defaultApplications = util.build.mime {
28 markdown = ["org.x.editor.desktop"];
29 text = ["org.x.editor.desktop"];
30 };
31
32 dconf.settings = {
33 "org/x/editor/preferences/editor" = {
34 auto-close = true;
35 auto-indent = true;
36 bracket-matching = true;
37 display-line-numbers = true;
38 display-right-margin = false;
39 draw-whitespace = false;
40 ensure-trailing-newline = false;
41 highlight-current-line = true;
42 scheme = "custom";
43 };
44
45 "org/x/editor/preferences/ui" = {
46 minimap-visible = true;
47 side-panel-visible = false;
48 statusbar-visible = true;
49 };
50
51 "org/x/editor/plugins".active-plugins = [
52 "open-uri-context-menu"
53 "textsize"
54 "docinfo"
55 "time"
56 "filebrowser"
57 "joinlines"
58 "modelines"
59 "spell"
60 "bracketcompletion"
61 "sort"
62 "xed_find_in_files"
63 "xed_split_pane"
64 "xed_smart_overview"
65 "xed_quick_highlight"
66 "xed_indentation_guides"
67 ];
68 };
69
70 home = {
71 persist.directories = [
72 ".config/xed"
73 ".config/xed-find-in-files"
74 ".local/share/xed"
75 ".cache/xed"
76 ".config/enchant"
77 ];
78
79 file = {
80 ".local/share/xed/styles/custom.xml".text = util.build.theme {
81 colors = config.lib.stylix.colors;
82 file = files.hyprland.xed;
83 };
84
85 ".local/share/xed/plugins" = {
86 source = "${pkgs.custom.xed-extra-plugins}/share/xed/plugins";
87 recursive = true;
88 };
89 };
90 };
91 };
92}