From 5e48ce3f9b210078fb99c4d173f223c2da0379b0 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sun, 15 Oct 2017 20:23:51 +0200 Subject: [PATCH] feat: Add nix-mode & nix-config function * install nix-mode by default * add a function to quickly open the system configuration.nix --- init.el | 1 + init/custom.el | 3 +++ init/functions.el | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/init.el b/init.el index a8c9ae9cd..2959691b6 100644 --- a/init.el +++ b/init.el @@ -33,6 +33,7 @@ markdown-mode+ multiple-cursors multi-term + nix-mode paredit password-store pkgbuild-mode diff --git a/init/custom.el b/init/custom.el index 16f9802df..f9729f28e 100644 --- a/init/custom.el +++ b/init/custom.el @@ -15,6 +15,9 @@ '(ns-alternate-modifier (quote none)) '(ns-command-modifier (quote control)) '(ns-right-command-modifier (quote meta)) + '(package-selected-packages + (quote + (fish-mode nix-mode yaml-mode undo-tree terraform-mode switch-window smart-mode-line rust-mode rainbow-mode rainbow-delimiters puppet-mode pkgbuild-mode password-store paredit multi-term multiple-cursors markdown-mode+ magit iy-go-to-char idle-highlight-mode hi2 helm haskell-mode gruber-darker-theme go-mode flycheck erlang dockerfile-mode confluence browse-kill-ring ag ace-jump-mode))) '(require-final-newline (quote visit-save))) (custom-set-faces ;; custom-set-faces was added by Custom. diff --git a/init/functions.el b/init/functions.el index 29d07f811..a0f4d5945 100644 --- a/init/functions.el +++ b/init/functions.el @@ -111,4 +111,9 @@ Including indent-buffer, which should not be called automatically on save." (interactive) (eww "https://blog.fefe.de/")) +;; Open this machines NixOS config +(defun nix-config () + (interactive) + (find-file "/etc/nixos/configuration.nix")) + (provide 'functions)