Skip to content

Commit

Permalink
install emacs with brew
Browse files Browse the repository at this point in the history
  • Loading branch information
dszakallas committed Jan 27, 2025
1 parent 4806ff9 commit 7e75925
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 21 deletions.
5 changes: 5 additions & 0 deletions hosts/dszakallas--Clownfish/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ in
davids-dotfiles.users.${myUsername}
];

davids.emacs = {
enable = true;
version = "29";
};

nix.settings.trusted-users = [
"root"
myUsername
Expand Down
5 changes: 5 additions & 0 deletions hosts/jellyfish/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ in
myUsername
];

davids.emacs = {
enable = true;
version = "30";
};

davids.jupiter = {
enable = true;
amalthea.staticIP.v4 = "192.168.1.244";
Expand Down
64 changes: 43 additions & 21 deletions modules/darwin/default/default.nix
Original file line number Diff line number Diff line change
@@ -1,37 +1,59 @@
{ self, davids-dotfiles, ... }:
{
pkgs,
config,
system,
nixConfig,
hostName,
lib,
...
}:
{
services.nix-daemon.enable = true;
options = with lib; {
davids.emacs = {
enable = mkEnableOption "Emacs configuration (system-wide)";
version = mkOption {
default = "29";
type = types.str;
description = "Emacs major version";
};
};
};
config = {
services.nix-daemon.enable = true;

homebrew.enable = true;
homebrew.enable = true;

homebrew.casks = [
"gpg-suite"
"iterm2"
];
homebrew.casks = [
"gpg-suite"
"iterm2"
];

# Create /etc/zshrc that loads the nix-darwin environment.
programs.zsh = {
enable = true; # default shell on catalina
homebrew.brews = lib.optionals config.davids.emacs.enable [
"emacs-plus@${config.davids.emacs.version}"
];

# Add back the original contents
shellInit = ''
if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi
'';
};
homebrew.taps = lib.optionals config.davids.emacs.enable [
"d12frosted/emacs-plus"
];

# Create /etc/zshrc that loads the nix-darwin environment.
programs.zsh = {
enable = true; # default shell on catalina

# Set Git commit hash for darwin-version.
system.configurationRevision = self.rev or self.dirtyRev or null;
# Add back the original contents
shellInit = ''
if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi
'';
};

# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
# Set Git commit hash for darwin-version.
system.configurationRevision = self.rev or self.dirtyRev or null;

# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
};
}

0 comments on commit 7e75925

Please sign in to comment.