#+title: P’undrak’s dotfiles

#+html: <a href="https://www.gnu.org/software/emacs/"><img src="https://img.shields.io/badge/Emacs-29.1-blueviolet.svg?style=flat-square&logo=GNU%20Emacs&logoColor=white" /></a>
#+html: <a href="https://orgmode.org/"><img src="https://img.shields.io/badge/Written%20with-Org%20mode-success?logo=Org&logoColor=white&style=flat-square"/></a>
#+html: <a href="https://v2.vuepress.vuejs.org/"><img src="https://img.shields.io/badge/Framework-Vuepress-42D392?logo=Vue.js&logoColor=white&style=flat-square"/></a>
#+html: <a href="https://config.phundrak.com/"><img src="https://img.shields.io/badge/Website-online-success?logo=buffer&logoColor=white&style=flat-square"/></a>


* About the Project
This repository holds my Linux dotfiles and other configuration files.
The files I’m using are written in [[https://orgmode.org/][org-mode]] and exported in Markdown
through [[https://www.gnu.org/software/emacs/][Emacs]].

These Markdown files are then compiled by [[https://v2.vuepress.vuejs.org/][Vuepress]] into a beautiful
website available at [[https://beta.config.phundrak.com][config.phundrak.com]].

Note that a few configs here are no longer up to date. I am in the
process of switching over to [[https://nixos.org/][NixOS]]. You can find my current NixOS
configuration [[https://labs.phundrak.com/phundrak/nix-config][in this repository]]. It will eventually circle back to
being a litterary configuration. Not every piece of software will be
configured by Nix exclusively though, Emacs for instance will stay
relatively free of Nix configurations aside from its basic
installation.

* Running the project
In order to run the project, you need to export all =.org= files in the
Markdown format. To do that easily, you can use an org project setup
in Emacs, mine looks like this:
#+begin_src emacs-lisp
(require 'ox-gfm)
(defvar phundrak--projects-config-common-root
  "~/org/config/docs/"
  "Points to the common root of my source and target for my
config.phundrak.com org project.")
(setq org-publish-project-alist
        `(("config-phundrak-com-md"
           :base-directory ,phundrak--projects-config-common-root
           :base-extension "org"
           :exclude ,(rx (* print
                            (or "CONTRIB"
                                   "README"
                                   "site-map"
                                   "temp"
                                   "private"
                                   "svg-ink")
                            (* print)))
           :publishing-directory ,phundrak--projects-config-common-root
           :recursive t
           :language "en"
           :publishing-function org-gfm-publish-to-gfm
           :headline-levels 5
           :auto-sitemap nil
           :auto-preamble nil)
          ("config-phundrak-com"
           :components ("config-phundrak-com-md"))))
#+end_src

Once you have all the Markdown files generated correctly, you can
install the dependencies of the project.
#+begin_src shell
yarn
# or
npm install # delete the yarn.lock file first
#+end_src

Once this is done, you can launch a preview of the project.
#+begin_src shell
yarn dev
# or
npm run dev
#+end_src

You can also compile the project to a static website.
#+begin_src shell
yarn build
# or
npm run build
#+end_src

** With Nix shell
A Nix shell is available for running the project without the Emacs
part. Simply run =nix-shell= in the project root. You’ll get the latest
version of =yarn= installed and should be able to run the commands
above.
