Skip to content

Commit

Permalink
work
Browse files Browse the repository at this point in the history
  • Loading branch information
dszakallas committed Jan 27, 2025
1 parent d85f2f4 commit 8ff7528
Showing 1 changed file with 48 additions and 48 deletions.
96 changes: 48 additions & 48 deletions modules/home/default/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ in
default = { };
type = types.submodule {
options = {
enable = mkEnableOption "Enable Spacemacs";
enable = mkEnableOption "Enable Spacemacs management";
rev = mkOption {
default = "11aaddf3ad7e5e3dd3b494d56221efe7b882fd72";
type = types.str;
Expand All @@ -134,58 +134,58 @@ in
};
};
};
config = mkIf config.davids.emacs.enable {
# Only adding wrappers for now
home.file.".files/bin/ect" = {
text = ''
#!/bin/sh
exec emacsclient --tty "$@"
'';
executable = true;
};
home.file.".files/bin/ecw" = {
text = ''
#!/bin/sh
exec emacsclient --reuse-frame -a "" "$@"
'';
executable = true;
};
home.file.".files/bin/ec" = {
text = ''
#!/bin/sh
exec emacsclient "$@"
'';
executable = true;
};
home.file.".spacemacs.d" = mkIf config.davids.emacs.spacemacs.enable {
source = ./his.spacemacs.d;
};
home.file.".emacs.d/init.el" = mkIf config.davids.emacs.spacemacs.enable {
text = ''
(setq spacemacs-start-directory "~/.emacs.d/spacemacs/")
(setq user-emacs-directory "~/.emacs.d/")
(load-file (concat spacemacs-start-directory "init.el"))
'';
};
home.file.".emacs.d/early-init.el" = mkIf config.davids.emacs.spacemacs.enable {
text = ''
(setq spacemacs-start-directory "~/.emacs.d/spacemacs/")
(setq user-emacs-directory "~/.emacs.d/")
(load-file (concat spacemacs-start-directory "early-init.el"))
'';
};
home.file.".emacs.d/spacemacs" = mkIf config.davids.emacs.spacemacs.enable {
source = pkgs.fetchFromGitHub {
config = mkIf config.davids.emacs.enable (
let
spacemacs = pkgs.fetchFromGitHub {
owner = "syl20bnr";
repo = "spacemacs";
rev = config.davids.emacs.spacemacs.rev;
hash = config.davids.emacs.spacemacs.hash;
};
};
programs.zsh.shellAliases = {
e = "ect";
};
};
loadSpacemacsInit = f: ''
(setq spacemacs-start-directory "~/.emacs.d/")
(load-file (concat "${spacemacs.out}/" "${f}"))
'';
in
{
home.file.".files/bin/ect" = {
text = ''
#!/bin/sh
exec emacsclient --tty "$@"
'';
executable = true;
};
home.file.".files/bin/ecw" = {
text = ''
#!/bin/sh
exec emacsclient --reuse-frame -a "" "$@"
'';
executable = true;
};
home.file.".files/bin/ec" = {
text = ''
#!/bin/sh
exec emacsclient "$@"
'';
executable = true;
};
programs.zsh.shellAliases = {
e = "ect";
};
home.file.".spacemacs.d" = mkIf config.davids.emacs.spacemacs.enable {
source = ./his.spacemacs.d;
};
home.file.".emacs.d/init.el" = mkIf config.davids.emacs.spacemacs.enable {
text = loadSpacemacsInit "init.el";
};
home.file.".emacs.d/early-init.el" = mkIf config.davids.emacs.spacemacs.enable {
text = loadSpacemacsInit "early-init.el";
};
home.file.".emacs.d/dump-init.el" = mkIf config.davids.emacs.spacemacs.enable {
text = loadSpacemacsInit "dump-init.el";
};
}
);
}
)
] ++ (lib.optionals hostPlatform.isDarwin [ ./darwin ]);
Expand Down

0 comments on commit 8ff7528

Please sign in to comment.