Merge remote-tracking branch 'youngjin/master'

Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
This commit is contained in:
Nico Schottelius 2020-05-07 12:36:02 +02:00
commit ee27d069ac
9 changed files with 763 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
/youngjin.han/dot-cdist/type/__my_computer/manifest~
/youngjin.han/cdist.org~

243
youngjin.han/cdist.org Normal file
View file

@ -0,0 +1,243 @@
* singleton / non-singleton
** non-singleton needs process ID.
** singletion should be carried out by itself.
* verbosity
** verbosity level display me cdist processing information.
*** '-v' is light information.
*** '-vv' and '-vvv' iform me more cidst processing information (e.g. debug, verbose and etc)
* log : verbosity
** -v
INFO: localhost: Starting configuration run
INFO: localhost: Processing __apt_update_index/
INFO: localhost: Processing __motd/
INFO: localhost: Finished successful run in 2.45 seconds
** -vv
VERBOSE: cdist: version 6.5.5-2-gd4059fd2
INFO: localhost: Starting configuration run
VERBOSE: localhost: Running global explorers
VERBOSE: localhost: Running initial manifest /tmp/tmplx_30ksy/421aa90e079fa326b6494f812ad13e79/data/conf/manifest/init
VERBOSE: localhost: Preparing object __file/etc/cdist-configured
VERBOSE: localhost: Running manifest and explorers for __file/etc/cdist-configured
VERBOSE: localhost: Running type explorers for <CdistType __file>
VERBOSE: localhost: Running object __file/etc/cdist-configured
VERBOSE: localhost: Preparing object __timezone/Asia/Seoul
VERBOSE: localhost: Running manifest and explorers for __timezone/Asia/Seoul
VERBOSE: localhost: Running type explorers for <CdistType __timezone>
VERBOSE: localhost: Running type manifest /tmp/tmplx_30ksy/421aa90e079fa326b6494f812ad13e79/data/conf/type/__timezone/manifest for object __timezone/Asia/Seoul
VERBOSE: localhost: Preparing object __my_computer/
VERBOSE: localhost: Running manifest and explorers for __my_computer/
VERBOSE: localhost: Running type explorers for <CdistType __my_computer>
VERBOSE: localhost: Running type manifest /tmp/tmplx_30ksy/421aa90e079fa326b6494f812ad13e79/data/conf/type/__my_computer/manifest for object __my_computer/
VERBOSE: localhost: Preparing object __motd/
VERBOSE: localhost: Running manifest and explorers for __motd/
VERBOSE: localhost: Running type explorers for <CdistType __motd>
VERBOSE: localhost: Running type manifest /tmp/tmplx_30ksy/421aa90e079fa326b6494f812ad13e79/data/conf/type/__motd/manifest for object __motd/
VERBOSE: localhost: Preparing object __apt_update_index/
VERBOSE: localhost: Running manifest and explorers for __apt_update_index/
VERBOSE: localhost: Running type explorers for <CdistType __apt_update_index>
VERBOSE: localhost: Running object __apt_update_index/
INFO: localhost: Processing __apt_update_index/
VERBOSE: localhost: Preparing object __file/home/jafo/.emacs.d/30_agenda_config.el
VERBOSE: localhost: Running manifest and explorers for __file/home/jafo/.emacs.d/30_agenda_config.el
VERBOSE: localhost: Running type explorers for <CdistType __file>
VERBOSE: localhost: Running object __file/home/jafo/.emacs.d/30_agenda_config.el
VERBOSE: localhost: Preparing object __file/home/jafo/.emacs.d/00_global_config.el
VERBOSE: localhost: Running manifest and explorers for __file/home/jafo/.emacs.d/00_global_config.el
VERBOSE: localhost: Running type explorers for <CdistType __file>
VERBOSE: localhost: Running object __file/home/jafo/.emacs.d/00_global_config.el
VERBOSE: localhost: Preparing object __file/home/jafo/.emacs.d/10_magit_config.el
VERBOSE: localhost: Running manifest and explorers for __file/home/jafo/.emacs.d/10_magit_config.el
VERBOSE: localhost: Running type explorers for <CdistType __file>
VERBOSE: localhost: Running object __file/home/jafo/.emacs.d/10_magit_config.el
VERBOSE: localhost: Preparing object __file/home/jafo/.emacs.d/20_mu4e_config.el
VERBOSE: localhost: Running manifest and explorers for __file/home/jafo/.emacs.d/20_mu4e_config.el
VERBOSE: localhost: Running type explorers for <CdistType __file>
VERBOSE: localhost: Running object __file/home/jafo/.emacs.d/20_mu4e_config.el
VERBOSE: localhost: Preparing object __file/home/jafo/.emacs.d/init.el
VERBOSE: localhost: Running manifest and explorers for __file/home/jafo/.emacs.d/init.el
VERBOSE: localhost: Running type explorers for <CdistType __file>
VERBOSE: localhost: Running object __file/home/jafo/.emacs.d/init.el
VERBOSE: localhost: Preparing object __file/home/jafo/.emacs.d/21_smtp_config.el
VERBOSE: localhost: Running manifest and explorers for __file/home/jafo/.emacs.d/21_smtp_config.el
VERBOSE: localhost: Running type explorers for <CdistType __file>
VERBOSE: localhost: Running object __file/home/jafo/.emacs.d/21_smtp_config.el
VERBOSE: localhost: Preparing object __file/home/jafo/.emacs.d/99_custom_config.el
VERBOSE: localhost: Running manifest and explorers for __file/home/jafo/.emacs.d/99_custom_config.el
VERBOSE: localhost: Running type explorers for <CdistType __file>
VERBOSE: localhost: Running object __file/home/jafo/.emacs.d/99_custom_config.el
VERBOSE: localhost: Preparing object __file/etc/motd.tail
VERBOSE: localhost: Running manifest and explorers for __file/etc/motd.tail
VERBOSE: localhost: Running type explorers for <CdistType __file>
VERBOSE: localhost: Running object __file/etc/motd.tail
VERBOSE: localhost: Preparing object __directory/home/jafo/.emacs.d
VERBOSE: localhost: Running manifest and explorers for __directory/home/jafo/.emacs.d
VERBOSE: localhost: Running type explorers for <CdistType __directory>
VERBOSE: localhost: Running object __directory/home/jafo/.emacs.d
VERBOSE: localhost: Preparing object __package/tzdata
VERBOSE: localhost: Running manifest and explorers for __package/tzdata
VERBOSE: localhost: Running type explorers for <CdistType __package>
VERBOSE: localhost: Running type manifest /tmp/tmplx_30ksy/421aa90e079fa326b6494f812ad13e79/data/conf/type/__package/manifest for object __package/tzdata
VERBOSE: localhost: Running object __my_computer/
VERBOSE: localhost: Running object __motd/
INFO: localhost: Processing __motd/
VERBOSE: localhost: Preparing object __package_apt/tzdata
VERBOSE: localhost: Running manifest and explorers for __package_apt/tzdata
VERBOSE: localhost: Running type explorers for <CdistType __package_apt>
VERBOSE: localhost: Running object __package_apt/tzdata
VERBOSE: localhost: Running object __package/tzdata
VERBOSE: localhost: Preparing object __link/etc/localtime
VERBOSE: localhost: Running manifest and explorers for __link/etc/localtime
VERBOSE: localhost: Running type explorers for <CdistType __link>
VERBOSE: localhost: Running object __link/etc/localtime
VERBOSE: localhost: Running object __timezone/Asia/Seoul
INFO: localhost: Finished successful run in 2.42 seconds
VERBOSE: config: Total processing time for 1 host(s): 2.424041986465454
** -vvv
VERBOSE: cdist: version 6.5.5-2-gd4059fd2
DEBUG: inventory: Host 'localhost' not found, skipped
DEBUG: config: Base root path for target host "localhost" is "/tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79"
DEBUG: localhost: remote_exec for host "localhost": ssh -o User=root -o ControlPath=/tmp/tmppv2p77_1/s -o ControlMaster=auto -o ControlPersist=2h
DEBUG: localhost: remote_copy for host "localhost": scp -o User=root -q -o ControlPath=/tmp/tmppv2p77_1/s -o ControlMaster=auto -o ControlPersist=2h
DEBUG: localhost: address family: 0
DEBUG: localhost: derived host_name for host "localhost": localhost
DEBUG: localhost: derived host_fqdn for host "localhost": localhost
DEBUG: localhost: target_host for host "localhost": ('localhost', 'localhost', 'localhost')
INFO: localhost: Starting configuration run
DEBUG: localhost: Checking conf_dir /usr/local/lib/python3.5/dist-packages/cdist/conf ...
DEBUG: localhost: Checking conf_dir /home/jafo/.cdist ...
DEBUG: localhost: Checking conf_dir /home/jafo/ungleich-learning-circle/youngjin.han/dot-cdist/ ...
VERBOSE: localhost: Running global explorers
DEBUG: localhost: Running global explorers sequentially
VERBOSE: localhost: Running initial manifest /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/manifest/init
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/manifest/init is NOT executable, running it with /bin/sh -e
DEBUG: localhost: Iteration in sequential mode
VERBOSE: localhost: Preparing object __file/etc/cdist-configured
VERBOSE: localhost: Running manifest and explorers for __file/etc/cdist-configured
VERBOSE: localhost: Running type explorers for <CdistType __file>
VERBOSE: localhost: Running object __file/etc/cdist-configured
DEBUG: localhost: Generating code for __file/etc/cdist-configured
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__file/gencode-local is NOT executable, running it with /bin/sh -e
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__file/gencode-remote is NOT executable, running it with /bin/sh -e
VERBOSE: localhost: Preparing object __timezone/Asia/Seoul
VERBOSE: localhost: Running manifest and explorers for __timezone/Asia/Seoul
VERBOSE: localhost: Running type explorers for <CdistType __timezone>
VERBOSE: localhost: Running type manifest /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__timezone/manifest for object __timezone/Asia/Seoul
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__timezone/manifest is NOT executable, running it with /bin/sh -e
VERBOSE: localhost: Preparing object __my_computer/
VERBOSE: localhost: Running manifest and explorers for __my_computer/
VERBOSE: localhost: Running type explorers for <CdistType __my_computer>
VERBOSE: localhost: Running type manifest /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__my_computer/manifest for object __my_computer/
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__my_computer/manifest is executable, running it
VERBOSE: localhost: Preparing object __motd/
VERBOSE: localhost: Running manifest and explorers for __motd/
VERBOSE: localhost: Running type explorers for <CdistType __motd>
VERBOSE: localhost: Running type manifest /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__motd/manifest for object __motd/
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__motd/manifest is NOT executable, running it with /bin/sh -e
DEBUG: localhost: Iteration in sequential mode
VERBOSE: localhost: Preparing object __apt_update_index/
VERBOSE: localhost: Running manifest and explorers for __apt_update_index/
VERBOSE: localhost: Running type explorers for <CdistType __apt_update_index>
VERBOSE: localhost: Running object __apt_update_index/
DEBUG: localhost: Generating code for __apt_update_index/
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__apt_update_index/gencode-remote is NOT executable, running it with /bin/sh -e
INFO: localhost: Processing __apt_update_index/
VERBOSE: localhost: Preparing object __file/home/jafo/.emacs.d/30_agenda_config.el
VERBOSE: localhost: Running manifest and explorers for __file/home/jafo/.emacs.d/30_agenda_config.el
VERBOSE: localhost: Running type explorers for <CdistType __file>
VERBOSE: localhost: Running object __file/home/jafo/.emacs.d/30_agenda_config.el
DEBUG: localhost: Generating code for __file/home/jafo/.emacs.d/30_agenda_config.el
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__file/gencode-local is NOT executable, running it with /bin/sh -e
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__file/gencode-remote is NOT executable, running it with /bin/sh -e
VERBOSE: localhost: Preparing object __file/home/jafo/.emacs.d/00_global_config.el
VERBOSE: localhost: Running manifest and explorers for __file/home/jafo/.emacs.d/00_global_config.el
VERBOSE: localhost: Running type explorers for <CdistType __file>
VERBOSE: localhost: Running object __file/home/jafo/.emacs.d/00_global_config.el
DEBUG: localhost: Generating code for __file/home/jafo/.emacs.d/00_global_config.el
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__file/gencode-local is NOT executable, running it with /bin/sh -e
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__file/gencode-remote is NOT executable, running it with /bin/sh -e
VERBOSE: localhost: Preparing object __file/home/jafo/.emacs.d/10_magit_config.el
VERBOSE: localhost: Running manifest and explorers for __file/home/jafo/.emacs.d/10_magit_config.el
VERBOSE: localhost: Running type explorers for <CdistType __file>
VERBOSE: localhost: Running object __file/home/jafo/.emacs.d/10_magit_config.el
DEBUG: localhost: Generating code for __file/home/jafo/.emacs.d/10_magit_config.el
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__file/gencode-local is NOT executable, running it with /bin/sh -e
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__file/gencode-remote is NOT executable, running it with /bin/sh -e
VERBOSE: localhost: Preparing object __file/home/jafo/.emacs.d/20_mu4e_config.el
VERBOSE: localhost: Running manifest and explorers for __file/home/jafo/.emacs.d/20_mu4e_config.el
VERBOSE: localhost: Running type explorers for <CdistType __file>
VERBOSE: localhost: Running object __file/home/jafo/.emacs.d/20_mu4e_config.el
DEBUG: localhost: Generating code for __file/home/jafo/.emacs.d/20_mu4e_config.el
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__file/gencode-local is NOT executable, running it with /bin/sh -e
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__file/gencode-remote is NOT executable, running it with /bin/sh -e
VERBOSE: localhost: Preparing object __file/home/jafo/.emacs.d/init.el
VERBOSE: localhost: Running manifest and explorers for __file/home/jafo/.emacs.d/init.el
VERBOSE: localhost: Running type explorers for <CdistType __file>
VERBOSE: localhost: Running object __file/home/jafo/.emacs.d/init.el
DEBUG: localhost: Generating code for __file/home/jafo/.emacs.d/init.el
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__file/gencode-local is NOT executable, running it with /bin/sh -e
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__file/gencode-remote is NOT executable, running it with /bin/sh -e
VERBOSE: localhost: Preparing object __file/home/jafo/.emacs.d/21_smtp_config.el
VERBOSE: localhost: Running manifest and explorers for __file/home/jafo/.emacs.d/21_smtp_config.el
VERBOSE: localhost: Running type explorers for <CdistType __file>
VERBOSE: localhost: Running object __file/home/jafo/.emacs.d/21_smtp_config.el
DEBUG: localhost: Generating code for __file/home/jafo/.emacs.d/21_smtp_config.el
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__file/gencode-local is NOT executable, running it with /bin/sh -e
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__file/gencode-remote is NOT executable, running it with /bin/sh -e
VERBOSE: localhost: Preparing object __file/home/jafo/.emacs.d/99_custom_config.el
VERBOSE: localhost: Running manifest and explorers for __file/home/jafo/.emacs.d/99_custom_config.el
VERBOSE: localhost: Running type explorers for <CdistType __file>
VERBOSE: localhost: Running object __file/home/jafo/.emacs.d/99_custom_config.el
DEBUG: localhost: Generating code for __file/home/jafo/.emacs.d/99_custom_config.el
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__file/gencode-local is NOT executable, running it with /bin/sh -e
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__file/gencode-remote is NOT executable, running it with /bin/sh -e
VERBOSE: localhost: Preparing object __file/etc/motd.tail
VERBOSE: localhost: Running manifest and explorers for __file/etc/motd.tail
VERBOSE: localhost: Running type explorers for <CdistType __file>
VERBOSE: localhost: Running object __file/etc/motd.tail
DEBUG: localhost: Generating code for __file/etc/motd.tail
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__file/gencode-local is NOT executable, running it with /bin/sh -e
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__file/gencode-remote is NOT executable, running it with /bin/sh -e
VERBOSE: localhost: Preparing object __directory/home/jafo/.emacs.d
VERBOSE: localhost: Running manifest and explorers for __directory/home/jafo/.emacs.d
VERBOSE: localhost: Running type explorers for <CdistType __directory>
VERBOSE: localhost: Running object __directory/home/jafo/.emacs.d
DEBUG: localhost: Generating code for __directory/home/jafo/.emacs.d
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__directory/gencode-remote is NOT executable, running it with /bin/sh -e
VERBOSE: localhost: Preparing object __package/tzdata
VERBOSE: localhost: Running manifest and explorers for __package/tzdata
VERBOSE: localhost: Running type explorers for <CdistType __package>
VERBOSE: localhost: Running type manifest /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__package/manifest for object __package/tzdata
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__package/manifest is NOT executable, running it with /bin/sh -e
VERBOSE: localhost: Running object __my_computer/
DEBUG: localhost: Generating code for __my_computer/
VERBOSE: localhost: Running object __motd/
DEBUG: localhost: Generating code for __motd/
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__motd/gencode-remote is NOT executable, running it with /bin/sh -e
INFO: localhost: Processing __motd/
DEBUG: localhost: Iteration in sequential mode
VERBOSE: localhost: Preparing object __package_apt/tzdata
VERBOSE: localhost: Running manifest and explorers for __package_apt/tzdata
VERBOSE: localhost: Running type explorers for <CdistType __package_apt>
VERBOSE: localhost: Running object __package_apt/tzdata
DEBUG: localhost: Generating code for __package_apt/tzdata
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__package_apt/gencode-remote is NOT executable, running it with /bin/sh -e
DEBUG: localhost: Iteration in sequential mode
VERBOSE: localhost: Running object __package/tzdata
DEBUG: localhost: Generating code for __package/tzdata
DEBUG: localhost: Iteration in sequential mode
VERBOSE: localhost: Preparing object __link/etc/localtime
VERBOSE: localhost: Running manifest and explorers for __link/etc/localtime
VERBOSE: localhost: Running type explorers for <CdistType __link>
VERBOSE: localhost: Running object __link/etc/localtime
DEBUG: localhost: Generating code for __link/etc/localtime
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__link/gencode-remote is NOT executable, running it with /bin/sh -e
VERBOSE: localhost: Running object __timezone/Asia/Seoul
DEBUG: localhost: Generating code for __timezone/Asia/Seoul
DEBUG: localhost: /tmp/tmp4qn81ovh/421aa90e079fa326b6494f812ad13e79/data/conf/type/__timezone/gencode-remote is NOT executable, running it with /bin/sh -e
DEBUG: localhost: Iteration in sequential mode
DEBUG: localhost: Running cleanup commands
Exit request sent.
DEBUG: localhost: cache subpath: 421aa90e079fa326b6494f812ad13e79
INFO: localhost: Finished successful run in 2.47 seconds
VERBOSE: config: Total processing time for 1 host(s): 2.4723527431488037

