working emacs?
This commit is contained in:
parent
7481580f14
commit
3fc5284ec8
6 changed files with 33 additions and 23 deletions
|
@ -15,11 +15,9 @@ in {
|
|||
dig
|
||||
easyeffects
|
||||
element-desktop
|
||||
emacs
|
||||
evince
|
||||
eza
|
||||
fastfetch
|
||||
fd
|
||||
feh
|
||||
(fenix.complete.withComponents [
|
||||
"cargo"
|
||||
|
@ -75,7 +73,6 @@ in {
|
|||
polkit
|
||||
python3
|
||||
qbittorrent
|
||||
ripgrep
|
||||
rustdesk
|
||||
scc
|
||||
scummvm
|
||||
|
|
0
lib/default.nix
Normal file
0
lib/default.nix
Normal file
17
lib/options.nix
Normal file
17
lib/options.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Taken from: https://github.com/hlissner/dotfiles/blob/master/lib/options.nix
|
||||
{ lib, ... }:
|
||||
|
||||
let inherit (lib) mkOption types;
|
||||
in {
|
||||
mkOpt = type: default: mkOption { inherit type default; };
|
||||
|
||||
mkOpt' = type: default: description:
|
||||
mkOption { inherit type default description; };
|
||||
|
||||
mkBoolOpt = default:
|
||||
mkOption {
|
||||
inherit default;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
}
|
|
@ -1,27 +1,26 @@
|
|||
{ config, lib, pkgs, inputs, ... }:
|
||||
# Taken from: https://github.com/hlissner/dotfiles/blob/master/modules/editors/emacs.nix
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
# with lib.my;
|
||||
let
|
||||
cfg = config.modules.editors.emacs;
|
||||
configDir = config.dotfiles.configDir;
|
||||
in {
|
||||
options.modules.editors.emacs = {
|
||||
enable = mkBoolOpt false;
|
||||
doom = rec {
|
||||
enable = mkBoolOpt false;
|
||||
forgeUrl = "https://github.com";
|
||||
repoUrl = "${forgeUrl}/doomemacs/doomemacs";
|
||||
configRepoUrl = "${forgeUrl}/bloxx12/doom-emacs-private";
|
||||
};
|
||||
configRepoUrl = "${forgeUrl}/bloxx12/doom-emacs-config";
|
||||
in {
|
||||
options.modules.editors.emacs = {
|
||||
enable = mkEnableOption "emacs";
|
||||
doom.enable = mkEnableOption "doom";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Why is this needed?
|
||||
# nixpkgs.overlays = [ inputs.emacs-overlay.overlay ];
|
||||
|
||||
user.packages = with pkgs; [
|
||||
environment.systemPackages = with pkgs; [
|
||||
## Emacs itself
|
||||
emacs
|
||||
binutils # native-comp needs 'as', provided by this
|
||||
# 28.2 + native-comp
|
||||
((emacsPackagesFor emacsNativeComp).emacsWithPackages
|
||||
|
@ -35,8 +34,6 @@ in {
|
|||
## Optional dependencies
|
||||
fd # faster projectile indexing
|
||||
imagemagick # for image-dired
|
||||
(mkIf (config.programs.gnupg.agent.enable)
|
||||
pinentry_emacs) # in-emacs gnupg prompts
|
||||
zstd # for undo-fu-session/undo-tree compression
|
||||
|
||||
## Module dependencies
|
||||
|
@ -50,20 +47,19 @@ in {
|
|||
texlive.combined.scheme-medium
|
||||
# :lang beancount
|
||||
beancount
|
||||
unstable.fava # HACK Momentarily broken on nixos-unstable
|
||||
];
|
||||
|
||||
env.PATH = [ "$XDG_CONFIG_HOME/emacs/bin" ];
|
||||
environment.sessionVariables.PATH = [ "$XDG_CONFIG_HOME/emacs/bin" ];
|
||||
|
||||
modules.shell.zsh.rcFiles = [ "${configDir}/emacs/aliases.zsh" ];
|
||||
# modules.shell.zsh.rcFiles = [ "${configDir}/emacs/aliases.zsh" ];
|
||||
|
||||
fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ];
|
||||
|
||||
system.userActivationScripts = mkIf cfg.doom.enable {
|
||||
installDoomEmacs = ''
|
||||
if [ ! -d "$XDG_CONFIG_HOME/emacs" ]; then
|
||||
git clone --depth=1 --single-branch "${cfg.doom.repoUrl}" "$XDG_CONFIG_HOME/emacs"
|
||||
git clone "${cfg.doom.configRepoUrl}" "$XDG_CONFIG_HOME/doom"
|
||||
git clone --depth=1 --single-branch "${repoUrl}" "$XDG_CONFIG_HOME/emacs"
|
||||
git clone "${configRepoUrl}" "$XDG_CONFIG_HOME/doom"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -10,7 +10,7 @@ in {
|
|||
home-manager.users.${username} = {
|
||||
stylix = {
|
||||
polarity = "dark";
|
||||
image = ../../lib/wallpapers/mafu_trad_wall.png;
|
||||
image = ../../assets/wallpapers/mafu_trad_wall.png;
|
||||
base16Scheme =
|
||||
"${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
||||
autoEnable = true;
|
||||
|
@ -71,7 +71,7 @@ in {
|
|||
};
|
||||
};
|
||||
stylix = {
|
||||
image = ../../lib/wallpapers/FreeBSD.png;
|
||||
image = ../../assets/wallpapers/FreeBSD.png;
|
||||
polarity = "dark";
|
||||
targets.plymouth.enable = false;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, config, ... }:
|
||||
{ config, ... }:
|
||||
let
|
||||
username = config.modules.other.system.username;
|
||||
hmCfg = config.home-manager.users.${username};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue