1

add emacs nativecomp/pgtk option

This commit is contained in:
2022-08-10 12:57:12 +02:00
parent 33dc750d4c
commit 341f1c0fef
2 changed files with 50 additions and 37 deletions

View File

@ -26,6 +26,7 @@ rec {
# Config my modules
modules.emacs = {
enable = true;
pgtkNativeComp = true;
doom.enable = true;
doom.autoSync = true;
@ -47,6 +48,7 @@ rec {
# TODO: Store the external binaries for my derivations in GitHub LFS (Vital, NeuralDSP, other plugins etc.)
# TODO: Derivations for bottles like UPlay, NeuralDSP, LoL (don't know what is possible with bottles-cli though)
# TODO: When bottles derivations are there remove the bottles option from audio/gaming module and assert that bottles is enabled in flatpak module
# TODO: Fix chinese input
# Chinese Input
i18n.inputMethod.enabled = "fcitx5";
@ -169,7 +171,6 @@ rec {
# gcc # nvim needs this
# Gnome extensions
# gnome.gnome-tweaks # Disabled since settings should be set declaratively
gnomeExtensions.appindicator
gnomeExtensions.blur-my-shell
gnomeExtensions.sound-output-device-chooser
@ -194,14 +195,14 @@ rec {
gnome.gnome-boxes
gnome.sushi # Gnome files previews
gnome.gnome-logs # systemd log viewer
gnome.gnome-tweaks # conflicts with nixos/hm gnome settings file
gnome.gnome-tweaks # conflicts with nixos/hm gnome settings file sometimes, watch out what settings to change
gnome.gnome-nettool
gnome.simple-scan
gnome.gnome-sound-recorder
gnome.file-roller # archive manager
# gnome-usage # Alternative system performance monitor (gnome.gnome-system-monitor is the preinstalled one)
# gnome-secrets # Alternative keepass database viewer
gnome-firmware
wike # Wikipedia viewer
# Ranger
ranger
@ -218,9 +219,7 @@ rec {
# Web
signal-desktop
# Flatpak discord
yt-dlp
# Flatpak spotify
# thunderbird # Try gnome mail
protonmail-bridge
protonvpn-cli
@ -228,19 +227,21 @@ rec {
# Tools
# calibre
# virt-manager # Let's try gnome-boxes while we're at it
gource
gource # Visualize git commit log
keepassxc
anki-bin # Use anki-bin as anki is some versions behind
libreoffice-fresh
# libreoffice-fresh
jabref # manage bibilography
# wike # Wikipedia viewer
# Graphics
# Media
wacomtablet
xournalpp
# kdenlive
# krita
# blender
# godot
# obs-studio
# Use NixCommunity binary cache
cachix
@ -684,7 +685,7 @@ rec {
EOF
'';
}
vim-gitgutter
# vim-gitgutter
# YouCompleteMe
{
@ -739,7 +740,7 @@ rec {
nextcloud-client = {
enable = true;
startInBackground = true;
startInBackground = false; # TODO: Nextcloud doesn't start after login
};
};

View File

@ -17,10 +17,12 @@ in {
# Options is a vector of options this module defines
# This module defines only the "emacs" option and suboptions "enable" and "doom"
options.modules.emacs = {
enable = mkBoolOpt false "Enable the GNU Emacs editor";
enable = mkEnableOpt "Emacs module";
nativeComp = mkBoolOpt false "Use Emacs 28.x branch with native comp support";
pgtkNativeComp = mkBoolOpt false "Use Emacs 29.x branch with native comp and pure gtk support";
doom = {
enable = mkBoolOpt false "Use the Doom Emacs framework";
enable = mkEnableOpt "Doom Emacs framework";
autoSync = mkBoolOpt false "Sync Doom Emacs on nixos-rebuild";
autoUpgrade = mkBoolOpt false "Upgrade Doom Emacs on nixos-rebuild";
};
@ -35,35 +37,45 @@ in {
# as it delays the evaluation (the if is moved inside the assignments inside the set)
# mkIf can only be used in the config section (like mkMerge, mkForce and co)
config = mkIf cfg.enable {
assertions = [
(mkIf cfg.nativeComp {
assertion = !cfg.pgtkNativeComp;
message = "Can't enable both nativeComp and pgtkNativeComp!";
})
(mkIf cfg.pgtkNativeComp {
assertion = !cfg.nativeComp;
message = "Can't enable both nativeComp and pgtkNativeComp!";
})
];
# What home packages should be enabled
home.packages = with pkgs; [
((emacsPackagesFor emacsPgtkNativeComp).emacsWithPackages
(epkgs: [ epkgs.vterm ]))
home.packages = with pkgs; builtins.concatLists [
(optionals cfg.nativeComp [ ((emacsPackagesFor emacsNativeComp).emacsWithPackages (epkgs: [ epkgs.vterm ])) ])
(optionals cfg.pgtkNativeComp [ ((emacsPackagesFor emacsPgtkNativeComp).emacsWithPackages (epkgs: [ epkgs.vterm ])) ])
# binutils # conflicts with gcc
zstd
(ripgrep.override { withPCRE2 = true; })
fd
# libgccjit
sqlite
inkscape
graphviz
gnuplot
pandoc
nixfmt
shellcheck
maim
# TODO: Use LaTeX module instead
texlive.combined.scheme-medium
emacs-all-the-icons-fonts
bashInteractive # For keychain
# TODO: Check what hlissner has enabled
(optionals cfg.doom.enable [
emacs-all-the-icons-fonts
(ripgrep.override { withPCRE2 = true; })
fd
zstd
sqlite # Org roam
inkscape # Org latex preview
graphviz # Org graphviz support
gnuplot # Org gnuplot support
pandoc # Org export formats
maim
bashInteractive # For keychain
# Treemacs needs python + syntax coloring in org/latex needs pygments
(python310.withPackages (ppkgs:
[
ppkgs.pygments
])) # withPackages expects a function that gets all the packages as argument and returns a list with the packages we want
# withPackages expects a function that gets all the packages as argument and returns a list with the packages we want
(python310.withPackages (ppkgs: [ ppkgs.pygments ])) # Latex minted
# nixfmt # This belongs in specific flake.nix
# shellcheck # This belongs in specific flake.nix
# TODO: Use LaTeX module instead
texlive.combined.scheme-medium
])
];
home.sessionPath = mkIf cfg.doom.enable [ "${config.home.homeDirectory}/.emacs.d/bin" ];