View file

@ -0,0 +1,9 @@
__file /etc/cdist-configured
case "$__target_host" in
localhost)
__motd
__timezone Asia/Seoul
__my_computer
;;
esac

View file

@ -0,0 +1,349 @@
#!/bin/sh -e
packages_to_install="zsh mosh emacs nmap sipcals"
__apt_update_index
for package in $package_to_install;
do require="__apt_update_index" __package $package --state=present
done
__require="__package/emacs" \
__directory ~/.emacs.d
__require="__package/emacs __directory/~/.emacs.d" \
__file ~/.emacs.d/init.el \
--owner root \
--group root \
--mode 0644 \
--source - << EOF
;;; init.el --- GNU Emacs Configuration
;; Copyright (C) 2014 Terencio Agozzino
;; Author: Terencio Agozzino <terencio.agozzino@gmail.com>
;; Created: February 16, 2014
;; Homepage: https://github.com/rememberYou/.emacs.d
;; Keywords: abbrev, convenience, faces, maint, outlines, vc
;; This program is free software. You can redistribute it and/or modify it under
;; the terms of the Do What The Fuck You Want To Public License, version 2 as
;; published by Sam Hocevar.
;;
;; This program is distributed in the hope that it will be useful, but WITHOUT
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
;; FOR A PARTICULAR PURPOSE.
;;
;; You should have received a copy of the Do What The Fuck You Want To Public
;; License along with this program. If not, see http://www.wtfpl.net/.
;;; Commentary:
;; Following lines build the configuration code out of the config.el file.
;;; Code:
;; Make startup faster by reducing the frequency of garbage
;; collection.
(setq gc-cons-threshold (* 50 1000 1000))
(require 'package)
(package-initialize)
(if (file-exists-p (expand-file-name "00_global_config.el" user-emacs-directory))
(load-file (expand-file-name "00_global_config.el" user-emacs-directory)))
(if (file-exists-p (expand-file-name "10_magit_config.el" user-emacs-directory))
(load-file (expand-file-name "10_magit_config.el" user-emacs-directory)))
(if (file-exists-p (expand-file-name "20_mu4e_config.el" user-emacs-directory))
(load-file (expand-file-name "20_mu4e_config.el" user-emacs-directory)))
(if (file-exists-p (expand-file-name "21_smtp_config.el" user-emacs-directory))
(load-file (expand-file-name "21_smtp_config.el" user-emacs-directory)))
(if (file-exists-p (expand-file-name "30_agenda_config.el" user-emacs-directory))
(load-file (expand-file-name "30_agenda_config.el" user-emacs-directory)))
(if (file-exists-p (expand-file-name "99_custom_config.el" user-emacs-directory))
(load-file (expand-file-name "99_custom_config.el" user-emacs-directory)))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(org-agenda-files
(quote
("~/ungleich-learning-circle/youngjin.han/todo-node02-2020.org" "~/ungleich-learning-circle/youngjin.han/learning-node02-2020.org")))
'(package-selected-packages (quote (zenburn-theme magit)))
'(xterm-mouse-mode t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
;; Make gc pauses faster by decreasing the threshold.
(setq gc-cons-threshold (* 2 1000 1000))
;;; init.el ends here
EOF
__require="__package/emacs __directory/~/.emacs.d __file/~/.emacs.d/init.el" \
__file ~/.emacs.d/00_global_config.el \
--owner root \
--group root \
--mode 0644 \
--source - << EOF
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
;; load emacs 24's package system. Add MELPA repository.
(when (>= emacs-major-version 24)
(require 'package)
(add-to-list
'package-archives
;; '("melpa" . "http://stable.melpa.org/packages/") ; many packages won't show if using stable
'("melpa" . "http://melpa.milkbox.net/packages/")
;; '("org" . "http://orgmode.org/elpa/")
t))
(setq auth-sources '("~/.authinfo.gpg"
"~/.authinfo"))
(setq-default
;; ad-redefinition-action 'accept ; Silence warnings for redefinition
;; cursor-in-non-selected-windows t ; Hide the cursor in inactive windows
;; display-time-default-load-average nil ; Don't display load average
;; fill-column 80 ; Set width for automatic line breaks
help-window-select t ; Focus new help windows when opened
indent-tabs-mode nil ; Prefers spaces over tabs
inhibit-startup-screen t ; Disable start-up screen
;; initial-scratch-message "" ; Empty the initial *scratch* buffer
;; kill-ring-max 128 ; Maximum length of kill ring
;; load-prefer-newer t ; Prefers the newest version of a file
;; mark-ring-max 128 ; Maximum length of mark ring
;; scroll-conservatively most-positive-fixnum ; Always scroll by one line
;; select-enable-clipboard t ; Merge system's and Emacs' clipboard
tab-width 4 ; Set width for tabs
;; use-package-always-ensure t ; Avoid the :ensure keyword for each package
;; user-full-name "Terencio Agozzino" ; Set the full name of the current user
;; user-mail-address "terencio.agozzino@gmail.com" ; Set the email address of the current user
vc-follow-symlinks t ; Always follow the symlinks
;; view-read-only t ; Always open read-only buffers in view-mode
)
(cd "~/") ; Move to the user directory
(column-number-mode 1) ; Show the column number
(display-time-mode 1) ; Enable time in the mode-line
(fset 'yes-or-no-p 'y-or-n-p) ; Replace yes/no prompts with y/n
(global-hl-line-mode) ; Hightlight current line
;; (set-default-coding-systems 'utf-8) ; Default to utf-8 encoding
;; (show-paren-mode 1) ; Show the parent
;; use variable-pitch fonts for some headings and titles
(setq zenburn-use-variable-pitch t)
;; scale headings in org-mode
(setq zenburn-scale-org-headlines t)
;; scale headings in outline-mode
(setq zenburn-scale-outline-headlines t)
(setq zenburn-override-colors-alist
'(("zenburn-bg+05" . "#282828")
("zenburn-bg+1" . "#2F2F2F")
("zenburn-bg+2" . "#3F3F3F")
("zenburn-bg+3" . "#4F4F4F")))
(load-theme 'zenburn t)
(set-face-attribute 'default nil :font "Source Code Pro Medium")
(set-fontset-font t 'latin "Noto Sans")
(set-frame-font "DejaVu Sans Mono-18" nil t)
;;문법 강조를 활성화
(global-font-lock-mode t)
(transient-mark-mode 1)
(when window-system
(menu-bar-mode -1) ; Disable the menu bar
(scroll-bar-mode -1) ; Disable the scroll bar
(tool-bar-mode -1) ; Disable the tool bar
(tooltip-mode -1)) ; Disable the tooltips
;; org-mode 설정
;; org-mode 활성화
(require 'org)
;; org-mode를 .org로 끝나는 파일에서 활성화
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
;; (global-set-key (kbd "<f3>") (lambda () (interactive) (find-file (concat "~/ungleich-learning-circle/youngjin.han/learning-"(system-name)"-"(substring (current-time-string) -4 nil)".org"))))
(global-set-key (kbd "<f3>") (lambda () (interactive) (find-file (concat "~/ungleich-learning-circle/youngjin.han/learning-"(system-name)"-"(format-time-string "%Y")".org"))))
(setq org-directory (expand-file-name "~/ungleich-learning-circle/youngjin.han"))
(use-package window
:ensure nil
:bind (("C-x 3" . hsplit-last-buffer)
("C-x 2" . vsplit-last-buffer))
:preface
(defun hsplit-last-buffer ()
"Gives the focus to the last created horizontal window."
(interactive)
(split-window-horizontally)
(other-window 1))
(defun vsplit-last-buffer ()
"Gives the focus to the last created vertical window."
(interactive)
(split-window-vertically)
(other-window 1)))
EOF
__require="__package/emacs __directory/~/.emacs.d __file/~/.emacs.d/init.el" \
__file ~/.emacs.d/10_magit_config.el \
--owner root \
--group root \
--mode 0644 \
--source - << EOF
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(require 'magit)
(global-set-key (kbd "C-x g") 'magit-status)
EOF
__require="__package/emacs __directory/~/.emacs.d __file/~/.emacs.d/init.el" \
__file ~/.emacs.d/20_mu4e_config.el \
--owner root \
--group root \
--mode 0644 \
--source - << EOF
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e")
(require 'mu4e)
;; location of my maildir
(setq mu4e-maildir (expand-file-name "~/.maildir/ungleich/youngjin.han@ungleich.ch/"))
(setq mu4e-maildir-shortcuts
'( (:maildir "/Inbox" :key ?i)
(:maildir "/archive" :key ?a)
(:maildir "/drafts" :key ?d)
(:maildir "/sent" :key ?s)
(:maildir "/trash" :key ?t)))
;; these are actually the defaults
(setq
mu4e-refile-folder "/archive" ;; saved messages
mu4e-drafts-folder "/drafts" ;; unfinished messages
mu4e-sent-folder "/sent" ;; folder for sent messages
mu4e-trash-folder "/trash") ;; trashed messages
(setq
mu4e-index-cleanup nil ;; don't do a full cleanup check
mu4e-index-lazy-check t) ;; don't consider up-to-date dirs
(setq
mu4e-get-mail-command "mbsync -a" ;; or fetchmail, or ...
mu4e-update-interval 300) ;; update every 5 minutes
;; show images
(setq mu4e-show-images t)
(setq mu4e-reply-to-address "youngjin.han@ungleich.ch"
user-mail-address "youngjin.han@ungleich.ch"
user-full-name "YOUNGJIN.HAN")
;; spell check
(add-hook 'mu4e-compose-mode-hook
(defun my-do-compose-stuff ()
"My settings for message composition."
(set-fill-column 72)
(flyspell-mode)))
;;rename files when moving
;;NEEDED FOR MBSYNC
(setq mu4e-change-filenames-when-moving t)
;;store org-mode links to messages
(require 'org-mu4e)
(define-key mu4e-headers-mode-map (kbd "C-c c") 'mu4e-org-store-and-capture)
(define-key mu4e-view-mode-map (kbd "C-c c") 'mu4e-org-store-and-capture)
(setq mu4e-headers-skip-duplicates nil)
;;store link to message if in header view, not to header query
(setq org-mu4e-link-query-in-headers-mode nil)
EOF
__require="__package/emacs __directory/~/.emacs.d __file/~/.emacs.d/init.el" \
__file ~/.emacs.d/21_smtp_config.el \
--owner root \
--group root \
--mode 0644 \
--source - << EOF
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(require 'smtpmail)
;; smtp
(setq message-send-mail-function 'smtpmail-send-it
smtpmail-starttls-credentials
'(("smtp.ungleich.ch" 587 nil nil))
smtpmail-default-smtp-server "smtp.ungleich.ch"
smtpmail-smtp-server "smtp.ungleich.ch"
smtpmail-smtp-service 587
smtpmail-auth-credentials "~/.authinfo"
smtpmail-debug-info t)
EOF
__require="__package/emacs __directory/~/.emacs.d __file/~/.emacs.d/init.el" \
__file ~/.emacs.d/30_agenda_config.el \
--owner root \
--group root \
--mode 0644 \
--source - << EOF
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(require 'org-agenda)
(global-set-key (kbd "C-c a") 'org-agenda)
(require 'org-capture)
(setq org-capture-templates
'(("t" "todo" entry (file+headline (concat "~/ungleich-learning-circle/youngjin.han/todo-"(system-name)"-"(format-time-string "%Y")".org") "Tasks")
"* TODO [#A] %?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n%a\n")))
(global-set-key (kbd "<f8>") 'org-todo-list)
(setq org-log-done 'time)
EOF
__require="__package/emacs __directory/~/.emacs.d __file/~/.emacs.d/init.el" \
__file ~/.emacs.d/99_custom_config.el \
--owner root \
--group root \
--mode 0644 \
--source - << EOF
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
EOF

View file

@ -1,3 +1,79 @@
* 2020-05-06
** cdist #2: Your first cdist type
**** Lecture content
***** Objective
****** Begin to understand how cdist types function
***** Steps
****** DONE Create a new type named `__my_computer`
CLOSED: [2020-05-06 수 22:53]
******* DONE Mark the type as a singleton type
CLOSED: [2020-05-06 수 22:53]
******* DONE Create a `manifest` file in it
CLOSED: [2020-05-06 수 22:53]
******* DONE Use this type to install the following packages: zsh, mosh, emacs, nmap, sipcalc
CLOSED: [2020-05-06 수 22:53]
******* DONE Edit the *initial manifest* and use **__my_computer** for **localhost**
CLOSED: [2020-05-06 수 22:53]
******* DONE Match using the $__target_host variable
CLOSED: [2020-05-06 수 22:53]
****** DONE Modify your type to use a *for loop* to install the packages
CLOSED: [2020-05-06 수 22:53]
****** DONE Deploy / manage your ~/.emacs file in this type
CLOSED: [2020-05-06 수 22:53]
******* DONE Ensure that permissions and ownership are correct
CLOSED: [2020-05-06 수 22:53]
****** DONE Use different *verbosity* levels when configuring
CLOSED: [2020-05-06 수 22:54]
****** DONE Ensure that all your changes are committed and pushed in your ungleich-learning-circle repository
CLOSED: [2020-05-06 수 22:54]
******* DONE Use magit inside emacs for that
CLOSED: [2020-05-06 수 22:54]
***** DONE Documentation steps to be done in cdist.org
CLOSED: [2020-05-06 수 23:02]
****** DONE Create a new org document named `cdist.org` in the same folder as the learning.org file
CLOSED: [2020-05-06 수 23:02]
****** DONE Explain the difference between a singleton and non-singleton type
CLOSED: [2020-05-06 수 23:02]
****** DONE Explain the difference between the different verbosity levels
CLOSED: [2020-05-06 수 23:02]
****** Document (copy&paste) some of the cdist runs in a "log" section```
* 2020-05-04
*** cdist #1: Introduction
**** Lecture content
***** Objective
****** Begin to use cdist
***** Steps
****** DONE Checkout cdist quickstart https://www.cdi.st/manual/latest/cdist-quickstart.html
CLOSED: [2020-05-04 월 22:32]
****** DONE Install cdist locally
CLOSED: [2020-05-04 월 22:32]
****** DONE Create a new cdist configuration directory in ~/ungleich-learning-circle/USERNAME/dot-cdist
CLOSED: [2020-05-04 월 22:32]
****** DONE Create an empty initial manifest ("use touch")
CLOSED: [2020-05-04 월 22:32]
****** DONE Commit that status
CLOSED: [2020-05-04 월 22:37]
****** DONE Ensure that you can login as root to localhost via ssh without a password
CLOSED: [2020-05-04 월 22:37]
****** DONE Configure cdist to configures the motd of your localhost
CLOSED: [2020-05-05 화 00:42]
******* DONE Ensure you have a case block matching on $__target_host
CLOSED: [2020-05-05 화 00:21]
******* DONE Use the -c parameter to cdist to specify the configuration directory
CLOSED: [2020-05-04 월 23:58]
******* DONE Use the -vv parameter to get more verbose output
CLOSED: [2020-05-04 월 23:57]
******* DONE Search for / understand what MOTD stands for
CLOSED: [2020-05-05 화 00:41]
****** DONE Configure cdist to create the file /etc/cdist-configured
CLOSED: [2020-05-04 월 23:33]
****** DONE Configure cdist to setup the timezone on your local computer
CLOSED: [2020-05-04 월 23:33]
****** DONE Configure cdist to ensure emacs is installed
CLOSED: [2020-05-04 월 23:47]
****** DONE Ensure that in the end all changes are committed in your repository
CLOSED: [2020-05-05 화 00:42]
* 2020-05-01
*** Organisation #5: Emacs refresher
**** Lecture content
***** Objective: get confident with emacs commands
@ -51,9 +127,91 @@
******* DONE Document two very similar, but slightly different ways
CLOSED: [2020-05-01 금 23:28]
******** C-x b is that the selected buffer is displayed on the focused window
******** C-x C-b is that all buffers is dispalayed on the new window
******** C-x 4 b is that the selected buffer is displayed on the new window
***** Outcome
****** DONE Document all above commands in your learning org sheet
CLOSED: [2020-05-01 금 23:28]
****** DONE Share your documentation at the end of the session (not before)
CLOSED: [2020-05-01 금 23:28]
* 2020-04-29
*** Organisation #4: Organising yourself
**** Lecture content
***** Objective: have a todo list based on org mode
***** Steps
****** Configure the "org-directory" to be ~/ungleich-learning-circle/USERNAME/
******* This is important as it will be used by the todo function later
****** Extend your function from the organisation #1 session
******* Instead of opening a fixed file, we include two variable parts:
******** The hostname of the machine
******** The year
******* Pressing F3 should open ~/ungleich-learning-circle/USERNAME/learning-$(hostname)-$(year).org
******** we call this "your personal agenda"
****** Configure mu4e to create a org-mode tasks from an email
******* Store these tasks in ~/ungleich-learning-circle/USERNAME/todo.org
****** Configure emacs to open the "org-agenda" with "C-c a"
****** List all TODO entries
****** List the agenda of the day
****** List the agenda of the week
****** Bind F8 to open the "org-todo-list"
****** Create some sample tasks in it
***** From now on, maintaining tasks should be
****** Pressing F3 to open your personal "logfile"
****** Adding a TODO item
****** Pressing F8 to see the tasks with priorities
***** Bonus tasks
****** Configure mu4e to store org-mode tasks in .../todo-$(hostname)-$(year).org
* 2020-04-27
*** Organisation #3: Managing your emails
**** Lecture content
***** Objective
****** Be able to manage all your mails in mu4e
***** Description
****** All email is synchronised using isync/mbsync
****** Email is indexed with mu (xapian backend)
****** Email is viewed in mu4e
****** All new emails arrive in the inbox
***** Steps
****** Install mu4e
****** Start mu4e in emacs
****** Configure mbsync for your ungleich mail account
******* Synchronise all mails into ~/Maildir/ungleich
******* This structure leaves room for other mail accounts, like ~/Maildir/gmail
****** Verify that mbsync synchronises the mail
****** Index mails using `mu` on the command line (only first time)
****** Configure mu4e to get email with mbsync -a
****** Configure mu4e to "archive" emails into ~/Maildir/ungleich/YEAR/
******* This gives you a good performance / organisation for the next decades
****** Configure mu4e/emacs for sending emails
****** Send other participants an email via mu4e
****** Verify that it arrives
****** "Archive" it afterwards
* 2020-04-24
*** Organisation #2: Creating, managing and sharing with "magit"
**** Lecture content
***** Install "magit" for emacs
***** Bind C-x g to open magit-status in ~/.emacs
***** Create a new directory ~/ungleich-learning-circle/ (with emacs)
****** Use C-h b in dired mode to find out how to
***** Create a sub directory ~/ungleich-learning-circle/YOURNAME/ (with emacs)
***** Move your previously created learning.org file into ~/ungleich-learning-circle/YOURNAME/ (with emacs)
***** Initialise it with git (with magit)
***** Create the repo "ungleich-learning-circle" on code.ungleich.ch under your username
***** Add your remote on code.ungleich.ch to your local git repo with magit
***** Push your repo
***** Add a new remote of a another participant
***** Move your ~/learning.org to ~/notes
***** Commit that file with magit
***** Push the repo with magit
***** Merging the remote repo with the command line
***** End result: everyone has everything of everyone else
* 2020-04-23
*** Organisation #1: org-mode introduction
**** Lecture content
***** Install emacs
***** Install org-mode
***** Create a function that opens ~/learning.org in your ~/.emacs
***** Bind that function to "f3" (configure it in .emacs)
***** Create a new item named "2020-04-10"
****** Create a sub item "ungleich learning circle"

View file

@ -0,0 +1 @@
* Mail TODO Tasks

1
youngjin.han/todo.org Normal file
View file

@ -0,0 +1 @@
* Mail TODO Tasks