mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 16:57:55 +00:00
49592d7f01
I also fixed the long-time occuring error when using the newest version of the channel (or the unstable one). It turns out to be a simple type error with the `my.user' attribute. (To be honest the error messages are quite horrible.) On another note, I also accidentally bricked my NixOS setup after a garbage collection and a horrible update. The breakage includes not being able to use any of the builtin tools of Nix (e.g., nix, nix-env, nixos-rebuild) due to a shared library error that has been garbage collected. Which means I have to reinstall it. (I seem to have a talent for breaking things, if only I'm paid for it.)
76 lines
1.8 KiB
Nix
Executable File
76 lines
1.8 KiB
Nix
Executable File
# Ah yes, the bane of my endless configuration hell (or heaven, whichever your personal preferences).
|
|
# Or specifically, Org-mode...
|
|
# Doom Emacs saved me from being a configuration demon.
|
|
{ config, options, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
let
|
|
emacsOrgProtocolDesktopEntry = pkgs.makeDesktopItem {
|
|
name = "org-protocol";
|
|
desktopName = "Org-Protocol";
|
|
exec = "emacsclient %u";
|
|
icon = "emacs-icon";
|
|
type = "Application";
|
|
mimeType = "x-scheme-handler/org-protocol";
|
|
};
|
|
in
|
|
{
|
|
options.modules.editors.emacs = {
|
|
enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
};
|
|
|
|
# Just make sure the unstable version of Emacs is available as a package by creating an overlay.
|
|
pkg = mkOption {
|
|
type = types.package;
|
|
default = pkgs.emacs;
|
|
};
|
|
};
|
|
|
|
config = mkIf config.modules.editors.emacs.enable {
|
|
my.packages = with pkgs; [
|
|
((emacsPackagesNgGen config.modules.editors.emacs.pkg).emacsWithPackages (epkgs: [
|
|
epkgs.vterm
|
|
]))
|
|
|
|
emacsOrgProtocolDesktopEntry
|
|
|
|
# Doom dependencies
|
|
git
|
|
(ripgrep.override { withPCRE2 = true; })
|
|
gnutls
|
|
|
|
# Optional depedencies
|
|
fd # faster projectile
|
|
imagemagick # image-dired
|
|
(lib.mkIf (config.programs.gnupg.agent.enable)
|
|
pinentry_emacs) # gnupg-emacs
|
|
zstd # for undo-fu-sessions
|
|
|
|
# Module dependencies
|
|
## :checkers spell
|
|
aspell
|
|
aspellDicts.en
|
|
aspellDicts.en-computers
|
|
aspellDicts.en-science
|
|
|
|
## :checkers grammar
|
|
languagetool
|
|
|
|
## :tools editorconfig
|
|
editorconfig-core-c
|
|
|
|
## :tools lookup
|
|
wordnet
|
|
|
|
## :tools lookup & :lang org+roam
|
|
sqlite
|
|
];
|
|
|
|
fonts.fonts = with pkgs; [
|
|
emacs-all-the-icons-fonts
|
|
];
|
|
};
|
|
}
|