From f3b8a769c6b881c4134ce7240b19f44024286942 Mon Sep 17 00:00:00 2001 From: Kat Date: Sun, 4 Aug 2024 20:11:31 -0600 Subject: [PATCH] [Emacs] Add swift-mode --- dotfiles/emacs.d/README.org | 4 ++ nix-darwin/flake.nix | 81 +++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 nix-darwin/flake.nix diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 332e8d66..de3842be 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -2897,6 +2897,10 @@ The following is taken from [[https://github.com/syl20bnr/spacemacs/blob/a650877 :defer t :mode ("\\.kt\\'")) #+END_SRC +*** swift +#+begin_src emacs-lisp +(use-package swift-mode) +#+end_src *** groovy #+begin_src emacs-lisp (use-package groovy-mode) diff --git a/nix-darwin/flake.nix b/nix-darwin/flake.nix new file mode 100644 index 00000000..25528a17 --- /dev/null +++ b/nix-darwin/flake.nix @@ -0,0 +1,81 @@ +{ + description = "Example Darwin system flake"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + nix-darwin.url = "github:LnL7/nix-darwin"; + nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; + railbird-secrets = { + url = "git+ssh://gitea@dev.railbird.ai:1123/railbird/secrets-flake.git"; + }; + nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew"; + + # Optional: Declarative tap management + homebrew-core = { + url = "github:homebrew/homebrew-core"; + flake = false; + }; + homebrew-cask = { + url = "github:homebrew/homebrew-cask"; + flake = false; + }; + + }; + + outputs = inputs@{ self, nix-darwin, nixpkgs, ... }: + let + configuration = { pkgs, config, ... }: { + # List packages installed in system profile. To search by name, run: + # $ nix-env -qaP | grep wget + environment.systemPackages = with pkgs; [ + emacs + slack + gitFull + ripgrep + yarn + nodePackages.prettier + vim + ]; + + nixpkgs.config.allowUnfree = true; + + + # Auto upgrade nix package and the daemon service. + services.nix-daemon.enable = true; + services.yabai.enable = false; + launchd.user.envVariables.PATH = config.environment.systemPath; + + programs.direnv.enable = true; + + # Necessary for using flakes on this system. + nix.settings.experimental-features = "nix-command flakes"; + + # Create /etc/zshrc that loads the nix-darwin environment. + programs.zsh.enable = true; + program.bash.enable = true; + + # 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; + + # The platform the configuration will be used on. + nixpkgs.hostPlatform = "aarch64-darwin"; + users.users.kat.openssh.authorizedKeys.keys = inputs.railbird-secrets.keys.kanivanKeys; + }; + in + { + # Build darwin flake using: + # $ darwin-rebuild build --flake .#Kats-Mac-mini + darwinConfigurations."Kats-Mac-mini" = nix-darwin.lib.darwinSystem { + modules = [ + configuration + ]; + }; + + # Expose the package set, including overlays, for convenience. + darwinPackages = self.darwinConfigurations."Kats-Mac-mini".pkgs; + }; +}