-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4806ff9
commit 7e75925
Showing
3 changed files
with
53 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}; | ||
} |