Reformat emacs config
This commit is contained in:
parent
5839002d3c
commit
0197faa345
@ -1,22 +1,23 @@
|
|||||||
{
|
{
|
||||||
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
|
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
|
||||||
# as well as the libraries available from your flake's inputs.
|
# as well as the libraries available from your flake's inputs.
|
||||||
lib,
|
lib,
|
||||||
# An instance of `pkgs` with your overlays and packages applied is also available.
|
# An instance of `pkgs` with your overlays and packages applied is also available.
|
||||||
pkgs,
|
pkgs,
|
||||||
# You also have access to your flake's inputs.
|
# You also have access to your flake's inputs.
|
||||||
inputs,
|
inputs,
|
||||||
|
|
||||||
# Additional metadata is provided by Snowfall Lib.
|
# Additional metadata is provided by Snowfall Lib.
|
||||||
system, # The system architecture for this host (eg. `x86_64-linux`).
|
system, # The system architecture for this host (eg. `x86_64-linux`).
|
||||||
target, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
|
target, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
|
||||||
format, # A normalized name for the system target (eg. `iso`).
|
format, # A normalized name for the system target (eg. `iso`).
|
||||||
virtual
|
virtual, # A boolean to determine whether this system is a virtual target using nixos-generators.
|
||||||
, # A boolean to determine whether this system is a virtual target using nixos-generators.
|
systems, # An attribute map of your defined hosts.
|
||||||
systems, # An attribute map of your defined hosts.
|
|
||||||
|
|
||||||
# All other arguments come from the module system.
|
# All other arguments come from the module system.
|
||||||
config, ... }:
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
@ -24,10 +25,15 @@ let
|
|||||||
cfg = config.modules.emacs;
|
cfg = config.modules.emacs;
|
||||||
doomRepoUrl = "https://github.com/doomemacs/doomemacs";
|
doomRepoUrl = "https://github.com/doomemacs/doomemacs";
|
||||||
configRepoUrl = "https://gitlab.julian-mutter.de/julian/emacs-config";
|
configRepoUrl = "https://gitlab.julian-mutter.de/julian/emacs-config";
|
||||||
in {
|
in
|
||||||
options.modules.emacs = { enable = mkOption { default = false; }; };
|
{
|
||||||
|
options.modules.emacs = {
|
||||||
|
enable = mkOption { default = false; };
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
home.sessionPath = [ "/home/julian/.config/emacs/bin" ];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
emacs
|
emacs
|
||||||
binutils # native-comp needs 'as', provided by this
|
binutils # native-comp needs 'as', provided by this
|
||||||
@ -42,7 +48,14 @@ in {
|
|||||||
zstd # for undo-fu-session/undo-tree compression
|
zstd # for undo-fu-session/undo-tree compression
|
||||||
|
|
||||||
## Module dependencies
|
## Module dependencies
|
||||||
(aspellWithDicts (ds: with ds; [ en en-computers en-science de ]))
|
(aspellWithDicts (
|
||||||
|
ds: with ds; [
|
||||||
|
en
|
||||||
|
en-computers
|
||||||
|
en-science
|
||||||
|
de
|
||||||
|
]
|
||||||
|
))
|
||||||
sqlite
|
sqlite
|
||||||
|
|
||||||
# Code formatters for use with doom emacs
|
# Code formatters for use with doom emacs
|
||||||
@ -60,14 +73,13 @@ in {
|
|||||||
emacs-all-the-icons-fonts
|
emacs-all-the-icons-fonts
|
||||||
];
|
];
|
||||||
|
|
||||||
home.activation.installDoomEmacs =
|
home.activation.installDoomEmacs = lib.home-manager.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
lib.home-manager.hm.dag.entryAfter [ "writeBoundary" ] ''
|
if [ ! -d "/home/julian/.config/emacs" ]; then
|
||||||
if [ ! -d "/home/julian/.config/emacs" ]; then
|
$DRY_RUN_CMD ${pkgs.git}/bin/git clone --depth=1 --single-branch "${doomRepoUrl}" "/home/julian/.config/emacs"
|
||||||
$DRY_RUN_CMD ${pkgs.git}/bin/git clone --depth=1 --single-branch "${doomRepoUrl}" "/home/julian/.config/emacs"
|
fi
|
||||||
fi
|
if [ ! -d "/home/julian/.config/doom" ]; then
|
||||||
if [ ! -d "/home/julian/.config/doom" ]; then
|
$DRY_RUN_CMD ${pkgs.git}/bin/git clone "${configRepoUrl}" "/home/julian/.config/doom"
|
||||||
$DRY_RUN_CMD ${pkgs.git}/bin/git clone "${configRepoUrl}" "/home/julian/.config/doom"
|
fi
|
||||||
fi
|
'';
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user