summaryrefslogtreecommitdiffstats
path: root/jeschli/2configs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2019-04-13 14:07:30 +0200
committertv <tv@krebsco.de>2019-04-13 14:07:30 +0200
commit0430fbbbfeef5f7d6188ec70d7f084ffa1cb1a46 (patch)
tree38daa64159448bc750de5b3c6692c7e2027ed4c7 /jeschli/2configs
parent39fba33bed71c7553da47e56c5e34a0389950c71 (diff)
parentbb2f8b9b920287df33e194a3b62d86669d8e6ddd (diff)
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'jeschli/2configs')
-rw-r--r--jeschli/2configs/emacs.nix43
-rw-r--r--jeschli/2configs/xserver/default.nix6
2 files changed, 47 insertions, 2 deletions
diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix
index 5fc887477..4f5b690f2 100644
--- a/jeschli/2configs/emacs.nix
+++ b/jeschli/2configs/emacs.nix
@@ -15,6 +15,7 @@ let
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize)
'';
+
evilMode = ''
;; Evil Mode
(require 'evil)
@@ -25,6 +26,22 @@ let
;; (require 'evil-org-agenda)
;; (evil-org-agenda-set-keys)
'';
+
+ goMode = ''
+ (add-to-list 'exec-path "~/go/bin")
+ (add-hook 'go-mode-hook
+ (lambda ()
+ (setq-default)
+ (setq tab-width 2)
+ (setq standard-indent 2)
+ (setq indent-tabs-mode nil)))
+ '';
+
+ ido = ''
+ (require 'ido)
+ (ido-mode t)
+ '';
+
windowCosmetics = ''
(menu-bar-mode -1)
(tool-bar-mode -1) ; Disable the button bar atop screen
@@ -37,46 +54,68 @@ let
(setq visible-bell nil) ; Disable annoying visual bell graphic
(setq ring-bell-function 'ignore) ; Disable super annoying audio bell
'';
+
orgMode = ''
(add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode))
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)
+ (global-set-key "\C-c L" 'org-insert-link-global)
+ (global-set-key "\C-c o" 'org-open-at-point-global)
(setq org-link-frame-setup '((file . find-file))) ; open link in same frame.
(if (boundp 'org-user-agenda-files)
(setq org-agenda-files org-user-agenda-files)
(setq org-agenda-files (quote ("~/projects/notes")))
)
'';
+
theme = ''
- (load-theme 'monokai-alt)
+ (load-theme 'monokai-alt t)
'';
+
recentFiles = ''
(recentf-mode 1)
(setq recentf-max-menu-items 25)
(global-set-key "\C-x\ \C-r" 'recentf-open-files)
'';
+
dotEmacs = pkgs.writeText "dot-emacs" ''
${evilMode}
+ ${goMode}
+ ${ido}
${packageRepos}
${orgMode}
${recentFiles}
${theme}
${windowCosmetics}
'';
+
emacsWithCustomPackages = (pkgs.emacsPackagesNgGen pkgs.emacs).emacsWithPackages (epkgs: [
+ epkgs.melpaPackages.ag
epkgs.melpaPackages.evil
epkgs.melpaStablePackages.magit
epkgs.melpaPackages.nix-mode
epkgs.melpaPackages.go-mode
+ epkgs.melpaPackages.haskell-mode
epkgs.melpaPackages.google-this
epkgs.melpaPackages.monokai-alt-theme
+ epkgs.melpaPackages.rust-mode
]);
+
myEmacs = pkgs.writeDashBin "my-emacs" ''
exec ${emacsWithCustomPackages}/bin/emacs -q -l ${dotEmacs} "$@"
'';
+
+ myEmacsWithDaemon = pkgs.writeDashBin "my-emacs-daemon" ''
+ exec ${emacsWithCustomPackages}/bin/emacs -q -l ${dotEmacs} --daemon
+ '';
+
+ myEmacsClient = pkgs.writeDashBin "meclient" ''
+ exec ${emacsWithCustomPackages}/bin/emacsclient --create-frame
+ '';
+
in {
environment.systemPackages = [
- myEmacs
+ myEmacs myEmacsWithDaemon myEmacsClient
];
}
diff --git a/jeschli/2configs/xserver/default.nix b/jeschli/2configs/xserver/default.nix
index ec3977c7e..44c35ca37 100644
--- a/jeschli/2configs/xserver/default.nix
+++ b/jeschli/2configs/xserver/default.nix
@@ -51,6 +51,12 @@ in {
${pkgs.xorg.xmodmap}/bin/xmodmap ${import ./Xmodmap.nix args} &
${pkgs.xorg.xrdb}/bin/xrdb ${import ./Xresources.nix args} &
${pkgs.xorg.xsetroot}/bin/xsetroot -solid '#1c1c1c' &
+ ${config.services.xserver.displayManager.sessionCommands}
+ if test -z "$DBUS_SESSION_BUS_ADDRESS"; then
+ exec ${pkgs.dbus.dbus-launch} --exit-with-session "$0" ""
+ fi
+ export DBUS_SESSION_BUS_ADDRESS
+ ${config.systemd.package}/bin/systemctl --user import-environment DISPLAY DBUS_SESSION_BUS_ADDRESS
wait
'';