From b6461fccb9559b80eb21c90046009ab064b9d8f0 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Wed, 11 Mar 2026 21:47:17 -0700 Subject: checkpoint for scss --- style.scss | 390 +++++++++++++++++++++++++------------------------------------ 1 file changed, 161 insertions(+), 229 deletions(-) (limited to 'style.scss') diff --git a/style.scss b/style.scss index dc90ab0..2956572 100644 --- a/style.scss +++ b/style.scss @@ -1,49 +1,40 @@ -@font-face { - font-family: 'Lora'; - font-style: normal; - font-weight: 500; - src: url('/fonts/Lora-Medium.woff2') format('woff2'); - font-display: swap; -} - -@font-face { - font-family: 'Inconsolata'; - font-style: normal; - font-weight: 400; - src: url('/fonts/Inconsolata-Regular.woff2') format('woff2'); - font-display: swap; -} - -@font-face { - font-family: 'STIX Two Math'; - font-style: normal; - font-weight: 400; - src: url('/fonts/STIXTwoMath-Regular.woff2') format('woff2'); - font-display: swap; -} - -@font-face { - font-family: 'CormorantGaramond'; - font-style: normal; - font-weight: 600; - src: url('/fonts/CormorantGaramond-Medium.woff2') format('woff2'); - font-display: swap; -} - -@font-face { - font-family: 'CormorantGaramond'; - font-style: normal; - font-weight: 700; - src: url('/fonts/CormorantGaramond-Bold.woff2') format('woff2'); - font-display: swap; +@use 'sass:map'; + +$fonts: ( + ('Lora', 'Lora-Medium', 500, normal), + ('Inconsolata', 'Inconsolata-Regular', 400, normal), + ('STIX Two Math', 'STIXTwoMath-Regular', 400, normal), + ('CormorantGaramond', 'CormorantGaramond-Medium', 600, normal), + ('CormorantGaramond', 'CormorantGaramond-Bold', 700, normal), + ('CormorantGaramond', 'CormorantGaramond-MediumItalic', 700, italic), +); + +@each $family, $file, $weight, $style in $fonts { + @font-face { + font-family: '#{$family}'; + font-style: $style; + font-weight: $weight; + src: url('/fonts/#{$file}.woff2') format('woff2'); + font-display: swap; + } } -@font-face { - font-family: 'CormorantGaramond'; - font-style: italic; - font-weight: 500; - src: url('/fonts/CormorantGaramond-MediumItalic.woff2') format('woff2'); - font-display: swap; +/* text color, background color (hex) */ +$isa: ( + ("info", #00529b, #bde5f8), + ("success", #4f8a10, #dff2bf), + ("warning", #9f6000, #fad776), + ("error", #d8000c, #feebe3) +); + +@each $name, $textcolor, $bgcolor in $isa { + .isa_#{$name} { + color: $textcolor; + background-color: $bgcolor; + width: 90%; + margin: 10px 0; + padding: 12px; + } } @mixin hide-scrollbar { @@ -53,16 +44,37 @@ } @mixin horizontal-scroll { - display: block !important; + display: block; overflow-x: auto; } +$breakpoints: ( + 'mobile': 768px, + 'toc': 1250px +); + +@mixin bp($name) { + $value: map.get($breakpoints, $name); + + @if $value { + @media (max-width: $value) { + @content; + } + } @else { + @error "Screen size '#{$name}' is not defined in the $breakpoints map."; + } +} + +@function accent_rgba($aval) { + @return rgb(from var(--accent) r g b / $aval); +} + :root { --bg-main: #FBF8F1; --text-main: #4A3F35; - --toc-bg: #EAE3D2; - --toc-text: #4A3F35; + --text-highlight: #ffe066; --accent: #D4A373; + --toc-bg: #F3E4D4; --link-color: #8C6239; --code-bg: #1e1e2e; @@ -72,14 +84,17 @@ --font-serif: "Lora", serif; --font-mono: "Inconsolata", monospace; --font-header: "CormorantGaramond", serif; + --font-math: "STIX Two Math",'Latin Modern Math', serif; } ::selection { - color: white; - background: #ff4081; + color: var(--text-main); + background: var(--text-highlight); } -*, *::before, *::after { box-sizing: border-box; } +*, *::before, *::after { + box-sizing: border-box; +} body { background: @@ -98,17 +113,24 @@ body { font-variant-ligatures: common-ligatures; -webkit-font-smoothing: antialiased; - display: flex; + // display: flex; flex-direction: column; align-items: center; min-height: 100vh; - @media (max-width: 1250px) { + @include bp('toc') { padding-left: 0; font-size: 20px; } } +main, header, footer { + width: 100%; + max-width: 85ch; + padding: 1rem 20px; + margin: 0 auto; +} + h1, h2, h3 { line-height: 1.2; font-family: var(--font-header), serif; } h4, h5, h6 { font-family: var(--font-mono), monospace; line-height: 1.3; margin-top: 1.5rem; margin-bottom: 0.5rem; } @@ -133,7 +155,7 @@ h2 { margin-top: 2.5rem; margin-bottom: 0.6rem; - @media (max-width: 768px) { font-size: 1.5rem; } + @include bp('mobile') { font-size: 1.5rem; } } h3 { font-size: 1.25rem; font-weight: 700; margin-top: 2rem; margin-bottom: 0.4rem; letter-spacing: 0.02em; } @@ -142,11 +164,9 @@ h5 { font-size: 1rem; font-weight: 700; color: var(--link-color); } h6 { font-size: 0.85rem; font-weight: 400; text-transform: uppercase; letter-spacing: 1px; color: color-mix(in srgb, var(--text-main) 60%, transparent); } p, ul, ol { margin-top: 1rem; margin-bottom: 1rem; } -p { margin: 1.2rem 0; } -li { margin: 0.3rem 0; } +li { margin-top: 0.3rem; } a { - cursor: pointer; color: var(--link-color); text-decoration: underline; text-decoration-thickness: 2px; @@ -164,7 +184,7 @@ figure { } figcaption { - font-family: var(--text-serif); + font-family: var(--font-serif); font-size: 0.9rem; color: color-mix(in srgb, var(--text-main) 80%, gray); margin-top: 0.5rem; @@ -177,6 +197,7 @@ img { max-width: 50%; width: auto; height: auto; + @include bp('mobile') { max-width: 100%; } } blockquote { @@ -191,6 +212,11 @@ blockquote { position: relative; background: color-mix(in srgb, var(--accent) 15%, transparent); + @include bp('mobile') { + padding: 1em 15px 1em 40px; + width: 100%; + } + &::before { font-family: var(--font-serif), serif; content: "\201C"; @@ -203,114 +229,53 @@ blockquote { } } -input { - padding: 10px 16px; - margin: 2px 0; - border: 2px solid #dabebe; - border-radius: 6px; - background: var(--bg-main); - color: var(--text-main); - font-size: 16px; - transition: 0.5s; - outline: none; - &:focus { border: 2px solid var(--text-main); } -} - math { display: inline-block; white-space: nowrap; &[display="block"] { - font-family: 'STIX Two Math', 'Latin Modern Math', serif; + font-family: var(--font-math); font-size: 1.3em; - min-width: 0 !important; - overflow-y: hidden !important; + min-width: 0; + overflow-y: hidden; & mtable { - margin-left: 0 !important; - text-align: left !important; + margin-left: 0; + text-align: left; } - & mtd { text-align: left !important; } - + & mtd { text-align: left; } @include hide-scrollbar; @include horizontal-scroll; } } -.button { - background-color: var(--bg-main); - border: none; - color: black; - padding: 6px 14px; - text-align: center; - text-decoration: none; - display: inline-block; - font-size: 16px; - margin: 4px 2px; - transition-duration: 0.4s; - cursor: pointer; - border: 2px solid var(--text-main); - border-radius: 6px; - &:hover { background-color: var(--text-main); color: white; } -} - -header, .title + p, .subtitle + p { - margin-bottom: 3rem; - padding-bottom: 1rem; -} - -#preamble { - padding-bottom: 0 !important; -} - -#preamble hr { - margin-bottom: 0 !important; -} - #content { - padding-top: 0 !important; -} - -h1.title { - padding-top: 1.5rem !important; -} - -#preamble + hr, header + hr { - display: none !important; -} - -#preamble, header { - padding-bottom: 0 !important; + padding-top: 0; } h1.title { - margin-top: 0.5rem; /* Reduced from 3rem */ + padding-top: 1.5rem; + margin-top: 0.5rem; } .title { font-size: 2.6rem; margin-bottom: 0.5rem; text-align: center; -} -.subtitle { - display: block; - font-size: 1.2rem; - text-align: center; - font-style: italic; - margin-top: 0.5rem; - font-family: var(--font-header), serif; -} - -.title + .subtitle { - text-align: center; - font-style: italic; - padding-bottom: 30px; - margin-top: -10px; - color: #555; - display: block; + & .subtitle { + text-align: center; + font-style: italic; + padding-bottom: 30px; + /* maybe change */ + margin-top: 10px; + color: #555; + display: block; + font-size: 1.2rem; + font-family: var(--font-header), serif; + } } .author, .date { @@ -336,13 +301,17 @@ h1.title { &:not(:last-child)::after { content: ", "; font-style: normal; } } -.preamble { - font-family: var(--font-mono), monospace; - font-size: 0.85rem; - text-transform: uppercase; - letter-spacing: 1px; +#preamble { margin-top: 10px; - color: color-mix(in srgb, var(--text-main) 50%, transparent); + margin-bottom: 0; + + .preamble { + font-family: var(--font-mono), monospace; + font-size: 0.85rem; + text-transform: uppercase; + letter-spacing: 1px; + color: color-mix(in srgb, var(--text-main) 50%, transparent); + } a { color: var(--text-main); @@ -356,19 +325,18 @@ h1.title { } } - & + hr { + & hr { border: none; height: 1px; background: linear-gradient(to right, var(--accent), transparent); - margin-bottom: 0rem; opacity: 0.5; width: 100%; - max-width: 85ch; + margin: 1rem 0 0 0; } } -.todo, .done { +.todo, .done, .tag { font-family: var(--font-mono), monospace; font-size: 0.75em; font-weight: bold; @@ -391,28 +359,38 @@ h1.title { border: 1px solid #8f9e76; } -.isa_info, .isa_success, .isa_warning, .isa_error { width: 90%; margin: 10px 0px; padding: 12px; } -.isa_info { color: #00529b; background-color: #bde5f8; } -.isa_success { color: #4f8a10; background-color: #dff2bf; } -.isa_warning { color: #9f6000; background-color: #feefb3; } -.isa_error { color: #d8000c; background-color: #ffd2d2; } +.tag { + margin-left: 8px; + font-weight: normal; + color: color-mix(in srgb, var(--text-main) 80%, transparent); + background-color: color-mix(in srgb, var(--accent) 15%, transparent); + border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); +} .theorem, .proof { display: block; - margin-left: 10px; font-style: normal; background: color-mix(in srgb, var(--accent) 8%, transparent); border-left: 3px solid var(--accent); padding: 1rem 1.3rem; - margin: 2rem 0; + margin-top: 2rem; + margin-left: 10px; &::before { float: left; font-weight: bold; } } .theorem { margin-bottom: 20px; &::before { content: "Theorem.\00a0\00a0"; } } -.proof { margin-bottom: 30px; &::after { content: "\25FC"; float: right; } &::before { content: 'Proof.\00a0\00a0'; } } +.proof { + margin-bottom: 30px; + &::after { content: "\25FC"; float: right; } + &::before { content: 'Proof.\00a0\00a0'; } +} -.links-page > ul { columns: 2; -webkit-columns: 2; -moz-columns: 2; } +.links-page > ul { + columns: 2; + @include bp('mobile') { columns: 1; } +} +/* inline code blocks */ :not(pre) > code { font-family: var(--font-mono), monospace; background: var(--code-bg); @@ -429,7 +407,6 @@ pre { &.src-stem::before { content: "Stem"; } } -.org-svg { width: 100%; max-width: none; } .src, .example { @include hide-scrollbar; @@ -441,7 +418,6 @@ pre { padding: 1rem; border-radius: 6px; font-size: 0.9rem; - box-shadow: none; &::before { position: absolute; @@ -458,42 +434,23 @@ pre { } } +.org-svg { width: 100%; max-width: none; } + .org-src-container { position: relative; margin: 1.2em 0; pre.src { - position: relative !important; - overflow: visible !important; - background: var(--code-bg); - border-radius: 6px; - margin: 0 !important; - padding: 0 !important; - border: none !important; + overflow: visible; + margin: 0; + // padding: 0; + border: none; & > code { - display: block; - overflow-x: auto; padding: 1.5rem 1rem 1rem 1rem; white-space: pre; @include hide-scrollbar; - } - - &::before { - content: attr(data-language); - display: block !important; - position: absolute !important; - top: 0.5rem; - right: 0.5rem; - z-index: 20; - font-family: var(--font-mono), monospace; - font-size: 0.7rem; - color: var(--code-text); - background: var(--code-bg); - padding: 2px 8px; - border-radius: 4px; - opacity: 0.6; - pointer-events: none; + @include horizontal-scroll; } } } @@ -506,7 +463,7 @@ pre { box-sizing: border-box; margin: 2rem 0; - background: rgba(212, 163, 115, 0.05); + background: accent_rgba(0.05); padding: 1.5rem; border-left: 2px solid var(--accent); @@ -514,7 +471,7 @@ pre { grid-column: 2; text-align: center; - & math[display="block"] { margin: 0 !important; } + & math[display="block"] { margin: 0; } @include horizontal-scroll; @include hide-scrollbar; @@ -532,28 +489,21 @@ pre { display: flex; flex-direction: column; align-items: center; -} -.figure p:last-of-type { - font-size: 0.9rem; - color: color-mix(in srgb, var(--text-main) 80%, gray); - margin-top: 0.5rem; - max-width: 80%; /* Keeps long captions from stretching too far */ + p:last-of-type { + font-size: 0.9rem; + color: color-mix(in srgb, var(--text-main) 80%, gray); + margin-top: 0.5rem; + max-width: 80%; + } } .figure-number { font-weight: 700; + font-family: var(--font-serif); color: var(--text-main); } - -#preamble, #content, #postamble, main, header { - width: 100%; - max-width: 85ch; - padding: 1rem 20px; - display: block; -} - #table-of-contents { height: 100vh; width: 250px; @@ -578,7 +528,7 @@ pre { font-weight: bold; letter-spacing: 2px; color: var(--text-main); - border-bottom: 1px solid rgba(212, 163, 115, 0.2); + border-bottom: 1px solid accent_rgba(0.2); margin-bottom: 10px; } @@ -598,8 +548,7 @@ pre { text-overflow: ellipsis; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); border-left: 3px solid transparent; - opacity: 1; - + &, &:visited { color: var(--text-main); text-decoration: none; @@ -619,34 +568,17 @@ pre { font-size: 13px; &:hover { padding-left: 38px; opacity: 1; } } - ul a { - padding-left: 64px; - opacity: 0.75; - &:hover { padding-left: 54px; } + ul{ + a { + padding-left: 64px; + opacity: 0.75; + &:hover { padding-left: 54px; } + } } } } - - h2 { display: none !important; } - - @media (max-width: 1250px) { display: none !important; } + h2 { display: none; } + @include bp('toc') { display: none; } } #postamble { text-align: center; } - - -@media (max-width: 768px) { - blockquote, .src, .example { - max-width: 100%; - width: 100%; - box-sizing: border-box; - } - - img { - max-width: 100%; - width: auto; - } - - blockquote { padding: 1em 15px 1em 40px; } - .links-page > ul { columns: 1; -webkit-columns: 1; -moz-columns: 1; } -} -- cgit v1.3 From 06b61743d200ec9427fda45e89caa3467314c872 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Sat, 14 Mar 2026 01:56:31 -0700 Subject: Emacs configuration clean; attempt to build website --- .pre-commit-config.yaml | 2 +- agenda.org | 4 + config/emacs.org | 1414 +++++----- config/nix.org | 6709 ++++++++++++++++++++++++----------------------- flake.nix | 45 +- nix | 2 +- style.scss | 183 +- syntax.css | 4777 --------------------------------- 8 files changed, 4259 insertions(+), 8877 deletions(-) delete mode 100644 syntax.css (limited to 'style.scss') diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0cd4cc0..82c6c1d 120000 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1 +1 @@ -/nix/store/714fs2fgv3vq1kwafv1hyqbhxwxp1yay-pre-commit-config.json \ No newline at end of file +/nix/store/cakjamand6f24wvfg7wfh6xi7ydwicq6-pre-commit-config.json \ No newline at end of file diff --git a/agenda.org b/agenda.org index d46f6a5..0247258 100644 --- a/agenda.org +++ b/agenda.org @@ -16,6 +16,10 @@ These are general life tasks that I need to do, which don't depend on a specific - finish up my SCSS abstractions and learning how to write in it (also finish touching up my CSS). - finish my automated testing matrix. - write more content to my website. +- write a shell script to get passwords from my run path. +- touch up emacs. +- write tests for installer script. +- write documentation ** TODO [#B] Nullring Update the nullring to be in org mode, and also include a couple more sites. ** TODO [#B] Umami diff --git a/config/emacs.org b/config/emacs.org index d262138..5df511e 100644 --- a/config/emacs.org +++ b/config/emacs.org @@ -1,12 +1,140 @@ #+title: Emacs Configuration #+author: Preston Pan #+description: my personal emacs configuration for NixOS +#+PROPERTY: header-args :tangle yes :comments link * Introduction This is my Vanilla Emacs configuration, made to work with my NixOS configuration. For that reason, you will not see :ensure t inside any use-package declaration, for emacs packages are all compiled natively and reproducibly on the NixOS side. This configuration uses the emacs-lisp language only to configure variables for said packages, for the most part. +* Initialization +This must be the very first line in the tangled file to enable lexical binding. +#+begin_src emacs-lisp :tangle ../nix/init.el +;; -*- lexical-binding: t; -*- +#+end_src +** State +This is my imperative state. Note that a lot of the state is just in the form of various macros that I use in order to write in declarative +syntax elsewhere. Generally, however, these are all unordered and not dependent on each other loading first. +#+begin_src emacs-lisp :tangle ../nix/init.el +;; pure, well okay it prints but whatever +(defmacro try (expr) + `(condition-case err + ,expr + (error + (princ (format "BLOCK FAILED: %s\n" (error-message-string err)))))) + +;; pure +(defmacro declare-irc-server (name server port) + `(defun ,name () + (interactive) + (erc-tls :server ,server + :port ,port))) + +;; pure, well imperative when evaluated but they're all just bindings that don't depend on each other +(defmacro create-irc-servers (&rest server-list) + `(progn + ,@(mapcar (lambda (n) `(declare-irc-server ,@n)) server-list))) + +;; pure +(defun org-html-latex-environment-pandoc-fix (orig-fun latex-environment contents info) + "Force `ox-html' to use the convert command for LaTeX environments when set to 'html." + (let ((processing-type (plist-get info :with-latex))) + (if (eq processing-type 'html) + (let* ((latex-frag (org-remove-indentation (org-element-property :value latex-environment))) + (converted (org-format-latex-as-html latex-frag))) + (format "
\n\n%s\n\n
" converted)) + (funcall orig-fun latex-environment contents info)))) + +;; imperative +(defun insert-urandom-password (&optional length) + (interactive "P") + (let ((length (or length 32)) + (chars "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()-_=+[]{};:,.<>?")) + (insert + (with-temp-buffer + (call-process "head" nil t nil "-c" (number-to-string length) "/dev/urandom") + (let ((bytes (buffer-string))) + (mapconcat (lambda (c) + (string (elt chars (mod (string-to-char (char-to-string c)) (length chars))))) + bytes "")))))) + +;; imperative +(defun create-htmlize-css () + (org-html-htmlize-generate-css) + (with-current-buffer "*html*" + (buffer-string))) + +;; imperative +(defun minify-css (css) + "A functional wrapper around the external 'minify' binary." + (with-temp-buffer + (insert css) + (call-process-region (point-min) (point-max) "minify" t t nil "--type=css") + (buffer-string))) + +;; imperative +(defun emacs-config () + (unless noninteractive (server-start)) + + ;; start with sane defaults + (pixel-scroll-precision-mode 1) + (display-battery-mode 1) + (display-time-mode 1) + (menu-bar-mode -1) + (scroll-bar-mode -1) + (tool-bar-mode -1) + + ;; load theme, fonts, and transparency. Prettify symbols. + (set-face-attribute 'default nil :font "Iosevka Nerd Font" :height 130) + (set-face-attribute 'variable-pitch nil :font "Lora" :height 1.1) + + (when (display-graphic-p) + (set-fontset-font t 'han (font-spec :family "Noto Sans CJK SC")) + (set-fontset-font t 'kana (font-spec :family "Noto Sans CJK JP")) + (set-fontset-font t 'symbol (font-spec :family "Noto Color Emoji")) + (set-fontset-font t 'symbol (font-spec :family "Symbols Nerd Font Mono") nil 'append)) + (set-frame-parameter nil 'alpha-background 70)) + +;; imperative +(defun evil-config () + (evil-mode 1) + (evil-set-undo-system 'undo-redo) + (evil-set-initial-state 'pdf-view-mode 'normal)) + +;; imperative +(defun doom-themes-config () + (load-theme 'doom-rouge t) + (doom-themes-visual-bell-config) + (doom-themes-treemacs-config) + (doom-themes-org-config)) + +;; imperative +(defun org-roam-config () + (org-roam-db-autosync-mode) + (org-roam-update-org-id-locations)) + +;; same as above +(defun org-electric-pair () + (setq-local electric-pair-inhibit-predicate + (lambda (c) (if (eq c ?<) t (electric-pair-default-inhibit c))))) + +;; same as above +(defun org-yasnippet-latex () (yas-activate-extra-mode 'latex-mode)) + +;; same as above +(defun remove-annoying-pairing () (remove-hook 'post-self-insert-hook #'yaml-electric-bar-and-angle t)) + +#+end_src +** Random Packages +These are packages that I require in order to write some scripts in emacs-lisp. +#+begin_src emacs-lisp :tangle ../nix/init.el +(use-package tex-site) +(use-package subr-x) +(use-package dash) +(use-package s) +(use-package f) +#+end_src ** Emacs These are all the options that need to be set at the start of the program. Because use-package is largely declarative, the order of many of these options should not matter. However, there @@ -15,20 +143,27 @@ configuration as they are also defined using the use-package macros. Some of the have documentation strings attached, so it is easy to follow what the individual options do. Emacs is self documenting, after all! #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package emacs +(use-package emacs :custom ;; global defaults (indent-tabs-mode nil "no real tabs, only spaces") (tab-width 2 "tab show as 2 spaces") (standard-indent 2 "base indentation") + (custom-safe-themes t "I already manage my themes with nix") + (custom-file null-device "Don't save custom configs") ;; Startup errors (warning-minimum-level :emergency "Supress emacs warnings") (confirm-kill-processes nil "Don't ask to quit") (debug-ignored-errors (cons 'remote-file-error debug-ignored-errors) "Remove annoying error from debug errors") - (browse-url-generic-program "librewolf") - (browse-url-secondary-browser-function 'browse-url-generic) - (browse-url-browser-function 'browse-url-generic) + (browse-url-generic-program "librewolf" "set browser to librewolf") + (browse-url-secondary-browser-function 'browse-url-generic "set browser") + (browse-url-browser-function 'browse-url-generic "set browser") + (default-frame-alist '((alpha-background . 70) + (vertical-scroll-bars) + (internal-border-width . 24) + (left-fringe . 8) + (right-fringe . 8))) ;; Mouse wheel (mouse-wheel-scroll-amount '(1 ((shift) . 1)) "Nicer scrolling") @@ -38,88 +173,23 @@ Emacs is self documenting, after all! (scroll-step 1 "Scroll one line at a time") (debug-on-error nil "Don't make the annoying popups") (display-time-24hr-format t "Use 24 hour format to read the time") - (display-line-numbers-type 'relative "Relative line numbers for easy vim jumping") - (use-short-answers t "Use y instead of yes") - (make-backup-files nil "Don't make backups") - (display-fill-column-indicator-column 150 "Draw a line at 100 characters") - (fill-column 150) - (line-spacing 2 "Default line spacing") - (c-doc-comment-style '((c-mode . doxygen) - (c++-mode . doxygen))) - - :hook ((text-mode . visual-line-mode) - (prog-mode . display-line-numbers-mode) - (prog-mode . display-fill-column-indicator-mode) - (org-mode . auto-fill-mode) - (org-mode . display-fill-column-indicator-mode) - (org-mode . display-line-numbers-mode) - (org-mode . (lambda () - (setq prettify-symbols-alist - '(("#+begin_src" . ?) - ("#+BEGIN_SRC" . ?) - ("#+end_src" . ?) - ("#+END_SRC" . ?) - ("#+begin_example" . ?) - ("#+BEGIN_EXAMPLE" . ?) - ("#+end_example" . ?) - ("#+END_EXAMPLE" . ?) - ("#+header:" . ?) - ("#+HEADER:" . ?) - ("#+name:" . ?﮸) - ("#+NAME:" . ?﮸) - ("#+results:" . ?) - ("#+RESULTS:" . ?) - ("#+call:" . ?) - ("#+CALL:" . ?) - (":PROPERTIES:" . ?) - (":properties:" . ?) - ("lambda" . ?λ) - ("->" . ?→) - ("map" . ?↦) - ("/=" . ?≠) - ("!=" . ?≠) - ("==" . ?≡) - ("<=" . ?≤) - (">=" . ?≥) - ("&&" . ?∧) - ("||" . ?∨) - ("sqrt" . ?√) - ("..." . ?…))) - (prettify-symbols-mode))) - (prog-mode . - (lambda () - (setq prettify-symbols-alist - '(("lambda" . ?λ) - ("->" . ?→) - ("map" . ?↦) - ("/=" . ?≠) - ("!=" . ?≠) - ("==" . ?≡) - ("<=" . ?≤) - (">=" . ?≥) - ("&&" . ?∧) - ("||" . ?∨) - ("sqrt" . ?√) - ("..." . ?…))) - (prettify-symbols-mode)))) - :config - (require 'tex-site) - (require 'subr-x) - (server-start) - - ;; start with sane defaults - (pixel-scroll-precision-mode 1) - (display-battery-mode 1) - (display-time-mode 1) - (menu-bar-mode -1) - (scroll-bar-mode -1) - (tool-bar-mode -1) - - ;; load theme, fonts, and transparency. Prettify symbols. - (global-prettify-symbols-mode 1) - (set-face-attribute 'default nil :font "Iosevka Nerd Font" :height 130) - (set-frame-parameter nil 'alpha-background 70) - (add-to-list 'default-frame-alist '(alpha-background . 70))) + (display-line-numbers-type 'relative "Relative line numbers for easy vim jumping") + (use-short-answers t "Use y instead of yes") + (make-backup-files nil "Don't make backups") + (display-fill-column-indicator-column 150 "Draw a line at 100 characters") + (fill-column 150) + (line-spacing 2 "Default line spacing") + (c-doc-comment-style '((c-mode . doxygen) + (c++-mode . doxygen))) + + + :hook ((text-mode . visual-line-mode) + (prog-mode . display-line-numbers-mode) + (prog-mode . display-fill-column-indicator-mode) + (org-mode . auto-fill-mode) + (org-mode . display-fill-column-indicator-mode) + (org-mode . display-line-numbers-mode)) + :config (emacs-config)) #+end_src As you can see, the config (and sometimes the init section) of most of these use-package blocks contain most of the imperative commands. In fact, most of the configurations are completely @@ -134,263 +204,306 @@ of course Emacs was not designed to be fully imperative. ** Org Mode This is my org mode configuration, which also configures latex. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package org - :hook - ((org-mode-hook . (lambda () (remove-hook 'post-self-insert-hook #'yaml-electric-bar-and-angle t)))) - :custom - (org-confirm-babel-evaluate nil "Don't ask to evaluate code block") - (org-export-with-broken-links t "publish website even with broken links") - (org-src-fontify-natively t "Colors!") - (org-latex-preview-image-directory (expand-file-name "~/.cache/ltximg/") "don't use weird cache location") - (org-preview-latex-image-directory (expand-file-name "~/.cache/ltximg/") "don't use weird cache location") - (TeX-PDF-mode t) - (org-latex-compiler "xelatex" "Use latex as default") - (org-latex-pdf-process '("xelatex -interaction=nonstopmode -output-directory=%o %f") "set xelatex as default") - (TeX-engine 'xetex "set xelatex as default engine") - (preview-default-option-list '("displaymath" "textmath" "graphics") "preview latex") - (preview-image-type 'png "Use PNGs") - ;; (org-format-latex-options (plist-put org-format-latex-options :scale 1.5) "space latex better") - (org-return-follows-link t "be able to follow links without mouse") - (org-habit-preceding-days 7 "See org habit entries") - (org-habit-following-days 35 "See org habit entries") - (org-habit-show-habits t "See org habit entries") - (org-habit-show-habits-only-for-today nil "See org habit entries") - (org-habit-show-all-today t "Show org habit graph") - (org-startup-indented t "Indent the headings") - (org-image-actual-width '(300) "Cap width") - (org-startup-with-latex-preview t "see latex previews on opening file") - (org-startup-with-inline-images t "See images on opening file") - (org-hide-emphasis-markers t "prettify org mode") - (org-use-sub-superscripts "{}" "Only display superscripts and subscripts when enclosed in {}") - (org-pretty-entities t "prettify org mode") - (org-agenda-files (list "~/monorepo/agenda.org" "~/org/notes.org" "~/org/agenda.org") "set default org files") - (org-default-notes-file (concat org-directory "/notes.org") "Notes file") - (org-html-with-latex 'html "let my html handler handle latex") - (org-html-mathjax-options nil "disable mathjax, use MathML") - (org-html-mathjax-template "" "disable mathjax, use MathML") - (org-html-head-include-default-style nil "use my own css for everything") - (org-html-head-include-scripts nil "use my own js for everything") - (org-html-divs '((preamble "header" "preamble") - (content "main" "content") - (postamble "footer" "postamble")) "semantic html exports") - (org-html-head-extra (concat "\n\n\n\n\n\n\n\n\n\n\n" - "") "add all these different headers for performance and compliance") - (org-latex-to-html-convert-command - "printf '%%s' %i | pandoc -f latex -t html --mathml | tr -d '\\n' | sed -e 's/^

//' -e 's/<\\/p>$//'" "latex to MathML with special character handling") - (org-html-viewport '((width "device-width") - (initial-scale "1.0") - (minimum-scale "1.0")) "Prevent zooming out past default size") - (org-publish-project-alist - '(("website-org" - :base-directory "~/monorepo" - :base-extension "org" - :exclude "nix/README\\.org" - :publishing-directory "~/website_html" - :with-author t - :with-date t - :recursive t - :publishing-function org-html-publish-to-html - :headline-levels 4 - :html-preamble t - :html-preamble-format (("en" "

home | section main page


"))) - ("website-static" - :base-directory "~/monorepo" - :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|ico\\|asc\\|pub\\|webmanifest\\|xml\\|svg\\|txt\\|webp\\|conf" - :publishing-directory "~/website_html/" - :recursive t - :publishing-function org-publish-attachment) - ("website" :auto-sitemap t :components ("website-org" "website-static"))) "functions to publish website") - (org-html-postamble (concat "Copyright © 2024 " system-fullname) "set copyright notice on bottom of site") - :config - (require 'ox-publish) - (require 'org-tempo) - (require 'org-habit) - (require 'ob-latex) - - (defun my-org-html-latex-environment-pandoc-fix (orig-fun latex-environment contents info) - "Force `ox-html' to use the convert command for LaTeX environments when set to 'html." - (let ((processing-type (plist-get info :with-latex))) - (if (eq processing-type 'html) - (let* ((latex-frag (org-remove-indentation - (org-element-property :value latex-environment))) - (converted (org-format-latex-as-html latex-frag))) - (format "
\n\n%s\n\n
" - converted)) - (funcall orig-fun latex-environment contents info)))) - - (advice-add 'org-html-latex-environment :around #'my-org-html-latex-environment-pandoc-fix) - - (org-babel-do-load-languages 'org-babel-load-languages - '((shell . t) - (python . t) - (nix . t) - (latex . t)))) +(use-package org + :after (f s dash nix-mode) + :hook + ((org-mode-hook . remove-annoying-pairing)) + :custom + ;; Fix terrible indentation issues + (org-edit-src-content-indentation 0) + (org-src-tab-acts-natively t) + (org-src-preserve-indentation t) + + (TeX-PDF-mode t) + (org-confirm-babel-evaluate nil "Don't ask to evaluate code block") + (org-export-with-broken-links t "publish website even with broken links") + (org-src-fontify-natively t "Colors!") + + ;; org-latex + (org-preview-latex-image-directory (expand-file-name "~/.cache/ltximg/") "don't use weird cache location") + (org-latex-preview-ltxpng-directory (expand-file-name "~/.cache/ltximg/") "don't use weird cache location") + (org-latex-to-html-convert-command "printf '%%s' %i | pandoc -f latex -t html --mathml | tr -d '\\n' | sed -e 's/^

//' -e 's/<\\/p>$//'" "latex to MathML with special character handling") + (org-latex-to-mathml-convert-command "printf '%%s' %i | pandoc -f latex -t html --mathml | tr -d '\\n' | sed -e 's/^

//' -e 's/<\\/p>$//'" "latex to MathML with special character handling") + + (TeX-engine 'xetex "set xelatex as default engine") + (preview-default-option-list '("displaymath" "textmath" "graphics") "preview latex") + (preview-image-type 'png "Use PNGs") + (org-format-latex-options + '(:foreground default + :background default + :scale 2 + :html-foreground "Black" + :html-background "Transparent" + :html-scale 1.5 + :matchers ("begin" "$1" "$" "$$" "\\(" "\\[")) "space latex better") + (org-return-follows-link t "be able to follow links without mouse") + (org-startup-indented t "Indent the headings") + (org-image-actual-width '(300) "Cap width") + (org-startup-with-latex-preview t "see latex previews on opening file") + (org-startup-with-inline-images t "See images on opening file") + (org-hide-emphasis-markers t "prettify org mode") + (org-use-sub-superscripts "{}" "Only display superscripts and subscripts when enclosed in {}") + (org-pretty-entities t "prettify org mode") + (org-agenda-files (list "~/monorepo/agenda.org" "~/org/notes.org" "~/org/agenda.org") "set default org files") + (org-default-notes-file (concat org-directory "/notes.org") "Notes file") + + ;; ricing + (org-auto-align-tags nil) + (org-tags-column 0) + (org-catch-invisible-edits 'show-and-error) + (org-special-ctrl-a/e t) + (org-insert-heading-respect-content t) + (org-hide-emphasis-markers t) + (org-pretty-entities t) + (org-agenda-tags-column 0) + (org-ellipsis "…") + :config + (org-babel-do-load-languages 'org-babel-load-languages + '((shell . t) + (python . t) + (nix . t) + (latex . t)))) + +(use-package org-tempo + :after org) + +(use-package org-habit + :after org + :custom + (org-habit-preceding-days 7 "See org habit entries") + (org-habit-following-days 35 "See org habit entries") + (org-habit-show-habits t "See org habit entries") + (org-habit-show-habits-only-for-today nil "See org habit entries") + (org-habit-show-all-today t "Show org habit graph")) + +(use-package htmlize + :after (doom-themes catppuccin-theme)) + +(use-package ox-latex + :after (org) + :custom + (org-latex-compiler "xelatex" "Use latex as default") + (org-latex-pdf-process '("xelatex -interaction=nonstopmode -output-directory=%o %f") "set xelatex as default")) + +(use-package ox-html + :after (org htmlize) + :custom + (org-html-htmlize-output-type 'css "allow styling from CSS file") + (org-html-with-latex 'html "let my html handler handle latex") + (org-html-mathjax-options nil "disable mathjax, use MathML") + (org-html-mathjax-template "" "disable mathjax, use MathML") + (org-html-head-include-default-style nil "use my own css for everything") + (org-html-head-include-scripts nil "use my own js for everything") + (org-html-postamble (concat "Copyright © 2024 " system-fullname) "set copyright notice on bottom of site") + (org-html-divs '((preamble "header" "preamble") + (content "main" "content") + (postamble "footer" "postamble")) "semantic html exports") + (org-html-viewport '((width "device-width") + (initial-scale "1.0") + (minimum-scale "1.0")) "Prevent zooming out past default size") + :config (advice-add 'org-html-latex-environment :around #'org-html-latex-environment-pandoc-fix)) + +(use-package ox-publish + :after (org f s dash ox-html) + :custom + (org-publish-project-alist + `(("website-org" + :base-directory "~/monorepo" + :base-extension "org" + :exclude "nix/README\\.org" + :publishing-directory "~/website_html" + :with-author t + :with-date t + :recursive t + :publishing-function org-html-publish-to-html + :headline-levels 4 + :html-head ,(concat "\n\n\n\n\n\n\n\n\n\n\n" + "" "") + (s-trim) + (minify-css)) + (f-read-text "~/monorepo/style.css" 'utf-8) + "") + :html-preamble t + :html-preamble-format (("en" "

home | section main page


"))) + ("website-static" + :base-directory "~/monorepo" + :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|ico\\|asc\\|pub\\|webmanifest\\|xml\\|svg\\|txt\\|webp\\|conf" + :publishing-directory "~/website_html/" + :recursive t + :publishing-function org-publish-attachment) + ("website" :auto-sitemap t :components ("website-org" "website-static"))) "functions to publish website")) #+end_src As you can see, I only have one real entry in config here (I don't count requires even though they have to be on the top) -* Unicode -I want emacs to have unicode fonts. +* All The Icons +I already pull in all-the-icons, but we need the emacs package to load it correctly. +#+begin_src emacs-lisp :tangle ../nix/init.el +(use-package all-the-icons + :if (display-graphic-p)) +#+end_src +* Variable Pitch Font +I use this in org-mode so that I can read/write with variable pitched font. Feels like I'm reading a blog article or something. +#+begin_src emacs-lisp :tangle ../nix/init.el +(use-package mixed-pitch + :hook ((text-mode . mixed-pitch-mode) + (org-mode . mixed-pitch-mode)) + :custom (mixed-pitch-set-height t) + :config + (dolist (face '(org-latex-and-related + org-priority + org-block + org-table + org-formula)) + (add-to-list 'mixed-pitch-fixed-pitch-faces face))) +#+end_src +* Writeroom +#+begin_src emacs-lisp :tangle ../nix/init.el +(use-package writeroom-mode + :custom (writeroom-width 150)) +#+end_src +* Indent Bars +I want to show indent lines in emacs so that I can line things up. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package unicode-fonts - :init (unicode-fonts-setup)) +(use-package indent-bars + :after (nix-mode) + :hook ((python-mode yaml-mode nix-mode) . indent-bars-mode)) #+end_src * Autopair Use electric-pair to automatically complete pairs of things. We need to change what electric-pair does based on the mode. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package electric-pair - :hook ((prog-mode . electric-pair-mode) - (org-mode . (lambda () (setq-local electric-pair-inhibit-predicate (lambda (c) (if (eq c ?<) t (electric-pair-default-inhibit c)))))))) +(use-package electric-pair + :hook ((prog-mode . electric-pair-mode) + (org-mode . org-electric-pair))) #+end_src * Search and Replace wgrep is a program that allows you to do more intelligent search and replace. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package wgrep - :after grep) -#+end_src -* Passwords -This is a function that inserts a random password into the buffer. I use this to manage sops-nix. -#+begin_src emacs-lisp :tangle ../nix/init.el - (defun insert-urandom-password (&optional length) - (interactive "P") - (let ((length (or length 32)) - (chars "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()-_=+[]{};:,.<>?")) - (insert - (with-temp-buffer - (call-process "head" nil t nil "-c" (number-to-string length) "/dev/urandom") - (let ((bytes (buffer-string))) - (mapconcat (lambda (c) - (string (elt chars (mod (string-to-char (char-to-string c)) (length chars))))) - bytes "")))))) +(use-package wgrep + :after grep) #+end_src * Fragtog This package is used to generate previews automatically when your cursor hovers over a latex snippet. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package org-fragtog :hook (org-mode . org-fragtog-mode)) +(use-package org-fragtog :hook (org-mode . org-fragtog-mode)) #+end_src * Snippets Yasnippets are useful for macros that automatically complete to an arbitrary form. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package yasnippet - :config - (add-to-list 'yas-snippet-dirs "~/monorepo/yasnippet/") - (yas-global-mode 1) - :hook (org-mode . (lambda () (yas-minor-mode) (yas-activate-extra-mode 'latex-mode)))) +(use-package yasnippet + :demand t + :hook (org-mode . org-yasnippet-latex) + :custom (yas-snippet-dirs '("~/monorepo/yasnippet/" "~/.emacs.d/snippets")) + :config (yas-global-mode 1)) + +(use-package yasnippet-snippets + :after yasnippet) #+end_src * Completion Company-mode! We need this to do autocomplete stuff. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package company - :config - '(add-to-list 'company-backends '(company-ispell company-capf company-yasnippet company-files)) - :hook ((after-init . global-company-mode))) +(use-package company + :custom (company-backends '(company-ispell company-capf company-yasnippet company-files) "Set company backends") + :hook ((after-init . global-company-mode))) +(use-package company-box + :hook (company-mode . company-box-mode)) #+end_src * Spelling This loads a dictionary so that I can save certain words to be not misspelled and also have this spellcheck during org mode. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package ispell - :custom - (ispell-program-name "aspell" "use aspell") - (ispell-silently-savep t "Save changes to dict without confirmation") - (ispell-dictionary "en" "Use english dictionary") - (ispell-alternate-dictionary "~/.local/share/dict" "dict location")) +(unless noninteractive (use-package ispell + :custom + (ispell-program-name "aspell" "use aspell") + (ispell-local-dictionary-alist + '(("en" "[[:alpha:]]" "[^[:alpha:]]" "[']" t ("-d" "en") nil utf-8))) + (ispell-dictionary "en" "Use english dictionary") + (ispell-extra-args my-ispell-args "Force aspell to use normal mode instead of nroff") + (ispell-silently-savep t "Save changes to dict without confirmation") + (ispell-alternate-dictionary my-ispell-dictionary "dict location"))) - (use-package flyspell - :hook (text-mode . flyspell-mode)) +(unless noninteractive (use-package flyspell + :hook (text-mode . flyspell-mode))) #+end_src * Packages First, some small configurations and some evil-mode initilaization because I like vim keybindings: #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package evil - :custom - (evil-want-keybinding nil "Don't load a whole bunch of default keybindings") - :config - (evil-mode 1) - (evil-set-undo-system 'undo-redo) - (evil-set-initial-state 'pdf-view-mode 'normal) - ;; bind / and ? safely after evil is loaded - (define-key evil-normal-state-map (kbd "/") 'swiper) - (define-key evil-normal-state-map (kbd "?") - (lambda () (interactive) (swiper "--reverse")))) - - (use-package evil-collection - :after (evil) - :config - (with-eval-after-load 'evil-maps - (define-key evil-motion-state-map (kbd "SPC") nil) - (define-key evil-motion-state-map (kbd "RET") nil) - (define-key evil-motion-state-map (kbd "TAB") nil)) - (evil-collection-init)) - - (use-package evil-commentary - :after (evil) - :config - (evil-commentary-mode)) - - (use-package evil-org - :after (evil org) - :hook (org-mode . (lambda () evil-org-mode)) - :config - (require 'evil-org-agenda) - (evil-org-agenda-set-keys)) - - (use-package which-key - :config - (which-key-mode)) - - (use-package page-break-lines - :init - (page-break-lines-mode)) +(use-package evil + :demand t + :custom (evil-want-keybinding nil "Don't load a whole bunch of default keybindings") + :bind + (:map evil-normal-state-map + ("/" . swiper) + ("?" . (lambda () (interactive) (swiper "--reverse")))) + :config (evil-config)) + +(use-package evil-collection + :demand t + :after (evil) + :bind (:map evil-motion-state-map + ("SPC" . nil) + ("RET" . nil) + ("TAB" . nil)) + :config (evil-collection-init)) + +(use-package evil-commentary + :after (evil) + :config (evil-commentary-mode)) + +(use-package evil-org + :after (evil org) + :hook (org-mode . evil-org-mode)) + +(use-package evil-org-agenda + :after (evil-org) + :config (evil-org-agenda-set-keys)) + +(use-package which-key + :config (which-key-mode)) + +(use-package page-break-lines + :config (page-break-lines-mode)) #+end_src ** Journal I use org-journal to journal about my life, and it's a part of my website: #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package org-journal - :after (org) - :custom - (org-journal-dir "~/monorepo/journal/" "Set journal directory") - (org-journal-date-format "%A, %d %B %Y" "Date format") - (org-journal-file-format "%Y%m%d.org" "Automatic file creation format based on date") - (org-journal-enable-agenda-integration t "All org-journal entries are org-agenda entries") - :init - (defun org-journal-file-header-func (time) - "Custom function to create journal header." - (concat - (pcase org-journal-file-type - (`daily "#+TITLE: Daily Journal\n#+STARTUP: showeverything\n#+DESCRIPTION: My daily journal entry\n#+AUTHOR: Preston Pan\n#+options: broken-links:t") - (`weekly "#+TITLE: Weekly Journal\n#+STARTUP: folded") - (`monthly "#+TITLE: Monthly Journal\n#+STARTUP: folded") - (`yearly "#+TITLE: Yearly Journal\n#+STARTUP: folded")))) - (setq org-journal-file-header 'org-journal-file-header-func)) +(use-package org-journal + :after (org) + :custom + (org-journal-dir "~/monorepo/journal/" "Set journal directory") + (org-journal-date-format "%A, %d %B %Y" "Date format") + (org-journal-file-format "%Y%m%d.org" "Automatic file creation format based on date") + (org-journal-enable-agenda-integration t "All org-journal entries are org-agenda entries") + (org-journal-file-header "#+TITLE: Daily Journal\n#+STARTUP: showeverything\n#+DESCRIPTION: My daily journal entry\n#+AUTHOR: Preston Pan\n#+date:\n#+options: broken-links:t" "set header files on new org journal entry")) #+end_src ** Doom Modeline The default modeline is ugly. I replace it with the doom modeline because it's better. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package doom-modeline - :config - (doom-modeline-mode 1)) +(use-package doom-modeline + :config (doom-modeline-mode 1)) #+end_src *** Doom Theme I used to use catppuccin, but the doom themes are so good that I am willing to break some theme consistency with my desktop in order to use doom themes. I mean it looks better anyways if emacs is a distinct theme. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package doom-themes - :ensure t - :custom - (doom-themes-enable-bold t) - (doom-themes-enable-italic t) - (doom-themes-treemacs-theme "doom-rouge") - :config - (load-theme 'doom-rouge t) +(use-package doom-themes + :custom + (doom-themes-enable-bold t "use bold letters") + (doom-themes-enable-italic t "use italic letters") + (doom-themes-treemacs-theme "doom-colors" "set theme to something like catppuccin but doom") + :config + (unless noninteractive (doom-themes-config))) + +(use-package catppuccin-theme + :config (when noninteractive (try (load-theme 'catppuccin-theme t)))) - (doom-themes-visual-bell-config) - (doom-themes-treemacs-config) - (doom-themes-org-config)) - ;; (load-theme 'catppuccin :no-confirm) +(use-package solaire-mode + :after doom-themes + :config (solaire-global-mode +1)) #+end_src ** Grammar I want to write good! I grammar good too. @@ -401,239 +514,240 @@ I want to write good! I grammar good too. ** Make Org Look Better Org superstar adds those nice looking utf-8 bullets: #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package org-superstar - :after (org) - :hook (org-mode . (lambda () (org-superstar-mode 1)))) +(use-package org-modern + :after (org) + :hook (org-mode . org-modern-mode) + :custom + (org-modern-block-fringe t) + (org-modern-block-name t) + (org-modern-star '("◉" "○" "◈" "◇")) + (org-modern-block-name '((t . t))) + (org-modern-keyword '((t . t))) + :config + (global-org-modern-mode)) #+end_src ** LSP We set up eglot, the LSP manager for emacs, now built in: #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package lsp - :hook - (prog-mode . lsp)) - - (with-eval-after-load 'lsp-mode - (setq lsp-typescript-format-enable t - lsp-typescript-indent-size 4 - lsp-typescript-tab-size 4 - lsp-typescript-indent-style "spaces")) +(use-package lsp + :custom + (lsp-use-plists t) + (lsp-typescript-format-enable t) + (lsp-typescript-indent-size 4) + (lsp-typescript-tab-size 4) + (lsp-typescript-indent-style "spaces") + :hook ((prog-mode . lsp))) - (use-package editorconfig - :config - (editorconfig-mode 1)) +(use-package editorconfig + :config (editorconfig-mode 1)) - (use-package flycheck - :config (global-flycheck-mode)) +(use-package flycheck + :config (global-flycheck-mode)) - (use-package platformio-mode +(use-package platformio-mode :hook (prog-mode . platformio-conditionally-enable)) #+end_src *** C/C++ Specific configuration for C (I also use the clangd lsp): #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package irony - :hook ( - (c++-mode . irony-mode) - (c-mode . irony-mode) - (objc-mode . irony-mode) - (irony-mode . irony-cdb-autosetup-compile-options))) +(use-package irony + :hook ((c++-mode . irony-mode) + (c-mode . irony-mode) + (objc-mode . irony-mode) + (irony-mode . irony-cdb-autosetup-compile-options))) - (use-package irony-eldoc - :hook ((irony-mode . irony-eldoc))) +(use-package irony-eldoc + :hook ((irony-mode . irony-eldoc))) #+end_src *** Solidity For writing solidity: #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package solidity-mode) - (use-package company-solidity) - (use-package solidity-flycheck - :custom - (solidity-flycheck-solc-checker-active t)) +(use-package solidity-mode) +(use-package company-solidity + :after company) +(use-package solidity-flycheck + :after flycheck + :custom (solidity-flycheck-solc-checker-active t)) #+end_src ** Projectile Manages projects and shit. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package projectile - :custom - (projectile-project-search-path '("~/org" "~/src" "~/monorepo" "~/projects") "search path for projects") - :config - (projectile-mode +1)) +(use-package projectile + :custom + (projectile-project-search-path '("~/org" "~/src" "~/monorepo" "~/projects") "search path for projects") + :config (projectile-mode +1)) #+end_src ** Dashboard We want our emacs initialization to be pretty and display useful things. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package dashboard - :after (projectile) - :custom - (dashboard-banner-logo-title "Welcome, Commander!" "Set title for dashboard") - (dashboard-icon-type 'nerd-icons "Use nerd icons") - (dashboard-vertically-center-content t "Center content") - (dashboard-set-init-info t) - (dashboard-week-agenda t "Agenda in dashboard") - (dashboard-items '((recents . 5) - (bookmarks . 5) - (projects . 5) - (agenda . 5) - (registers . 5)) "Look at some items") - :config - (dashboard-setup-startup-hook)) +(use-package dashboard + :after (projectile) + :custom + (dashboard-banner-logo-title "Welcome, Commander!" "Set title for dashboard") + (dashboard-icon-type 'nerd-icons "Use nerd icons") + (dashboard-vertically-center-content t "Center content") + (dashboard-set-init-info t) + (dashboard-week-agenda t "Agenda in dashboard") + (dashboard-items '((recents . 5) + (bookmarks . 5) + (projects . 5) + (agenda . 5) + (registers . 5)) "Look at some items") + :config + (dashboard-setup-startup-hook)) #+end_src ** Ivy Ivy is a pretty cool general program for displaying stuff: #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package counsel) - - (use-package ivy - :custom - (ivy-use-virtual-buffers t "Make searching more efficient") - (enable-recursive-minibuffers t "Don't get soft locked when in a minibuffer") - :bind - ("C-s" . swiper) - ("C-c C-r" . ivy-resume) - ("M-x" . counsel-M-x) - ("C-x C-f" . counsel-find-file) - (" f" . counsel-describe-function) - (" v" . counsel-describe-variable) - (" o" . counsel-describe-symbol) - (" l" . counsel-find-library) - (" i" . counsel-info-lookup-symbol) - (" u" . counsel-unicode-char) - ("C-c g" . counsel-git) - ("C-c j" . counsel-git-grep) - ("C-c k" . counsel-ag) - ("C-x l" . counsel-locate) - :config - (ivy-mode)) - (define-key ivy-minibuffer-map (kbd "C-j") 'ivy-immediate-done) +(use-package ivy + :demand t + :custom + (ivy-use-virtual-buffers t "Make searching more efficient") + (enable-recursive-minibuffers t "Don't get soft locked when in a minibuffer") + :bind + ("C-j" . ivy-immediate-done) + ("C-c C-r" . ivy-resume) + :init (ivy-mode) + :config (ivy-rich-mode)) + +(use-package counsel + :after ivy + :bind + ("M-x" . counsel-M-x) + ("C-x C-f" . counsel-find-file) + (" f" . counsel-describe-function) + (" v" . counsel-describe-variable) + (" o" . counsel-describe-symbol) + (" l" . counsel-find-library) + (" i" . counsel-info-lookup-symbol) + (" u" . counsel-unicode-char) + ("C-c g" . counsel-git) + ("C-c j" . counsel-git-grep) + ("C-c k" . counsel-ag) + ("C-x l" . counsel-locate)) + +(use-package swiper + :after ivy + :bind ("C-s" . swiper)) + +(use-package ivy-posframe + :custom + (ivy-posframe-display-functions-alist '((t . ivy-posframe-display))) + :config (ivy-posframe-mode 1)) + +(use-package all-the-icons-ivy-rich + :after (ivy all-the-icons) + :config (all-the-icons-ivy-rich-mode 1)) #+end_src I use it for an M-x replacement and a dired replacement, among other things. ** Magit I use magit in order to do all my git management in emacs. #+begin_src emacs-lisp :tangle ../nix/init.el (use-package magit) +(use-package git-gutter + :config + (global-git-gutter-mode +1)) #+end_src ** IRC Configure IRC to use my username. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package erc - :hook - ((erc-mode . erc-notifications-mode)) - :custom - (erc-nick system-username "sets erc username to the one set in nix config") - (erc-user-full-name system-fullname "sets erc fullname to the one set in nix config")) +(use-package erc + :hook ((erc-mode . erc-notifications-mode)) + :custom + (erc-nick system-username "sets erc username to the one set in nix config") + (erc-user-full-name system-fullname "sets erc fullname to the one set in nix config")) #+end_src ** Keybindings Global keybindings for everything that I care about globally. It's all here! I use general to manage my global keybindings in a declarative way. These are in part inspired by the doom emacs keybindings. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package general - :init - (defun znc () - (interactive) - (erc-tls :server "ret2pop.net" - :port "5000")) - - (defun prestonpan () - (interactive) - (erc-tls :server "nullring.xyz" - :port "6697")) - - (defun liberachat () - (interactive) - (erc-tls :server "irc.libera.chat" - :port "6697")) - - (defun efnet () - (interactive) - (erc-tls :server "irc.prison.net" - :port "6697")) - - (defun matrix-org () - (interactive) - (ement-connect)) - - (defun gimp-org () - (interactive) - (erc-tls :server "irc.gimp.org" - :port "6697")) - - :config - (general-create-definer leader-key :prefix "SPC") - (leader-key 'normal - "o c" '(org-capture :wk "Capture") - - ;; Org Mode - "n" '(:ignore t :wk "Org mode plugins") - "n j j" '(org-journal-new-entry :wk "Make new journal entry") - "n r f" '(org-roam-node-find :wk "Find roam node") - "n r i" '(org-roam-node-insert :wk "Insert roam node") - "n r a" '(org-roam-alias-add :wk "Add alias to org roam node") - "n r g" '(org-roam-graph :wk "Graph roam database") - "m I" '(org-id-get-create :wk "Make org id") - - ;; Programming Projects - "." '(counsel-find-file :wk "find file") - "p a" '(projectile-add-known-project :wk "Add to project list") - - "N f" '(nix-flake :wk "nix flake menu") - "f" '(:ignore t :wk "file operations") - "f p" '(projectile-switch-project :wk "find project to switch to") - "f f" '(counsel-fzf :wk "find file in project") - "f s" '(counsel-rg :wk "find string in project") - - "y n s" '(yas-new-snippet :wk "Create new snippet") - - "g" '(:ignore t :wk "Magit") - "g /" '(magit-dispatch :wk "git commands") - "g P" '(magit-push :wk "git push") - "g c" '(magit-commit :wk "git commit") - "g p" '(magit-pull :wk "Pull from git") - "g s" '(magit-status :wk "Change status of files") - "g i" '(magit-init :wk "init new git project") - "g r" '(magit-rebase :wk "Rebase branch") - "g m" '(magit-merge :wk "Merge branches") - "g b" '(magit-branch :wk "Git branch") - - "o p" '(treemacs :wk "Project Drawer") - "o P" '(treemacs-projectile :wk "Import Projectile project to treemacs") - - "w r" '(writeroom-mode :wk "focus mode for writing") - - ;; Applications - "o" '(:ignore t :wk "Open application") - "o t" '(vterm :wk "Terminal") - "o e" '(eshell :wk "Elisp Interpreter") - "o m" '(mu4e :wk "Email") - "o M" '(matrix-org :wk "Connect to matrix") - "o r s" '(elfeed :wk "rss feed") - "o a" '(org-agenda :wk "Open agenda") - "o w" '(eww :wk "web browser") - "m m" '(emms :wk "Music player") - "s m" '(proced :wk "System Manager") - "l p" '(list-processes :wk "List Emacs Processes") - - "m P p" '(org-publish :wk "Publish website components") - "s e" '(sudo-edit :wk "Edit file with sudo") - - ;; "f f" '(eglot-format :wk "Format code buffer") - "i p c" '(prestonpan :wk "Connect to my IRC server") - "i l c" '(liberachat :wk "Connect to libera chat server") - "i e c" '(efnet :wk "Connect to efnet chat server") - "i g c" '(gimp-org :wk "Connect to gimp chat server") - "i z c" '(znc :wk "Connect to my ZNC instance") - - ;; Documentation - "h" '(:ignore t :wk "Documentation") - "h v" '(counsel-describe-variable :wk "Describe variable") - "h f" '(counsel-describe-function :wk "Describe function") - "h h" '(help :wk "Help") - "h m" '(woman :wk "Manual") - "h i" '(info :wk "Info") - - "s i p" '(insert-urandom-password :wk "insert random password to buffer (for sops)") - - "h r r" '(lambda () (interactive) (org-babel-load-file (expand-file-name "~/monorepo/config/emacs.org"))))) +(use-package general + :after (evil evil-collection) + :init (general-create-definer leader-key :prefix "SPC") + :config + ;; these are just bindings but the symbols are all lazily handled by general + (create-irc-servers + (znc "ret2pop.net" "5000") + (prestonpan "nullring.xyz" "6697") + (libera-chat "irc.libera.chat" "6697") + (efnet "irc.prison.net" "6697") + (matrix-org "matrix.org" "8448") + (gimp-org "irc.gimp.org" "6697")) + + (leader-key 'normal + "o c" '(org-capture :wk "Capture") + ;; Org Mode + "n" '(:ignore t :wk "Org mode plugins") + "n j j" '(org-journal-new-entry :wk "Make new journal entry") + "n r f" '(org-roam-node-find :wk "Find roam node") + "n r i" '(org-roam-node-insert :wk "Insert roam node") + "n r a" '(org-roam-alias-add :wk "Add alias to org roam node") + "n r g" '(org-roam-graph :wk "Graph roam database") + "m I" '(org-id-get-create :wk "Make org id") + + ;; Programming Projects + "." '(counsel-find-file :wk "find file") + "p a" '(projectile-add-known-project :wk "Add to project list") + + "N f" '(nix-flake :wk "nix flake menu") + "f" '(:ignore t :wk "file operations") + "f p" '(projectile-switch-project :wk "find project to switch to") + "f f" '(counsel-fzf :wk "find file in project") + "f s" '(counsel-rg :wk "find string in project") + + "y n s" '(yas-new-snippet :wk "Create new snippet") + + "g" '(:ignore t :wk "Magit") + "g /" '(magit-dispatch :wk "git commands") + "g P" '(magit-push :wk "git push") + "g c" '(magit-commit :wk "git commit") + "g p" '(magit-pull :wk "Pull from git") + "g s" '(magit-status :wk "Change status of files") + "g i" '(magit-init :wk "init new git project") + "g r" '(magit-rebase :wk "Rebase branch") + "g m" '(magit-merge :wk "Merge branches") + "g b" '(magit-branch :wk "Git branch") + + "o p" '(treemacs :wk "Project Drawer") + "o P" '(treemacs-projectile :wk "Import Projectile project to treemacs") + + "w r" '(writeroom-mode :wk "focus mode for writing") + + ;; Applications + "o" '(:ignore t :wk "Open application") + "o t" '(vterm :wk "Terminal") + "o e" '(eshell :wk "Elisp Interpreter") + "o m" '(mu4e :wk "Email") + "o M" '(matrix-org :wk "Connect to matrix") + "o r s" '(elfeed :wk "rss feed") + "o a" '(org-agenda :wk "Open agenda") + "o w" '(eww :wk "web browser") + "m m" '(emms :wk "Music player") + "s m" '(proced :wk "System Manager") + "l p" '(list-processes :wk "List Emacs Processes") + + "m P p" '(org-publish :wk "Publish website components") + "s e" '(sudo-edit :wk "Edit file with sudo") + + ;; "f f" '(eglot-format :wk "Format code buffer") + "i p c" '(prestonpan :wk "Connect to my IRC server") + "i l c" '(liberachat :wk "Connect to libera chat server") + "i e c" '(efnet :wk "Connect to efnet chat server") + "i g c" '(gimp-org :wk "Connect to gimp chat server") + "i z c" '(znc :wk "Connect to my ZNC instance") + + ;; Documentation + "h" '(:ignore t :wk "Documentation") + "h v" '(counsel-describe-variable :wk "Describe variable") + "h f" '(counsel-describe-function :wk "Describe function") + "h h" '(help :wk "Help") + "h m" '(woman :wk "Manual") + "h i" '(info :wk "Info") + + "s i p" '(insert-urandom-password :wk "insert random password to buffer (for sops)") + + "h r r" '(lambda () (interactive) (load-file (expand-file-name "~/monorepo/nix/init.el"))))) #+end_src ** LLM I use LLMs in order to help me come up with ideas. I use a local LLM so that I can have a @@ -642,228 +756,224 @@ competitive LLM that doesn't cost money. Minuet does my code completion, showing the potential code completion as a ghost and automatically completing the code when my cursor is still. It is kind of like copilot but it works with local LLMs, which is better. Though, it's obviously not always the most accurate. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package minuet - :bind - (("M-y" . #'minuet-complete-with-minibuffer) - ("C-c m" . #'minuet-show-suggestion) - :map minuet-active-mode-map - ("C-c r" . #'minuet-dismiss-suggestion) - ("TAB" . #'minuet-accept-suggestion)) - - :init - (add-hook 'prog-mode-hook #'minuet-auto-suggestion-mode) - - :custom - (minuet-request-timeout 40 "Max timeout in seconds") - (minuet-provider 'openai-fim-compatible "FIM compatible OpenAI-like API (Ollama)") - (minuet-n-completions 1 "I am using ghost text so I only need one possible completion") - (minuet-context-window 1024 "how much context do I want?") - - :config - (plist-put minuet-openai-fim-compatible-options :end-point "http://localhost:11434/v1/completions") - - (plist-put minuet-openai-fim-compatible-options :name "Ollama") - (plist-put minuet-openai-fim-compatible-options :api-key "TERM") - (plist-put minuet-openai-fim-compatible-options :model "qwen2.5-coder:14b") - - (minuet-set-optional-options minuet-openai-fim-compatible-options :max_tokens 50)) +(use-package minuet + :bind + (("M-y" . #'minuet-complete-with-minibuffer) + ("C-c m" . #'minuet-show-suggestion) + :map minuet-active-mode-map + ("C-c r" . #'minuet-dismiss-suggestion) + ("TAB" . #'minuet-accept-suggestion)) + :hook ((prog-mode-hook . minuet-auto-suggestion-mode)) + :custom + (minuet-request-timeout 40 "Max timeout in seconds") + (minuet-provider 'openai-fim-compatible "FIM compatible OpenAI-like API (Ollama)") + (minuet-n-completions 1 "I am using ghost text so I only need one possible completion") + (minuet-context-window 1024 "how much context do I want?") + (minuet-openai-fim-compatible-options + '( + :end-point "http://localhost:11434/v1/completions" + :name "Ollama" + :api-key "TERM" + :template ( + :prompt minuet--default-fim-prompt-function + :suffix minuet--default-fim-suffix-function) + :transform () + :get-text-fn minuet--openai-fim-get-text-fn + :optional (:max-tokens 50) + :model "qwen2.5-coder:14b"))) #+end_src ** RSS Feed I use really simple syndication (RSS) in order to read news. As a result, I use elfeed to fetch feeds found on my website: #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package elfeed - :custom - (elfeed-search-filter "@1-month-ago +unread" "Only display unread articles from a month ago") +(use-package elfeed + :hook ((elfeed-search-mode . elfeed-update)) + :custom (elfeed-search-filter "@1-month-ago +unread" "Only display unread articles from a month ago") + :config (run-with-timer 0 (* 60 3) 'elfeed-update)) - :config - (run-with-timer 0 (* 60 60 4) 'elfeed-update) - - :hook ((elfeed-search-mode . elfeed-update))) - - (use-package elfeed-org - :custom - (rmh-elfeed-org-files '("~/monorepo/config/elfeed.org") "Use elfeed config in repo as default") - :config - (elfeed-org)) +(use-package elfeed-org + :after (elfeed org) + :demand t + :custom (rmh-elfeed-org-files '("~/monorepo/config/elfeed.org") "Use elfeed config in repo as default") + :config (elfeed-org)) #+end_src *** Youtube Then we set up elfeed-tube for Youtube video RSS feeds (so I don't ever have to use the web interface and can control it from emacs): #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package elfeed-tube - :after elfeed - :demand t - :config - (elfeed-tube-setup) - :bind (:map elfeed-show-mode-map - ("F" . elfeed-tube-fetch) - ([remap save-buffer] . elfeed-tube-save) - :map elfeed-search-mode-map - ("F" . elfeed-tube-fetch) - ([remap save-buffer] . elfeed-tube-save))) - - (use-package elfeed-tube-mpv - :bind (:map elfeed-show-mode-map - ("C-c C-f" . elfeed-tube-mpv-follow-mode) - ("C-c C-c" . elfeed-tube-mpv) - ("C-c C-w" . elfeed-tube-mpv-where) - :map elfeed-search-mode-map - ("M" . elfeed-tube-mpv))) +(use-package elfeed-tube + :after elfeed + :demand t + :bind (:map elfeed-show-mode-map + ("F" . elfeed-tube-fetch) + ([remap save-buffer] . elfeed-tube-save) + :map elfeed-search-mode-map + ("F" . elfeed-tube-fetch) + ([remap save-buffer] . elfeed-tube-save)) + :config (elfeed-tube-setup)) + +(use-package elfeed-tube-mpv + :bind (:map elfeed-show-mode-map + ("C-c C-f" . elfeed-tube-mpv-follow-mode) + ("C-c C-c" . elfeed-tube-mpv) + ("C-c C-w" . elfeed-tube-mpv-where) + :map elfeed-search-mode-map + ("M" . elfeed-tube-mpv))) #+end_src ** Project Drawer I use treemacs as my sidebar for projects, so that I can easily navigate to any file in the project directory. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package treemacs) - (use-package treemacs-evil - :after (treemacs evil)) - (use-package treemacs-projectile - :after (treemacs projectile)) - (use-package treemacs-magit - :after (treemacs magit)) +(use-package treemacs + :after doom-themes) + +(use-package treemacs-evil + :after (treemacs evil)) + +(use-package treemacs-projectile + :after (treemacs projectile)) + +(use-package treemacs-magit + :after (treemacs magit)) + +(use-package treemacs-all-the-icons + :after (treemacs all-the-icons)) #+end_src ** Eww Used only for the purpose of viewing RSS feed items in emacs if I can, only resorting to Chromium if I have to: #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package eww - :custom - (search-engines - '((("google" "g") "https://google.com/search?q=%s") - (("duckduckgo" "d" "ddg") "https://duckduckgo.com/?q=%s") - (("rfc" "r") "https://www.rfc-editor.org/rfc/rfc%s.txt") - (("rfc-kw" "rk") "https://www.rfc-editor.org/search/rfc_search_detail.php?title=%s")) - "use this set of search engines") - - (search-engine-default "google" "Use google as default") - (eww-search-prefix "https://google.com/search?q=" "Google prefix") - :hook ((eww-mode . (lambda () (local-set-key (kbd "y Y") #'eww-copy-page-url))))) +(use-package eww + :bind (:map eww-mode-map + ("y Y" . eww-copy-page-url)) + :custom + (search-engines + '((("google" "g") "https://google.com/search?q=%s") + (("duckduckgo" "d" "ddg") "https://duckduckgo.com/?q=%s") + (("rfc" "r") "https://www.rfc-editor.org/rfc/rfc%s.txt") + (("rfc-kw" "rk") "https://www.rfc-editor.org/search/rfc_search_detail.php?title=%s")) + "use this set of search engines") + (search-engine-default "google" "Use google as default") + (eww-search-prefix "https://google.com/search?q=" "Google prefix")) #+end_src ** Nix Mode Load Nix mode so our exported website has syntax highlighting for Nix blocks. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package nix-mode - :mode "\\.nix\\'") +(use-package nix-mode + :mode "\\.nix\\'") #+end_src ** Org Roam For all my mathematics and programming notes: #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package org-roam - :after (org) - :custom - (org-roam-db-update-on-save t "Update org-roam db") - (org-roam-graph-viewer "librewolf" "Use librewolf to view org-roam graph") - (org-roam-directory (file-truename "~/monorepo/mindmap") "Set org-roam directory inside monorepo") - (org-roam-capture-templates '(("d" "default" plain "%?" - :target (file+head "${title}.org" - "#+title: ${title}\n#+author: Preston Pan\n#+description:\n#+options: broken-links:t") - :unnarrowed t)) "org-roam files start with this snippet by default") - :config - (org-roam-db-autosync-mode) - ;; Otherwise links are broken when publishing - (org-roam-update-org-id-locations)) - - (use-package org-roam-ui - :after org-roam - :hook (after-init . org-roam-ui-mode) - :custom - (org-roam-ui-sync-theme t "Use emacs theme for org-roam-ui") - (org-roam-ui-follow t "Have cool visual while editing org-roam") - (org-roam-ui-update-on-save t "This option is obvious") - (org-roam-ui-open-on-start t "Have cool visual open in librewolf when emacs loads")) +(use-package org-roam + :after (org) + :custom + (org-roam-db-update-on-save t "Update org-roam db") + (org-roam-graph-viewer "librewolf" "Use librewolf to view org-roam graph") + (org-roam-directory (file-truename "~/monorepo/mindmap") "Set org-roam directory inside monorepo") + (org-roam-capture-templates '(("d" "default" plain "%?" + :target (file+head "${title}.org" + "#+title: ${title}\n#+author: Preston Pan\n#+description:\n#+options: broken-links:t") + :unnarrowed t)) "org-roam files start with this snippet by default") + :config (org-roam-config)) + +(unless noninteractive (use-package org-roam-ui + :after org-roam + :hook (after-init . org-roam-ui-mode) + :custom + (org-roam-ui-sync-theme t "Use emacs theme for org-roam-ui") + (org-roam-ui-follow t "Have cool visual while editing org-roam") + (org-roam-ui-update-on-save t "This option is obvious") + (org-roam-ui-open-on-start t "Have cool visual open in librewolf when emacs loads"))) #+end_src ** Pinentry Set up pinentry so that I can use emacs as my pinentry frontend: #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package pinentry - :custom (epa-pinentry-mode `loopback "Set this option to match gpg-agent.conf") - :config (pinentry-start)) +(unless noninteractive (use-package pinentry + :custom (epa-pinentry-mode `loopback "Set this option to match gpg-agent.conf") + :config (pinentry-start))) #+end_src ** Email Email in emacs can be done with Mu4e. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package smtpmail - :custom - (user-mail-address system-email "Use our email") - (user-full-name system-fullname "Use our full name") - (sendmail-program "msmtp" "Use msmtp in order to send emails") - (send-mail-function 'smtpmail-send-it "This is required for this to work") - (message-sendmail-f-is-evil t "Use evil-mode for sendmail") - (message-sendmail-extra-arguments '("--read-envelope-from") "idk what this does") - (message-send-mail-function 'message-send-mail-with-sendmail "Use sendmail")) - - (use-package mu4e - :after smtpmail - :hook - ((mu4e-compose-mode . mml-secure-message-sign-pgpmime)) - :custom - (mu4e-drafts-folder "/Drafts" "Set drafts folder mu db") - (mu4e-sent-folder "/Sent" "Set sent folder in mu db") - (mu4e-trash-folder "/Trash" "Set trash folder in mu db") - (mu4e-attachment-dir "~/Downloads" "Set downloads folder for attachments") - (mu4e-view-show-addresses 't "Show email addresses in main view") - (mu4e-confirm-quit nil "Don't ask to quit") - (message-kill-buffer-on-exit t "Kill buffer when I exit mu4e") - (mu4e-compose-dont-reply-to-self t "Don't include self in replies") - (mu4e-change-filenames-when-moving t) - (mu4e-get-mail-command (concat "mbsync " system-username) "Use mbsync for imap") - (mu4e-compose-reply-ignore-address (list "no-?reply" system-email) "ignore my own address and noreply") - (mu4e-html2text-command "w3m -T text/html" "Use w3m to convert html to text") - (mu4e-update-interval 300 "Update duration") - (mu4e-headers-auto-update t "Auto-updates feed") - (mu4e-view-show-images t "Shows images") - (mu4e-compose-signature-auto-include nil) - (mml-secure-openpgp-sign-with-sender t) - (mml-secure-openpgp-signers (list system-gpgkey)) - (mail-user-agent 'mu4e-user-agent) - (message-mail-user-agent 'mu4e-user-agent) - (mu4e-use-fancy-chars t "Random option to make mu4e look nicer")) +(use-package smtpmail + :custom + (user-mail-address system-email "Use our email") + (user-full-name system-fullname "Use our full name") + (sendmail-program "msmtp" "Use msmtp in order to send emails") + (send-mail-function 'smtpmail-send-it "This is required for this to work") + (message-sendmail-f-is-evil t "Use evil-mode for sendmail") + (message-sendmail-extra-arguments '("--read-envelope-from") "idk what this does") + (message-send-mail-function 'message-send-mail-with-sendmail "Use sendmail")) + +(use-package mu4e + :after smtpmail + :hook + ((mu4e-compose-mode . mml-secure-message-sign-pgpmime)) + :custom + (mu4e-drafts-folder "/Drafts" "Set drafts folder mu db") + (mu4e-sent-folder "/Sent" "Set sent folder in mu db") + (mu4e-trash-folder "/Trash" "Set trash folder in mu db") + (mu4e-attachment-dir "~/Downloads" "Set downloads folder for attachments") + (mu4e-view-show-addresses 't "Show email addresses in main view") + (mu4e-confirm-quit nil "Don't ask to quit") + (message-kill-buffer-on-exit t "Kill buffer when I exit mu4e") + (mu4e-compose-dont-reply-to-self t "Don't include self in replies") + (mu4e-change-filenames-when-moving t) + (mu4e-get-mail-command (concat "mbsync " system-username) "Use mbsync for imap") + (mu4e-compose-reply-ignore-address (list "no-?reply" system-email) "ignore my own address and noreply") + (mu4e-html2text-command "w3m -T text/html" "Use w3m to convert html to text") + (mu4e-update-interval 300 "Update duration") + (mu4e-headers-auto-update t "Auto-updates feed") + (mu4e-view-show-images t "Shows images") + (mu4e-compose-signature-auto-include nil) + (mml-secure-openpgp-sign-with-sender t) + (mml-secure-openpgp-signers (list system-gpgkey)) + (mail-user-agent 'mu4e-user-agent) + (message-mail-user-agent 'mu4e-user-agent) + (mu4e-use-fancy-chars t "Random option to make mu4e look nicer")) #+end_src ** Music Set up emms in order to play music from my music directory: #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package emms - :custom - (emms-source-file-default-directory (expand-file-name "~/music/") "Use directory specified in Nix") - (emms-player-mpd-music-directory (expand-file-name "~/music/") "Use directory specified in Nix") - (emms-player-mpd-server-name "localhost" "Connect to localhost") - (emms-player-mpd-server-port "6600" "Connect to port 6600") - (emms-player-list '(emms-player-mpd) "Use mpd") - (emms-lyrics-display-on-modeline t) - :hook - ((emms-playlist-mode . emms-lyrics-mode) - (emms-player-started . emms-lyrics-lrclib-get)) - :init - (emms-all) - (add-to-list 'emms-info-functions 'emms-info-mpd) - (add-to-list 'emms-player-list 'emms-player-mpd) - :config (emms-player-mpd-connect)) +(unless noninteractive (use-package emms + :custom + (emms-source-file-default-directory (expand-file-name "~/music/") "Use directory specified in Nix") + (emms-player-mpd-music-directory (expand-file-name "~/music/") "Use directory specified in Nix") + (emms-player-mpd-server-name "localhost" "Connect to localhost") + (emms-player-mpd-server-port "6600" "Connect to port 6600") + (emms-player-list '(emms-player-mpd) "Use mpd") + (emms-lyrics-display-on-modeline t "Display lyrics for reading") + (emms-info-functions '(emms-info-mpd emms-info-native emms-info-cueinfo) "functions for displaying information about tracks") + :hook + ((emms-playlist-mode . emms-lyrics-mode) + (emms-player-started . emms-lyrics-lrclib-get)) + :init (emms-all) + :config (emms-player-mpd-connect))) #+end_src ** Tabs I use tabs because sometimes I like using the mouse (it's actually more efficient to have the option for both, trust me. Keyboards aren't all it). #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package centaur-tabs - :custom - (centaur-tabs-set-icons t "use icons for centaur-tabs") - (centaur-tabs-set-modified-marker t "show when buffer modified") - (centaur-tabs-icon-type 'all-the-icons "use all-the-icons for icons") - :demand - :config - (centaur-tabs-mode t) - :bind - ("C-" . centaur-tabs-backward) - ("C-" . centaur-tabs-forward)) +(use-package centaur-tabs + :custom + (centaur-tabs-set-icons t "use icons for centaur-tabs") + (centaur-tabs-set-modified-marker t "show when buffer modified") + (centaur-tabs-icon-type 'all-the-icons "use all-the-icons for icons") + :bind + ("C-" . centaur-tabs-backward) + ("C-" . centaur-tabs-forward) + :demand t + :config (centaur-tabs-mode t)) #+end_src * Unpinned ** Lean4 For some reason, lean4-mode is not in MELPA currently so I have to do this ugly thing: #+begin_src emacs-lisp :tangle ../nix/init.el - (unless noninteractive (use-package lean4-mode - :commands lean4-mode - :vc (:url "https://github.com/leanprover-community/lean4-mode.git" - :rev "76895d8939111654a472cfc617cfd43fbf5f1eb6"))) +(unless noninteractive (use-package lean4-mode + :commands lean4-mode + :vc (:url "https://github.com/leanprover-community/lean4-mode.git" + :rev "76895d8939111654a472cfc617cfd43fbf5f1eb6"))) #+end_src and actually pull something from the internet instead of pinning. Thankfully this reproduction issue is probably localized to lean files. Also, we're pulling a specific commit so it is still pinned. If it fails to fetch, lean4 is broken I guess. diff --git a/config/nix.org b/config/nix.org index 29d558a..6eb55d5 100644 --- a/config/nix.org +++ b/config/nix.org @@ -1,6 +1,7 @@ #+title: NixOS Configuration #+AUTHOR: Preston Pan #+DESCRIPTION: My NixOS system, written entirely in a literate configuration +#+PROPERTY: header-args :tangle yes :comments link * Introduction This is my NixOS configuration. It is a part of my monorepo, and this file automatically tangles @@ -16,28 +17,28 @@ and they are webpages as well. This page is one such example of this concept. * Configurables We start with some configurable variables (you can change these if you want to use this configuration yourself): #+begin_src nix :tangle ../nix/flakevars.nix - let - # I'm ret2pop! What's your name? - internetName = "ret2pop"; - in - { - # Name of spontaneity box - remoteHost = "${internetName}.net"; - - # Your internet name - internetName = internetName; - - # Name of your organization - orgHost = "nullring.xyz"; - - # Hostnames of my systems - hostnames = [ - "affinity" - "continuity" - "spontaneity" - "installer" - ]; - } +let + # I'm ret2pop! What's your name? + internetName = "ret2pop"; +in +{ + # Name of spontaneity box + remoteHost = "${internetName}.net"; + + # Your internet name + internetName = internetName; + + # Name of your organization + orgHost = "nullring.xyz"; + + # Hostnames of my systems + hostnames = [ + "affinity" + "continuity" + "spontaneity" + "installer" + ]; +} #+end_src * Flake.nix The flake is the entry point of the NixOS configuration. Here, I have a list of all the systems @@ -48,148 +49,148 @@ with ~nix flake check~. I have implemented also git hooks which help with CI. and now for the main flake: #+begin_src nix :tangle ../nix/flake.nix - { - description = "Emacs centric configurations for a complete networked system"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - nur.url = "github:nix-community/NUR"; - sops-nix.url = "github:Mic92/sops-nix"; - - scripts.url = "github:ret2pop/scripts"; - wallpapers.url = "github:ret2pop/wallpapers"; - sounds.url = "github:ret2pop/sounds"; - deep-research.url = "github:ret2pop/ollama-deep-researcher"; - impermanence.url = "github:nix-community/impermanence"; - - nix-topology = { - url = "github:oddlama/nix-topology"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - home-manager = { - url = "github:nix-community/home-manager/release-25.05"; - inputs.nixpkgs.follows = "nixpkgs"; - }; +{ + description = "Emacs centric configurations for a complete networked system"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nur.url = "github:nix-community/NUR"; + sops-nix.url = "github:Mic92/sops-nix"; + + scripts.url = "github:ret2pop/scripts"; + wallpapers.url = "github:ret2pop/wallpapers"; + sounds.url = "github:ret2pop/sounds"; + deep-research.url = "github:ret2pop/ollama-deep-researcher"; + impermanence.url = "github:nix-community/impermanence"; + + nix-topology = { + url = "github:oddlama/nix-topology"; + inputs.nixpkgs.follows = "nixpkgs"; + }; - disko = { - url = "github:nix-community/disko"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + home-manager = { + url = "github:nix-community/home-manager/release-25.05"; + inputs.nixpkgs.follows = "nixpkgs"; + }; - lanzaboote = { - url = "github:nix-community/lanzaboote/v0.4.1"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + disko = { + url = "github:nix-community/disko"; + inputs.nixpkgs.follows = "nixpkgs"; + }; - nixos-dns = { - url = "github:Janik-Haag/nixos-dns"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + lanzaboote = { + url = "github:nix-community/lanzaboote/v0.4.1"; + inputs.nixpkgs.follows = "nixpkgs"; + }; - git-hooks = { - url = "github:cachix/git-hooks.nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + nixos-dns = { + url = "github:Janik-Haag/nixos-dns"; + inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = { - self, - nixpkgs, - home-manager, - nur, - disko, - lanzaboote, - sops-nix, - nix-topology, - nixos-dns, - deep-research, - impermanence, - git-hooks, - ... - } - @attrs: - let - vars = import ./flakevars.nix; - system = "x86_64-linux"; + git-hooks = { + url = "github:cachix/git-hooks.nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; - pkgs = import nixpkgs { inherit system; }; - generate = nixos-dns.utils.generate nixpkgs.legacyPackages."${system}"; + outputs = { + self, + nixpkgs, + home-manager, + nur, + disko, + lanzaboote, + sops-nix, + nix-topology, + nixos-dns, + deep-research, + impermanence, + git-hooks, + ... + } + @attrs: + let + vars = import ./flakevars.nix; + system = "x86_64-linux"; - dnsConfig = { - inherit (self) nixosConfigurations; - extraConfig = import ./dns/default.nix; - }; + pkgs = import nixpkgs { inherit system; }; + generate = nixos-dns.utils.generate nixpkgs.legacyPackages."${system}"; - rpiCheck = hostname: (builtins.match "rpi-.*" hostname) != null; - noRpi = builtins.filter (hostname: (! rpiCheck hostname)); - noInstaller = builtins.filter (hostname: (hostname != "installer")); - filterHosts = noInstaller (noRpi vars.hostnames); - - mkHostModules = hostname: - if (hostname == "installer") then ([ - (./. + "/systems/${hostname}/default.nix") - { networking.hostName = "${hostname}"; } - nix-topology.nixosModules.default - ]) else (if (rpiCheck hostname) then [ - (./. + "/systems/${hostname}/default.nix") - disko.nixosModules.disko - home-manager.nixosModules.home-manager - sops-nix.nixosModules.sops - lanzaboote.nixosModules.lanzaboote - ] else [ - { - environment.systemPackages = with nixpkgs.lib; [ - deep-research.packages."${system}".deep-research - ]; - } - impermanence.nixosModules.impermanence - nix-topology.nixosModules.default - lanzaboote.nixosModules.lanzaboote - disko.nixosModules.disko - home-manager.nixosModules.home-manager - sops-nix.nixosModules.sops - nixos-dns.nixosModules.dns - { - nixpkgs.overlays = [ nur.overlays.default ]; - home-manager.extraSpecialArgs = attrs // { - systemHostName = "${hostname}"; - }; - networking.hostName = "${hostname}"; - } - (./. + "/systems/${hostname}/default.nix") - ]); + dnsConfig = { + inherit (self) nixosConfigurations; + extraConfig = import ./dns/default.nix; + }; - # function that generates all systems from hostnames - mkConfigs = map (hostname: - let - hostSystem = if (rpiCheck hostname) then "aarch64-linux" else system; - in - { - name = "${hostname}"; - value = nixpkgs.lib.nixosSystem { - system = hostSystem; - specialArgs = attrs // { - isIntegrationTest = false; - monorepoSelf = null; - }; - modules = mkHostModules hostname; + rpiCheck = hostname: (builtins.match "rpi-.*" hostname) != null; + noRpi = builtins.filter (hostname: (! rpiCheck hostname)); + noInstaller = builtins.filter (hostname: (hostname != "installer")); + filterHosts = noInstaller (noRpi vars.hostnames); + + mkHostModules = hostname: + if (hostname == "installer") then ([ + (./. + "/systems/${hostname}/default.nix") + { networking.hostName = "${hostname}"; } + nix-topology.nixosModules.default + ]) else (if (rpiCheck hostname) then [ + (./. + "/systems/${hostname}/default.nix") + disko.nixosModules.disko + home-manager.nixosModules.home-manager + sops-nix.nixosModules.sops + lanzaboote.nixosModules.lanzaboote + ] else [ + { + environment.systemPackages = with nixpkgs.lib; [ + deep-research.packages."${system}".deep-research + ]; + } + impermanence.nixosModules.impermanence + nix-topology.nixosModules.default + lanzaboote.nixosModules.lanzaboote + disko.nixosModules.disko + home-manager.nixosModules.home-manager + sops-nix.nixosModules.sops + nixos-dns.nixosModules.dns + { + nixpkgs.overlays = [ nur.overlays.default ]; + home-manager.extraSpecialArgs = attrs // { + systemHostName = "${hostname}"; + }; + networking.hostName = "${hostname}"; + } + (./. + "/systems/${hostname}/default.nix") + ]); + + # function that generates all systems from hostnames + mkConfigs = map (hostname: + let + hostSystem = if (rpiCheck hostname) then "aarch64-linux" else system; + in + { + name = "${hostname}"; + value = nixpkgs.lib.nixosSystem { + system = hostSystem; + specialArgs = attrs // { + isIntegrationTest = false; + monorepoSelf = null; }; - }); + modules = mkHostModules hostname; + }; + }); - mkDiskoFiles = map (hostname: { - name = "${hostname}"; - value = self.nixosConfigurations."${hostname}".config.monorepo.vars.diskoSpec; - }); + mkDiskoFiles = map (hostname: { + name = "${hostname}"; + value = self.nixosConfigurations."${hostname}".config.monorepo.vars.diskoSpec; + }); - mkBuildChecks = map (hostname: { - name = "${hostname}-build-check"; - value = { - enable = true; - name = "${hostname}-vm-build"; - description = "Ensure ${hostname} can build"; - stages = [ "pre-merge-commit" ]; - entry = "${pkgs.writeShellScript "${hostname}-check" '' + mkBuildChecks = map (hostname: { + name = "${hostname}-build-check"; + value = { + enable = true; + name = "${hostname}-vm-build"; + description = "Ensure ${hostname} can build"; + stages = [ "pre-merge-commit" ]; + entry = "${pkgs.writeShellScript "${hostname}-check" '' #!/usr/bin/env bash set -e set -o pipefail @@ -209,92 +210,92 @@ and now for the main flake: exit 1 fi ''}"; - pass_filenames = false; - always_run = true; - }; - }); + pass_filenames = false; + always_run = true; + }; + }); - hostToServices = (hostname: - let - super = self.nixosConfigurations."${hostname}".config; - in - [ - { - serviceName = "nginx"; - enabled = super.services.nginx.enable; - } - { - serviceName = "sshd"; - enabled = super.services.openssh.enable; - } - { - serviceName = "git-daemon"; - enabled = super.services.gitDaemon.enable; - } - { - serviceName = "tor"; - enabled = super.services.tor.enable; - } - ]); - - _mkServiceTestScripts = hostname: services: builtins.concatStringsSep "\n" (builtins.map (service: - (if service.enabled then '' + hostToServices = (hostname: + let + super = self.nixosConfigurations."${hostname}".config; + in + [ + { + serviceName = "nginx"; + enabled = super.services.nginx.enable; + } + { + serviceName = "sshd"; + enabled = super.services.openssh.enable; + } + { + serviceName = "git-daemon"; + enabled = super.services.gitDaemon.enable; + } + { + serviceName = "tor"; + enabled = super.services.tor.enable; + } + ]); + + _mkServiceTestScripts = hostname: services: builtins.concatStringsSep "\n" (builtins.map (service: + (if service.enabled then '' ${hostname}.succeed("systemctl is-active ${service.serviceName}") '' else "")) services); - mkServiceTestScripts = hostname: _mkServiceTestScripts hostname (hostToServices hostname); + mkServiceTestScripts = hostname: _mkServiceTestScripts hostname (hostToServices hostname); - mkIntegrationTests = builtins.map (hostname: - let - lib = nixpkgs.lib; - hostPkgs = self.nixosConfigurations."${hostname}".pkgs; - hardwareConfig = ./systems/${hostname}/hardware-configuration.nix; - in - { - name = "integration-test-${hostname}"; - value = hostPkgs.testers.runNixOSTest { - name = "services-test-${hostname}"; - nodes = { - "${hostname}" = { ... }: { - _module.args = attrs // { isIntegrationTest = true; }; - imports = mkHostModules hostname ++ [ - "${nixpkgs}/nixos/modules/misc/nixpkgs/read-only.nix" - { - nixpkgs.pkgs = lib.mkVMOverride hostPkgs; - nixpkgs.config = lib.mkForce {}; - systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false; - systemd.services.NetworkManager-wait-online.enable = lib.mkForce false; - nixpkgs.overlays = lib.mkForce []; - } - ]; - disabledModules = [ - ./modules/nixpkgs-options.nix - ] - ++ lib.optional (builtins.pathExists hardwareConfig) hardwareConfig; - }; + mkIntegrationTests = builtins.map (hostname: + let + lib = nixpkgs.lib; + hostPkgs = self.nixosConfigurations."${hostname}".pkgs; + hardwareConfig = ./systems/${hostname}/hardware-configuration.nix; + in + { + name = "integration-test-${hostname}"; + value = hostPkgs.testers.runNixOSTest { + name = "services-test-${hostname}"; + nodes = { + "${hostname}" = { ... }: { + _module.args = attrs // { isIntegrationTest = true; }; + imports = mkHostModules hostname ++ [ + "${nixpkgs}/nixos/modules/misc/nixpkgs/read-only.nix" + { + nixpkgs.pkgs = lib.mkVMOverride hostPkgs; + nixpkgs.config = lib.mkForce {}; + systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false; + systemd.services.NetworkManager-wait-online.enable = lib.mkForce false; + nixpkgs.overlays = lib.mkForce []; + } + ]; + disabledModules = [ + ./modules/nixpkgs-options.nix + ] + ++ lib.optional (builtins.pathExists hardwareConfig) hardwareConfig; }; - testScript = '' + }; + testScript = '' ${hostname}.start() ${hostname}.wait_for_unit("default.target") ${hostname}.succeed('printf "smoke"') ${mkServiceTestScripts hostname} ''; - }; - } - ); - - integrationTests = builtins.listToAttrs (mkIntegrationTests filterHosts); - pre-commit-check = git-hooks.lib.${system}.run { - src = ./.; - hooks = builtins.listToAttrs (mkBuildChecks filterHosts) // { - statix.enable = false; - deadnix.enable = true; - prevent-direct-main-commits = { - enable = true; - name = "Prevent direct commits to main"; - description = "Blocks commits to main unless they are merge commits"; - pass_filenames = false; - entry = "${pkgs.writeShellScript "block-main-commits" '' + }; + } + ); + + integrationTests = builtins.listToAttrs (mkIntegrationTests filterHosts); + pre-commit-check = git-hooks.lib.${system}.run { + src = ./.; + hooks = builtins.listToAttrs (mkBuildChecks filterHosts) // { + statix.enable = false; + deadnix.enable = true; + prevent-direct-main-commits = { + enable = true; + name = "Prevent direct commits to main"; + description = "Blocks commits to main unless they are merge commits"; + pass_filenames = false; + entry = "${pkgs.writeShellScript "block-main-commits" '' BRANCH=$(git branch --show-current) GIT_DIR=$(git rev-parse --git-dir) if [ "$BRANCH" = "main" ] && [ ! -f "$GIT_DIR/MERGE_HEAD" ]; then @@ -303,45 +304,45 @@ and now for the main flake: exit 1 fi ''}"; - }; }; }; - in - { - lib = { - inherit mkHostModules; - }; + }; + in + { + lib = { + inherit mkHostModules; + }; - checks."${system}" = integrationTests // { - inherit pre-commit-check; - }; + checks."${system}" = integrationTests // { + inherit pre-commit-check; + }; - nixosConfigurations = builtins.listToAttrs (mkConfigs vars.hostnames); - evalDisko = builtins.listToAttrs (mkDiskoFiles (noInstaller vars.hostnames)); + nixosConfigurations = builtins.listToAttrs (mkConfigs vars.hostnames); + evalDisko = builtins.listToAttrs (mkDiskoFiles (noInstaller vars.hostnames)); - topology."${system}" = import nix-topology { - pkgs = import nixpkgs { - inherit system; - overlays = [ nix-topology.overlays.default ]; - }; - modules = [ - ./topology/default.nix - { nixosConfigurations = self.nixosConfigurations; } - ]; + topology."${system}" = import nix-topology { + pkgs = import nixpkgs { + inherit system; + overlays = [ nix-topology.overlays.default ]; }; + modules = [ + ./topology/default.nix + { nixosConfigurations = self.nixosConfigurations; } + ]; + }; - devShell."${system}" = with pkgs; mkShell { - buildInputs = [ - fira-code - statix - deadnix - (python3.withPackages (ps: with ps; [ - octodns - octodns-providers.cloudflare - octodns-providers.bind - ])) - ]; - shellHook = '' + devShell."${system}" = with pkgs; mkShell { + buildInputs = [ + fira-code + statix + deadnix + (python3.withPackages (ps: with ps; [ + octodns + octodns-providers.cloudflare + octodns-providers.bind + ])) + ]; + shellHook = '' ${pre-commit-check.shellHook} git config branch.main.mergeoptions "--no-ff" @@ -363,32 +364,32 @@ and now for the main flake: alias fake-update-dns="octodns-sync --config-file ${self.packages."${system}".octodns} --force " alias gprune='git branch --merged | grep -v -E "^\*|main|master|dev" | xargs -r git branch -d' ''; - }; + }; - packages."${system}" = { - zoneFiles = generate.zoneFiles dnsConfig; - octodns = generate.octodnsConfig { - inherit dnsConfig; - - config = { - providers = { - cloudflare = { - class = "octodns_cloudflare.CloudflareProvider"; - token = "env/CLOUDFLARE_TOKEN"; - }; - config = { - check_origin = false; - }; + packages."${system}" = { + zoneFiles = generate.zoneFiles dnsConfig; + octodns = generate.octodnsConfig { + inherit dnsConfig; + + config = { + providers = { + cloudflare = { + class = "octodns_cloudflare.CloudflareProvider"; + token = "env/CLOUDFLARE_TOKEN"; + }; + config = { + check_origin = false; }; - }; - zones = { - "${vars.remoteHost}." = nixos-dns.utils.octodns.generateZoneAttrs [ "cloudflare" ]; - "${vars.orgHost}." = nixos-dns.utils.octodns.generateZoneAttrs [ "cloudflare" ]; }; }; + zones = { + "${vars.remoteHost}." = nixos-dns.utils.octodns.generateZoneAttrs [ "cloudflare" ]; + "${vars.orgHost}." = nixos-dns.utils.octodns.generateZoneAttrs [ "cloudflare" ]; + }; }; }; - } + }; +} #+end_src Note that the configurations are automatically generated with he mkConfigs function, and the final disko output is automatically generated with mkDiskoFiles. @@ -396,350 +397,350 @@ with mkDiskoFiles. In order to use the sops configuration, you must change the age public key to the one that you own: #+begin_src yaml :tangle ../nix/.sops.yaml - keys: - - &primary age165ul43e8rc0qwzz2f2q9cw02psm2mkudsrwavq2e0pxs280p64yqy2z0dr - - &vps age1acpuyy2qnduyxzwvusd8urr6a78e3f37ylhvh2pngyqytf5r8ans5vkest - creation_rules: - - path_regex: secrets/secrets.yaml$ - key_groups: - - age: - - *primary - - - path_regex: secrets/vps_secrets.yaml$ - key_groups: - - age: - - *vps - - - path_regex: secrets/common_secrets.yaml$ - key_groups: - - age: - - *primary - - *vps + keys: + - &primary age165ul43e8rc0qwzz2f2q9cw02psm2mkudsrwavq2e0pxs280p64yqy2z0dr + - &vps age1acpuyy2qnduyxzwvusd8urr6a78e3f37ylhvh2pngyqytf5r8ans5vkest + creation_rules: + - path_regex: secrets/secrets.yaml$ + key_groups: + - age: + - *primary + + - path_regex: secrets/vps_secrets.yaml$ + key_groups: + - age: + - *vps + + - path_regex: secrets/common_secrets.yaml$ + key_groups: + - age: + - *primary + - *vps #+end_src also note that you will have to write your own secrets.yaml file, with an entry called ~mail~, which is used for the imaps and smtps password. * Nix DNS #+begin_src nix :tangle ../nix/dns/default.nix - { - defaultTTL = 120; - } +{ + defaultTTL = 120; +} #+end_src * Nix Topology Nix Topology generates a nice graph of all my hosts. You can view this graph by running ~nix build .#topology.x86_64-linux.config.output~. #+begin_src nix :tangle ../nix/topology/default.nix - { config, ... }: - let - inherit - (config.lib.topology); - in - { - nodes = { - spontaneity = { - interfaces.wan.network = "remote"; - }; - installer = { - interfaces.lan.network = "home"; - }; - affinity = { - interfaces.lan = { - network = "home"; - physicalConnections = [ - { - node = "spontaneity"; - interface = "wan"; - } - { - node = "installer"; - interface = "lan"; - } - ]; - }; - }; - continuity = { - interfaces.lan = { - network = "home"; - physicalConnections = [ - { - node = "spontaneity"; - interface = "wan"; - } - { - node = "affinity"; - interface = "lan"; - } - ]; - }; - }; +{ config, ... }: +let + inherit + (config.lib.topology); +in +{ + nodes = { + spontaneity = { + interfaces.wan.network = "remote"; }; - networks = { - home = { - name = "Home Network"; - cidrv4 = "192.168.1.1/24"; + installer = { + interfaces.lan.network = "home"; + }; + affinity = { + interfaces.lan = { + network = "home"; + physicalConnections = [ + { + node = "spontaneity"; + interface = "wan"; + } + { + node = "installer"; + interface = "lan"; + } + ]; }; - remote = { - name = "Remote Network"; - cidrv4 = "144.202.27.169/32"; + }; + continuity = { + interfaces.lan = { + network = "home"; + physicalConnections = [ + { + node = "spontaneity"; + interface = "wan"; + } + { + node = "affinity"; + interface = "lan"; + } + ]; }; }; - } + }; + networks = { + home = { + name = "Home Network"; + cidrv4 = "192.168.1.1/24"; + }; + remote = { + name = "Remote Network"; + cidrv4 = "144.202.27.169/32"; + }; + }; +} #+end_src * Modules ** Vars Variables used for regular configuration in your system ~default.nix~ file. The options are largely self-documenting. #+begin_src nix :tangle ../nix/modules/vars.nix - { config, lib, ... }: - let - vars = import ../flakevars.nix; - in - { - options.monorepo.vars = { - device = lib.mkOption { - type = lib.types.str; - default = "/dev/sda"; - example = "/dev/nvme0n1"; - description = "device that NixOS is installed to"; - }; +{ config, lib, ... }: +let + vars = import ../flakevars.nix; +in +{ + options.monorepo.vars = { + device = lib.mkOption { + type = lib.types.str; + default = "/dev/sda"; + example = "/dev/nvme0n1"; + description = "device that NixOS is installed to"; + }; - internetName = lib.mkOption { - type = lib.types.str; - default = "${vars.internetName}"; - example = "myinternetname"; - description = "Internet name to be used for internet usernames"; - }; + internetName = lib.mkOption { + type = lib.types.str; + default = "${vars.internetName}"; + example = "myinternetname"; + description = "Internet name to be used for internet usernames"; + }; - sshKey = lib.mkOption { - type = lib.types.str; - default = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICts6+MQiMwpA+DfFQxjIN214Jn0pCw/2BDvOzPhR/H2 preston@continuity-dell"; - example = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICts6+MQiMwpA+DfFQxjIN214Jn0pCw/2BDvOzPhR/H2 preston@continuity-dell"; - description = "Admin public key for managing multiple configurations"; - }; + sshKey = lib.mkOption { + type = lib.types.str; + default = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICts6+MQiMwpA+DfFQxjIN214Jn0pCw/2BDvOzPhR/H2 preston@continuity-dell"; + example = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICts6+MQiMwpA+DfFQxjIN214Jn0pCw/2BDvOzPhR/H2 preston@continuity-dell"; + description = "Admin public key for managing multiple configurations"; + }; - dkimKey = lib.mkOption { - type = lib.types.str; - default = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsC9GpfjvQlldPrHAC7Yt+ZF0aduUIVV4j2+KUkF0j6NsrpOgvU6COWKQSod/B/qyPBLWf+w5P5YiJ9XnOgw6Db/I9C67eusEHnV/cbvokXLQjSBvXee1OEdrT9i+6iUgDeGWP4CrD1DcwvXzAcCI9exy3yALHVlbkyYvi0KAYofs8dVQ3JCwSCMlol71lA6ULJ2zbCIWeSOv9/C6QZ5HOIeeoFLesX6O/YvF4FYxWbSHy244TXYuczQKuayjKgD6e8gIT5WJRQj8IAWOQ2podWw6hSuB3Ig+ekoOfnl5ivJGOMbAzFTj8FtbS4ncyidLU1kIOeuLfiILeDDLlIeYTwIDAQAB"; - example = "string_after_p="; - description = "dkim key to put in host record for email"; - }; + dkimKey = lib.mkOption { + type = lib.types.str; + default = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsC9GpfjvQlldPrHAC7Yt+ZF0aduUIVV4j2+KUkF0j6NsrpOgvU6COWKQSod/B/qyPBLWf+w5P5YiJ9XnOgw6Db/I9C67eusEHnV/cbvokXLQjSBvXee1OEdrT9i+6iUgDeGWP4CrD1DcwvXzAcCI9exy3yALHVlbkyYvi0KAYofs8dVQ3JCwSCMlol71lA6ULJ2zbCIWeSOv9/C6QZ5HOIeeoFLesX6O/YvF4FYxWbSHy244TXYuczQKuayjKgD6e8gIT5WJRQj8IAWOQ2podWw6hSuB3Ig+ekoOfnl5ivJGOMbAzFTj8FtbS4ncyidLU1kIOeuLfiILeDDLlIeYTwIDAQAB"; + example = "string_after_p="; + description = "dkim key to put in host record for email"; + }; - repoName = lib.mkOption { - type = lib.types.str; - default = "monorepo"; - example = "myreponame"; - description = "Name of this repository"; - }; + repoName = lib.mkOption { + type = lib.types.str; + default = "monorepo"; + example = "myreponame"; + description = "Name of this repository"; + }; - projects = lib.mkOption { - type = lib.types.listOf lib.types.str; - default = [ - "monorepo" - "nullerbot" - ]; - example = [ - "project1" - "project2" - "project3" - ]; - description = "Names of repos that will have mailing lists"; - }; + projects = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = [ + "monorepo" + "nullerbot" + ]; + example = [ + "project1" + "project2" + "project3" + ]; + description = "Names of repos that will have mailing lists"; + }; - fileSystem = lib.mkOption { - type = lib.types.str; - default = "ext4"; - example = "btrfs"; - description = "filesystem to install with disko"; - }; + fileSystem = lib.mkOption { + type = lib.types.str; + default = "ext4"; + example = "btrfs"; + description = "filesystem to install with disko"; + }; - diskoSpec = lib.mkOption { - type = lib.types.attrs; - description = "retains a copy of the disko spec for reflection"; - }; + diskoSpec = lib.mkOption { + type = lib.types.attrs; + description = "retains a copy of the disko spec for reflection"; + }; - fullName = lib.mkOption { - type = lib.types.str; - default = "Preston Pan"; - example = "John Doe"; - description = "Full Name"; - }; + fullName = lib.mkOption { + type = lib.types.str; + default = "Preston Pan"; + example = "John Doe"; + description = "Full Name"; + }; - userName = lib.mkOption { - type = lib.types.str; - default = "preston"; - example = "myUser"; - description = "system username"; - }; + userName = lib.mkOption { + type = lib.types.str; + default = "preston"; + example = "myUser"; + description = "system username"; + }; - gpgKey = lib.mkOption { - type = lib.types.str; - default = "AEC273BF75B6F54D81343A1AC1FE6CED393AE6C1"; - example = "1234567890ABCDEF..."; - description = "GPG key fingerprint"; - }; + gpgKey = lib.mkOption { + type = lib.types.str; + default = "AEC273BF75B6F54D81343A1AC1FE6CED393AE6C1"; + example = "1234567890ABCDEF..."; + description = "GPG key fingerprint"; + }; - remoteHost = lib.mkOption { - type = lib.types.str; - default = "${vars.remoteHost}"; - example = "example.com"; - description = "Address to push to and pull from for website and git repos"; - }; + remoteHost = lib.mkOption { + type = lib.types.str; + default = "${vars.remoteHost}"; + example = "example.com"; + description = "Address to push to and pull from for website and git repos"; + }; - orgHost = lib.mkOption { - type = lib.types.str; - default = "${vars.orgHost}"; - example = "orgname.org"; - description = "Domain name of your organization, points to same VPS as remoteHost"; - }; + orgHost = lib.mkOption { + type = lib.types.str; + default = "${vars.orgHost}"; + example = "orgname.org"; + description = "Domain name of your organization, points to same VPS as remoteHost"; + }; - email = lib.mkOption { - type = lib.types.str; - default = "${vars.internetName}@${vars.orgHost}"; - example = "example@example.org"; - description = "Admin email address"; - }; + email = lib.mkOption { + type = lib.types.str; + default = "${vars.internetName}@${vars.orgHost}"; + example = "example@example.org"; + description = "Admin email address"; + }; - timeZone = lib.mkOption { - type = lib.types.str; - default = "America/Vancouver"; - example = "America/Chicago"; - description = "Linux timezone"; - }; + timeZone = lib.mkOption { + type = lib.types.str; + default = "America/Vancouver"; + example = "America/Chicago"; + description = "Linux timezone"; + }; - ntfySecret = lib.mkOption { - type = lib.types.str; - default = "ntfy"; - example = "ntfy-env"; - description = "Name of Ntfy secret for notification handling"; - }; + ntfySecret = lib.mkOption { + type = lib.types.str; + default = "ntfy"; + example = "ntfy-env"; + description = "Name of Ntfy secret for notification handling"; + }; - ntfyUrl = lib.mkOption { - type = lib.types.str; - default = "ntfy.${config.monorepo.vars.remoteHost}"; - example = "ntfy.nullring.xyz"; - description = "Name of ntfy server"; - }; + ntfyUrl = lib.mkOption { + type = lib.types.str; + default = "ntfy.${config.monorepo.vars.remoteHost}"; + example = "ntfy.nullring.xyz"; + description = "Name of ntfy server"; + }; - monitors = lib.mkOption { - type = lib.types.listOf lib.types.str; - default = [ - "HDMI-A-1" - "eDP-1" - "DP-2" - "DP-3" - "DP-4" - "LVDS-1" - ]; - example = []; - description = "Monitors that waybar will use"; - }; + monitors = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = [ + "HDMI-A-1" + "eDP-1" + "DP-2" + "DP-3" + "DP-4" + "LVDS-1" + ]; + example = []; + description = "Monitors that waybar will use"; }; - } + }; +} #+end_src ** Default Profile Again, these are self documenting variables that you may see used below. These are to be used under ~default.nix~ in the ~systems~ folder. #+begin_src nix :tangle ../nix/modules/default.nix - { lib, config, pkgs, ... }: - let - dirContents = builtins.readDir ./.; - files = lib.filterAttrs (name: type: type == "regular" && lib.hasSuffix ".nix" name && name != "default.nix") dirContents; - in - { - imports = lib.mapAttrsToList (name: _: ./. + "/${name}") files; - - options = { - monorepo = { - profiles = { - cuda.enable = lib.mkEnableOption "Enables CUDA support"; - documentation.enable = lib.mkEnableOption "Enables documentation on system."; - secureBoot.enable = lib.mkEnableOption "Enables secure boot. See sbctl."; - pipewire.enable = lib.mkEnableOption "Enables pipewire low latency audio setup"; - tor.enable = lib.mkEnableOption "Enables tor along with torsocks"; - - server = { - enable = lib.mkEnableOption "Enables server services"; - interface = lib.mkOption { type = lib.types.str; default = "eth0"; }; - ipv4 = lib.mkOption { type = lib.types.nullOr lib.types.str; default = null; }; - ipv6 = lib.mkOption { type = lib.types.nullOr lib.types.str; default = null; }; - gateway = lib.mkOption { type = lib.types.nullOr lib.types.str; default = null; }; - }; +{ lib, config, pkgs, ... }: +let + dirContents = builtins.readDir ./.; + files = lib.filterAttrs (name: type: type == "regular" && lib.hasSuffix ".nix" name && name != "default.nix") dirContents; +in +{ + imports = lib.mapAttrsToList (name: _: ./. + "/${name}") files; - ttyonly.enable = lib.mkEnableOption "TTY only, no xserver"; - grub.enable = lib.mkEnableOption "Enables grub instead of systemd-boot"; - workstation.enable = lib.mkEnableOption "Enables workstation services"; - desktop.enable = lib.mkEnableOption "Enables everything common to desktops"; - impermanence.enable = lib.mkEnableOption "Enables imperamanence"; - home.enable = lib.mkEnableOption "Enables home profiles"; - }; + options = { + monorepo = { + profiles = { + cuda.enable = lib.mkEnableOption "Enables CUDA support"; + documentation.enable = lib.mkEnableOption "Enables documentation on system."; + secureBoot.enable = lib.mkEnableOption "Enables secure boot. See sbctl."; + pipewire.enable = lib.mkEnableOption "Enables pipewire low latency audio setup"; + tor.enable = lib.mkEnableOption "Enables tor along with torsocks"; + + server = { + enable = lib.mkEnableOption "Enables server services"; + interface = lib.mkOption { type = lib.types.str; default = "eth0"; }; + ipv4 = lib.mkOption { type = lib.types.nullOr lib.types.str; default = null; }; + ipv6 = lib.mkOption { type = lib.types.nullOr lib.types.str; default = null; }; + gateway = lib.mkOption { type = lib.types.nullOr lib.types.str; default = null; }; + }; + + ttyonly.enable = lib.mkEnableOption "TTY only, no xserver"; + grub.enable = lib.mkEnableOption "Enables grub instead of systemd-boot"; + workstation.enable = lib.mkEnableOption "Enables workstation services"; + desktop.enable = lib.mkEnableOption "Enables everything common to desktops"; + impermanence.enable = lib.mkEnableOption "Enables imperamanence"; + home.enable = lib.mkEnableOption "Enables home profiles"; }; }; + }; - config = { - environment.systemPackages = lib.mkIf config.monorepo.profiles.documentation.enable ((with pkgs; [ - linux-manual - man-pages - man-pages-posix - iproute2 - silver-searcher - ripgrep - ]) ++ - (if (config.monorepo.vars.fileSystem == "btrfs") then with pkgs; [ - btrfs-progs - btrfs-snap - btrfs-list - btrfs-heatmap - ] else [])); - - boot.loader.grub = lib.mkIf config.monorepo.profiles.grub.enable { - enable = true; - }; + config = { + environment.systemPackages = lib.mkIf config.monorepo.profiles.documentation.enable ((with pkgs; [ + linux-manual + man-pages + man-pages-posix + iproute2 + silver-searcher + ripgrep + ]) ++ + (if (config.monorepo.vars.fileSystem == "btrfs") then with pkgs; [ + btrfs-progs + btrfs-snap + btrfs-list + btrfs-heatmap + ] else [])); + + boot.loader.grub = lib.mkIf config.monorepo.profiles.grub.enable { + enable = true; + }; - assertions = [ - { - assertion = !(config.monorepo.profiles.workstation.enable && config.monorepo.profiles.server.enable); - message = '' + assertions = [ + { + assertion = !(config.monorepo.profiles.workstation.enable && config.monorepo.profiles.server.enable); + message = '' You can't enable both workstation and server profile together. Please select only one. ''; - } - { - assertion = !(config.monorepo.profiles.desktop.enable && config.monorepo.profiles.server.enable); - message = '' + } + { + assertion = !(config.monorepo.profiles.desktop.enable && config.monorepo.profiles.server.enable); + message = '' You can't enable both desktop and server profile together. Please select only one. ''; - } - ]; - monorepo = { - profiles = { - desktop.enable = lib.mkDefault config.monorepo.profiles.workstation.enable; - documentation.enable = lib.mkDefault true; - pipewire.enable = lib.mkDefault true; - tor.enable = lib.mkDefault true; - impermanence.enable = lib.mkDefault false; - server.enable = lib.mkDefault false; - ttyonly.enable = lib.mkDefault config.monorepo.profiles.server.enable; - home.enable = lib.mkDefault config.monorepo.profiles.desktop.enable; - }; + } + ]; + monorepo = { + profiles = { + desktop.enable = lib.mkDefault config.monorepo.profiles.workstation.enable; + documentation.enable = lib.mkDefault true; + pipewire.enable = lib.mkDefault true; + tor.enable = lib.mkDefault true; + impermanence.enable = lib.mkDefault false; + server.enable = lib.mkDefault false; + ttyonly.enable = lib.mkDefault config.monorepo.profiles.server.enable; + home.enable = lib.mkDefault config.monorepo.profiles.desktop.enable; }; }; - } + }; +} #+end_src ** Secrets This uses sops in order to declaratively create the secrets on my system by unencrypting the yaml file specified. Yes, this is safe to include in the repo. TODO clean up secrets, move them to relevant places. #+begin_src nix :tangle ../nix/modules/secrets.nix - { config, ... }: - { - sops = { - defaultSopsFile = if config.monorepo.profiles.server.enable - then ../secrets/vps_secrets.yaml - else ../secrets/secrets.yaml; +{ config, ... }: +{ + sops = { + defaultSopsFile = if config.monorepo.profiles.server.enable + then ../secrets/vps_secrets.yaml + else ../secrets/secrets.yaml; - templates = if config.monorepo.profiles.server.enable then { - "matterbridge" = { - owner = "matterbridge"; - content = '' + templates = if config.monorepo.profiles.server.enable then { + "matterbridge" = { + owner = "matterbridge"; + content = '' [irc.myirc] Server="127.0.0.1:6667" Nick="bridge" @@ -777,254 +778,254 @@ to relevant places. account="telegram.mytelegram" channel="-5290629325" ''; - }; - } else {}; - - age = { - keyFile = "/home/${config.monorepo.vars.userName}/.config/sops/age/keys.txt"; }; + } else {}; - secrets = if config.monorepo.profiles.desktop.enable then { - mail = { - format = "yaml"; - }; - cloudflare-dns = { - format = "yaml"; - }; - digikey = { - format = "yaml"; - }; - dn42 = { - format = "yaml"; - }; - } else { - znc = { - format = "yaml"; - }; + age = { + keyFile = "/home/${config.monorepo.vars.userName}/.config/sops/age/keys.txt"; + }; - znc_password_salt = { - format = "yaml"; - }; + secrets = if config.monorepo.profiles.desktop.enable then { + mail = { + format = "yaml"; + }; + cloudflare-dns = { + format = "yaml"; + }; + digikey = { + format = "yaml"; + }; + dn42 = { + format = "yaml"; + }; + } else { + znc = { + format = "yaml"; + }; - znc_password_hash = { - format = "yaml"; - }; + znc_password_salt = { + format = "yaml"; + }; - matrix_bridge = { - format = "yaml"; - }; + znc_password_hash = { + format = "yaml"; + }; - mail_password = { - format = "yaml"; - owner = "maddy"; - }; + matrix_bridge = { + format = "yaml"; + }; - mail_monorepo_password_pi = { - format = "yaml"; - owner = "public-inbox"; - }; + mail_password = { + format = "yaml"; + owner = "maddy"; + }; - mautrix_env = { - format = "yaml"; - }; + mail_monorepo_password_pi = { + format = "yaml"; + owner = "public-inbox"; + }; - telegram_token = { - format = "yaml"; - }; + mautrix_env = { + format = "yaml"; + }; - discord_token = { - format = "yaml"; - }; + telegram_token = { + format = "yaml"; + }; - mpd_password = { - format = "yaml"; - owner = "nginx"; - }; + discord_token = { + format = "yaml"; + }; + + mpd_password = { + format = "yaml"; + owner = "nginx"; }; }; - } + }; +} #+end_src ** X11 My Xorg configuration is used as a backup for when wayland applications don't work. Note that using this configuration is extremely inefficient and my i3 configuration is unoptimized. Still, it is suitable for using Krita. #+begin_src nix :tangle ../nix/modules/xserver.nix - { config, ... }: - { - services.xserver = { - enable = (! config.monorepo.profiles.ttyonly.enable); - displayManager = { - startx.enable = (! config.monorepo.profiles.ttyonly.enable); - }; - - desktopManager = { - runXdgAutostartIfNone = true; - }; +{ config, ... }: +{ + services.xserver = { + enable = (! config.monorepo.profiles.ttyonly.enable); + displayManager = { + startx.enable = (! config.monorepo.profiles.ttyonly.enable); + }; - videoDrivers = (if config.monorepo.profiles.cuda.enable then [ "nvidia" ] else []); + desktopManager = { + runXdgAutostartIfNone = true; }; - } + + videoDrivers = (if config.monorepo.profiles.cuda.enable then [ "nvidia" ] else []); + }; +} #+end_src You should add your own video drivers in a custom machine configuration. ** Containers In order to run docker/podman containers, I need this file: #+begin_src nix :tangle ../nix/modules/docker.nix - { lib, ... }: - { - virtualisation = { - oci-containers = { - backend = "podman"; - containers = {}; - }; - containers.enable = lib.mkDefault false; - podman = { - enable = lib.mkDefault false; - dockerCompat = true; - defaultNetwork.settings.dns_enabled = true; - }; +{ lib, ... }: +{ + virtualisation = { + oci-containers = { + backend = "podman"; + containers = {}; }; - } + containers.enable = lib.mkDefault false; + podman = { + enable = lib.mkDefault false; + dockerCompat = true; + defaultNetwork.settings.dns_enabled = true; + }; + }; +} #+end_src ** Pipewire My low latency pipewire configuration is used for music production, as well as for regular desktop usage. Pipewire is much better than pulseaudio because it supports jack with the same underlying interface and it breaks significantly less often. #+begin_src nix :tangle ../nix/modules/pipewire.nix - { lib, config, ... }: - { - services.pipewire = { +{ lib, config, ... }: +{ + services.pipewire = { + enable = lib.mkDefault config.monorepo.profiles.pipewire.enable; + alsa = { enable = lib.mkDefault config.monorepo.profiles.pipewire.enable; - alsa = { - enable = lib.mkDefault config.monorepo.profiles.pipewire.enable; - support32Bit = true; - }; - pulse.enable = lib.mkDefault config.monorepo.profiles.pipewire.enable; - jack.enable = lib.mkDefault config.monorepo.profiles.pipewire.enable; - wireplumber.enable = lib.mkDefault config.monorepo.profiles.pipewire.enable; - extraConfig = { - pipewire."92-low-latency" = { - "context.properties" = { - "default.clock.rate" = 48000; - "default.clock.quantum" = 512; - "default.clock.min-quantum" = 512; - "default.clock.max-quantum" = 1024; + support32Bit = true; + }; + pulse.enable = lib.mkDefault config.monorepo.profiles.pipewire.enable; + jack.enable = lib.mkDefault config.monorepo.profiles.pipewire.enable; + wireplumber.enable = lib.mkDefault config.monorepo.profiles.pipewire.enable; + extraConfig = { + pipewire."92-low-latency" = { + "context.properties" = { + "default.clock.rate" = 48000; + "default.clock.quantum" = 512; + "default.clock.min-quantum" = 512; + "default.clock.max-quantum" = 1024; + }; + pipewire-pulse."92-low-latency" = { + "context.properties" = [ + { + name = "libpipewire-module-protocol-pulse"; + args = { }; + } + ]; + "pulse.properties" = { + "pulse.min.req" = "32/48000"; + "pulse.default.req" = "32/48000"; + "pulse.max.req" = "32/48000"; + "pulse.min.quantum" = "32/48000"; + "pulse.max.quantum" = "32/48000"; }; - pipewire-pulse."92-low-latency" = { - "context.properties" = [ - { - name = "libpipewire-module-protocol-pulse"; - args = { }; - } - ]; - "pulse.properties" = { - "pulse.min.req" = "32/48000"; - "pulse.default.req" = "32/48000"; - "pulse.max.req" = "32/48000"; - "pulse.min.quantum" = "32/48000"; - "pulse.max.quantum" = "32/48000"; - }; - "stream.properties" = { - "node.latency" = "32/48000"; - "resample.quality" = 1; - }; + "stream.properties" = { + "node.latency" = "32/48000"; + "resample.quality" = 1; }; }; }; }; - } + }; +} #+end_src ** SSH My SSH daemon configuration. #+begin_src nix :tangle ../nix/modules/ssh.nix - { config, lib, ... }: - { - services.openssh = { - enable = true; - settings = { - PasswordAuthentication = false; - AllowUsers = [ config.monorepo.vars.userName "git" ]; - PermitRootLogin = "no"; - KbdInteractiveAuthentication = false; - }; +{ config, lib, ... }: +{ + services.openssh = { + enable = true; + settings = { + PasswordAuthentication = false; + AllowUsers = [ config.monorepo.vars.userName "git" ]; + PermitRootLogin = "no"; + KbdInteractiveAuthentication = false; }; - networking.firewall.allowedTCPPorts = lib.mkIf config.services.openssh.enable [ 22 ]; - } + }; + networking.firewall.allowedTCPPorts = lib.mkIf config.services.openssh.enable [ 22 ]; +} #+end_src ** Tor This is my tor configuration, used for my cryptocurrency wallets and whatever else I want it to do. #+begin_src nix :tangle ../nix/modules/tor.nix - { config, lib, ... }: - { - services.tor = { +{ config, lib, ... }: +{ + services.tor = { + enable = lib.mkDefault config.monorepo.profiles.tor.enable; + openFirewall = true; + client = { enable = lib.mkDefault config.monorepo.profiles.tor.enable; - openFirewall = true; - client = { - enable = lib.mkDefault config.monorepo.profiles.tor.enable; - socksListenAddress = { - IsolateDestAddr = true; - addr = "127.0.0.1"; - port = 9050; - }; - dns.enable = true; - }; - torsocks = { - enable = lib.mkDefault config.monorepo.profiles.tor.enable; - server = "127.0.0.1:9050"; + socksListenAddress = { + IsolateDestAddr = true; + addr = "127.0.0.1"; + port = 9050; }; + dns.enable = true; }; - } + torsocks = { + enable = lib.mkDefault config.monorepo.profiles.tor.enable; + server = "127.0.0.1:9050"; + }; + }; +} #+end_src ** Kubo IPFS I use IPFS for my website and also for my ISOs for truly declarative and deterministic configuration. NixOS might be moving to IPFS for binary cache distribution and package distribution soon, and I'm waiting on that. #+begin_src nix :tangle ../nix/modules/kubo.nix - { config, lib, ... }: - { - services.kubo = { - enable = lib.mkDefault config.monorepo.profiles.workstation.enable; - autoMount = false; - enableGC = true; - settings = { - Addresses.API = [ - "/ip4/127.0.0.1/tcp/5001" - ]; - Bootstrap = [ - "/ip4/128.199.219.111/tcp/4001/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu" - "/ip4/162.243.248.213/tcp/4001/ipfs/QmSoLueR4xBeUbY9WZ9xGUUxunbKWcrNFTDAadQJmocnWm" - ]; - Datastore = { - StorageMax = "20GB"; - }; +{ config, lib, ... }: +{ + services.kubo = { + enable = lib.mkDefault config.monorepo.profiles.workstation.enable; + autoMount = false; + enableGC = true; + settings = { + Addresses.API = [ + "/ip4/127.0.0.1/tcp/5001" + ]; + Bootstrap = [ + "/ip4/128.199.219.111/tcp/4001/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu" + "/ip4/162.243.248.213/tcp/4001/ipfs/QmSoLueR4xBeUbY9WZ9xGUUxunbKWcrNFTDAadQJmocnWm" + ]; + Datastore = { + StorageMax = "20GB"; }; }; - } + }; +} #+end_src ** TODO i2pd I use i2p for some p2p connections. We enable it with the server profile: #+begin_src nix :tangle ../nix/modules/i2pd.nix - { lib, ... }: - { - services.i2pd = { - enable = lib.mkDefault false; - address = "0.0.0.0"; - inTunnels = { - }; - outTunnels = { - }; +{ lib, ... }: +{ + services.i2pd = { + enable = lib.mkDefault false; + address = "0.0.0.0"; + inTunnels = { }; - } + outTunnels = { + }; + }; +} #+end_src ** TODO Icecast This is an internet radio which will host a ton of music. #+begin_src nix :tangle ../nix/modules/icecast.nix - { lib, ... }: - { - services.icecast = { - enable = lib.mkDefault false; - listen.address = "0.0.0.0"; - extraConfig = '' +{ lib, ... }: +{ + services.icecast = { + enable = lib.mkDefault false; + listen.address = "0.0.0.0"; + extraConfig = '' 0 /stream.m3u @@ -1037,8 +1038,8 @@ This is an internet radio which will host a ton of music. ''; - }; - } + }; +} #+end_src ** IRC A great protocol. It's the most widely usable by any netizen, as it is @@ -1046,95 +1047,95 @@ just pure plaintext and the operating costs are trivial. *** NgIRCD I run my own IRC server to bridge with my Matrix server and my discord guild. #+begin_src nix :tangle ../nix/modules/ngircd.nix - { lib, config, ... }: - { - services.ngircd = { - enable = lib.mkDefault config.monorepo.profiles.server.enable; - config = '' +{ lib, config, ... }: +{ + services.ngircd = { + enable = lib.mkDefault config.monorepo.profiles.server.enable; + config = '' [Global] - Name = ${config.monorepo.vars.orgHost} - Info = NullRing IRC Instance + Name = ${config.monorepo.vars.orgHost} + Info = NullRing IRC Instance Listen = ::,0.0.0.0 MotdFile = /etc/motd.txt - Network = NullRing - Ports = 6667 + Network = NullRing + Ports = 6667 [Options] - PAM = no + PAM = no [SSL] - CertFile = /var/lib/acme/${config.monorepo.vars.orgHost}/fullchain.pem - CipherList = HIGH:!aNULL:@STRENGTH:!SSLv3 - KeyFile = /var/lib/acme/${config.monorepo.vars.orgHost}/key.pem - Ports = 6697 + CertFile = /var/lib/acme/${config.monorepo.vars.orgHost}/fullchain.pem + CipherList = HIGH:!aNULL:@STRENGTH:!SSLv3 + KeyFile = /var/lib/acme/${config.monorepo.vars.orgHost}/key.pem + Ports = 6697 ''; - }; + }; - environment.etc."motd.txt" = { - source = ../data/motd.txt; - mode = "644"; - user = "ngircd"; - group = "ngircd"; - }; + environment.etc."motd.txt" = { + source = ../data/motd.txt; + mode = "644"; + user = "ngircd"; + group = "ngircd"; + }; - networking.firewall.allowedTCPPorts = if (config.services.ngircd.enable == true) then [ - 6697 - 6667 - ] else []; - } + networking.firewall.allowedTCPPorts = if (config.services.ngircd.enable == true) then [ + 6697 + 6667 + ] else []; +} #+end_src *** MOTD I also have a MOTD file that I want to add, which displays when users connect to the server: #+begin_src fundamental :tangle ../nix/data/motd.txt - Welcome to the NullRing experience! - The main channel is #nullring; we're glad to have you! - - Rules: - 1. Don't be annoying. - 2. No illegal content. - And if you're here to have constructive, philisophical and theoretical - conversations, this is the place for you! +Welcome to the NullRing experience! +The main channel is #nullring; we're glad to have you! + +Rules: +1. Don't be annoying. +2. No illegal content. +And if you're here to have constructive, philisophical and theoretical +conversations, this is the place for you! #+end_src *** ZNC I want to be able to create some sort of identity persistence on IRC for users: #+begin_src nix :tangle ../nix/modules/znc.nix - { lib, config, ... }: - { - services.znc = { - enable = lib.mkDefault config.monorepo.profiles.server.enable; - openFirewall = true; - confOptions = { - useSSL = true; - passBlock = '' +{ lib, config, ... }: +{ + services.znc = { + enable = lib.mkDefault config.monorepo.profiles.server.enable; + openFirewall = true; + confOptions = { + useSSL = true; + passBlock = '' Method = sha256 Hash = d4abdd69aa24de69693885c5bd83a4a0e9ee989e1a69a905041b0dad9abc06ea Salt = sDY,?H5AxC-!gH3a.:)D ''; - modules = [ - "partyline" - "webadmin" - "adminlog" - "log" - ]; - networks = { - "libera" = { - server = "irc.libera.chat"; - port = 6697; - useSSL = true; - modules = [ "simple_away" ]; - }; - "nullring" = { - server = "${config.monorepo.vars.orgHost}"; - port = 6697; - useSSL = true; - modules = [ "simple_away" "log" ]; - }; + modules = [ + "partyline" + "webadmin" + "adminlog" + "log" + ]; + networks = { + "libera" = { + server = "irc.libera.chat"; + port = 6697; + useSSL = true; + modules = [ "simple_away" ]; + }; + "nullring" = { + server = "${config.monorepo.vars.orgHost}"; + port = 6697; + useSSL = true; + modules = [ "simple_away" "log" ]; }; }; }; - } + }; +} #+end_src Note that the password hash and whatnot is completely random so there is almost no point to cracking it with hashcat. @@ -1143,182 +1144,182 @@ This is a modern matrix server that is meant to be lightweight while still federating and hosting the same protocol. There is also a configuration for lk-jwt and livekit which is important for configuring p2p calls in matrix. #+begin_src nix :tangle ../nix/modules/conduit.nix - { config, lib, ... }: - let - livekitListenPort = 8443; - # secrets.yaml - livekit_secret = "livekit_secret"; - conduit_secret = "conduit_secrets"; - in - { - sops.secrets = lib.mkIf config.services.matrix-conduit.enable { - "${livekit_secret}" = lib.mkIf config.services.livekit.enable { - format = "yaml"; - mode = "0444"; - }; - - "${conduit_secret}" = { - format = "yaml"; - }; +{ config, lib, ... }: +let + livekitListenPort = 8443; + # secrets.yaml + livekit_secret = "livekit_secret"; + conduit_secret = "conduit_secrets"; +in +{ + sops.secrets = lib.mkIf config.services.matrix-conduit.enable { + "${livekit_secret}" = lib.mkIf config.services.livekit.enable { + format = "yaml"; + mode = "0444"; }; - services.matrix-conduit = { - enable = lib.mkDefault config.monorepo.profiles.server.enable; - secretFile = "/run/secrets/${conduit_secret}"; - settings.global = { - server_name = "matrix.${config.monorepo.vars.orgHost}"; - trusted_servers = [ - "matrix.org" - "nixos.org" - "conduit.rs" - ]; - address = "0.0.0.0"; - port = 6167; - allow_registration = false; - }; + "${conduit_secret}" = { + format = "yaml"; }; + }; + services.matrix-conduit = { + enable = lib.mkDefault config.monorepo.profiles.server.enable; + secretFile = "/run/secrets/${conduit_secret}"; + settings.global = { + server_name = "matrix.${config.monorepo.vars.orgHost}"; + trusted_servers = [ + "matrix.org" + "nixos.org" + "conduit.rs" + ]; + address = "0.0.0.0"; + port = 6167; + allow_registration = false; + }; + }; - services.livekit = { - enable = lib.mkDefault (config.services.matrix-conduit.enable || config.services.matrix-synapse.enable); - keyFile = "/run/secrets/${livekit_secret}"; - settings = { - port = 7880; - turn = { - enabled = true; - domain = "livekit.${config.monorepo.vars.orgHost}"; - cert_file = "/var/lib/acme/livekit.${config.monorepo.vars.orgHost}/fullchain.pem"; - key_file = "/var/lib/acme/livekit.${config.monorepo.vars.orgHost}/key.pem"; - tls_port = 5349; - udp_port = 3478; - }; - rtc = { - use_external_ip = true; - tcp_port = 7881; - udp_port = 7882; - port_range_start = 50000; - port_range_end = 60000; - }; + services.livekit = { + enable = lib.mkDefault (config.services.matrix-conduit.enable || config.services.matrix-synapse.enable); + keyFile = "/run/secrets/${livekit_secret}"; + settings = { + port = 7880; + turn = { + enabled = true; + domain = "livekit.${config.monorepo.vars.orgHost}"; + cert_file = "/var/lib/acme/livekit.${config.monorepo.vars.orgHost}/fullchain.pem"; + key_file = "/var/lib/acme/livekit.${config.monorepo.vars.orgHost}/key.pem"; + tls_port = 5349; + udp_port = 3478; + }; + + rtc = { + use_external_ip = true; + tcp_port = 7881; + udp_port = 7882; + port_range_start = 50000; + port_range_end = 60000; }; }; + }; - services.lk-jwt-service = { - enable = lib.mkDefault config.services.livekit.enable; - port = 6495; - livekitUrl = "wss://livekit.${config.monorepo.vars.orgHost}"; - keyFile = "/run/secrets/${livekit_secret}"; - }; + services.lk-jwt-service = { + enable = lib.mkDefault config.services.livekit.enable; + port = 6495; + livekitUrl = "wss://livekit.${config.monorepo.vars.orgHost}"; + keyFile = "/run/secrets/${livekit_secret}"; + }; - # TODO: split into conduit and livekit - networking.firewall.allowedTCPPorts = lib.mkIf config.services.matrix-conduit.enable [ 8448 7881 5349 livekitListenPort ]; + # TODO: split into conduit and livekit + networking.firewall.allowedTCPPorts = lib.mkIf config.services.matrix-conduit.enable [ 8448 7881 5349 livekitListenPort ]; - # this is fine though - networking.firewall.allowedUDPPorts = lib.mkIf config.services.livekit.enable [ 7882 3478 ]; - networking.firewall.allowedUDPPortRanges = lib.mkIf config.services.livekit.enable [ - { from = 49152; to = 65535; } - ]; + # this is fine though + networking.firewall.allowedUDPPorts = lib.mkIf config.services.livekit.enable [ 7882 3478 ]; + networking.firewall.allowedUDPPortRanges = lib.mkIf config.services.livekit.enable [ + { from = 49152; to = 65535; } + ]; - networking.domains.subDomains."matrix.${config.monorepo.vars.orgHost}" = lib.mkIf config.services.matrix-conduit.enable {}; - networking.domains.subDomains."livekit.${config.monorepo.vars.orgHost}" = lib.mkIf config.services.livekit.enable {}; + networking.domains.subDomains."matrix.${config.monorepo.vars.orgHost}" = lib.mkIf config.services.matrix-conduit.enable {}; + networking.domains.subDomains."livekit.${config.monorepo.vars.orgHost}" = lib.mkIf config.services.livekit.enable {}; - services.nginx.virtualHosts."matrix.${config.monorepo.vars.orgHost}" = lib.mkIf config.services.matrix-conduit.enable { - enableACME = lib.mkDefault config.monorepo.profiles.server.enable; - forceSSL = true; - listen = [ - { - addr = "0.0.0.0"; - port = 443; - ssl = true; - } - { - addr = "[::]"; - port = 443; - ssl = true; - } - { - addr = "0.0.0.0"; - port = 8448; - ssl = true; - } - { - addr = "[::]"; - port = 8448; - ssl = true; - } - ]; - locations."/_matrix/" = { - proxyPass = "http://127.0.0.1:${toString config.services.matrix-conduit.settings.global.port}"; - extraConfig = '' + services.nginx.virtualHosts."matrix.${config.monorepo.vars.orgHost}" = lib.mkIf config.services.matrix-conduit.enable { + enableACME = lib.mkDefault config.monorepo.profiles.server.enable; + forceSSL = true; + listen = [ + { + addr = "0.0.0.0"; + port = 443; + ssl = true; + } + { + addr = "[::]"; + port = 443; + ssl = true; + } + { + addr = "0.0.0.0"; + port = 8448; + ssl = true; + } + { + addr = "[::]"; + port = 8448; + ssl = true; + } + ]; + locations."/_matrix/" = { + proxyPass = "http://127.0.0.1:${toString config.services.matrix-conduit.settings.global.port}"; + extraConfig = '' proxy_set_header Host $host; proxy_buffers 32 16k; proxy_read_timeout 5m; ''; - }; + }; - locations."= /.well-known/matrix/server" = { - extraConfig = '' + locations."= /.well-known/matrix/server" = { + extraConfig = '' default_type application/json; add_header Content-Type application/json; add_header Access-Control-Allow-Origin *; ''; - - return = ''200 '{"m.server": "matrix.${config.monorepo.vars.orgHost}:443"}' ''; - }; + + return = ''200 '{"m.server": "matrix.${config.monorepo.vars.orgHost}:443"}' ''; + }; - locations."/.well-known/matrix/client" = { - extraConfig = '' + locations."/.well-known/matrix/client" = { + extraConfig = '' default_type application/json; add_header Access-Control-Allow-Origin *; ''; - return = "200 '{\"m.homeserver\": {\"base_url\": \"https://matrix.${config.monorepo.vars.orgHost}\"}, \"org.matrix.msc4143.rtc_foci\": [{\"type\": \"livekit\", \"livekit_service_url\": \"https://matrix.${config.monorepo.vars.orgHost}:${toString livekitListenPort}\"}]}'"; - }; + return = "200 '{\"m.homeserver\": {\"base_url\": \"https://matrix.${config.monorepo.vars.orgHost}\"}, \"org.matrix.msc4143.rtc_foci\": [{\"type\": \"livekit\", \"livekit_service_url\": \"https://matrix.${config.monorepo.vars.orgHost}:${toString livekitListenPort}\"}]}'"; + }; - extraConfig = '' + extraConfig = '' merge_slashes off; ''; - }; + }; - services.nginx.virtualHosts."matrix.${config.monorepo.vars.orgHost}-livekit" = lib.mkIf config.services.livekit.enable { - serverName = "matrix.${config.monorepo.vars.orgHost}"; - listen = [ - { - addr = "0.0.0.0"; - port = livekitListenPort; - ssl = true; - } - { - addr = "[::]"; - port = livekitListenPort; - ssl = true; - } - ]; - addSSL = true; - enableACME = false; - forceSSL = false; - useACMEHost = "matrix.${config.monorepo.vars.orgHost}"; - - locations."/" = { - proxyPass = "http://127.0.0.1:${toString config.services.lk-jwt-service.port}"; - proxyWebsockets = true; - extraConfig = '' + services.nginx.virtualHosts."matrix.${config.monorepo.vars.orgHost}-livekit" = lib.mkIf config.services.livekit.enable { + serverName = "matrix.${config.monorepo.vars.orgHost}"; + listen = [ + { + addr = "0.0.0.0"; + port = livekitListenPort; + ssl = true; + } + { + addr = "[::]"; + port = livekitListenPort; + ssl = true; + } + ]; + addSSL = true; + enableACME = false; + forceSSL = false; + useACMEHost = "matrix.${config.monorepo.vars.orgHost}"; + + locations."/" = { + proxyPass = "http://127.0.0.1:${toString config.services.lk-jwt-service.port}"; + proxyWebsockets = true; + extraConfig = '' proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; ''; - }; }; + }; - services.nginx.virtualHosts."livekit.${config.monorepo.vars.orgHost}" = lib.mkIf config.services.livekit.enable { - enableACME = true; - forceSSL = true; - locations."/" = { - proxyPass = "http://127.0.0.1:${toString config.services.livekit.settings.port}"; - proxyWebsockets = true; - extraConfig = '' + services.nginx.virtualHosts."livekit.${config.monorepo.vars.orgHost}" = lib.mkIf config.services.livekit.enable { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:${toString config.services.livekit.settings.port}"; + proxyWebsockets = true; + extraConfig = '' proxy_read_timeout 3600s; proxy_send_timeout 3600s; @@ -1352,302 +1353,302 @@ for lk-jwt and livekit which is important for configuring p2p calls in matrix. } # --- CORS CONFIGURATION END --- ''; - }; }; - } + }; +} #+end_src ** TODO GoToSocial This is a basic ActivityPub server. #+begin_src nix :tangle ../nix/modules/gotosocial.nix - { lib, config, ... }: - { - services.gotosocial = { - enable = lib.mkDefault false; - setupPostgresqlDB = true; - settings = { - application-name = "Nullring GoToSocial Instance"; - host = "gotosocial.${config.monorepo.vars.orgHost}"; - protocol = "https"; - bind-address = "127.0.0.1"; - port = 8080; - }; +{ lib, config, ... }: +{ + services.gotosocial = { + enable = lib.mkDefault false; + setupPostgresqlDB = true; + settings = { + application-name = "Nullring GoToSocial Instance"; + host = "gotosocial.${config.monorepo.vars.orgHost}"; + protocol = "https"; + bind-address = "127.0.0.1"; + port = 8080; }; - } + }; +} #+end_src ** TODO matrix-appservice-irc #+begin_src nix :tangle ../nix/modules/matrix-appservice-irc.nix - { ... }: - { - # enable = lib.mkDefault config.monorepo.profiles.server.enable; - # registrationUrl = "localhost"; +{ ... }: +{ + # enable = lib.mkDefault config.monorepo.profiles.server.enable; + # registrationUrl = "localhost"; - # settings = { - # homeserver.url = "https://matrix.nullring.xyz"; - # homserver.domain = "matrix.nullring.xyz"; - # }; - } + # settings = { + # homeserver.url = "https://matrix.nullring.xyz"; + # homserver.domain = "matrix.nullring.xyz"; + # }; +} #+end_src ** Gitolite #+begin_src nix :tangle ../nix/modules/gitolite.nix - { lib, config, ... }: - { - services.gitolite = { - enable = lib.mkDefault config.monorepo.profiles.server.enable; - description = "My Gitolite User"; - adminPubkey = config.monorepo.vars.sshKey; - }; - } +{ lib, config, ... }: +{ + services.gitolite = { + enable = lib.mkDefault config.monorepo.profiles.server.enable; + description = "My Gitolite User"; + adminPubkey = config.monorepo.vars.sshKey; + }; +} #+end_src ** Matterbridge I want to connect IRC to discord with matterbridge. #+begin_src nix :tangle ../nix/modules/matterbridge.nix - { lib, config, ... }: - { - services.matterbridge = { - enable = lib.mkDefault config.monorepo.profiles.server.enable; - configPath = "${config.sops.templates.matterbridge.path}"; - }; - } +{ lib, config, ... }: +{ + services.matterbridge = { + enable = lib.mkDefault config.monorepo.profiles.server.enable; + configPath = "${config.sops.templates.matterbridge.path}"; + }; +} #+end_src *** Mautrix I use this bridge to bridge myself from Matrix to Discord and vise versa, because Matterbridge is not maintained very well and therefore does not support conduit at the moment. Note that this is not fully declarative and requires that you add ~/var/lib/mautrix-discord/discord-registration.yaml~ as an appservice to conduit. #+begin_src nix :tangle ../nix/modules/mautrix.nix - { lib, config, ... }: - { - services.mautrix-discord = { - enable = lib.mkDefault config.monorepo.profiles.server.enable; - environmentFile = "/run/secrets/mautrix_env"; - settings = { - bridge = { - animated_sticker = { - args = { - fps = 25; - height = 320; - width = 320; - }; - target = "webp"; - }; - autojoin_thread_on_open = true; - avatar_proxy_key = "generate"; - backfill = { - forward_limits = { - initial = { - channel = 0; - dm = 0; - thread = 0; - }; - max_guild_members = -1; - missed = { - channel = 0; - dm = 0; - thread = 0; - }; - }; - }; - cache_media = "unencrypted"; - channel_name_template = "{{if or (eq .Type 3) (eq .Type 4)}}{{.Name}}{{else}}#{{.Name}}{{end}}"; - command_prefix = "!discord"; - custom_emoji_reactions = true; - delete_guild_on_leave = true; - delete_portal_on_channel_delete = false; - delivery_receipts = false; - direct_media = { - allow_proxy = true; - enabled = false; - server_key = "generate"; +{ lib, config, ... }: +{ + services.mautrix-discord = { + enable = lib.mkDefault config.monorepo.profiles.server.enable; + environmentFile = "/run/secrets/mautrix_env"; + settings = { + bridge = { + animated_sticker = { + args = { + fps = 25; + height = 320; + width = 320; }; - displayname_template = "{{if .Webhook}}Webhook{{else}}{{or .GlobalName .Username}}{{if .Bot}} (bot){{end}}{{end}}"; - double_puppet_allow_discovery = true; - double_puppet_server_map = { }; - embed_fields_as_tables = true; - enable_webhook_avatars = true; - encryption = { - allow = false; - allow_key_sharing = false; - appservice = false; - default = false; - delete_keys = { - delete_fully_used_on_decrypt = false; - delete_on_device_delete = false; - delete_outbound_on_ack = false; - delete_outdated_inbound = false; - delete_prev_on_new_session = false; - dont_store_outbound = false; - periodically_delete_expired = false; - ratchet_on_decrypt = false; - }; - msc4190 = false; - plaintext_mentions = false; - require = false; - rotation = { - disable_device_change_key_rotation = false; - enable_custom = false; - messages = 100; - milliseconds = 604800000; + target = "webp"; + }; + autojoin_thread_on_open = true; + avatar_proxy_key = "generate"; + backfill = { + forward_limits = { + initial = { + channel = 0; + dm = 0; + thread = 0; }; - verification_levels = { - receive = "unverified"; - send = "unverified"; - share = "cross-signed-tofu"; + max_guild_members = -1; + missed = { + channel = 0; + dm = 0; + thread = 0; }; }; - federate_rooms = true; - guild_name_template = "{{.Name}}"; - login_shared_secret_map = { }; - management_room_text = { - additional_help = ""; - welcome = "Hello, I'm a Discord bridge bot."; - welcome_connected = "Use `help` for help."; - welcome_unconnected = "Use `help` for help or `login` to log in."; + }; + cache_media = "unencrypted"; + channel_name_template = "{{if or (eq .Type 3) (eq .Type 4)}}{{.Name}}{{else}}#{{.Name}}{{end}}"; + command_prefix = "!discord"; + custom_emoji_reactions = true; + delete_guild_on_leave = true; + delete_portal_on_channel_delete = false; + delivery_receipts = false; + direct_media = { + allow_proxy = true; + enabled = false; + server_key = "generate"; + }; + displayname_template = "{{if .Webhook}}Webhook{{else}}{{or .GlobalName .Username}}{{if .Bot}} (bot){{end}}{{end}}"; + double_puppet_allow_discovery = true; + double_puppet_server_map = { }; + embed_fields_as_tables = true; + enable_webhook_avatars = true; + encryption = { + allow = false; + allow_key_sharing = false; + appservice = false; + default = false; + delete_keys = { + delete_fully_used_on_decrypt = false; + delete_on_device_delete = false; + delete_outbound_on_ack = false; + delete_outdated_inbound = false; + delete_prev_on_new_session = false; + dont_store_outbound = false; + periodically_delete_expired = false; + ratchet_on_decrypt = false; }; - message_error_notices = true; - message_status_events = false; - mute_channels_on_create = false; - permissions = { - "@${config.monorepo.vars.internetName}:matrix.${config.monorepo.vars.orgHost}" = "admin"; - "*" = "user"; + msc4190 = false; + plaintext_mentions = false; + require = false; + rotation = { + disable_device_change_key_rotation = false; + enable_custom = false; + messages = 100; + milliseconds = 604800000; }; - portal_message_buffer = 128; - prefix_webhook_messages = true; - private_chat_portal_meta = "default"; - provisioning = { - debug_endpoints = false; - prefix = "/_matrix/provision"; - shared_secret = "generate"; + verification_levels = { + receive = "unverified"; + send = "unverified"; + share = "cross-signed-tofu"; }; - public_address = null; - resend_bridge_info = false; - restricted_rooms = false; - startup_private_channel_create_limit = 5; - sync_direct_chat_list = false; - use_discord_cdn_upload = true; - username_template = "discord_{{.}}"; }; - - appservice = { - address = "http://localhost:29334"; - hostname = "0.0.0.0"; - port = 29334; - id = "discord"; - bot = { - username = "discordbot"; - displayname = "Discord bridge bot"; - avatar = "mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC"; - }; - ephemeral_events = true; - async_transactions = false; - database = { - type = "sqlite3"; - uri = "file:${config.services.mautrix-discord.dataDir}/mautrix-discord.db?_txlock=immediate"; - max_open_conns = 20; - max_idle_conns = 2; - max_conn_idle_time = null; - max_conn_lifetime = null; - }; - as_token = "$MAUTRIX_DISCORD_APPSERVICE_AS_TOKEN"; - hs_token = "$MAUTRIX_DISCORD_APPSERVICE_HS_TOKEN"; + federate_rooms = true; + guild_name_template = "{{.Name}}"; + login_shared_secret_map = { }; + management_room_text = { + additional_help = ""; + welcome = "Hello, I'm a Discord bridge bot."; + welcome_connected = "Use `help` for help."; + welcome_unconnected = "Use `help` for help or `login` to log in."; }; - - dataDir = "/var/lib/mautrix-discord"; - homeserver = { - async_media = false; - message_send_checkpoint_endpoint = null; - ping_interval_seconds = 0; - software = "standard"; - status_endpoint = null; - websocket = false; - domain = "matrix.${config.monorepo.vars.orgHost}"; - address = "http://localhost:6167"; + message_error_notices = true; + message_status_events = false; + mute_channels_on_create = false; + permissions = { + "@${config.monorepo.vars.internetName}:matrix.${config.monorepo.vars.orgHost}" = "admin"; + "*" = "user"; }; + portal_message_buffer = 128; + prefix_webhook_messages = true; + private_chat_portal_meta = "default"; + provisioning = { + debug_endpoints = false; + prefix = "/_matrix/provision"; + shared_secret = "generate"; + }; + public_address = null; + resend_bridge_info = false; + restricted_rooms = false; + startup_private_channel_create_limit = 5; + sync_direct_chat_list = false; + use_discord_cdn_upload = true; + username_template = "discord_{{.}}"; + }; + + appservice = { + address = "http://localhost:29334"; + hostname = "0.0.0.0"; + port = 29334; + id = "discord"; + bot = { + username = "discordbot"; + displayname = "Discord bridge bot"; + avatar = "mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC"; + }; + ephemeral_events = true; + async_transactions = false; + database = { + type = "sqlite3"; + uri = "file:${config.services.mautrix-discord.dataDir}/mautrix-discord.db?_txlock=immediate"; + max_open_conns = 20; + max_idle_conns = 2; + max_conn_idle_time = null; + max_conn_lifetime = null; + }; + as_token = "$MAUTRIX_DISCORD_APPSERVICE_AS_TOKEN"; + hs_token = "$MAUTRIX_DISCORD_APPSERVICE_HS_TOKEN"; + }; + + dataDir = "/var/lib/mautrix-discord"; + homeserver = { + async_media = false; + message_send_checkpoint_endpoint = null; + ping_interval_seconds = 0; + software = "standard"; + status_endpoint = null; + websocket = false; + domain = "matrix.${config.monorepo.vars.orgHost}"; + address = "http://localhost:6167"; }; }; - } + }; +} #+end_src ** Ollama Use ollama for serving large language models to my other computers. #+begin_src nix :tangle ../nix/modules/ollama.nix - { config, lib, pkgs, ... }: - { - # services.open-webui.enable = lib.mkDefault (!config.monorepo.profiles.server.enable); - services.ollama = { - enable = lib.mkDefault config.monorepo.profiles.desktop.enable; - package = if (config.monorepo.profiles.cuda.enable) then pkgs.ollama-cuda else pkgs.ollama-vulkan; - loadModels = if (config.monorepo.profiles.cuda.enable) then [ - "qwen3:30b" - "qwen3-coder:latest" - "qwen2.5-coder:latest" - "gemma3:12b-it-qat" - ] else [ - "qwen3:0.6b" - "qwen2.5-coder:0.5b" - ]; - host = "0.0.0.0"; - openFirewall = true; - }; - } -#+end_src -** Bitcoind -#+begin_src nix :tangle ../nix/modules/bitcoin.nix - { config, lib, ... }: - { - services.bitcoind."${config.monorepo.vars.userName}" = { - enable = lib.mkDefault config.monorepo.profiles.workstation.enable; - prune = 10000; - }; - } +{ config, lib, pkgs, ... }: +{ + # services.open-webui.enable = lib.mkDefault (!config.monorepo.profiles.server.enable); + services.ollama = { + enable = lib.mkDefault config.monorepo.profiles.desktop.enable; + package = if (config.monorepo.profiles.cuda.enable) then pkgs.ollama-cuda else pkgs.ollama-vulkan; + loadModels = if (config.monorepo.profiles.cuda.enable) then [ + "qwen3:30b" + "qwen3-coder:latest" + "qwen2.5-coder:latest" + "gemma3:12b-it-qat" + ] else [ + "qwen3:0.6b" + "qwen2.5-coder:0.5b" + ]; + host = "0.0.0.0"; + openFirewall = true; + }; +} +#+end_src +** Bitcoind +#+begin_src nix :tangle ../nix/modules/bitcoin.nix +{ config, lib, ... }: +{ + services.bitcoind."${config.monorepo.vars.userName}" = { + enable = lib.mkDefault config.monorepo.profiles.workstation.enable; + prune = 10000; + }; +} #+end_src ** Git Server I run my own git server in order to have a mirror in case github goes down. #+begin_src nix :tangle ../nix/modules/git-daemon.nix - { config, lib, ... }: - { - services.gitDaemon = { - enable = lib.mkDefault config.monorepo.profiles.server.enable; - exportAll = true; - basePath = "${config.users.users.git.home}"; - }; - networking.firewall.allowedTCPPorts = lib.mkIf config.services.gitDaemon.enable [ - 9418 - ]; - } +{ config, lib, ... }: +{ + services.gitDaemon = { + enable = lib.mkDefault config.monorepo.profiles.server.enable; + exportAll = true; + basePath = "${config.users.users.git.home}"; + }; + networking.firewall.allowedTCPPorts = lib.mkIf config.services.gitDaemon.enable [ + 9418 + ]; +} #+end_src ** Ntfy I want to have notifications on my phone, and run my own server to do this. #+begin_src nix :tangle ../nix/modules/ntfy-sh.nix - { pkgs, lib, config, ... }: - let - serverName = "${config.monorepo.vars.ntfyUrl}"; - port = 2586; - ntfySecret = config.monorepo.vars.ntfySecret; - in - { - sops.secrets."${ntfySecret}" = lib.mkIf config.services.ntfy-sh.enable { - format = "yaml"; - owner = "ntfy-sh"; - sopsFile = ../secrets/common_secrets.yaml; - }; - - services.ntfy-sh = { - enable = lib.mkDefault config.monorepo.profiles.server.enable; - settings = { - base-url = "https://${serverName}"; - listen-http = "127.0.0.1:${toString port}"; - envrionmentFile = "/run/secrets/${ntfySecret}"; - auth-file = "/var/lib/ntfy-sh/user.db"; - auth-default-access = "deny-all"; - enable-login = true; - }; +{ pkgs, lib, config, ... }: +let + serverName = "${config.monorepo.vars.ntfyUrl}"; + port = 2586; + ntfySecret = config.monorepo.vars.ntfySecret; +in +{ + sops.secrets."${ntfySecret}" = lib.mkIf config.services.ntfy-sh.enable { + format = "yaml"; + owner = "ntfy-sh"; + sopsFile = ../secrets/common_secrets.yaml; + }; + + services.ntfy-sh = { + enable = lib.mkDefault config.monorepo.profiles.server.enable; + settings = { + base-url = "https://${serverName}"; + listen-http = "127.0.0.1:${toString port}"; + envrionmentFile = "/run/secrets/${ntfySecret}"; + auth-file = "/var/lib/ntfy-sh/user.db"; + auth-default-access = "deny-all"; + enable-login = true; }; + }; - services.nginx.enable = config.services.ntfy-sh.enable; + services.nginx.enable = config.services.ntfy-sh.enable; - systemd.services.ntfy-sh = lib.mkIf config.services.ntfy-sh.enable { - serviceConfig = { - EnvironmentFile = "/run/secrets/${ntfySecret}"; - }; - postStart = lib.mkForce '' + systemd.services.ntfy-sh = lib.mkIf config.services.ntfy-sh.enable { + serviceConfig = { + EnvironmentFile = "/run/secrets/${ntfySecret}"; + }; + postStart = lib.mkForce '' # 1. Wait for the server to initialize the database echo "Waiting for ntfy auth database to appear..." TIMEOUT=30 @@ -1676,81 +1677,81 @@ I want to have notifications on my phone, and run my own server to do this. echo "Admin user already exists." fi ''; - }; + }; - networking.domains.subDomains."${serverName}" = lib.mkIf config.services.ntfy-sh.enable {}; - services.nginx.virtualHosts."${serverName}" = lib.mkIf config.services.ntfy-sh.enable { - serverName = "${serverName}"; - enableACME = true; - forceSSL = true; - locations."/" = { - proxyPass = "http://127.0.0.1:${toString port}"; - proxyWebsockets = true; - extraConfig = '' + networking.domains.subDomains."${serverName}" = lib.mkIf config.services.ntfy-sh.enable {}; + services.nginx.virtualHosts."${serverName}" = lib.mkIf config.services.ntfy-sh.enable { + serverName = "${serverName}"; + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:${toString port}"; + proxyWebsockets = true; + extraConfig = '' proxy_buffering off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; ''; - }; }; - } + }; +} #+end_src ** Nginx These are all my virtual hosts. For many of these servers we have to have a reverse proxy in order to expose the locally running instances to the outside world under a domain. #+begin_src nix :tangle ../nix/modules/nginx.nix - { pkgs, config, lib, monorepoSelf ? null, ... }: - { - services.nginx = { - enable = lib.mkDefault config.monorepo.profiles.server.enable; - user = "nginx"; - recommendedGzipSettings = true; - recommendedOptimisation = true; - recommendedBrotliSettings = true; - recommendedTlsSettings = true; - recommendedProxySettings = false; - virtualHosts = { - "${config.monorepo.vars.remoteHost}" = lib.mkIf (monorepoSelf != null) { - serverName = "${config.monorepo.vars.remoteHost}"; - serverAliases = [ "${config.monorepo.vars.internetName}.${config.monorepo.vars.orgHost}" ]; - root = "${monorepoSelf.packages.${pkgs.system}.website}"; - addSSL = true; - enableACME = true; - quic = true; - - locations."/" = { - extraConfig = '' +{ pkgs, config, lib, monorepoSelf ? null, ... }: +{ + services.nginx = { + enable = lib.mkDefault config.monorepo.profiles.server.enable; + user = "nginx"; + recommendedGzipSettings = true; + recommendedOptimisation = true; + recommendedBrotliSettings = true; + recommendedTlsSettings = true; + recommendedProxySettings = false; + virtualHosts = { + "${config.monorepo.vars.remoteHost}" = lib.mkIf (monorepoSelf != null) { + serverName = "${config.monorepo.vars.remoteHost}"; + serverAliases = [ "${config.monorepo.vars.internetName}.${config.monorepo.vars.orgHost}" ]; + root = "${monorepoSelf.packages.${pkgs.system}.website}"; + addSSL = true; + enableACME = true; + quic = true; + + locations."/" = { + extraConfig = '' add_header Cache-Control "no-cache, must-revalidate"; add_header Alt-Svc 'h3=":443"; ma=86400'; include ${monorepoSelf.packages.${pkgs.system}.website}/csp_header.conf; expires off; ''; - }; + }; - locations."~* \\.(?:woff2|ttf|otf|eot|woff|ico|css|js|gif|jpe?g|png|svg|mp3|mp4|iso|webmanifest)$" = { - extraConfig = '' + locations."~* \\.(?:woff2|ttf|otf|eot|woff|ico|css|js|gif|jpe?g|png|svg|mp3|mp4|iso|webmanifest)$" = { + extraConfig = '' add_header Cache-Control "public, max-age=31536000, immutable"; add_header Alt-Svc 'h3=":443"; ma=86400'; include ${monorepoSelf.packages.${pkgs.system}.website}/csp_header.conf; access_log off; ''; - }; - extraConfig = '' + }; + extraConfig = '' rewrite ^/graph_view/?(.*)$ https://graph.${config.monorepo.vars.remoteHost}/$1 permanent; ''; - }; + }; - # the port comes from ssh tunnelling - "music.${config.monorepo.vars.remoteHost}" = lib.mkIf config.monorepo.profiles.server.enable { - addSSL = true; - enableACME = true; - basicAuthFile = config.sops.secrets."mpd_password".path; - locations."/" = { - proxyPass = "http://localhost:8000"; - extraConfig = '' + # the port comes from ssh tunnelling + "music.${config.monorepo.vars.remoteHost}" = lib.mkIf config.monorepo.profiles.server.enable { + addSSL = true; + enableACME = true; + basicAuthFile = config.sops.secrets."mpd_password".path; + locations."/" = { + proxyPass = "http://localhost:8000"; + extraConfig = '' proxy_buffering off; proxy_http_version 1.1; proxy_set_header Connection ""; @@ -1759,343 +1760,343 @@ to the outside world under a domain. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_read_timeout 36000s; ''; - }; }; + }; - "${config.monorepo.vars.orgHost}" = { - serverName = "${config.monorepo.vars.orgHost}"; - root = "/var/www/nullring/"; - addSSL = true; - enableACME = true; - }; + "${config.monorepo.vars.orgHost}" = { + serverName = "${config.monorepo.vars.orgHost}"; + root = "/var/www/nullring/"; + addSSL = true; + enableACME = true; + }; - "graph.${config.monorepo.vars.remoteHost}" = lib.mkIf (monorepoSelf != null) { - serverName = "graph.${config.monorepo.vars.remoteHost}"; - root = "${monorepoSelf.packages.${pkgs.system}.website}"; - addSSL = true; - enableACME = true; - quic = true; - locations."/" = { - extraConfig = '' + "graph.${config.monorepo.vars.remoteHost}" = lib.mkIf (monorepoSelf != null) { + serverName = "graph.${config.monorepo.vars.remoteHost}"; + root = "${monorepoSelf.packages.${pkgs.system}.website}"; + addSSL = true; + enableACME = true; + quic = true; + locations."/" = { + extraConfig = '' add_header Alt-Svc 'h3=":443"; ma=86400'; rewrite ^/$ /graph_view/index.html break; ''; - }; + }; - extraConfig = '' + extraConfig = '' add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; object-src 'none';"; ''; - }; }; }; + }; - networking.firewall.allowedTCPPorts = lib.mkIf config.services.nginx.enable [ 80 443 ]; - networking.firewall.allowedUDPPorts = lib.mkIf config.services.nginx.enable [ 443 ]; + networking.firewall.allowedTCPPorts = lib.mkIf config.services.nginx.enable [ 80 443 ]; + networking.firewall.allowedUDPPorts = lib.mkIf config.services.nginx.enable [ 443 ]; - networking.domains.subDomains = lib.mkIf config.services.nginx.enable { - "${config.monorepo.vars.remoteHost}" = {}; - "${config.monorepo.vars.orgHost}" = {}; - "${config.monorepo.vars.internetName}.${config.monorepo.vars.orgHost}" = {}; - "music.${config.monorepo.vars.remoteHost}" = {}; - "graph.${config.monorepo.vars.remoteHost}" = {}; - }; - } + networking.domains.subDomains = lib.mkIf config.services.nginx.enable { + "${config.monorepo.vars.remoteHost}" = {}; + "${config.monorepo.vars.orgHost}" = {}; + "${config.monorepo.vars.internetName}.${config.monorepo.vars.orgHost}" = {}; + "music.${config.monorepo.vars.remoteHost}" = {}; + "graph.${config.monorepo.vars.remoteHost}" = {}; + }; +} #+end_src ** CGit Interface I have this cgit interface in order to integrate with public-inbox. #+begin_src nix :tangle ../nix/modules/cgit.nix - { lib, config, ... }: - let - serverName = "git.${config.monorepo.vars.orgHost}"; - in - { - services.cgit."my-projects" = { - enable = lib.mkDefault config.services.gitDaemon.enable; - scanPath = "${config.users.users.git.home}"; - settings = { - root-title = "Nullring Git Server"; - root-desc = "Projects and cool things"; - enable-commit-graph = 1; - enable-log-filecount = 1; - enable-log-linecount = 1; - enable-index-owner = 0; - clone-prefix = "https://${serverName}"; - enable-tree-linenumbers = 1; - strict-export = "git-daemon-export-ok"; - }; - gitHttpBackend = { - enable = true; - checkExportOkFiles = true; - }; - nginx = { - virtualHost = "${serverName}"; - }; +{ lib, config, ... }: +let + serverName = "git.${config.monorepo.vars.orgHost}"; +in +{ + services.cgit."my-projects" = { + enable = lib.mkDefault config.services.gitDaemon.enable; + scanPath = "${config.users.users.git.home}"; + settings = { + root-title = "Nullring Git Server"; + root-desc = "Projects and cool things"; + enable-commit-graph = 1; + enable-log-filecount = 1; + enable-log-linecount = 1; + enable-index-owner = 0; + clone-prefix = "https://${serverName}"; + enable-tree-linenumbers = 1; + strict-export = "git-daemon-export-ok"; }; - - networking.domains.subDomains."${serverName}" = lib.mkIf config.services.cgit."my-projects".enable {}; - services.nginx.virtualHosts."${serverName}" = lib.mkIf config.services.cgit."my-projects".enable { - forceSSL = true; - enableACME = true; + gitHttpBackend = { + enable = true; + checkExportOkFiles = true; }; - } + nginx = { + virtualHost = "${serverName}"; + }; + }; + + networking.domains.subDomains."${serverName}" = lib.mkIf config.services.cgit."my-projects".enable {}; + services.nginx.virtualHosts."${serverName}" = lib.mkIf config.services.cgit."my-projects".enable { + forceSSL = true; + enableACME = true; + }; +} #+end_src ** Nvidia I have an Nvidia GPU on my computer. #+begin_src nix :tangle ../nix/modules/nvidia.nix - { config, lib, pkgs, ... }: - { - hardware = { - graphics.extraPackages = (if config.monorepo.profiles.cuda.enable - then with pkgs; [ - libva-vdpau-driver - libvdpau-va-gl - nvidia-vaapi-driver - ] else []); - - nvidia = { - modesetting.enable = lib.mkDefault config.monorepo.profiles.cuda.enable; - powerManagement = { - enable = lib.mkDefault config.monorepo.profiles.cuda.enable; - finegrained = false; - }; - open = config.monorepo.profiles.cuda.enable; - package = config.boot.kernelPackages.nvidiaPackages.stable; - nvidiaSettings = false; - }; +{ config, lib, pkgs, ... }: +{ + hardware = { + graphics.extraPackages = (if config.monorepo.profiles.cuda.enable + then with pkgs; [ + libva-vdpau-driver + libvdpau-va-gl + nvidia-vaapi-driver + ] else []); + + nvidia = { + modesetting.enable = lib.mkDefault config.monorepo.profiles.cuda.enable; + powerManagement = { + enable = lib.mkDefault config.monorepo.profiles.cuda.enable; + finegrained = false; + }; + open = config.monorepo.profiles.cuda.enable; + package = config.boot.kernelPackages.nvidiaPackages.stable; + nvidiaSettings = false; }; - } + }; +} #+end_src ** CUDA I need CUDA on some computers because I run local LLMs. #+begin_src nix :tangle ../nix/modules/cuda.nix - { config, pkgs, ... }: - { - environment.systemPackages = (if config.monorepo.profiles.cuda.enable then with pkgs; [ - cudatoolkit - cudaPackages.cudnn - cudaPackages.libcublas - linuxPackages.nvidia_x11 - ] else []); - } +{ config, pkgs, ... }: +{ + environment.systemPackages = (if config.monorepo.profiles.cuda.enable then with pkgs; [ + cudatoolkit + cudaPackages.cudnn + cudaPackages.libcublas + linuxPackages.nvidia_x11 + ] else []); +} #+end_src ** Maddy There is a non declarative part of setting dkims and spf. #+begin_src nix :tangle ../nix/modules/maddy.nix - { lib, config, options, ... }: - let - emailServerName = "mail.${config.monorepo.vars.orgHost}"; - serverName = "list.${config.monorepo.vars.orgHost}"; - password_path = "mail_monorepo_password"; - in - { - sops = lib.mkIf config.services.maddy.enable { - secrets = { - "${password_path}" = { - format = "yaml"; - owner = "maddy"; - }; +{ lib, config, options, ... }: +let + emailServerName = "mail.${config.monorepo.vars.orgHost}"; + serverName = "list.${config.monorepo.vars.orgHost}"; + password_path = "mail_monorepo_password"; +in +{ + sops = lib.mkIf config.services.maddy.enable { + secrets = { + "${password_path}" = { + format = "yaml"; + owner = "maddy"; }; - templates = lib.mkIf config.services.public-inbox.enable { - "public-inbox-netrc" = { - owner = "public-inbox"; - group = "public-inbox"; - mode = "0400"; - content = (builtins.concatStringsSep "\n" (builtins.map (x: "machine ${emailServerName} login ${x}@${config.monorepo.vars.orgHost} password ${config.sops.placeholder."mail_monorepo_password_pi"}") config.monorepo.vars.projects)) + '' + }; + templates = lib.mkIf config.services.public-inbox.enable { + "public-inbox-netrc" = { + owner = "public-inbox"; + group = "public-inbox"; + mode = "0400"; + content = (builtins.concatStringsSep "\n" (builtins.map (x: "machine ${emailServerName} login ${x}@${config.monorepo.vars.orgHost} password ${config.sops.placeholder."mail_monorepo_password_pi"}") config.monorepo.vars.projects)) + '' machine ${emailServerName} login discussion@${config.monorepo.vars.orgHost} password ${config.sops.placeholder."mail_monorepo_password_pi"}''; - }; }; }; + }; - services.maddy = { - enable = lib.mkDefault config.monorepo.profiles.server.enable; - openFirewall = true; - hostname = "${config.monorepo.vars.orgHost}"; - primaryDomain = "mail.${config.monorepo.vars.orgHost}"; - localDomains = [ - "$(primary_domain)" - "${config.monorepo.vars.orgHost}" - ]; - tls = { - loader = "file"; - certificates = [ - { - keyPath = "/var/lib/acme/mail.${config.monorepo.vars.orgHost}/key.pem"; - certPath = "/var/lib/acme/mail.${config.monorepo.vars.orgHost}/fullchain.pem"; - } - ]; - }; - config = builtins.replaceStrings [ - "imap tcp://0.0.0.0:143" - "submission tcp://0.0.0.0:587" - ] [ - "imap tls://0.0.0.0:993 tcp://0.0.0.0:143" - "submission tls://0.0.0.0:465 tcp://0.0.0.0:587" - ] options.services.maddy.config.default; - - ensureAccounts = (builtins.map (x: "${x}@${config.monorepo.vars.orgHost}") config.monorepo.vars.projects) ++ [ - "${config.monorepo.vars.internetName}@${config.monorepo.vars.orgHost}" - "discussion@${config.monorepo.vars.orgHost}" + services.maddy = { + enable = lib.mkDefault config.monorepo.profiles.server.enable; + openFirewall = true; + hostname = "${config.monorepo.vars.orgHost}"; + primaryDomain = "mail.${config.monorepo.vars.orgHost}"; + localDomains = [ + "$(primary_domain)" + "${config.monorepo.vars.orgHost}" + ]; + tls = { + loader = "file"; + certificates = [ + { + keyPath = "/var/lib/acme/mail.${config.monorepo.vars.orgHost}/key.pem"; + certPath = "/var/lib/acme/mail.${config.monorepo.vars.orgHost}/fullchain.pem"; + } ]; - ensureCredentials = lib.genAttrs config.services.maddy.ensureAccounts (_: { - passwordFile = "/run/secrets/${password_path}"; - }) // { - "${config.monorepo.vars.internetName}@${config.monorepo.vars.orgHost}" = { - passwordFile = "/run/secrets/mail_password"; - }; + }; + config = builtins.replaceStrings [ + "imap tcp://0.0.0.0:143" + "submission tcp://0.0.0.0:587" + ] [ + "imap tls://0.0.0.0:993 tcp://0.0.0.0:143" + "submission tls://0.0.0.0:465 tcp://0.0.0.0:587" + ] options.services.maddy.config.default; + + ensureAccounts = (builtins.map (x: "${x}@${config.monorepo.vars.orgHost}") config.monorepo.vars.projects) ++ [ + "${config.monorepo.vars.internetName}@${config.monorepo.vars.orgHost}" + "discussion@${config.monorepo.vars.orgHost}" + ]; + ensureCredentials = lib.genAttrs config.services.maddy.ensureAccounts (_: { + passwordFile = "/run/secrets/${password_path}"; + }) // { + "${config.monorepo.vars.internetName}@${config.monorepo.vars.orgHost}" = { + passwordFile = "/run/secrets/mail_password"; }; }; + }; - systemd.tmpfiles.rules = [ - "C+ /var/lib/public-inbox/style.css 0644 public-inbox public-inbox - ${../data/public-inbox.css}" - ]; - systemd.services.public-inbox-httpd = if config.monorepo.profiles.server.enable then { - preStart = '' + systemd.tmpfiles.rules = [ + "C+ /var/lib/public-inbox/style.css 0644 public-inbox public-inbox - ${../data/public-inbox.css}" + ]; + systemd.services.public-inbox-httpd = if config.monorepo.profiles.server.enable then { + preStart = '' # Copy or link the file. # Using 'cp' is often safer for sandboxed services than linking to the store. Lol. cp -f ${../data/public-inbox.css} /var/lib/public-inbox/style.css chmod 644 /var/lib/public-inbox/style.css ''; - - serviceConfig = { - BindPaths = [ - "/var/lib/public-inbox" - "${config.users.users.git.home}" - ]; - ReadOnlyPaths = [ "/var/lib/public-inbox/style.css" ]; - ReadWritePaths = [ "/var/lib/public-inbox" ]; - }; - } else {}; + + serviceConfig = { + BindPaths = [ + "/var/lib/public-inbox" + "${config.users.users.git.home}" + ]; + ReadOnlyPaths = [ "/var/lib/public-inbox/style.css" ]; + ReadWritePaths = [ "/var/lib/public-inbox" ]; + }; + } else {}; - systemd.services.public-inbox-watch = if config.services.public-inbox.enable then { - after = [ "sops-nix.service" ]; - confinement.enable = lib.mkForce false; - preStart = '' + systemd.services.public-inbox-watch = if config.services.public-inbox.enable then { + after = [ "sops-nix.service" ]; + confinement.enable = lib.mkForce false; + preStart = '' mkdir -p /var/lib/public-inbox/.tmp chmod 0700 /var/lib/public-inbox/.tmp ln -sfn ${config.sops.templates."public-inbox-netrc".path} /var/lib/public-inbox/.netrc ''; - environment = { - PUBLIC_INBOX_FORCE_IPV4 = "1"; - NETRC = config.sops.templates."public-inbox-netrc".path; - HOME = "/var/lib/public-inbox"; - TMPDIR = "/var/lib/public-inbox/.tmp"; - }; + environment = { + PUBLIC_INBOX_FORCE_IPV4 = "1"; + NETRC = config.sops.templates."public-inbox-netrc".path; + HOME = "/var/lib/public-inbox"; + TMPDIR = "/var/lib/public-inbox/.tmp"; + }; - serviceConfig = { - RestrictSUIDSGID = lib.mkForce false; - ReadWritePaths = [ "/var/lib/public-inbox" ]; - RestrictAddressFamilies = lib.mkForce [ "AF_UNIX" "AF_INET" "AF_INET6" ]; - PrivateNetwork = lib.mkForce false; - SystemCallFilter = lib.mkForce []; - RootDirectory = lib.mkForce ""; - - CapabilityBoundingSet = lib.mkForce [ "~" ]; - UMask = lib.mkForce "0022"; - ProtectSystem = lib.mkForce false; - }; - } else {}; + serviceConfig = { + RestrictSUIDSGID = lib.mkForce false; + ReadWritePaths = [ "/var/lib/public-inbox" ]; + RestrictAddressFamilies = lib.mkForce [ "AF_UNIX" "AF_INET" "AF_INET6" ]; + PrivateNetwork = lib.mkForce false; + SystemCallFilter = lib.mkForce []; + RootDirectory = lib.mkForce ""; + + CapabilityBoundingSet = lib.mkForce [ "~" ]; + UMask = lib.mkForce "0022"; + ProtectSystem = lib.mkForce false; + }; + } else {}; - services.public-inbox = { - enable = lib.mkDefault config.services.maddy.enable; - settings = { - coderepo = lib.genAttrs config.monorepo.vars.projects (name: { - dir = "${config.users.users.git.home}/${name}.git"; - # works even if no cgit server running here, this is just the default - cgitUrl = "https://git.${config.monorepo.vars.orgHost}/${name}.git"; - }); - publicinbox.css = ["/var/lib/public-inbox/style.css"]; - publicinbox.wwwlisting = "all"; - }; - http = { - enable = true; - port = 9090; - }; - inboxes = lib.genAttrs config.monorepo.vars.projects (name: { - description = "discussion of the ${name} project."; - address = [ "${name}@${config.monorepo.vars.orgHost}" ]; - inboxdir = "/var/lib/public-inbox/${name}"; - url = "https://list.${config.monorepo.vars.orgHost}/${name}"; - watch = [ "imaps://${name}${config.monorepo.vars.orgHost}@${emailServerName}/INBOX" ]; - coderepo = [ "${name}" ]; - }) // { - "discussion" = { - description = "Main Nullring Discussion Mailing List"; - address = [ "discussion@${config.monorepo.vars.orgHost}" ]; - inboxdir = "/var/lib/public-inbox/discuss"; - url = "https://${serverName}/discussion"; - watch = [ "imaps://discussion%40${config.monorepo.vars.orgHost}@${emailServerName}/INBOX" ]; - }; + services.public-inbox = { + enable = lib.mkDefault config.services.maddy.enable; + settings = { + coderepo = lib.genAttrs config.monorepo.vars.projects (name: { + dir = "${config.users.users.git.home}/${name}.git"; + # works even if no cgit server running here, this is just the default + cgitUrl = "https://git.${config.monorepo.vars.orgHost}/${name}.git"; + }); + publicinbox.css = ["/var/lib/public-inbox/style.css"]; + publicinbox.wwwlisting = "all"; + }; + http = { + enable = true; + port = 9090; + }; + inboxes = lib.genAttrs config.monorepo.vars.projects (name: { + description = "discussion of the ${name} project."; + address = [ "${name}@${config.monorepo.vars.orgHost}" ]; + inboxdir = "/var/lib/public-inbox/${name}"; + url = "https://list.${config.monorepo.vars.orgHost}/${name}"; + watch = [ "imaps://${name}${config.monorepo.vars.orgHost}@${emailServerName}/INBOX" ]; + coderepo = [ "${name}" ]; + }) // { + "discussion" = { + description = "Main Nullring Discussion Mailing List"; + address = [ "discussion@${config.monorepo.vars.orgHost}" ]; + inboxdir = "/var/lib/public-inbox/discuss"; + url = "https://${serverName}/discussion"; + watch = [ "imaps://discussion%40${config.monorepo.vars.orgHost}@${emailServerName}/INBOX" ]; }; }; + }; - networking.domains.baseDomains."${config.monorepo.vars.orgHost}" = lib.mkIf config.services.maddy.enable { - mx.data = [ - { - preference = 10; - exchange = "${emailServerName}"; - } - ]; - }; + networking.domains.baseDomains."${config.monorepo.vars.orgHost}" = lib.mkIf config.services.maddy.enable { + mx.data = [ + { + preference = 10; + exchange = "${emailServerName}"; + } + ]; + }; - networking.domains.subDomains = lib.mkIf config.services.maddy.enable { - "${serverName}" = {}; - "${emailServerName}" = {}; - "_dmarc.${config.monorepo.vars.orgHost}" = { - txt = { - data = "v=DMARC1; p=none"; - }; + networking.domains.subDomains = lib.mkIf config.services.maddy.enable { + "${serverName}" = {}; + "${emailServerName}" = {}; + "_dmarc.${config.monorepo.vars.orgHost}" = { + txt = { + data = "v=DMARC1; p=none"; }; - "default._domainkey.${config.monorepo.vars.orgHost}" = { - txt = { - data = "v=DKIM1; k=rsa; p=${config.monorepo.vars.dkimKey}"; - }; + }; + "default._domainkey.${config.monorepo.vars.orgHost}" = { + txt = { + data = "v=DKIM1; k=rsa; p=${config.monorepo.vars.dkimKey}"; }; }; + }; - networking.firewall.allowedTCPPorts = lib.mkIf config.services.maddy.enable [ - 143 - 465 - 587 - 993 - ]; - - services.nginx.virtualHosts."${serverName}" = lib.mkIf config.services.public-inbox.enable { - forceSSL = true; - enableACME = true; - locations."/" = { - proxyPass = "http://localhost:${toString config.services.public-inbox.http.port}"; - extraConfig = '' + networking.firewall.allowedTCPPorts = lib.mkIf config.services.maddy.enable [ + 143 + 465 + 587 + 993 + ]; + + services.nginx.virtualHosts."${serverName}" = lib.mkIf config.services.public-inbox.enable { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://localhost:${toString config.services.public-inbox.http.port}"; + extraConfig = '' proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; ''; - }; }; + }; - services.nginx.virtualHosts."${emailServerName}" = lib.mkIf config.services.maddy.enable { - serverName = "${emailServerName}"; - root = "/var/www/dummy"; - addSSL = true; - enableACME = true; - }; + services.nginx.virtualHosts."${emailServerName}" = lib.mkIf config.services.maddy.enable { + serverName = "${emailServerName}"; + root = "/var/www/dummy"; + addSSL = true; + enableACME = true; + }; - } +} #+end_src *** Public Inbox CSS This is a minimal stylesheet for public inbox so that I don't get eye cancer while reading it. #+begin_src nix :tangle ../nix/data/public-inbox.css - :root { - --bg: #f8f9fa; - --fg: #2e3440; - --link: #5e81ac; - --link-hover: #81a1c1; - --border: #d8dee9; - --card-bg: #ffffff; - --meta-fg: #4c566a; /* Darker gray for better legibility */ - --btn-fg: #ffffff; - --max-width: 780px; - } +:root { + --bg: #f8f9fa; + --fg: #2e3440; + --link: #5e81ac; + --link-hover: #81a1c1; + --border: #d8dee9; + --card-bg: #ffffff; + --meta-fg: #4c566a; /* Darker gray for better legibility */ + --btn-fg: #ffffff; + --max-width: 780px; +} @media (prefers-color-scheme: dark) { :root { @@ -2123,10 +2124,10 @@ This is a minimal stylesheet for public inbox so that I don't get eye cancer whi margin: 3rem auto; padding: 0 1.5rem; font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; - - /* Keep this for smoother rendering on macOS/iOS */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; + + /* Keep this for smoother rendering on macOS/iOS */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } /* 1. Global Link Fixes */ @@ -2134,129 +2135,129 @@ This is a minimal stylesheet for public inbox so that I don't get eye cancer whi color: var(--link); } - /* 2. Card Styling */ - body pre { - white-space: pre-wrap; - background: var(--card-bg); - padding: 2rem; - border-radius: 12px; - border: 1px solid var(--border); - margin-bottom: 2.5rem; - } - - /* 3. Header Cleanup */ - body pre b:first-of-type { - font-weight: 700; - color: var(--link); - font-size: 1.1rem; - display: block; - margin-bottom: 0.5rem; - } - - /* 4. Fixing the "Permalink" label on documentation */ - /* We target links ending in / but EXCLUDE system paths like help or mirror */ - body pre a[href$="/"]:not([href*="_/"]):not([href*="new.atom"]) { - font-size: 0; - text-decoration: none; - margin-right: 10px; - } - - body pre a[href$="/"]:not([href*="_/"]):not([href*="new.atom"]):after { - content: "permalink"; - font-size: 11px; - font-weight: bold; - color: var(--fg); /* Use main text color for high contrast */ - background: var(--bg); - border: 1px solid var(--link); /* Use link color for the border */ - padding: 4px 10px; - border-radius: 4px; - display: inline-block; - } + /* 2. Card Styling */ + body pre { + white-space: pre-wrap; + background: var(--card-bg); + padding: 2rem; + border-radius: 12px; + border: 1px solid var(--border); + margin-bottom: 2.5rem; + } - /* 5. Fixing the "Raw" button contrast */ - body pre a[href$="/raw"] { - font-size: 0; - text-decoration: none; - } + /* 3. Header Cleanup */ + body pre b:first-of-type { + font-weight: 700; + color: var(--link); + font-size: 1.1rem; + display: block; + margin-bottom: 0.5rem; + } - body pre a[href$="/raw"]:after { - content: "raw"; - font-size: 11px; - font-weight: bold; - color: var(--fg); - background: var(--bg); - border: 1px solid var(--link); - padding: 4px 10px; - border-radius: 4px; - display: inline-block; - } + /* 4. Fixing the "Permalink" label on documentation */ + /* We target links ending in / but EXCLUDE system paths like help or mirror */ + body pre a[href$="/"]:not([href*="_/"]):not([href*="new.atom"]) { + font-size: 0; + text-decoration: none; + margin-right: 10px; + } - /* Hover effect for ghost buttons: solid color shift */ - body pre a[href$="/"]:hover:after, + body pre a[href$="/"]:not([href*="_/"]):not([href*="new.atom"]):after { + content: "permalink"; + font-size: 11px; + font-weight: bold; + color: var(--fg); /* Use main text color for high contrast */ + background: var(--bg); + border: 1px solid var(--link); /* Use link color for the border */ + padding: 4px 10px; + border-radius: 4px; + display: inline-block; + } + + /* 5. Fixing the "Raw" button contrast */ + body pre a[href$="/raw"] { + font-size: 0; + text-decoration: none; + } + + body pre a[href$="/raw"]:after { + content: "raw"; + font-size: 11px; + font-weight: bold; + color: var(--fg); + background: var(--bg); + border: 1px solid var(--link); + padding: 4px 10px; + border-radius: 4px; + display: inline-block; + } + + /* Hover effect for ghost buttons: solid color shift */ + body pre a[href$="/"]:hover:after, body pre a[href$="/raw"]:hover:after { - background: var(--link); - color: var(--btn-fg); - } - - /* 6. The Reply Button (Primary Action) */ - body pre a[href$="#R"], body pre a[href$="#R"]:visited { - font-size: 0; - text-decoration: none; - } - - body pre a[href$="#R"]:after { - content: "REPLY"; - font-size: 12px; - font-weight: bold; - padding: 6px 20px; - background: var(--link); - color: var(--btn-fg); - border-radius: 6px; - display: inline-block; - margin-left: 10px; - } - - /* 7. Hide clutter */ - body pre a[href^="#r"], body pre a[href^="#r"] + b, body hr { - display: none; - } + background: var(--link); + color: var(--btn-fg); + } + + /* 6. The Reply Button (Primary Action) */ + body pre a[href$="#R"], body pre a[href$="#R"]:visited { + font-size: 0; + text-decoration: none; + } + + body pre a[href$="#R"]:after { + content: "REPLY"; + font-size: 12px; + font-weight: bold; + padding: 6px 20px; + background: var(--link); + color: var(--btn-fg); + border-radius: 6px; + display: inline-block; + margin-left: 10px; + } - /* Fix: Mathematically outscore the header rule to keep link text inline */ - body pre a[href] b:first-of-type { - display: inline; - font-size: inherit; - margin-bottom: 0; - color: inherit; - } + /* 7. Hide clutter */ + body pre a[href^="#r"], body pre a[href^="#r"] + b, body hr { + display: none; + } + + /* Fix: Mathematically outscore the header rule to keep link text inline */ + body pre a[href] b:first-of-type { + display: inline; + font-size: inherit; + margin-bottom: 0; + color: inherit; + } #+end_src ** Fail2Ban This is a service that bans bots that try to sign in on my server. #+begin_src nix :tangle ../nix/modules/fail2ban.nix - { lib, config, ... }: - { - services.fail2ban = { - enable = lib.mkDefault config.monorepo.profiles.server.enable; - # Ban IP after 5 failures for 1 hour - maxretry = 5; - bantime = "1h"; - banaction = "iptables-allports"; - banaction-allports = "iptables-allports"; - }; - } +{ lib, config, ... }: +{ + services.fail2ban = { + enable = lib.mkDefault config.monorepo.profiles.server.enable; + # Ban IP after 5 failures for 1 hour + maxretry = 5; + bantime = "1h"; + banaction = "iptables-allports"; + banaction-allports = "iptables-allports"; + }; +} #+end_src ** Impermanence This is my impermanence profile, which removes all files on reboot except for the ones listed below. #+begin_src nix :tangle ../nix/modules/impermanence.nix - { lib, config, ... }: - { - assertions = [ - { - assertion = (! (config.monorepo.profiles.impermanence.enable && (! (config.monorepo.vars.fileSystem == "btrfs")))); - message = "Impermanence requires btrfs filesystem."; - } - ]; +{ lib, config, ... }: +{ + assertions = [ + { + assertion = (! (config.monorepo.profiles.impermanence.enable && (! (config.monorepo.vars.fileSystem == "btrfs")))); + message = "Impermanence requires btrfs filesystem."; + } + ]; - boot.initrd.postResumeCommands = (if config.monorepo.profiles.impermanence.enable then lib.mkAfter '' + boot.initrd.postResumeCommands = (if config.monorepo.profiles.impermanence.enable then lib.mkAfter '' mkdir /btrfs_tmp mount -t btrfs -n -o subvol=/ /dev/mapper/crypted /btrfs_tmp if [[ -e /btrfs_tmp/root ]]; then @@ -2281,213 +2282,212 @@ This is my impermanence profile, which removes all files on reboot except for th umount -n /btrfs_tmp '' else ""); - boot.initrd.luks.devices = (if (config.monorepo.vars.fileSystem == "btrfs") then { - crypted = { - device = "/dev/disk/by-partlabel/disk-main-luks"; - }; - } else {}); - - fileSystems = if (config.monorepo.profiles.impermanence.enable) then { - "/persistent" = { - neededForBoot = true; - }; - "/home" = { - neededForBoot = true; - }; - } else {}; + boot.initrd.luks.devices = (if (config.monorepo.vars.fileSystem == "btrfs") then { + crypted = { + device = "/dev/disk/by-partlabel/disk-main-luks"; + }; + } else {}); - environment.persistence."/persistent" = { - enable = config.monorepo.profiles.impermanence.enable; - hideMounts = true; + fileSystems = if (config.monorepo.profiles.impermanence.enable) then { + "/persistent" = { + neededForBoot = true; + }; + "/home" = { + neededForBoot = true; + }; + } else {}; + + environment.persistence."/persistent" = { + enable = config.monorepo.profiles.impermanence.enable; + hideMounts = true; + directories = [ + "/var/log" + "/var/lib/bluetooth" + "/var/lib/nixos" + "/var/lib/systemd/coredump" + "/etc/NetworkManager/system-connections" + ]; + files = [ + "/etc/machine-id" + { file = "/var/keys/secret_file"; parentDirectory = { mode = "u=rwx,g=,o="; }; } + ]; + users."${config.monorepo.vars.userName}" = { directories = [ - "/var/log" - "/var/lib/bluetooth" - "/var/lib/nixos" - "/var/lib/systemd/coredump" - "/etc/NetworkManager/system-connections" + "Downloads" + "music" + "Pictures" + "Documents" + "Videos" + "Monero" + "org" + "monorepo" + "soundfont" + "website_html" + "ardour" + "audacity" + "img" + "email" + "projects" + "secrets" + + ".emacs.d" + ".elfeed" + ".electrum" + ".mozilla" + ".bitmonero" + ".config" + ".crypto" + { directory = ".gnupg"; mode = "0700"; } + { directory = ".ssh"; mode = "0700"; } + { directory = ".local/share/keyrings"; mode = "0700"; } + ".local/share/direnv" ]; files = [ - "/etc/machine-id" - { file = "/var/keys/secret_file"; parentDirectory = { mode = "u=rwx,g=,o="; }; } + ".emacs" ]; - users."${config.monorepo.vars.userName}" = { - directories = [ - "Downloads" - "music" - "Pictures" - "Documents" - "Videos" - "Monero" - "org" - "monorepo" - "soundfont" - "website_html" - "ardour" - "audacity" - "img" - "email" - "projects" - "secrets" - - ".emacs.d" - ".elfeed" - ".electrum" - ".mozilla" - ".bitmonero" - ".config" - ".crypto" - { directory = ".gnupg"; mode = "0700"; } - { directory = ".ssh"; mode = "0700"; } - { directory = ".local/share/keyrings"; mode = "0700"; } - ".local/share/direnv" - ]; - files = [ - ".emacs" - ]; - }; }; - } + }; +} #+end_src ** Nixpkgs #+begin_src nix :tangle ../nix/modules/nixpkgs-options.nix - { lib, config, isIntegrationTest, ... }: - { - nixpkgs = lib.mkIf (! isIntegrationTest) { - hostPlatform = lib.mkDefault "x86_64-linux"; - config = { - allowUnfree = true; - cudaSupport = lib.mkDefault config.monorepo.profiles.cuda.enable; - }; - config.permittedInsecurePackages = [ - "python3.13-ecdsa-0.19.1" - "olm-3.2.16" - ]; +{ lib, config, isIntegrationTest, ... }: +{ + nixpkgs = lib.mkIf (! isIntegrationTest) { + hostPlatform = lib.mkDefault "x86_64-linux"; + config = { + allowUnfree = true; + cudaSupport = lib.mkDefault config.monorepo.profiles.cuda.enable; }; - } + config.permittedInsecurePackages = [ + "python3.13-ecdsa-0.19.1" + "olm-3.2.16" + ]; + }; +} #+end_src ** Main Configuration This is the backbone of the all the NixOS configurations, with all these options being shared because they enhance security. #+begin_src nix :tangle ../nix/modules/configuration.nix - { config, pkgs, lib, ... }: - let - userGroups = [ - "nginx" - "git" - "ircd" - "ngircd" - "conduit" - "livekit" - "matterbridge" - "maddy" - "ntfy-sh" - "public-inbox" - "plugdev" - ]; - allDomains = - (lib.attrNames config.networking.domains.baseDomains) ++ - (lib.attrNames config.networking.domains.subDomains); - - # 2. Generate BOTH possible outcomes in advance - prodHosts = map (dom: "${config.monorepo.profiles.server.ipv4} ${dom}") allDomains; - vmHosts = map (dom: "127.0.0.1 ${dom}") allDomains; - in - { - environment.etc."wpa_supplicant.conf".text = '' +{ config, pkgs, lib, ... }: +let + userGroups = [ + "nginx" + "git" + "ircd" + "ngircd" + "conduit" + "livekit" + "matterbridge" + "maddy" + "ntfy-sh" + "public-inbox" + "plugdev" + ]; + allDomains = + (lib.attrNames config.networking.domains.baseDomains) ++ + (lib.attrNames config.networking.domains.subDomains); + + prodHosts = map (dom: "${config.monorepo.profiles.server.ipv4} ${dom}") allDomains; + vmHosts = map (dom: "127.0.0.1 ${dom}") allDomains; +in +{ + environment.etc."wpa_supplicant.conf".text = '' country=CA ''; - systemd.tmpfiles.rules = [ - "d /srv/git 0755 git git -" - ]; - - zramSwap = lib.mkIf config.monorepo.profiles.desktop.enable { - enable = true; - algorithm = "zstd"; - memoryPercent = 50; - }; - - # Shim for testing - virtualisation.vmVariant = { - sops.validateSopsFiles = false; - disko.devices = lib.mkForce {}; + systemd.tmpfiles.rules = [ + "d /srv/git 0755 git git -" + ]; + + zramSwap = lib.mkIf config.monorepo.profiles.desktop.enable { + enable = true; + algorithm = "zstd"; + memoryPercent = 50; + }; - virtualisation.forwardPorts = lib.mkIf config.monorepo.profiles.server.enable [ - { from = "host"; host.port = 10443; guest.port = 443; } - { from = "host"; host.port = 9080; guest.port = 80; } - ]; + # Shim for testing + virtualisation.vmVariant = { + sops.validateSopsFiles = false; + disko.devices = lib.mkForce {}; - virtualisation.useNixStoreImage = false; + virtualisation.forwardPorts = lib.mkIf config.monorepo.profiles.server.enable [ + { from = "host"; host.port = 10443; guest.port = 443; } + { from = "host"; host.port = 9080; guest.port = 80; } + ]; - virtualisation.sharedDirectories.sops-keys = { - source = "/home/preston/.config/sops/age"; - target = "/home/preston/.config/sops/age"; - }; + virtualisation.useNixStoreImage = false; - networking.extraHosts = lib.mkForce (lib.concatStringsSep "\n" vmHosts); - networking.defaultGateway = lib.mkForce null; + virtualisation.sharedDirectories.sops-keys = { + source = "/home/preston/.config/sops/age"; + target = "/home/preston/.config/sops/age"; + }; - networking.interfaces.eth0.useDHCP = lib.mkForce true; + networking.extraHosts = lib.mkForce (lib.concatStringsSep "\n" vmHosts); + networking.defaultGateway = lib.mkForce null; - fileSystems."/" = lib.mkForce { - device = "/dev/disk/by-label/nixos"; - fsType = "ext4"; - }; - systemd.services.sops-nix = { - unitConfig.RequiresMountsFor = "/home/preston/.config/sops/age"; - }; + networking.interfaces.eth0.useDHCP = lib.mkForce true; - security.acme.defaults.server = lib.mkForce "https://127.0.0.1:14000/dir"; + fileSystems."/" = lib.mkForce { + device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; }; - - documentation = { - enable = lib.mkDefault config.monorepo.profiles.documentation.enable; - man.enable = lib.mkDefault config.monorepo.profiles.documentation.enable; - dev.enable = lib.mkDefault config.monorepo.profiles.documentation.enable; + systemd.services.sops-nix = { + unitConfig.RequiresMountsFor = "/home/preston/.config/sops/age"; }; - environment = { - etc = { - securetty.text = '' + security.acme.defaults.server = lib.mkForce "https://127.0.0.1:14000/dir"; + }; + + documentation = { + enable = lib.mkDefault config.monorepo.profiles.documentation.enable; + man.enable = lib.mkDefault config.monorepo.profiles.documentation.enable; + dev.enable = lib.mkDefault config.monorepo.profiles.documentation.enable; + }; + + environment = { + etc = { + securetty.text = '' # /etc/securetty: list of terminals on which root is allowed to login. # See securetty(5) and login(1). ''; - }; }; + }; - systemd.network.enable = lib.mkDefault config.monorepo.profiles.server.enable; - systemd.network.networks."40-${config.monorepo.profiles.server.interface}" = lib.mkIf config.monorepo.profiles.server.enable { - matchConfig.Name = "${config.monorepo.profiles.server.interface}"; - networkConfig = { - IPv6AcceptRA = true; - IPv6PrivacyExtensions = false; - }; - ipv6AcceptRAConfig = { - UseAutonomousPrefix = false; - }; + systemd.network.enable = lib.mkDefault config.monorepo.profiles.server.enable; + systemd.network.networks."40-${config.monorepo.profiles.server.interface}" = lib.mkIf config.monorepo.profiles.server.enable { + matchConfig.Name = "${config.monorepo.profiles.server.interface}"; + networkConfig = { + IPv6AcceptRA = true; + IPv6PrivacyExtensions = false; }; + ipv6AcceptRAConfig = { + UseAutonomousPrefix = false; + }; + }; - systemd = { - services.NetworkManager-wait-online.enable = false; - coredump.enable = false; - network.config.networkConfig.IPv6PrivacyExtensions = "kernel"; - tmpfiles.settings = { - "restrictetcnixos"."/etc/nixos/*".Z = { - mode = "0000"; - user = "root"; - group = "root"; - }; + systemd = { + services.NetworkManager-wait-online.enable = false; + coredump.enable = false; + network.config.networkConfig.IPv6PrivacyExtensions = "kernel"; + tmpfiles.settings = { + "restrictetcnixos"."/etc/nixos/*".Z = { + mode = "0000"; + user = "root"; + group = "root"; }; }; + }; - boot = { - supportedFilesystems = { - btrfs = true; - ext4 = true; - }; + boot = { + supportedFilesystems = { + btrfs = true; + ext4 = true; + }; - extraModprobeConfig = '' + extraModprobeConfig = '' options snd-usb-audio vid=0x1235 pid=0x8200 device_setup=1 options rtw88_core disable_lps_deep=y power_save=0 disable_aspm_l1ss=y options rtw88_pci disable_msi=y disable_aspm=y @@ -2497,428 +2497,428 @@ because they enhance security. options rtw89_pci disable_aspm_l1=y disable_aspm_l1ss=y disable_clkreq=y options iwlwifi 11n_disable=8 uapsd_disable=1 bt_coex_active=0 disable_11ax=1 power_save=0 ''; - extraModulePackages = [ ]; - - initrd = { - availableKernelModules = [ - "xhci_pci" - "ahci" - "usb_storage" - "sd_mod" - "nvme" - "sd_mod" - "ehci_pci" - "rtsx_pci_sdmmc" - "usbhid" - ]; - - kernelModules = [ ]; - }; + extraModulePackages = [ ]; + + initrd = { + availableKernelModules = [ + "xhci_pci" + "ahci" + "usb_storage" + "sd_mod" + "nvme" + "sd_mod" + "ehci_pci" + "rtsx_pci_sdmmc" + "usbhid" + ]; - lanzaboote = { - enable = config.monorepo.profiles.secureBoot.enable; - pkiBundle = "/var/lib/sbctl"; - }; + kernelModules = [ ]; + }; - loader = { - systemd-boot.enable = lib.mkForce ((! config.monorepo.profiles.grub.enable) && (! config.monorepo.profiles.secureBoot.enable)); - efi.canTouchEfiVariables = lib.mkForce (! config.monorepo.profiles.grub.enable); - }; + lanzaboote = { + enable = config.monorepo.profiles.secureBoot.enable; + pkiBundle = "/var/lib/sbctl"; + }; - kernelModules = [ - "snd-seq" - "snd-rawmidi" - "xhci_hcd" - "kvm_intel" - "af_packet" - "ccm" - "ctr" - "cmac" - "arc4" - "ecb" - "michael_mic" - "gcm" - "sha256" - "sha384" - ]; + loader = { + systemd-boot.enable = lib.mkForce ((! config.monorepo.profiles.grub.enable) && (! config.monorepo.profiles.secureBoot.enable)); + efi.canTouchEfiVariables = lib.mkForce (! config.monorepo.profiles.grub.enable); + }; - kernelParams = [ - "cfg80211.reg_alpha2=CA" - "usbcore.autosuspend=-1" - "pcie_aspm=off" - "pci=noaer" - "page_alloc.shuffle=1" - "slab_nomerge" - - # madaidan - "pti=on" - "randomize_kstack_offset=on" - "vsyscall=none" - - # cpu - "spectre_v2=on" - "spec_store_bypass_disable=on" - "tsx=off" - "l1tf=full,force" - "kvm.nx_huge_pages=force" - - # hardened - "extra_latent_entropy" - - # mineral - "quiet" - ]; + kernelModules = [ + "snd-seq" + "snd-rawmidi" + "xhci_hcd" + "kvm_intel" + "af_packet" + "ccm" + "ctr" + "cmac" + "arc4" + "ecb" + "michael_mic" + "gcm" + "sha256" + "sha384" + ]; - blacklistedKernelModules = [ - "netrom" - "rose" - - "adfs" - "affs" - "bfs" - "befs" - "cramfs" - "efs" - "erofs" - "exofs" - "freevxfs" - "f2fs" - "hfs" - "hpfs" - "jfs" - "minix" - "nilfs2" - "ntfs" - "omfs" - "qnx4" - "qnx6" - "sysv" - "ufs" - ]; + kernelParams = [ + "cfg80211.reg_alpha2=CA" + "usbcore.autosuspend=-1" + "pcie_aspm=off" + "pci=noaer" + "page_alloc.shuffle=1" + "slab_nomerge" + + # madaidan + "pti=on" + "randomize_kstack_offset=on" + "vsyscall=none" + + # cpu + "spectre_v2=on" + "spec_store_bypass_disable=on" + "tsx=off" + "l1tf=full,force" + "kvm.nx_huge_pages=force" + + # hardened + "extra_latent_entropy" + + # mineral + "quiet" + ]; - kernel.sysctl = if config.monorepo.profiles.server.enable then { - "net.ipv6.conf.${config.monorepo.profiles.server.interface}.autoconf" = 0; - "net.ipv6.conf.${config.monorepo.profiles.server.interface}.accept_ra" = 1; - } else { - "kernel.ftrace_enabled" = false; - "net.core.bpf_jit_enable" = false; - "kernel.kptr_restrict" = 2; - - # madaidan - "kernel.smtcontrol" = "on"; - "vm.swappiness" = 1; - "vm.unprivileged_userfaultfd" = 0; - "dev.tty.ldisc_autoload" = 0; - "kernel.kexec_load_disabled" = 1; - "kernel.sysrq" = 4; - "kernel.perf_event_paranoid" = 3; - - # net - "net.ipv4.ip_forward" = 1; - "net.ipv4.icmp_echo_ignore_broadcasts" = true; - }; + blacklistedKernelModules = [ + "netrom" + "rose" + + "adfs" + "affs" + "bfs" + "befs" + "cramfs" + "efs" + "erofs" + "exofs" + "freevxfs" + "f2fs" + "hfs" + "hpfs" + "jfs" + "minix" + "nilfs2" + "ntfs" + "omfs" + "qnx4" + "qnx6" + "sysv" + "ufs" + ]; + + kernel.sysctl = if config.monorepo.profiles.server.enable then { + "net.ipv6.conf.${config.monorepo.profiles.server.interface}.autoconf" = 0; + "net.ipv6.conf.${config.monorepo.profiles.server.interface}.accept_ra" = 1; + } else { + "kernel.ftrace_enabled" = false; + "net.core.bpf_jit_enable" = false; + "kernel.kptr_restrict" = 2; + + # madaidan + "kernel.smtcontrol" = "on"; + "vm.swappiness" = 1; + "vm.unprivileged_userfaultfd" = 0; + "dev.tty.ldisc_autoload" = 0; + "kernel.kexec_load_disabled" = 1; + "kernel.sysrq" = 4; + "kernel.perf_event_paranoid" = 3; + + # net + "net.ipv4.ip_forward" = 1; + "net.ipv4.icmp_echo_ignore_broadcasts" = true; }; + }; - networking = { - interfaces = lib.mkIf config.monorepo.profiles.server.enable { - "${config.monorepo.profiles.server.interface}" = { - ipv4.addresses = [ - { - address = config.monorepo.profiles.server.ipv4; - prefixLength = 24; - } - ]; - ipv6.addresses = [ - { - address = config.monorepo.profiles.server.ipv6; - prefixLength = 64; - } - ]; - useDHCP = lib.mkForce false; - }; + networking = { + interfaces = lib.mkIf config.monorepo.profiles.server.enable { + "${config.monorepo.profiles.server.interface}" = { + ipv4.addresses = [ + { + address = config.monorepo.profiles.server.ipv4; + prefixLength = 24; + } + ]; + ipv6.addresses = [ + { + address = config.monorepo.profiles.server.ipv6; + prefixLength = 64; + } + ]; + useDHCP = lib.mkForce false; }; + }; - defaultGateway = lib.mkIf config.monorepo.profiles.server.enable config.monorepo.profiles.server.gateway; - useDHCP = false; - tempAddresses = lib.mkIf config.monorepo.profiles.server.enable "disabled"; - extraHosts = lib.mkIf config.monorepo.profiles.server.enable (lib.concatStringsSep "\n" prodHosts); - - domains = lib.mkIf config.monorepo.profiles.server.enable { - enable = true; - baseDomains = { - "${config.monorepo.vars.remoteHost}" = { - a.data = config.monorepo.profiles.server.ipv4; - aaaa.data = config.monorepo.profiles.server.ipv6; - }; - "${config.monorepo.vars.orgHost}" = { - a.data = config.monorepo.profiles.server.ipv4; - aaaa.data = config.monorepo.profiles.server.ipv6; - txt = { - data = "v=spf1 ip4:${config.monorepo.profiles.server.ipv4} ip6:${config.monorepo.profiles.server.ipv6} -all"; - }; + defaultGateway = lib.mkIf config.monorepo.profiles.server.enable config.monorepo.profiles.server.gateway; + useDHCP = false; + tempAddresses = lib.mkIf config.monorepo.profiles.server.enable "disabled"; + extraHosts = lib.mkIf config.monorepo.profiles.server.enable (lib.concatStringsSep "\n" prodHosts); + + domains = lib.mkIf config.monorepo.profiles.server.enable { + enable = true; + baseDomains = { + "${config.monorepo.vars.remoteHost}" = { + a.data = config.monorepo.profiles.server.ipv4; + aaaa.data = config.monorepo.profiles.server.ipv6; + }; + "${config.monorepo.vars.orgHost}" = { + a.data = config.monorepo.profiles.server.ipv4; + aaaa.data = config.monorepo.profiles.server.ipv6; + txt = { + data = "v=spf1 ip4:${config.monorepo.profiles.server.ipv4} ip6:${config.monorepo.profiles.server.ipv6} -all"; }; }; }; + }; - nameservers = [ "8.8.8.8" "1.1.1.1"]; - dhcpcd.enable = (! config.monorepo.profiles.server.enable); - networkmanager = { - enable = lib.mkForce (! config.monorepo.profiles.server.enable); # rpis need network - wifi = { - powersave = false; - }; - ensureProfiles = { - profiles = { - home-wifi = { - connection = { - id = "TELUS6572"; - permissions = ""; - type = "wifi"; - }; - ipv4 = { - dns-search = ""; - method = "auto"; - }; - ipv6 = { - addr-gen-mode = "stable-privacy"; - dns-search = ""; - method = "auto"; - }; - wifi = { - mac-address-blacklist = ""; - mode = "infrastructure"; - ssid = "TELUS6572"; - }; - wifi-security = { - auth-alg = "open"; - key-mgmt = "wpa-psk"; - # when someone actually steals my internet then I will be concerned. - # This password only matters if you actually show up to my house in real life. - # That would perhaps allow for some nasty networking related shenanigans. - # I guess we'll cross that bridge when I get there. - psk = "b4xnrv6cG6GX"; - }; + nameservers = [ "8.8.8.8" "1.1.1.1"]; + dhcpcd.enable = (! config.monorepo.profiles.server.enable); + networkmanager = { + enable = lib.mkForce (! config.monorepo.profiles.server.enable); # rpis need network + wifi = { + powersave = false; + }; + ensureProfiles = { + profiles = { + home-wifi = { + connection = { + id = "TELUS6572"; + permissions = ""; + type = "wifi"; + }; + ipv4 = { + dns-search = ""; + method = "auto"; + }; + ipv6 = { + addr-gen-mode = "stable-privacy"; + dns-search = ""; + method = "auto"; + }; + wifi = { + mac-address-blacklist = ""; + mode = "infrastructure"; + ssid = "TELUS6572"; + }; + wifi-security = { + auth-alg = "open"; + key-mgmt = "wpa-psk"; + # when someone actually steals my internet then I will be concerned. + # This password only matters if you actually show up to my house in real life. + # That would perhaps allow for some nasty networking related shenanigans. + # I guess we'll cross that bridge when I get there. + psk = "b4xnrv6cG6GX"; }; }; }; }; - firewall = { - allowedTCPPorts = [ 22 11434 ]; - allowedUDPPorts = [ ]; - }; }; - - hardware = { - wirelessRegulatoryDatabase = true; - enableAllFirmware = true; - cpu.intel.updateMicrocode = true; - graphics.enable = ! config.monorepo.profiles.ttyonly.enable; - - bluetooth = { - enable = lib.mkDefault config.monorepo.profiles.desktop.enable; - powerOnBoot = lib.mkDefault config.monorepo.profiles.desktop.enable; - }; + firewall = { + allowedTCPPorts = [ 22 11434 ]; + allowedUDPPorts = [ ]; }; + }; - services = { - pulseaudio.enable = ! config.monorepo.profiles.pipewire.enable; - chrony = { - enable = true; - enableNTS = true; - servers = [ "time.cloudflare.com" "ptbtime1.ptb.de" "ptbtime2.ptb.de" ]; - }; - - jitterentropy-rngd.enable = true; - resolved.settings.Resolve.DNSSEC = true; - usbguard.enable = false; - dbus.apparmor = "enabled"; + hardware = { + wirelessRegulatoryDatabase = true; + enableAllFirmware = true; + cpu.intel.updateMicrocode = true; + graphics.enable = ! config.monorepo.profiles.ttyonly.enable; - # Misc. - udev = { - extraRules = ''''; - packages = if config.monorepo.profiles.workstation.enable then with pkgs; [ - platformio-core - platformio-core.udev - openocd - ] else []; - }; + bluetooth = { + enable = lib.mkDefault config.monorepo.profiles.desktop.enable; + powerOnBoot = lib.mkDefault config.monorepo.profiles.desktop.enable; + }; + }; - printing.enable = lib.mkDefault config.monorepo.profiles.workstation.enable; - udisks2.enable = (! config.monorepo.profiles.ttyonly.enable); + services = { + pulseaudio.enable = ! config.monorepo.profiles.pipewire.enable; + chrony = { + enable = true; + enableNTS = true; + servers = [ "time.cloudflare.com" "ptbtime1.ptb.de" "ptbtime2.ptb.de" ]; }; - programs = { - nix-ld.enable = true; - zsh.enable = true; - ssh.enableAskPassword = false; + jitterentropy-rngd.enable = true; + resolved.settings.Resolve.DNSSEC = true; + usbguard.enable = false; + dbus.apparmor = "enabled"; + + # Misc. + udev = { + extraRules = ''''; + packages = if config.monorepo.profiles.workstation.enable then with pkgs; [ + platformio-core + platformio-core.udev + openocd + ] else []; }; - security = { - acme = { - acceptTerms = true; - defaults.email = "${config.monorepo.vars.internetName}@gmail.com"; - }; - apparmor = { - enable = true; - killUnconfinedConfinables = true; - packages = with pkgs; [ - apparmor-profiles - ]; - }; + printing.enable = lib.mkDefault config.monorepo.profiles.workstation.enable; + udisks2.enable = (! config.monorepo.profiles.ttyonly.enable); + }; + + programs = { + nix-ld.enable = true; + zsh.enable = true; + ssh.enableAskPassword = false; + }; - pam.loginLimits = [ - { domain = "*"; item = "nofile"; type = "-"; value = "32768"; } - { domain = "*"; item = "memlock"; type = "-"; value = "32768"; } + security = { + acme = { + acceptTerms = true; + defaults.email = "${config.monorepo.vars.internetName}@gmail.com"; + }; + apparmor = { + enable = true; + killUnconfinedConfinables = true; + packages = with pkgs; [ + apparmor-profiles ]; - rtkit.enable = true; + }; - lockKernelModules = true; - protectKernelImage = true; + pam.loginLimits = [ + { domain = "*"; item = "nofile"; type = "-"; value = "32768"; } + { domain = "*"; item = "memlock"; type = "-"; value = "32768"; } + ]; + rtkit.enable = true; - allowSimultaneousMultithreading = true; - forcePageTableIsolation = true; + lockKernelModules = true; + protectKernelImage = true; - tpm2 = { - enable = true; - pkcs11.enable = true; - tctiEnvironment.enable = true; - }; + allowSimultaneousMultithreading = true; + forcePageTableIsolation = true; - auditd.enable = true; - audit.enable = true; - chromiumSuidSandbox.enable = (! config.monorepo.profiles.ttyonly.enable); - sudo.enable = true; + tpm2 = { + enable = true; + pkcs11.enable = true; + tctiEnvironment.enable = true; }; - xdg.portal = { - enable = (! config.monorepo.profiles.ttyonly.enable); - wlr.enable = (! config.monorepo.profiles.ttyonly.enable); - extraPortals = with pkgs; if (! config.monorepo.profiles.ttyonly.enable) then [ - xdg-desktop-portal-gtk - xdg-desktop-portal - xdg-desktop-portal-hyprland - ] else []; - config.common.default = "*"; - }; + auditd.enable = true; + audit.enable = true; + chromiumSuidSandbox.enable = (! config.monorepo.profiles.ttyonly.enable); + sudo.enable = true; + }; + + xdg.portal = { + enable = (! config.monorepo.profiles.ttyonly.enable); + wlr.enable = (! config.monorepo.profiles.ttyonly.enable); + extraPortals = with pkgs; if (! config.monorepo.profiles.ttyonly.enable) then [ + xdg-desktop-portal-gtk + xdg-desktop-portal + xdg-desktop-portal-hyprland + ] else []; + config.common.default = "*"; + }; - environment.etc."gitconfig".text = '' + environment.etc."gitconfig".text = '' [init] defaultBranch = main ''; - environment.extraInit = '' + environment.extraInit = '' umask 0022 ''; - environment.systemPackages = with pkgs; [ - restic - sbctl - gitFull - git-lfs - git-lfs-transfer - vim - curl - nmap - exiftool - (writeShellScriptBin "new-repo" - '' + environment.systemPackages = with pkgs; [ + restic + sbctl + gitFull + git-lfs + git-lfs-transfer + vim + curl + nmap + exiftool + (writeShellScriptBin "new-repo" + '' #!/bin/bash cd ${config.users.users.git.home} git init --bare "$1" vim "$1/description" chown -R git:git "$1" '' - ) - ]; + ) + ]; - users.groups = lib.genAttrs userGroups (_: lib.mkDefault {}); + users.groups = lib.genAttrs userGroups (_: lib.mkDefault {}); - users.users = lib.genAttrs userGroups (name: { + users.users = lib.genAttrs userGroups (name: { + isSystemUser = lib.mkDefault true; + group = "${name}"; + extraGroups = [ "acme" "nginx" ]; + }) // { + conduit = { isSystemUser = lib.mkDefault true; - group = "${name}"; - extraGroups = [ "acme" "nginx" ]; - }) // { - conduit = { - isSystemUser = lib.mkDefault true; - group = "conduit"; - extraGroups = []; - }; - matterbridge = { - isSystemUser = lib.mkDefault true; - group = "matterbridge"; - extraGroups = []; - }; + group = "conduit"; + extraGroups = []; + }; + matterbridge = { + isSystemUser = lib.mkDefault true; + group = "matterbridge"; + extraGroups = []; + }; - public-inbox = { - isSystemUser = lib.mkDefault true; - group = "public-inbox"; + public-inbox = { + isSystemUser = lib.mkDefault true; + group = "public-inbox"; - extraGroups = [ "acme" "nginx" "git" ]; - }; + extraGroups = [ "acme" "nginx" "git" ]; + }; - ircd = { - isSystemUser = lib.mkDefault true; - group = "ircd"; - home = "/home/ircd"; - }; - - nginx = { - group = "nginx"; - isSystemUser = lib.mkDefault true; - extraGroups = [ "acme" ]; - }; + ircd = { + isSystemUser = lib.mkDefault true; + group = "ircd"; + home = "/home/ircd"; + }; + + nginx = { + group = "nginx"; + isSystemUser = lib.mkDefault true; + extraGroups = [ "acme" ]; + }; + + root.openssh.authorizedKeys.keys = [ + config.monorepo.vars.sshKey + ]; - root.openssh.authorizedKeys.keys = [ + git = { + isSystemUser = true; + home = "/srv/git"; + shell = "/bin/sh"; + group = "git"; + openssh.authorizedKeys.keys = [ + config.monorepo.vars.sshKey + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIEF+mcL9nDkzVhCYyYWCIrP+b6oRiiaV509jywbD0Vq nix-on-droid@localhost" + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCedJm0yYB0qLah/Y7PqLVgNh6qp+yujssGtuR05KbZLzSnsLUjUMObMyjFB9xTKrSGDqyoMkNe2l5VXMBJ9wBKLbzqMWbkakAWOj7EC/qZ6dFWA075mniwAuWKY/Q8QYohAJbbeU4j0ObWrltd4ar2Ac9vsVyftYF5efg8PEqVdOxzrBn5taY1zCCRjee5ISeRDIovnBbq7x86jsx5VnXTjMN9FZCI2qmz992Sg/PPXpXat+O1YQlG0eBHEny2Ug9gaAYnGOVr6kZKE4lrjz47nrXVXO6lJsNXmuzTVnEgo30DAA3dV4fws/M5ptM5Pgg2qe94HyHWhhmtXOekWmGtP3YxpVe3M/SPl31UL570ZDuuCcpJTsbe90ZyXC3CiSJkLKbmFkfOgZ6DI2LT8KSp09/2NCtZYriLN/nXObn6gQzByGMxVyKNx2hh8ENt9hzTCAk5lYDK3g3wS8eLCY3EH/caEqT9mLZEZeRHtAhtfozo1VJL7sSZ0Zm7wiIxHylwOshh1sYI1gb1MgMqNnrr1t8+8UK+Q0NERQW3yiphG36HXWy/DdCG0EF+N850KbgH1FFur+m+3hZCZCFVp3tGCcOC+bxWMBT3+9yC6LARi5cFjLQaWLsNO5xEs4vqX3+s3QjJ0pAYDkgtoeY2Fbh+imN+JasWn/cSy5p3UdE4ZQ== andrei@kiss" + ]; + }; + "${config.monorepo.vars.userName}" = { + openssh.authorizedKeys.keys = [ config.monorepo.vars.sshKey ]; - git = { - isSystemUser = true; - home = "/srv/git"; - shell = "/bin/sh"; - group = "git"; - openssh.authorizedKeys.keys = [ - config.monorepo.vars.sshKey - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIEF+mcL9nDkzVhCYyYWCIrP+b6oRiiaV509jywbD0Vq nix-on-droid@localhost" - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCedJm0yYB0qLah/Y7PqLVgNh6qp+yujssGtuR05KbZLzSnsLUjUMObMyjFB9xTKrSGDqyoMkNe2l5VXMBJ9wBKLbzqMWbkakAWOj7EC/qZ6dFWA075mniwAuWKY/Q8QYohAJbbeU4j0ObWrltd4ar2Ac9vsVyftYF5efg8PEqVdOxzrBn5taY1zCCRjee5ISeRDIovnBbq7x86jsx5VnXTjMN9FZCI2qmz992Sg/PPXpXat+O1YQlG0eBHEny2Ug9gaAYnGOVr6kZKE4lrjz47nrXVXO6lJsNXmuzTVnEgo30DAA3dV4fws/M5ptM5Pgg2qe94HyHWhhmtXOekWmGtP3YxpVe3M/SPl31UL570ZDuuCcpJTsbe90ZyXC3CiSJkLKbmFkfOgZ6DI2LT8KSp09/2NCtZYriLN/nXObn6gQzByGMxVyKNx2hh8ENt9hzTCAk5lYDK3g3wS8eLCY3EH/caEqT9mLZEZeRHtAhtfozo1VJL7sSZ0Zm7wiIxHylwOshh1sYI1gb1MgMqNnrr1t8+8UK+Q0NERQW3yiphG36HXWy/DdCG0EF+N850KbgH1FFur+m+3hZCZCFVp3tGCcOC+bxWMBT3+9yC6LARi5cFjLQaWLsNO5xEs4vqX3+s3QjJ0pAYDkgtoeY2Fbh+imN+JasWn/cSy5p3UdE4ZQ== andrei@kiss" - ]; - }; - "${config.monorepo.vars.userName}" = { - openssh.authorizedKeys.keys = [ - config.monorepo.vars.sshKey - ]; - - linger = true; - initialPassword = "${config.monorepo.vars.userName}"; - isNormalUser = true; - description = config.monorepo.vars.fullName; - extraGroups = [ "networkmanager" "wheel" "video" "docker" "jackaudio" "tss" "dialout" "docker" "plugdev" ]; - shell = pkgs.zsh; - packages = []; - }; + linger = true; + initialPassword = "${config.monorepo.vars.userName}"; + isNormalUser = true; + description = config.monorepo.vars.fullName; + extraGroups = [ "networkmanager" "wheel" "video" "docker" "jackaudio" "tss" "dialout" "docker" "plugdev" ]; + shell = pkgs.zsh; + packages = []; }; + }; - nix = { - settings = { - keep-outputs = true; - keep-derivations = true; - auto-optimise-store = true; - max-jobs = 4; - cores = 0; - substituters = [ - "https://cache.nixos-cuda.org" - ]; - trusted-public-keys = [ - "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" - ]; - experimental-features = "nix-command flakes ca-derivations"; - trusted-users = [ "@wheel" ]; - }; - gc.automatic = true; + nix = { + settings = { + keep-outputs = true; + keep-derivations = true; + auto-optimise-store = true; + max-jobs = 4; + cores = 0; + substituters = [ + "https://cache.nixos-cuda.org" + ]; + trusted-public-keys = [ + "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" + ]; + experimental-features = "nix-command flakes ca-derivations"; + trusted-users = [ "@wheel" ]; }; - time.timeZone = config.monorepo.vars.timeZone; - i18n.defaultLocale = "en_CA.UTF-8"; - system.stateVersion = "24.11"; - } + gc.automatic = true; + }; + time.timeZone = config.monorepo.vars.timeZone; + i18n.defaultLocale = "en_CA.UTF-8"; + system.stateVersion = "24.11"; +} #+end_src ** Disko This is the disko configuration for my continuity system. It features a boot and ext4 partition, @@ -2926,427 +2926,427 @@ with configurable disk. *** GPT Common This is all configuration common to any GPT partitioned drive. I dynamically choose the partitioning scheme based on the options set. #+begin_src nix :tangle ../nix/disko/gpt-common.nix - { config, ... }: - let - matchSd = builtins.match "/dev/mmcblk[0-9]+" config.monorepo.vars.device != null; - partitions = if ((builtins.match "/dev/vd[a-z]+" config.monorepo.vars.device) != null) then - (import ./virtual-machine.nix) - else (if matchSd then - (import ./sd-card.nix) - else - (import (./. + "/${config.monorepo.vars.fileSystem}.nix"))); - spec = { - disko.devices = { - disk = { - main = { - type = "disk"; - device = config.monorepo.vars.device; - content = { - type = if matchSd then "mbr" else "gpt"; - inherit partitions; - }; +{ config, ... }: +let + matchSd = builtins.match "/dev/mmcblk[0-9]+" config.monorepo.vars.device != null; + partitions = if ((builtins.match "/dev/vd[a-z]+" config.monorepo.vars.device) != null) then + (import ./virtual-machine.nix) + else (if matchSd then + (import ./sd-card.nix) + else + (import (./. + "/${config.monorepo.vars.fileSystem}.nix"))); + spec = { + disko.devices = { + disk = { + main = { + type = "disk"; + device = config.monorepo.vars.device; + content = { + type = if matchSd then "mbr" else "gpt"; + inherit partitions; }; }; }; }; - in - { - monorepo.vars.diskoSpec = spec; - disko.devices = spec.disko.devices; - } + }; +in +{ + monorepo.vars.diskoSpec = spec; + disko.devices = spec.disko.devices; +} #+end_src *** ESP Boot Partition #+begin_src nix :tangle ../nix/disko/esp-boot.nix - { - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ "umask=0077" ]; - }; - } +{ + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; +} #+end_src *** Btrfs This is a fully featured drive configuration and the recommended configuration to install if on a workstation or laptop. Btrfs enables you to enable impermanence and also encrypt the drive with ~/tmp/secret.key~. #+begin_src nix :tangle ../nix/disko/btrfs.nix - { - ESP = (import ./esp-boot.nix) // { - size = "512M"; - }; - luks = { - size = "100%"; +{ + ESP = (import ./esp-boot.nix) // { + size = "512M"; + }; + luks = { + size = "100%"; + content = { + type = "luks"; + name = "crypted"; + passwordFile = "/tmp/secret.key"; content = { - type = "luks"; - name = "crypted"; - passwordFile = "/tmp/secret.key"; - content = { - type = "btrfs"; - extraArgs = [ "-f" ]; - subvolumes = { - "/root" = { - mountpoint = "/"; - mountOptions = [ - "compress=zstd" - "noatime" - ]; - }; + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "/root" = { + mountpoint = "/"; + mountOptions = [ + "compress=zstd" + "noatime" + ]; + }; - "/home" = { - mountpoint = "/home"; - mountOptions = [ - "compress=zstd" - "noatime" - ]; - }; + "/home" = { + mountpoint = "/home"; + mountOptions = [ + "compress=zstd" + "noatime" + ]; + }; - "/nix" = { - mountpoint = "/nix"; - mountOptions = [ - "compress=zstd" - "noatime" - ]; - }; + "/nix" = { + mountpoint = "/nix"; + mountOptions = [ + "compress=zstd" + "noatime" + ]; + }; - "/persistent" = { - mountpoint = "/persistent"; - mountOptions = [ - "compress=zstd" - "noatime" - ]; - }; + "/persistent" = { + mountpoint = "/persistent"; + mountOptions = [ + "compress=zstd" + "noatime" + ]; }; }; }; }; - } + }; +} #+end_src *** Ext4 This configuration is used for simple partitioning schemes with EFI. A simple ext4 disk with no encryption or any fancy features. You should be using EFI if you can. #+begin_src nix :tangle ../nix/disko/ext4.nix - { - ESP = (import ./esp-boot.nix) // { - size = "500M"; - priority = 1; - }; - root = { - size = "100%"; - priority = 2; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - }; +{ + ESP = (import ./esp-boot.nix) // { + size = "500M"; + priority = 1; + }; + root = { + size = "100%"; + priority = 2; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; }; - } + }; +} #+end_src *** Virtual Machine This configuration is meant for virtual machines where BIOS is the only option. #+begin_src nix :tangle ../nix/disko/virtual-machine.nix - { - boot = { - size = "1M"; - type = "EF02"; - }; - root = { - label = "disk-main-root"; - size = "100%"; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - }; +{ + boot = { + size = "1M"; + type = "EF02"; + }; + root = { + label = "disk-main-root"; + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; }; - } + }; +} #+end_src *** TODO SD Card #+begin_src nix :tangle ../nix/disko/sd-card.nix - { - boot = {}; - root = {}; - } +{ + boot = {}; + root = {}; +} #+end_src ** Home *** Default Home Profile As you can see, I have my installed home packages installed based on the profiles enabled. Also, I have many imports that we'll go through next. #+begin_src nix :tangle ../nix/modules/home/default.nix - { lib, config, pkgs, sops-nix, super, ... }: - let - dirContents = builtins.readDir ./.; - files = lib.filterAttrs (name: type: type == "regular" && lib.hasSuffix ".nix" name && name != "default.nix" && name != "emacs-packages.nix") dirContents; - in - { - imports = [ - sops-nix.homeManagerModules.sops - ] ++ lib.mapAttrsToList (name: _: ./. + "/${name}") files; - - options = { - monorepo.profiles = { - enable = lib.mkEnableOption "Enables home manager desktop configuration"; - # Programs - graphics.enable = lib.mkEnableOption "Enables graphical programs for user"; - lang-c.enable = lib.mkEnableOption "Enables C language support"; - lang-sh.enable = lib.mkEnableOption "Enables sh language support"; - lang-rust.enable = lib.mkEnableOption "Enables Rust language support"; - lang-python.enable = lib.mkEnableOption "Enables python language support"; - lang-sol.enable = lib.mkEnableOption "Enables solidity language support"; - lang-openscad.enable = lib.mkEnableOption "Enables openscad language support"; - lang-js.enable = lib.mkEnableOption "Enables javascript language support"; - lang-nix.enable = lib.mkEnableOption "Enables nix language support"; - lang-idris.enable = lib.mkEnableOption "Enables idris language support"; - lang-agda.enable = lib.mkEnableOption "Enables agda language support"; - lang-coq.enable = lib.mkEnableOption "Enables coq language support"; - lang-lean.enable = lib.mkEnableOption "Enables lean language support"; - lang-haskell.enable = lib.mkEnableOption "Enables haskell language support"; - crypto.enable = lib.mkEnableOption "Enables various cryptocurrency wallets"; - art.enable = lib.mkEnableOption "Enables various art programs"; - music.enable = lib.mkEnableOption "Enables mpd"; - workstation.enable = lib.mkEnableOption "Enables workstation packages (music production and others)"; - cuda.enable = lib.mkEnableOption "Enables CUDA user package builds"; - hyprland.enable = lib.mkEnableOption "Enables hyprland"; - email.enable = lib.mkEnableOption "Enables email"; - }; +{ lib, config, pkgs, sops-nix, super, ... }: +let + dirContents = builtins.readDir ./.; + files = lib.filterAttrs (name: type: type == "regular" && lib.hasSuffix ".nix" name && name != "default.nix" && name != "emacs-packages.nix") dirContents; +in +{ + imports = [ + sops-nix.homeManagerModules.sops + ] ++ lib.mapAttrsToList (name: _: ./. + "/${name}") files; + + options = { + monorepo.profiles = { + enable = lib.mkEnableOption "Enables home manager desktop configuration"; + # Programs + graphics.enable = lib.mkEnableOption "Enables graphical programs for user"; + lang-c.enable = lib.mkEnableOption "Enables C language support"; + lang-sh.enable = lib.mkEnableOption "Enables sh language support"; + lang-rust.enable = lib.mkEnableOption "Enables Rust language support"; + lang-python.enable = lib.mkEnableOption "Enables python language support"; + lang-sol.enable = lib.mkEnableOption "Enables solidity language support"; + lang-openscad.enable = lib.mkEnableOption "Enables openscad language support"; + lang-js.enable = lib.mkEnableOption "Enables javascript language support"; + lang-nix.enable = lib.mkEnableOption "Enables nix language support"; + lang-idris.enable = lib.mkEnableOption "Enables idris language support"; + lang-agda.enable = lib.mkEnableOption "Enables agda language support"; + lang-coq.enable = lib.mkEnableOption "Enables coq language support"; + lang-lean.enable = lib.mkEnableOption "Enables lean language support"; + lang-haskell.enable = lib.mkEnableOption "Enables haskell language support"; + crypto.enable = lib.mkEnableOption "Enables various cryptocurrency wallets"; + art.enable = lib.mkEnableOption "Enables various art programs"; + music.enable = lib.mkEnableOption "Enables mpd"; + workstation.enable = lib.mkEnableOption "Enables workstation packages (music production and others)"; + cuda.enable = lib.mkEnableOption "Enables CUDA user package builds"; + hyprland.enable = lib.mkEnableOption "Enables hyprland"; + email.enable = lib.mkEnableOption "Enables email"; }; + }; - config = { - home.packages = (if config.monorepo.profiles.email.enable then [ pkgs.mu ] else []) - ++ - (if config.monorepo.profiles.lang-c.enable then (with pkgs; [ - autobuild - clang - gdb - gnumake - bear - clang-tools - autotools-language-server - ]) else []) - ++ - (if config.monorepo.profiles.workstation.enable then (with pkgs; [ - mumble - ]) else []) - ++ - (if config.monorepo.profiles.lang-js.enable then (with pkgs; [ - nodejs - bun - yarn - typescript - typescript-language-server - vscode-langservers-extracted - ]) else []) - ++ - (if config.monorepo.profiles.lang-rust.enable then (with pkgs; [ - cargo - rust-analyzer - rustfmt - ]) else []) - ++ - (if config.monorepo.profiles.lang-python.enable then (with pkgs; [ - poetry - python3 - python314Packages.python-lsp-server - ]) else []) - ++ - (if config.monorepo.profiles.lang-sol.enable then (with pkgs; [ - solc - ]) else []) - ++ - (if config.monorepo.profiles.lang-openscad.enable then (with pkgs; [ - openscad - openscad-lsp - ]) else []) - ++ - (if config.monorepo.profiles.lang-sh.enable then (with pkgs; [ - bash-language-server - ]) else []) - ++ - (if config.monorepo.profiles.lang-haskell.enable then (with pkgs; [ - haskell-language-server - haskellPackages.hlint - ghc - ]) else []) - ++ - (if config.monorepo.profiles.lang-coq.enable then (with pkgs; [ - coq - ]) else []) - ++ - (if config.monorepo.profiles.lang-lean.enable then (with pkgs; [ - lean4 - ]) else []) - ++ - (if config.monorepo.profiles.lang-agda.enable then (with pkgs; [ - agda - ]) else []) - ++ - (if config.monorepo.profiles.lang-idris.enable then (with pkgs; [ - idris - idris2Packages.idris2Lsp - ]) else []) - ++ - (if config.monorepo.profiles.lang-nix.enable then (with pkgs; [ - nil - nixd - nixfmt - nix-prefetch-scripts - ]) else []) - ++ - (if config.monorepo.profiles.crypto.enable then (with pkgs; [ - bitcoin - monero-cli - monero-gui - ]) else []) - ++ - (if config.monorepo.profiles.art.enable then (with pkgs; [ - inkscape - krita - ]) else []) - ++ - (if config.monorepo.profiles.music.enable then (with pkgs; [ - mpc - sox - ]) else []) - ++ - (if config.monorepo.profiles.workstation.enable then (with pkgs; [ - alsa-utils - alsa-scarlett-gui - ardour - audacity - blender - foxdot - fluidsynth - qjackctl - qsynth - qpwgraph - imagemagick - supercollider - inkscape - kdePackages.kdenlive - kicad - ]) else []); - - monorepo.profiles = { - enable = lib.mkDefault super.monorepo.profiles.home.enable; - music.enable = lib.mkDefault config.monorepo.profiles.enable; - email.enable = lib.mkDefault config.monorepo.profiles.enable; - cuda.enable = lib.mkDefault super.monorepo.profiles.cuda.enable; - - # Programming - graphics.enable = lib.mkDefault (! super.monorepo.profiles.ttyonly.enable); - hyprland.enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - lang-c.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-rust.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-python.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-sol.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-sh.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-openscad.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-js.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-nix.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-coq.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-lean.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-haskell.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-idris.enable = lib.mkDefault config.monorepo.profiles.enable; - lang-agda.enable = lib.mkDefault config.monorepo.profiles.enable; - - crypto.enable = lib.mkDefault config.monorepo.profiles.enable; - art.enable = lib.mkDefault config.monorepo.profiles.enable; - workstation.enable = lib.mkDefault super.monorepo.profiles.workstation.enable; - }; + config = { + home.packages = (if config.monorepo.profiles.email.enable then [ pkgs.mu ] else []) + ++ + (if config.monorepo.profiles.lang-c.enable then (with pkgs; [ + autobuild + clang + gdb + gnumake + bear + clang-tools + autotools-language-server + ]) else []) + ++ + (if config.monorepo.profiles.workstation.enable then (with pkgs; [ + mumble + ]) else []) + ++ + (if config.monorepo.profiles.lang-js.enable then (with pkgs; [ + nodejs + bun + yarn + typescript + typescript-language-server + vscode-langservers-extracted + ]) else []) + ++ + (if config.monorepo.profiles.lang-rust.enable then (with pkgs; [ + cargo + rust-analyzer + rustfmt + ]) else []) + ++ + (if config.monorepo.profiles.lang-python.enable then (with pkgs; [ + poetry + python3 + python314Packages.python-lsp-server + ]) else []) + ++ + (if config.monorepo.profiles.lang-sol.enable then (with pkgs; [ + solc + ]) else []) + ++ + (if config.monorepo.profiles.lang-openscad.enable then (with pkgs; [ + openscad + openscad-lsp + ]) else []) + ++ + (if config.monorepo.profiles.lang-sh.enable then (with pkgs; [ + bash-language-server + ]) else []) + ++ + (if config.monorepo.profiles.lang-haskell.enable then (with pkgs; [ + haskell-language-server + haskellPackages.hlint + ghc + ]) else []) + ++ + (if config.monorepo.profiles.lang-coq.enable then (with pkgs; [ + coq + ]) else []) + ++ + (if config.monorepo.profiles.lang-lean.enable then (with pkgs; [ + lean4 + ]) else []) + ++ + (if config.monorepo.profiles.lang-agda.enable then (with pkgs; [ + agda + ]) else []) + ++ + (if config.monorepo.profiles.lang-idris.enable then (with pkgs; [ + idris + idris2Packages.idris2Lsp + ]) else []) + ++ + (if config.monorepo.profiles.lang-nix.enable then (with pkgs; [ + nil + nixd + nixfmt + nix-prefetch-scripts + ]) else []) + ++ + (if config.monorepo.profiles.crypto.enable then (with pkgs; [ + bitcoin + monero-cli + monero-gui + ]) else []) + ++ + (if config.monorepo.profiles.art.enable then (with pkgs; [ + inkscape + krita + ]) else []) + ++ + (if config.monorepo.profiles.music.enable then (with pkgs; [ + mpc + sox + ]) else []) + ++ + (if config.monorepo.profiles.workstation.enable then (with pkgs; [ + alsa-utils + alsa-scarlett-gui + ardour + audacity + blender + foxdot + fluidsynth + qjackctl + qsynth + qpwgraph + imagemagick + supercollider + inkscape + kdePackages.kdenlive + kicad + ]) else []); + + monorepo.profiles = { + enable = lib.mkDefault super.monorepo.profiles.home.enable; + music.enable = lib.mkDefault config.monorepo.profiles.enable; + email.enable = lib.mkDefault config.monorepo.profiles.enable; + cuda.enable = lib.mkDefault super.monorepo.profiles.cuda.enable; + + # Programming + graphics.enable = lib.mkDefault (! super.monorepo.profiles.ttyonly.enable); + hyprland.enable = lib.mkDefault config.monorepo.profiles.graphics.enable; + lang-c.enable = lib.mkDefault config.monorepo.profiles.enable; + lang-rust.enable = lib.mkDefault config.monorepo.profiles.enable; + lang-python.enable = lib.mkDefault config.monorepo.profiles.enable; + lang-sol.enable = lib.mkDefault config.monorepo.profiles.enable; + lang-sh.enable = lib.mkDefault config.monorepo.profiles.enable; + lang-openscad.enable = lib.mkDefault config.monorepo.profiles.enable; + lang-js.enable = lib.mkDefault config.monorepo.profiles.enable; + lang-nix.enable = lib.mkDefault config.monorepo.profiles.enable; + lang-coq.enable = lib.mkDefault config.monorepo.profiles.enable; + lang-lean.enable = lib.mkDefault config.monorepo.profiles.enable; + lang-haskell.enable = lib.mkDefault config.monorepo.profiles.enable; + lang-idris.enable = lib.mkDefault config.monorepo.profiles.enable; + lang-agda.enable = lib.mkDefault config.monorepo.profiles.enable; + + crypto.enable = lib.mkDefault config.monorepo.profiles.enable; + art.enable = lib.mkDefault config.monorepo.profiles.enable; + workstation.enable = lib.mkDefault super.monorepo.profiles.workstation.enable; }; - } + }; +} #+end_src *** Secrets These are some secrets that I use regularly for my programs in home. #+begin_src nix :tangle ../nix/modules/home/secrets.nix - { config, super, ... }: - { - sops = { - defaultSopsFile = if config.monorepo.profiles.graphics.enable - then ../../secrets/secrets.yaml - else ../../secrets/vps_secrets.yaml; +{ config, super, ... }: +{ + sops = { + defaultSopsFile = if config.monorepo.profiles.graphics.enable + then ../../secrets/secrets.yaml + else ../../secrets/vps_secrets.yaml; - age = { - keyFile = "/home/${super.monorepo.vars.userName}/.config/sops/age/keys.txt"; - }; + age = { + keyFile = "/home/${super.monorepo.vars.userName}/.config/sops/age/keys.txt"; + }; - secrets = if super.monorepo.profiles.desktop.enable then { - mail = { - format = "yaml"; - path = "${config.sops.defaultSymlinkPath}/mail"; - }; - cloudflare-dns = { - format = "yaml"; - path = "${config.sops.defaultSymlinkPath}/cloudflare-dns"; - }; - digikey = { - format = "yaml"; - path = "${config.sops.defaultSymlinkPath}/digikey"; - }; - dn42 = { - format = "yaml"; - path = "${config.sops.defaultSymlinkPath}/dn42"; - }; + secrets = if super.monorepo.profiles.desktop.enable then { + mail = { + format = "yaml"; + path = "${config.sops.defaultSymlinkPath}/mail"; + }; + cloudflare-dns = { + format = "yaml"; + path = "${config.sops.defaultSymlinkPath}/cloudflare-dns"; + }; + digikey = { + format = "yaml"; + path = "${config.sops.defaultSymlinkPath}/digikey"; + }; + dn42 = { + format = "yaml"; + path = "${config.sops.defaultSymlinkPath}/dn42"; + }; - ntfy = { - format = "yaml"; - path = "${config.sops.defaultSymlinkPath}/${super.monorepo.vars.ntfySecret}"; - sopsFile = ../../secrets/common_secrets.yaml; - }; - } else { + ntfy = { + format = "yaml"; + path = "${config.sops.defaultSymlinkPath}/${super.monorepo.vars.ntfySecret}"; + sopsFile = ../../secrets/common_secrets.yaml; }; - defaultSymlinkPath = "/run/user/1000/secrets"; - defaultSecretsMountPoint = "/run/user/1000/secrets.d"; + } else { }; - } + defaultSymlinkPath = "/run/user/1000/secrets"; + defaultSecretsMountPoint = "/run/user/1000/secrets.d"; + }; +} #+end_src *** Firefox I conditionally enable metamask based on the cryptocurrency option. Everything else here should be straightforward. #+begin_src nix :tangle ../nix/modules/home/firefox.nix - { lib, config, pkgs, ... }: - { - programs.librewolf = { - enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - package = pkgs.librewolf; - profiles = { - default = { - id = 0; - name = "default"; - isDefault = true; - - extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [ - ublock-origin - tree-style-tab - firefox-color - vimium - privacy-redirect - ] ++ (lib.optional config.monorepo.profiles.crypto.enable pkgs.nur.repos.rycee.firefox-addons.metamask); - settings = { - "privacy.resistFingerprinting.letterboxing" = true; - }; +{ lib, config, pkgs, ... }: +{ + programs.librewolf = { + enable = lib.mkDefault config.monorepo.profiles.graphics.enable; + package = pkgs.librewolf; + profiles = { + default = { + id = 0; + name = "default"; + isDefault = true; + + extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [ + ublock-origin + tree-style-tab + firefox-color + vimium + privacy-redirect + ] ++ (lib.optional config.monorepo.profiles.crypto.enable pkgs.nur.repos.rycee.firefox-addons.metamask); + settings = { + "privacy.resistFingerprinting.letterboxing" = true; }; }; }; - } + }; +} #+end_src *** Fcitx This is a virtual keyboard program for writing in multiple languages. I use this sometimes. #+begin_src nix :tangle ../nix/modules/home/fcitx.nix - { config, pkgs, lib, ... }: - { - i18n.inputMethod = { - type = "fcitx5"; - enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - fcitx5.addons = if config.monorepo.profiles.graphics.enable then (with pkgs; [ - fcitx5-gtk - qt6Packages.fcitx5-chinese-addons - qt6Packages.fcitx5-configtool - fcitx5-mozc - fcitx5-rime - ]) else []; - }; - } +{ config, pkgs, lib, ... }: +{ + i18n.inputMethod = { + type = "fcitx5"; + enable = lib.mkDefault config.monorepo.profiles.graphics.enable; + fcitx5.addons = if config.monorepo.profiles.graphics.enable then (with pkgs; [ + fcitx5-gtk + qt6Packages.fcitx5-chinese-addons + qt6Packages.fcitx5-configtool + fcitx5-mozc + fcitx5-rime + ]) else []; + }; +} #+end_src Note that I configure fcitx with chinese and some japanese input enabled. *** Emacs @@ -3355,115 +3355,129 @@ compilation, and because I can fetch their exact versions. Note that I have a st configuration here that tells emacs to load my real configuration at ~~/monorepo/config/emacs.org~ as an org file which gets automatically tangled to an emacs-lisp file. #+begin_src nix :tangle ../nix/modules/home/emacs.nix - { lib, config, pkgs, super, ... }: - { - programs.emacs = - { - enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - package = pkgs.emacs-pgtk; - extraConfig = '' +{ lib, config, pkgs, super, ... }: +{ + programs.emacs = + { + enable = lib.mkDefault config.monorepo.profiles.graphics.enable; + package = pkgs.emacs-pgtk; + extraConfig = '' (setq debug-on-error t) (setq system-email "${super.monorepo.vars.email}") (setq system-username "${super.monorepo.vars.internetName}") (setq system-fullname "${super.monorepo.vars.fullName}") (setq system-gpgkey "${super.monorepo.vars.gpgKey}") + (setq my-ispell-dictionary "${pkgs.scowl}/share/dict/words.txt") + (setq my-ispell-args '( + "--encoding=iso-8859-1" + "--mode=url" + "--data-dir=${pkgs.aspell}/lib/aspell" + "--dict-dir=${pkgs.aspellDicts.en}/lib/aspell")) + (load "${pkgs.writeText "init.el" (builtins.readFile ../../init.el)}") ''; - extraPackages = import ./emacs-packages.nix; - }; - } + extraPackages = import ./emacs-packages.nix; + }; +} #+end_src **** Emacs Packages I want to separate out these packages so that my parent flake which builds my website has a list of my packages. #+begin_src nix :tangle ../nix/modules/home/emacs-packages.nix - epkgs: [ - epkgs.agda2-mode - epkgs.all-the-icons - epkgs.auctex - epkgs.catppuccin-theme - epkgs.company - epkgs.company-solidity - epkgs.counsel - epkgs.centaur-tabs - epkgs.dashboard - epkgs.doom-themes - epkgs.doom-modeline - epkgs.irony - epkgs.elfeed - epkgs.elfeed-org - epkgs.elfeed-tube - epkgs.elfeed-tube-mpv - epkgs.elpher - epkgs.ement - epkgs.emmet-mode - epkgs.emms - epkgs.enwc - epkgs.evil - epkgs.evil-collection - epkgs.evil-commentary - epkgs.evil-org - epkgs.f - epkgs.flycheck - epkgs.general - epkgs.gptel - epkgs.gruvbox-theme - epkgs.haskell-mode - epkgs.htmlize - epkgs.idris-mode - epkgs.irony-eldoc - epkgs.ivy - epkgs.ivy-pass - epkgs.kiwix - epkgs.latex-preview-pane - epkgs.lsp-ivy - epkgs.lsp-mode - epkgs.lsp-haskell - epkgs.lyrics-fetcher - epkgs.mastodon - epkgs.magit - epkgs.magit-delta - epkgs.mu4e - epkgs.minuet - epkgs.nix-mode - epkgs.org-contrib - epkgs.org-fragtog - epkgs.org-journal - epkgs.org-roam - epkgs.org-roam-ui - epkgs.org-superstar - epkgs.page-break-lines - epkgs.password-store - epkgs.pdf-tools - epkgs.pinentry - epkgs.platformio-mode - epkgs.projectile - epkgs.rustic - epkgs.scad-mode - epkgs.simple-httpd - epkgs.solidity-flycheck - epkgs.solidity-mode - epkgs.sudo-edit - epkgs.telega - epkgs.treemacs - epkgs.treemacs-evil - epkgs.treemacs-magit - epkgs.treemacs-projectile - epkgs.treesit-auto - epkgs.typescript-mode - epkgs.unicode-fonts - epkgs.use-package - epkgs.vterm - epkgs.wgrep - epkgs.web-mode - epkgs.websocket - epkgs.which-key - epkgs.writegood-mode - epkgs.writeroom-mode - epkgs.yaml-mode - epkgs.yasnippet - epkgs.yasnippet-snippets - ] +epkgs: [ + epkgs.all-the-icons + epkgs.agda2-mode + epkgs.auctex + epkgs.catppuccin-theme + epkgs.company + epkgs.company-box + epkgs.company-solidity + epkgs.counsel + epkgs.centaur-tabs + epkgs.dash + epkgs.dashboard + epkgs.doom-themes + epkgs.doom-modeline + epkgs.indent-bars + epkgs.irony + epkgs.elfeed + epkgs.elfeed-org + epkgs.elfeed-tube + epkgs.elfeed-tube-mpv + epkgs.elpher + epkgs.ement + epkgs.emmet-mode + epkgs.emms + epkgs.engrave-faces + epkgs.enwc + epkgs.evil + epkgs.evil-collection + epkgs.evil-commentary + epkgs.evil-org + epkgs.f + epkgs.flycheck + epkgs.general + epkgs.git-gutter + epkgs.gptel + epkgs.gruvbox-theme + epkgs.haskell-mode + epkgs.htmlize + epkgs.idris-mode + epkgs.irony-eldoc + epkgs.ivy + epkgs.ivy-posframe + epkgs.latex-preview-pane + epkgs.lsp-ivy + epkgs.lsp-mode + epkgs.lsp-haskell + epkgs.lyrics-fetcher + epkgs.mastodon + epkgs.magit + epkgs.magit-delta + epkgs.mu4e + epkgs.mixed-pitch + epkgs.minuet + epkgs.nix-mode + epkgs.org-contrib + epkgs.org-fragtog + epkgs.org-journal + epkgs.org-modern + epkgs.org-roam + epkgs.org-roam-ui + epkgs.page-break-lines + epkgs.password-store + epkgs.pdf-tools + epkgs.pinentry + epkgs.platformio-mode + epkgs.projectile + epkgs.rustic + epkgs.s + epkgs.solaire-mode + epkgs.scad-mode + epkgs.simple-httpd + epkgs.solidity-flycheck + epkgs.solidity-mode + epkgs.sudo-edit + epkgs.treemacs + epkgs.treemacs-evil + epkgs.treemacs-magit + epkgs.treemacs-projectile + epkgs.treemacs-all-the-icons + epkgs.all-the-icons-ivy-rich + epkgs.treesit-auto + epkgs.typescript-mode + epkgs.use-package + epkgs.vterm + epkgs.wgrep + epkgs.web-mode + epkgs.websocket + epkgs.which-key + epkgs.writegood-mode + epkgs.writeroom-mode + epkgs.yaml-mode + epkgs.yasnippet + epkgs.yasnippet-snippets +] #+end_src *** Gammastep This is a program like redshift for making your screen emit more red and less blue light. Here @@ -3495,330 +3509,330 @@ the timezone. My git configuration uses information set in the ~vars.nix~ in order to set configuration options. Make sure those are set correctly. I've set it to sign by default. #+begin_src nix :tangle ../nix/modules/home/git.nix - { pkgs, lib, config, super, ... }: - { - programs.git = { - enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - package = pkgs.gitFull; - lfs.enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - userName = super.monorepo.vars.fullName; - userEmail = "${super.monorepo.vars.email}"; - signing = { - key = super.monorepo.vars.gpgKey; - signByDefault = true; - }; - - extraConfig = { - init.defaultBranch = "main"; - credential."mail.${super.monorepo.vars.orgHost}" = { - username = "${super.monorepo.vars.email}"; - helper = "!f() { test \"$1\" = get && echo \"password=$(cat /run/user/1000/secrets/mail)\"; }; f"; - }; +{ pkgs, lib, config, super, ... }: +{ + programs.git = { + enable = lib.mkDefault config.monorepo.profiles.graphics.enable; + package = pkgs.gitFull; + lfs.enable = lib.mkDefault config.monorepo.profiles.graphics.enable; + userName = super.monorepo.vars.fullName; + userEmail = "${super.monorepo.vars.email}"; + signing = { + key = super.monorepo.vars.gpgKey; + signByDefault = true; + }; - sendemail = { - smtpserver = "mail.${super.monorepo.vars.orgHost}"; - smtpuser = "${super.monorepo.vars.email}"; - smtpserverport = 465; - smtpencryption = "ssl"; - }; + extraConfig = { + init.defaultBranch = "main"; + credential."mail.${super.monorepo.vars.orgHost}" = { + username = "${super.monorepo.vars.email}"; + helper = "!f() { test \"$1\" = get && echo \"password=$(cat /run/user/1000/secrets/mail)\"; }; f"; }; - aliases = { - pl = "pull"; - ps = "push"; - co = "checkout"; - c = "commit"; - a = "add"; - st = "status"; - sw = "switch"; - b = "branch"; + sendemail = { + smtpserver = "mail.${super.monorepo.vars.orgHost}"; + smtpuser = "${super.monorepo.vars.email}"; + smtpserverport = 465; + smtpencryption = "ssl"; }; }; - } + + aliases = { + pl = "pull"; + ps = "push"; + co = "checkout"; + c = "commit"; + a = "add"; + st = "status"; + sw = "switch"; + b = "branch"; + }; + }; +} #+end_src *** Hyprland My compositor/window manager. This automatically starts on startup. Instructions on how to use this component will come soon. #+begin_src nix :tangle ../nix/modules/home/hyprland.nix - { lib, config, wallpapers, pkgs, scripts, ... }: - { - wayland.windowManager.hyprland = { - enable = lib.mkDefault config.monorepo.profiles.hyprland.enable; - package = pkgs.hyprland; - xwayland.enable = true; - systemd.enable = true; - settings = { - "$mod" = "SUPER"; - bezier = [ - "overshot, 0.05, 0.9, 0.1, 1.05" - ]; - animation = [ - # "workspaces, 1, 10, overshot" - "windows, 1, 2, default" - "workspaces, 1, 2, default, slidefade 20%" - ]; - exec-once = [ - "waybar" - "swww-daemon --format xrgb" - "sh -c 'swww img \"$(find ${wallpapers} -type f \\( -iname \"*.jpg\" -o -iname \"*.png\" \\) | shuf -n1)\"'" - "fcitx5-remote -r" - "fcitx5 -d --replace" - "fcitx5-remote -r" - "emacs" - "librewolf" - ]; - env = [ - "LIBVA_DRIVER_NAME,nvidia" - "XDG_SESSION_TYPE,wayland" - "GBM_BACKEND,nvidia-drm" - "__GLX_VENDOR_LIBRARY_NAME,nvidia" - "ELECTRON_OZONE_PLATFORM_HINT,auto" - ]; +{ lib, config, wallpapers, pkgs, scripts, ... }: +{ + wayland.windowManager.hyprland = { + enable = lib.mkDefault config.monorepo.profiles.hyprland.enable; + package = pkgs.hyprland; + xwayland.enable = true; + systemd.enable = true; + settings = { + "$mod" = "SUPER"; + bezier = [ + "overshot, 0.05, 0.9, 0.1, 1.05" + ]; + animation = [ + # "workspaces, 1, 10, overshot" + "windows, 1, 2, default" + "workspaces, 1, 2, default, slidefade 20%" + ]; + exec-once = [ + "waybar" + "swww-daemon --format xrgb" + "sh -c 'swww img \"$(find ${wallpapers} -type f \\( -iname \"*.jpg\" -o -iname \"*.png\" \\) | shuf -n1)\"'" + "fcitx5-remote -r" + "fcitx5 -d --replace" + "fcitx5-remote -r" + "emacs" + "librewolf" + ]; + env = [ + "LIBVA_DRIVER_NAME,nvidia" + "XDG_SESSION_TYPE,wayland" + "GBM_BACKEND,nvidia-drm" + "__GLX_VENDOR_LIBRARY_NAME,nvidia" + "ELECTRON_OZONE_PLATFORM_HINT,auto" + ]; - monitor = [ - "DP-4,2560x1440@165.000000,0x0,1" - "Unknown-1,disable" - ]; + monitor = [ + "DP-4,2560x1440@165.000000,0x0,1" + "Unknown-1,disable" + ]; - layerrule = [ - { - name = "waybar blur"; - "match:namespace" = "waybar"; - blur = "on"; - } - ]; + layerrule = [ + { + name = "waybar blur"; + "match:namespace" = "waybar"; + blur = "on"; + } + ]; - windowrule = [ - { - name = "emacs"; - "match:class" = "emacs"; - workspace = 1; - } - { - name = "librewolf"; - "match:class" = "librewolf"; - workspace = 2; - } - { - name = "chromium-browser"; - "match:class" = "chromium-browser"; - workspace = 2; - } - { - name = "signal"; - "match:class" = "signal"; - workspace = 3; - } - { - name = "Element"; - "match:class" = "Element"; - workspace = 3; - } - { - name = "pavucontrol"; - "match:class" = "pavucontrol"; - workspace = 4; - } - { - name = "qpwgraph"; - "match:class" = "qpwgraph"; - workspace = 4; - } - { - name = "mpv"; - "match:class" = "mpv"; - workspace = 4; - } - ]; + windowrule = [ + { + name = "emacs"; + "match:class" = "emacs"; + workspace = 1; + } + { + name = "librewolf"; + "match:class" = "librewolf"; + workspace = 2; + } + { + name = "chromium-browser"; + "match:class" = "chromium-browser"; + workspace = 2; + } + { + name = "signal"; + "match:class" = "signal"; + workspace = 3; + } + { + name = "Element"; + "match:class" = "Element"; + workspace = 3; + } + { + name = "pavucontrol"; + "match:class" = "pavucontrol"; + workspace = 4; + } + { + name = "qpwgraph"; + "match:class" = "qpwgraph"; + workspace = 4; + } + { + name = "mpv"; + "match:class" = "mpv"; + workspace = 4; + } + ]; - bind = [ - "$mod, F, exec, librewolf" - "$mod, Return, exec, kitty" - "$mod, E, exec, emacs" - "$mod, B, exec, bitcoin-qt" - "$mod, S, exec, pavucontrol" - "$mod, M, exec, monero-wallet-gui" - "$mod, V, exec, element-desktop" - "$mod, C, exec, signal-desktop" - "$mod, D, exec, wofi --show run" - "$mod, P, exec, bash ${scripts}/powermenu.sh" - "$mod, Q, killactive" - "$mod SHIFT, H, movewindow, l" - "$mod SHIFT, L, movewindow, r" - "$mod SHIFT, K, movewindow, u" - "$mod SHIFT, J, movewindow, d" - - "$mod SHIFT, T, togglefloating" - "$mod SHIFT, F, fullscreen" - - "$mod, H, movefocus, l" - "$mod, L, movefocus, r" - "$mod, K, movefocus, u" - "$mod, J, movefocus, d" - ", XF86AudioPlay, exec, mpc toggle" - ", Print, exec, grim" - - "$mod, right, resizeactive, 30 0" - "$mod, left, resizeactive, -30 0" - "$mod, up, resizeactive, 0 -30" - "$mod, down, resizeactive, 0 30" - ] - ++ ( - builtins.concatLists (builtins.genList - ( - x: - let - ws = - let - c = (x + 1) / 10; - in - builtins.toString (x + 1 - (c * 10)); - in - [ - "$mod, ${ws}, workspace, ${toString (x + 1)}" - "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" - ] - ) - 10) - ); - bindm = [ - "$mod, mouse:272, movewindow" - "$mod, mouse:273, resizewindow" - "$mod ALT, mouse:272, resizewindow" - ]; - binde = [ - ", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+" - ", XF86AudioLowerVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-" - ", XF86AudioNext, exec, mpc next" - ", XF86AudioPrev, exec, mpc prev" - ", XF86MonBrightnessUp , exec, xbacklight -inc 10" - ", XF86MonBrightnessDown, exec, xbacklight -dec 10" - ]; - decoration = { - blur = { - enabled = true; - size = 9; - passes = 4; - contrast = 0.8; - brightness = 1.1; - noise = 0.02; - new_optimizations = true; - ignore_opacity = true; - xray = false; - }; - rounding = 5; - }; - input = { - scroll_method = "on_button_down"; - scroll_button = 276; - sensitivity = -0.5; - kb_options = "caps:swapescape"; - repeat_delay = 300; - repeat_rate = 50; - natural_scroll = false; - touchpad = { - natural_scroll = true; - disable_while_typing = true; - tap-to-click = true; - }; - }; - cursor = { - no_hardware_cursors = true; + bind = [ + "$mod, F, exec, librewolf" + "$mod, Return, exec, kitty" + "$mod, E, exec, emacs" + "$mod, B, exec, bitcoin-qt" + "$mod, S, exec, pavucontrol" + "$mod, M, exec, monero-wallet-gui" + "$mod, V, exec, element-desktop" + "$mod, C, exec, signal-desktop" + "$mod, D, exec, wofi --show run" + "$mod, P, exec, bash ${scripts}/powermenu.sh" + "$mod, Q, killactive" + "$mod SHIFT, H, movewindow, l" + "$mod SHIFT, L, movewindow, r" + "$mod SHIFT, K, movewindow, u" + "$mod SHIFT, J, movewindow, d" + + "$mod SHIFT, T, togglefloating" + "$mod SHIFT, F, fullscreen" + + "$mod, H, movefocus, l" + "$mod, L, movefocus, r" + "$mod, K, movefocus, u" + "$mod, J, movefocus, d" + ", XF86AudioPlay, exec, mpc toggle" + ", Print, exec, grim" + + "$mod, right, resizeactive, 30 0" + "$mod, left, resizeactive, -30 0" + "$mod, up, resizeactive, 0 -30" + "$mod, down, resizeactive, 0 30" + ] + ++ ( + builtins.concatLists (builtins.genList + ( + x: + let + ws = + let + c = (x + 1) / 10; + in + builtins.toString (x + 1 - (c * 10)); + in + [ + "$mod, ${ws}, workspace, ${toString (x + 1)}" + "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" + ] + ) + 10) + ); + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + "$mod ALT, mouse:272, resizewindow" + ]; + binde = [ + ", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+" + ", XF86AudioLowerVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-" + ", XF86AudioNext, exec, mpc next" + ", XF86AudioPrev, exec, mpc prev" + ", XF86MonBrightnessUp , exec, xbacklight -inc 10" + ", XF86MonBrightnessDown, exec, xbacklight -dec 10" + ]; + decoration = { + blur = { + enabled = true; + size = 9; + passes = 4; + contrast = 0.8; + brightness = 1.1; + noise = 0.02; + new_optimizations = true; + ignore_opacity = true; + xray = false; }; - misc = { - force_default_wallpaper = 0; - disable_hyprland_logo = true; + rounding = 5; + }; + input = { + scroll_method = "on_button_down"; + scroll_button = 276; + sensitivity = -0.5; + kb_options = "caps:swapescape"; + repeat_delay = 300; + repeat_rate = 50; + natural_scroll = false; + touchpad = { + natural_scroll = true; + disable_while_typing = true; + tap-to-click = true; }; }; + cursor = { + no_hardware_cursors = true; + }; + misc = { + force_default_wallpaper = 0; + disable_hyprland_logo = true; + }; }; - } + }; +} #+end_src *** Kitty I've set my terminal, kitty, to use catppuccin colors. #+begin_src nix :tangle ../nix/modules/home/kitty.nix - { lib, config, ... }: - { - programs.kitty = { - enable = lib.mkDefault (config.monorepo.profiles.hyprland.enable && config.monorepo.profiles.graphics.enable); - settings = { - enable_audio_bell = false; - font_family = "Iosevka Nerd Font"; - font_size = 14; - confirm_os_window_close = 0; - background_opacity = "0.7"; - # Catppuccin theme - foreground = "#cdd6f4"; - background = "#1e1e2e"; - selection_foreground = "#1e1e2e"; - selection_background = "#f5e0dc"; - cursor = "#f5e0dc"; - cursor_text_color = "#1e1e2e"; - url_color = "#f5e0dc"; - active_border_color = "#B4BEFE"; - inactive_border_color = "#6C7086"; - bell_border_color = "#F9E2AF"; - wayland_titlebar_color = "#1E1E2E"; - macos_titlebar_color = "#1E1E2E"; - active_tab_foreground = "#11111B"; - active_tab_background = "#CBA6F7"; - inactive_tab_foreground = "#CDD6F4"; - inactive_tab_background = "#181825"; - tab_bar_background = "#11111B"; - mark1_foreground = "#1E1E2E"; - mark1_background = "#B4BEFE"; - mark2_foreground = "#1E1E2E"; - mark2_background = "#CBA6F7"; - mark3_foreground = "#1E1E2E"; - mark3_background = "#74C7EC"; - color0 = "#45475A"; - color8 = "#585B70"; - color1 = "#F38BA8"; - color9 = "#F38BA8"; - color2 = "#A6E3A1"; - color10 = "#A6E3A1"; - color3 = "#F9E2AF"; - color11 = "#F9E2AF"; - color4 = "#89B4FA"; - color12 = "#89B4FA"; - color5 = "#F5C2E7"; - color13 = "#F5C2E7"; - color6 = "#94E2D5"; - color14 = "#94E2D5"; - color7 = "#BAC2DE"; - color15 = "#A6ADC8"; - }; +{ lib, config, ... }: +{ + programs.kitty = { + enable = lib.mkDefault (config.monorepo.profiles.hyprland.enable && config.monorepo.profiles.graphics.enable); + settings = { + enable_audio_bell = false; + font_family = "Iosevka Nerd Font"; + font_size = 14; + confirm_os_window_close = 0; + background_opacity = "0.7"; + # Catppuccin theme + foreground = "#cdd6f4"; + background = "#1e1e2e"; + selection_foreground = "#1e1e2e"; + selection_background = "#f5e0dc"; + cursor = "#f5e0dc"; + cursor_text_color = "#1e1e2e"; + url_color = "#f5e0dc"; + active_border_color = "#B4BEFE"; + inactive_border_color = "#6C7086"; + bell_border_color = "#F9E2AF"; + wayland_titlebar_color = "#1E1E2E"; + macos_titlebar_color = "#1E1E2E"; + active_tab_foreground = "#11111B"; + active_tab_background = "#CBA6F7"; + inactive_tab_foreground = "#CDD6F4"; + inactive_tab_background = "#181825"; + tab_bar_background = "#11111B"; + mark1_foreground = "#1E1E2E"; + mark1_background = "#B4BEFE"; + mark2_foreground = "#1E1E2E"; + mark2_background = "#CBA6F7"; + mark3_foreground = "#1E1E2E"; + mark3_background = "#74C7EC"; + color0 = "#45475A"; + color8 = "#585B70"; + color1 = "#F38BA8"; + color9 = "#F38BA8"; + color2 = "#A6E3A1"; + color10 = "#A6E3A1"; + color3 = "#F9E2AF"; + color11 = "#F9E2AF"; + color4 = "#89B4FA"; + color12 = "#89B4FA"; + color5 = "#F5C2E7"; + color13 = "#F5C2E7"; + color6 = "#94E2D5"; + color14 = "#94E2D5"; + color7 = "#BAC2DE"; + color15 = "#A6ADC8"; }; - } + }; +} #+end_src *** Mako This is my notification system. My flake automatically fetches the notification sound, so you are all set from the get-go! #+begin_src nix :tangle ../nix/modules/home/mako.nix - { lib, config, sounds, ... }: - { - services.mako = { - enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - settings = { - on-notify = "exec mpv ${sounds}/polite.ogg --no-config --no-video"; - background-color = "#11111bf8"; - text-color = "#cdd6f4"; - border-color = "#89b4faff"; - border-radius = 1; - font = "Fira Code 10"; - default-timeout = 3000; - }; +{ lib, config, sounds, ... }: +{ + services.mako = { + enable = lib.mkDefault config.monorepo.profiles.graphics.enable; + settings = { + on-notify = "exec mpv ${sounds}/polite.ogg --no-config --no-video"; + background-color = "#11111bf8"; + text-color = "#cdd6f4"; + border-color = "#89b4faff"; + border-radius = 1; + font = "Fira Code 10"; + default-timeout = 3000; }; - } + }; +} #+end_src *** Mbsync Note that in order to use my email configuration, your imaps and smtps servers must be encrypted. This module uses the ~vars.nix~ as well as the home ~default.nix~ options. #+begin_src nix :tangle ../nix/modules/home/mbsync.nix - { lib, config, super, ... }: - { - programs.mbsync = { - enable = lib.mkDefault config.monorepo.profiles.email.enable; - extraConfig = '' +{ lib, config, super, ... }: +{ + programs.mbsync = { + enable = lib.mkDefault config.monorepo.profiles.email.enable; + extraConfig = '' IMAPAccount ${super.monorepo.vars.internetName} Host mail.${super.monorepo.vars.orgHost} User ${super.monorepo.vars.email} @@ -3845,18 +3859,18 @@ encrypted. This module uses the ~vars.nix~ as well as the home ~default.nix~ opt Expunge None SyncState * ''; - }; - } + }; +} #+end_src *** MSMTP This is the program I use to send email from emacs. It is really the same thing as above, just set the options to the ones you want in your system ~default.nix~. #+begin_src nix :tangle ../nix/modules/home/msmtp.nix - { lib, config, super, ... }: - { - programs.msmtp = { - enable = lib.mkDefault config.monorepo.profiles.email.enable; - extraConfig = '' +{ lib, config, super, ... }: +{ + programs.msmtp = { + enable = lib.mkDefault config.monorepo.profiles.email.enable; + extraConfig = '' # Set default values for all following accounts. defaults auth on @@ -3877,16 +3891,16 @@ just set the options to the ones you want in your system ~default.nix~. # Set a default account account default : ${super.monorepo.vars.internetName} ''; - }; - } + }; +} #+end_src *** Mpd This mpd configuration uses pipewire by default, and it should just work if you place music in the ~~/music~ directory and then run ~mpc add /~ afterwards. #+begin_src nix :tangle ../nix/modules/home/mpd.nix - { lib, config, super, ... }: - { - services.mpd = { +{ lib, config, super, ... }: +{ + services.mpd = { enable = lib.mkDefault config.monorepo.profiles.music.enable; dbFile = "/home/${super.monorepo.vars.userName}/.config/mpd/db"; dataDir = "/home/${super.monorepo.vars.userName}/.config/mpd/"; @@ -3901,12 +3915,12 @@ in the ~~/music~ directory and then run ~mpc add /~ afterwards. } audio_output { - type "httpd" - name "Ret2pop's Music Stream" - encoder "opus" - port "8000" - bitrate "128000" - format "48000:16:1" + type "httpd" + name "Ret2pop's Music Stream" + encoder "opus" + port "8000" + bitrate "128000" + format "48000:16:1" always_on "yes" tags "yes" } @@ -3924,10 +3938,10 @@ in the ~~/music~ directory and then run ~mpc add /~ afterwards. user "source" description "My MPD Stream" genre "Mixed" - } + } ''; - }; - } + }; +} #+end_src *** MPV I have some emacs + yt-dlp integrations with mpv with my rss feed, and therefore we need it @@ -3948,43 +3962,43 @@ here: #+end_src *** GTK #+begin_src nix :tangle ../nix/modules/home/gtk.nix - { lib, config, pkgs, ... }: - { - config = lib.mkIf config.monorepo.profiles.graphics.enable { - gtk = { - theme = { - name = "catppuccin-mocha-pink-standard"; - package = pkgs.catppuccin-gtk.override { - variant = "mocha"; - accents = [ "pink" ]; - }; +{ lib, config, pkgs, ... }: +{ + config = lib.mkIf config.monorepo.profiles.graphics.enable { + gtk = { + theme = { + name = "catppuccin-mocha-pink-standard"; + package = pkgs.catppuccin-gtk.override { + variant = "mocha"; + accents = [ "pink" ]; }; }; - xdg.configFile = { - "gtk-4.0/assets".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/assets"; - "gtk-4.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk.css"; - "gtk-4.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk-dark.css"; - - "gtk-3.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-3.0/gtk.css"; - "gtk-3.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-3.0/gtk-dark.css"; - "gtk-3.0/settings.ini".text = '' + }; + xdg.configFile = { + "gtk-4.0/assets".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/assets"; + "gtk-4.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk.css"; + "gtk-4.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk-dark.css"; + + "gtk-3.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-3.0/gtk.css"; + "gtk-3.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-3.0/gtk-dark.css"; + "gtk-3.0/settings.ini".text = '' [Settings] gtk-theme-name=${config.gtk.theme.name} gtk-application-prefer-dark-theme=1 ''; - }; }; - } + }; +} #+end_src *** Waybar This is the bar I use for my hyprland configuration. You will need to adjust the monitors field in the ~default.nix~ for it to really appear. #+begin_src nix :tangle ../nix/modules/home/waybar.nix - { lib, config, super, ... }: - { - programs.waybar = { - enable = lib.mkDefault config.monorepo.profiles.hyprland.enable; - style = '' +{ lib, config, super, ... }: +{ + programs.waybar = { + enable = lib.mkDefault config.monorepo.profiles.hyprland.enable; + style = '' ,* { border: none; border-radius: 0px; @@ -4022,32 +4036,32 @@ in the ~default.nix~ for it to really appear. } #workspaces button:hover { - background-color: #cdd6f4; - color: black; - border-radius: 16px; + background-color: #cdd6f4; + color: black; + border-radius: 16px; } #custom-date, #clock, #battery, #pulseaudio, #network, #custom-randwall, #custom-launcher { - background: transparent; - padding: 5px 5px 5px 5px; - margin: 5px 5px 5px 5px; + background: transparent; + padding: 5px 5px 5px 5px; + margin: 5px 5px 5px 5px; border-radius: 8px; border: solid 0px #f4d9e1; } #custom-date { - color: #D3869B; + color: #D3869B; } #custom-power { - color: #24283b; - background-color: #db4b4b; - border-radius: 5px; - margin-right: 10px; - margin-top: 5px; - margin-bottom: 5px; - margin-left: 0px; - padding: 5px 10px; + color: #24283b; + background-color: #db4b4b; + border-radius: 5px; + margin-right: 10px; + margin-top: 5px; + margin-bottom: 5px; + margin-left: 0px; + padding: 5px 10px; } #tray { @@ -4140,10 +4154,10 @@ in the ~default.nix~ for it to really appear. } #custom-playerctl { - background: #45475a; - padding-left: 15px; + background: #45475a; + padding-left: 15px; padding-right: 14px; - border-radius: 16px; + border-radius: 16px; /*border-left: solid 1px #282738;*/ /*border-right: solid 1px #282738;*/ margin-top: 5px; @@ -4230,30 +4244,30 @@ in the ~default.nix~ for it to really appear. font-weight: bold; } ''; - settings = { - mainBar = { - layer = "top"; - position = "top"; - height = 50; + settings = { + mainBar = { + layer = "top"; + position = "top"; + height = 50; - output = super.monorepo.vars.monitors; + output = super.monorepo.vars.monitors; - modules-left = [ "hyprland/workspaces" ]; - modules-center = [ "hyprland/window" ]; - modules-right = [ "battery" "clock" ]; + modules-left = [ "hyprland/workspaces" ]; + modules-center = [ "hyprland/window" ]; + modules-right = [ "battery" "clock" ]; - battery = { - format = "{icon} {capacity}%"; - format-icons = ["" "" "" "" "" ]; - }; + battery = { + format = "{icon} {capacity}%"; + format-icons = ["" "" "" "" "" ]; + }; - clock = { - format = "⏰ {:%a %d, %b %H:%M}"; - }; + clock = { + format = "⏰ {:%a %d, %b %H:%M}"; }; }; }; - } + }; +} #+end_src *** Wofi This is a run launcher for wayland. I also use it for my powermenu. @@ -4279,60 +4293,60 @@ This is a run launcher for wayland. I also use it for my powermenu. }; style = '' - @define-color rosewater #f5e0dc; - @define-color rosewater-rgb rgb(245, 224, 220); - @define-color flamingo #f2cdcd; - @define-color flamingo-rgb rgb(242, 205, 205); - @define-color pink #f5c2e7; - @define-color pink-rgb rgb(245, 194, 231); - @define-color mauve #cba6f7; - @define-color mauve-rgb rgb(203, 166, 247); - @define-color red #f38ba8; - @define-color red-rgb rgb(243, 139, 168); - @define-color maroon #eba0ac; - @define-color maroon-rgb rgb(235, 160, 172); - @define-color peach #fab387; - @define-color peach-rgb rgb(250, 179, 135); - @define-color yellow #f9e2af; - @define-color yellow-rgb rgb(249, 226, 175); - @define-color green #a6e3a1; - @define-color green-rgb rgb(166, 227, 161); - @define-color teal #94e2d5; - @define-color teal-rgb rgb(148, 226, 213); - @define-color sky #89dceb; - @define-color sky-rgb rgb(137, 220, 235); - @define-color sapphire #74c7ec; - @define-color sapphire-rgb rgb(116, 199, 236); - @define-color blue #89b4fa; - @define-color blue-rgb rgb(137, 180, 250); - @define-color lavender #b4befe; - @define-color lavender-rgb rgb(180, 190, 254); - @define-color text #cdd6f4; - @define-color text-rgb rgb(205, 214, 244); - @define-color subtext1 #bac2de; - @define-color subtext1-rgb rgb(186, 194, 222); - @define-color subtext0 #a6adc8; - @define-color subtext0-rgb rgb(166, 173, 200); - @define-color overlay2 #9399b2; - @define-color overlay2-rgb rgb(147, 153, 178); - @define-color overlay1 #7f849c; - @define-color overlay1-rgb rgb(127, 132, 156); - @define-color overlay0 #6c7086; - @define-color overlay0-rgb rgb(108, 112, 134); - @define-color surface2 #585b70; - @define-color surface2-rgb rgb(88, 91, 112); - @define-color surface1 #45475a; - @define-color surface1-rgb rgb(69, 71, 90); - @define-color surface0 #313244; - @define-color surface0-rgb rgb(49, 50, 68); - @define-color base #1e1e2e; - @define-color base-rgb rgb(30, 30, 46); - @define-color mantle #181825; - @define-color mantle-rgb rgb(24, 24, 37); - @define-color crust #11111b; - @define-color crust-rgb rgb(17, 17, 27); - - * { + @define-color rosewater #f5e0dc; + @define-color rosewater-rgb rgb(245, 224, 220); + @define-color flamingo #f2cdcd; + @define-color flamingo-rgb rgb(242, 205, 205); + @define-color pink #f5c2e7; + @define-color pink-rgb rgb(245, 194, 231); + @define-color mauve #cba6f7; + @define-color mauve-rgb rgb(203, 166, 247); + @define-color red #f38ba8; + @define-color red-rgb rgb(243, 139, 168); + @define-color maroon #eba0ac; + @define-color maroon-rgb rgb(235, 160, 172); + @define-color peach #fab387; + @define-color peach-rgb rgb(250, 179, 135); + @define-color yellow #f9e2af; + @define-color yellow-rgb rgb(249, 226, 175); + @define-color green #a6e3a1; + @define-color green-rgb rgb(166, 227, 161); + @define-color teal #94e2d5; + @define-color teal-rgb rgb(148, 226, 213); + @define-color sky #89dceb; + @define-color sky-rgb rgb(137, 220, 235); + @define-color sapphire #74c7ec; + @define-color sapphire-rgb rgb(116, 199, 236); + @define-color blue #89b4fa; + @define-color blue-rgb rgb(137, 180, 250); + @define-color lavender #b4befe; + @define-color lavender-rgb rgb(180, 190, 254); + @define-color text #cdd6f4; + @define-color text-rgb rgb(205, 214, 244); + @define-color subtext1 #bac2de; + @define-color subtext1-rgb rgb(186, 194, 222); + @define-color subtext0 #a6adc8; + @define-color subtext0-rgb rgb(166, 173, 200); + @define-color overlay2 #9399b2; + @define-color overlay2-rgb rgb(147, 153, 178); + @define-color overlay1 #7f849c; + @define-color overlay1-rgb rgb(127, 132, 156); + @define-color overlay0 #6c7086; + @define-color overlay0-rgb rgb(108, 112, 134); + @define-color surface2 #585b70; + @define-color surface2-rgb rgb(88, 91, 112); + @define-color surface1 #45475a; + @define-color surface1-rgb rgb(69, 71, 90); + @define-color surface0 #313244; + @define-color surface0-rgb rgb(49, 50, 68); + @define-color base #1e1e2e; + @define-color base-rgb rgb(30, 30, 46); + @define-color mantle #181825; + @define-color mantle-rgb rgb(24, 24, 37); + @define-color crust #11111b; + @define-color crust-rgb rgb(17, 17, 27); + + ,* { font-family: 'Iosevka Nerd Font', monospace; font-size: 14px; } @@ -4450,51 +4464,51 @@ This is a run launcher for wayland. I also use it for my powermenu. *** yt-dlp A classic program that allows you to download from youtube. Also has integrations with mpv. #+begin_src nix :tangle ../nix/modules/home/yt-dlp.nix - { lib, config, ... }: - { - programs.yt-dlp = { - enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - settings = { - embed-thumbnail = true; - embed-subs = true; - sub-langs = "all"; - downloader = "aria2c"; - downloader-args = "aria2c:'-c -x8 -s8 -k1M'"; - }; +{ lib, config, ... }: +{ + programs.yt-dlp = { + enable = lib.mkDefault config.monorepo.profiles.graphics.enable; + settings = { + embed-thumbnail = true; + embed-subs = true; + sub-langs = "all"; + downloader = "aria2c"; + downloader-args = "aria2c:'-c -x8 -s8 -k1M'"; }; - } + }; +} #+end_src *** pantalaimon #+begin_src nix :tangle ../nix/modules/home/pantalaimon.nix - { lib, ... }: - { - services.pantalaimon = { - enable = lib.mkDefault false; - settings = { - Default = { - LogLevel = "Debug"; - SSL = true; - }; - - local-matrix = { - Homeserver = "https://matrix.nullring.xyz"; - ListenAddress = "127.0.0.1"; - ListenPort = 8008; - }; +{ lib, ... }: +{ + services.pantalaimon = { + enable = lib.mkDefault false; + settings = { + Default = { + LogLevel = "Debug"; + SSL = true; }; + local-matrix = { + Homeserver = "https://matrix.nullring.xyz"; + ListenAddress = "127.0.0.1"; + ListenPort = 8008; + }; }; - } + + }; +} #+end_src *** Zsh My zsh config has some useful aliases that one should read through. Otherwise it is pretty standard. #+begin_src nix :tangle ../nix/modules/home/zsh.nix - { pkgs, systemHostName, super, ... }: - { - programs.zsh = { - enable = true; - initContent = '' +{ pkgs, systemHostName, super, ... }: +{ + programs.zsh = { + enable = true; + initContent = '' umask 0022 export EXTRA_CCFLAGS="-I/usr/include" source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh @@ -4502,51 +4516,51 @@ standard. export OLLAMA_MODEL="qwen3:14b" ''; - localVariables = { - EDITOR = "emacsclient --create-frame --alternate-editor=vim"; - INPUT_METHOD = "fcitx"; - QT_IM_MODULE = "fcitx"; - GTK_IM_MODULE = "fcitx"; - XMODIFIERS = "@im=fcitx"; - XIM_SERVERS = "fcitx"; - WXSUPPRESS_SIZER_FLAGS_CHECK = "1"; - }; + localVariables = { + EDITOR = "emacsclient --create-frame --alternate-editor=vim"; + INPUT_METHOD = "fcitx"; + QT_IM_MODULE = "fcitx"; + GTK_IM_MODULE = "fcitx"; + XMODIFIERS = "@im=fcitx"; + XIM_SERVERS = "fcitx"; + WXSUPPRESS_SIZER_FLAGS_CHECK = "1"; + }; - shellAliases = { - clone-secrets = "git clone ssh://\"$1\"/home/preston/secrets \"$HOME/secrets\""; - get-channel-id = "yt-dlp --print \"%(channel_id)s\" --playlist-end 1 \"$1\""; - se = "sops edit"; - f = "vim $(fzf)"; - e = "cd $(find . -type d -print | fzf)"; - c = "clear"; - g = "git"; - v = "vim"; - py = "python3"; - build-installer = "nix build $HOME/monorepo/nix#nixosConfigurations.installer.config.system.build.isoImage"; - rb = "sudo nixos-rebuild switch --flake $HOME/monorepo/nix#${systemHostName}"; - nfu = "cd ~/monorepo/nix && git add . && git commit -m \"new flake lock\" && nix flake update"; - usync = "rsync -azvP --chmod=\"Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r\" ~/monorepo/result/ root@${super.monorepo.vars.remoteHost}:/var/www/${super.monorepo.vars.internetName}-website/"; - usite - = "cd ~/src/publish-org-roam-ui && bash local.sh && rm -rf ~/website_html/graph_view; cp -r ~/src/publish-org-roam-ui/out ~/website_html/graph_view && rsync -azvP --chmod=\"Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r\" ~/website_html/ root@${super.monorepo.vars.remoteHost}:/var/www/${super.monorepo.vars.internetName}-website/"; - sai = "eval \"$(ssh-agent -s)\" && ssh-add ~/.ssh/id_ed25519 && ssh-add -l"; - }; - loginExtra = '' + shellAliases = { + clone-secrets = "git clone ssh://\"$1\"/home/preston/secrets \"$HOME/secrets\""; + get-channel-id = "yt-dlp --print \"%(channel_id)s\" --playlist-end 1 \"$1\""; + se = "sops edit"; + f = "vim $(fzf)"; + e = "cd $(find . -type d -print | fzf)"; + c = "clear"; + g = "git"; + v = "vim"; + py = "python3"; + build-installer = "nix build $HOME/monorepo/nix#nixosConfigurations.installer.config.system.build.isoImage"; + rb = "sudo nixos-rebuild switch --flake $HOME/monorepo/nix#${systemHostName}"; + nfu = "cd ~/monorepo/nix && git add . && git commit -m \"new flake lock\" && nix flake update"; + usync = "rsync -azvP --chmod=\"Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r\" ~/monorepo/result/ root@${super.monorepo.vars.remoteHost}:/var/www/${super.monorepo.vars.internetName}-website/"; + usite + = "cd ~/src/publish-org-roam-ui && bash local.sh && rm -rf ~/website_html/graph_view; cp -r ~/src/publish-org-roam-ui/out ~/website_html/graph_view && rsync -azvP --chmod=\"Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r\" ~/website_html/ root@${super.monorepo.vars.remoteHost}:/var/www/${super.monorepo.vars.internetName}-website/"; + sai = "eval \"$(ssh-agent -s)\" && ssh-add ~/.ssh/id_ed25519 && ssh-add -l"; + }; + loginExtra = '' if [[ "$(tty)" = "/dev/tty1" ]]; then exec Hyprland fi ''; - }; - } + }; +} #+end_src *** User This configuration is the backbone configuration for the default user. It specifies some generally useful packages and something every home should have, as well as some dependencies for these configurations. #+begin_src nix :tangle ../nix/modules/home/user.nix - { lib, config, pkgs, super, ... }: - { - home = { - activation.startup-files = lib.hm.dag.entryAfter [ "installPackages" ] '' +{ lib, config, pkgs, super, ... }: +{ + home = { + activation.startup-files = lib.hm.dag.entryAfter [ "installPackages" ] '' if [ ! -d "/home/${super.monorepo.vars.userName}/email/${super.monorepo.vars.internetName}/" ]; then mkdir -p /home/${super.monorepo.vars.userName}/email/${super.monorepo.vars.internetName}/ fi @@ -4567,61 +4581,66 @@ for these configurations. touch /home/${super.monorepo.vars.userName}/org/notes.org ''; - enableNixpkgsReleaseCheck = false; - username = super.monorepo.vars.userName; - homeDirectory = "/home/${super.monorepo.vars.userName}"; - stateVersion = "24.11"; + enableNixpkgsReleaseCheck = false; + username = super.monorepo.vars.userName; + homeDirectory = "/home/${super.monorepo.vars.userName}"; + stateVersion = "24.11"; - packages = with pkgs; (if config.monorepo.profiles.graphics.enable then [ - # wikipedia - # kiwix kiwix-tools - gnupg - unzip - mupdf - zathura + packages = with pkgs; (if config.monorepo.profiles.graphics.enable then [ + # wikipedia + # kiwix kiwix-tools + gnupg + unzip + mupdf + zathura - fzf - # passwords - age sops + fzf + # passwords + age sops - # formatting - ghostscript texliveFull pandoc + # formatting + ghostscript texliveFull pandoc - # Emacs Deps - graphviz jq + # Emacs Deps + graphviz jq - # Apps - octaveFull - grim swww vim kotatogram-desktop tg qwen-code element-desktop signal-desktop signal-cli thunderbird jami + # Apps + octaveFull + grim swww vim kotatogram-desktop tg qwen-code element-desktop signal-desktop signal-cli thunderbird jami - # Sound/media - pavucontrol alsa-utils imagemagick ffmpeg helvum + # Sound/media + pavucontrol alsa-utils imagemagick ffmpeg helvum - # Net - curl rsync gitFull iamb ungoogled-chromium + # Net + curl rsync gitFull iamb ungoogled-chromium - # Tor - torsocks tor-browser + # Tor + torsocks tor-browser - # For transfering secrets onto new system - stow + # For transfering secrets onto new system + stow - # fonts - nerd-fonts.iosevka noto-fonts noto-fonts-cjk-sans noto-fonts-color-emoji fira-code font-awesome_6 victor-mono - (aspellWithDicts - (dicts: with dicts; [ en en-computers en-science ])) + # fonts + nerd-fonts.iosevka noto-fonts noto-fonts-cjk-sans noto-fonts-color-emoji fira-code font-awesome_6 victor-mono + nerd-fonts.symbols-only emacs-all-the-icons-fonts lora - # Misc. - pinentry-gnome3 - x11_ssh_askpass - xdg-utils - acpilight - pfetch - libnotify - htop + aspell + aspellDicts.en-computers + aspellDicts.en + aspellDicts.en-science - (pkgs.writeShellScriptBin "help" - '' + # Misc. + pinentry-gnome3 + x11_ssh_askpass + xdg-utils + acpilight + pfetch + libnotify + htop + minify + + (pkgs.writeShellScriptBin "help" + '' #!/usr/bin/env sh # Portable, colored, nicely aligned alias list @@ -4632,7 +4651,7 @@ for these configurations. "${name} -> ${value}" ) aliases)} EOF - ) + ) # Align and color using awk echo "$aliases" | awk ' @@ -4657,249 +4676,249 @@ for these configurations. }' '') - (writeShellScriptBin "remote-build" - '' + (writeShellScriptBin "remote-build" + '' #!/bin/bash nixos-rebuild --sudo --ask-sudo-password --target-host "$1" switch --flake $HOME/monorepo#spontaneity '' - ) - (writeShellScriptBin "install-vps" - '' + ) + (writeShellScriptBin "install-vps" + '' #!/bin/bash nix run github:nix-community/nixos-anywhere -- --generate-hardware-config nixos-generate-config $HOME/monorepo/nix/systems/spontaneity/hardware-configuration.nix --flake $HOME/monorepo/nix#spontaneity --target-host "$1" '') - (writeShellScriptBin "secrets" - '' + (writeShellScriptBin "secrets" + '' #!/bin/bash cd "$HOME/secrets" git pull # repo is over LAN stow */ # manage secrets with gnu stow cd "$HOME" '') - (writeShellScriptBin "spontaneity-ci" - '' + (writeShellScriptBin "spontaneity-ci" + '' #!/bin/bash nixos-rebuild build-vm --flake $HOME/monorepo/nix#spontaneity && QEMU_OPTS="-serial stdio" ./result/bin/run-spontaneity-vm 2>&1 | tee vm-boot.log'') - ] else [ - pfetch - # net - curl - torsocks - rsync - ]); - }; + ] else [ + pfetch + # net + curl + torsocks + rsync + ]); + }; - services = { - gpg-agent = { - pinentry.package = pkgs.pinentry-emacs; - enable = true; - extraConfig = '' + services = { + gpg-agent = { + pinentry.package = pkgs.pinentry-emacs; + enable = true; + extraConfig = '' allow-emacs-pinentry allow-loopback-pinentry ''; - }; }; - xdg.mimeApps = { - enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - defaultApplications = { - "x-scheme-handler/mailto" = "emacsclient-mail.desktop"; - "text/html" = "librewolf.desktop"; - "text/xml" = "librewolf.desktop"; - "application/xhtml+xml" = "librewolf.desktop"; - "x-scheme-handler/http" = "librewolf.desktop"; - "x-scheme-handler/https" = "librewolf.desktop"; - "x-scheme-handler/about" = "librewolf.desktop"; - "x-scheme-handler/unknown" = "librewolf.desktop"; - }; + }; + xdg.mimeApps = { + enable = lib.mkDefault config.monorepo.profiles.graphics.enable; + defaultApplications = { + "x-scheme-handler/mailto" = "emacsclient-mail.desktop"; + "text/html" = "librewolf.desktop"; + "text/xml" = "librewolf.desktop"; + "application/xhtml+xml" = "librewolf.desktop"; + "x-scheme-handler/http" = "librewolf.desktop"; + "x-scheme-handler/https" = "librewolf.desktop"; + "x-scheme-handler/about" = "librewolf.desktop"; + "x-scheme-handler/unknown" = "librewolf.desktop"; }; + }; - programs.bash.enable = true; - fonts.fontconfig.enable = true; - } + programs.bash.enable = true; + fonts.fontconfig.enable = true; +} #+end_src * Systems ** Home This module dynamically imports the correct corresponding home.nix at the path. #+begin_src nix :tangle ../nix/systems/home.nix - { config, sops-nix, ... }: - { - home-manager = { - backupFileExtension = "backup"; - sharedModules = [ - sops-nix.homeManagerModules.sops - ]; - extraSpecialArgs = { - super = config; - }; - useGlobalPkgs = true; - useUserPackages = true; - users."${config.monorepo.vars.userName}" = (import (./. + "/${config.networking.hostName}/home.nix")); +{ config, sops-nix, ... }: +{ + home-manager = { + backupFileExtension = "backup"; + sharedModules = [ + sops-nix.homeManagerModules.sops + ]; + extraSpecialArgs = { + super = config; }; - } + useGlobalPkgs = true; + useUserPackages = true; + users."${config.monorepo.vars.userName}" = (import (./. + "/${config.networking.hostName}/home.nix")); + }; +} #+end_src ** Common These are the common includes for each of my systems. This ensures that we don't have to duplicate includes every time we want to add a new system. Also more common configuration can go here. #+begin_src nix :tangle ../nix/systems/common.nix - { ... }: - { - imports = [ - ./home.nix - ../modules/default.nix - ../disko/gpt-common.nix - ]; - # Put configuration (e.g. monorepo variable configuration) common to all configs here - } +{ ... }: +{ + imports = [ + ./home.nix + ../modules/default.nix + ../disko/gpt-common.nix + ]; + # Put configuration (e.g. monorepo variable configuration) common to all configs here +} #+end_src *** Home Manager Common Also I want to have the same kind of file for the home namespace. #+begin_src nix :tangle ../nix/systems/home-common.nix - { ... }: - { - imports = [ - ../modules/home/default.nix - ]; - # Put configuration (e.g. monorepo variable configuration) common to all configs here - } +{ ... }: +{ + imports = [ + ../modules/home/default.nix + ]; + # Put configuration (e.g. monorepo variable configuration) common to all configs here +} #+end_src ** Continuity This is pretty understandable, if you understand all the above. #+begin_src nix :tangle ../nix/systems/continuity/default.nix - { ... }: - { - imports = [ - ../common.nix - ]; - config = { - monorepo = { - profiles = { - impermanence.enable = true; - desktop.enable = true; - }; - vars = { - device = "/dev/sda"; - fileSystem = "btrfs"; - }; +{ ... }: +{ + imports = [ + ../common.nix + ]; + config = { + monorepo = { + profiles = { + impermanence.enable = true; + desktop.enable = true; + }; + vars = { + device = "/dev/sda"; + fileSystem = "btrfs"; }; }; - } + }; +} #+end_src *** Home Each system has a corresponding home configuration in order to set monorepo home options. #+begin_src nix :tangle ../nix/systems/continuity/home.nix - { ... }: - { - imports = [ - ../home-common.nix - ]; - } +{ ... }: +{ + imports = [ + ../home-common.nix + ]; +} #+end_src ** Affinity This is my configuration for my workstation. It runs ollama, as well as several other useful services. #+begin_src nix :tangle ../nix/systems/affinity/default.nix - { ... }: - { - imports = [ - ../common.nix - ]; - config = { - monorepo = { - vars.device = "/dev/nvme0n1"; - vars.fileSystem = "ext4"; - profiles = { - cuda.enable = true; - workstation.enable = true; - }; +{ ... }: +{ + imports = [ + ../common.nix + ]; + config = { + monorepo = { + vars.device = "/dev/nvme0n1"; + vars.fileSystem = "ext4"; + profiles = { + cuda.enable = true; + workstation.enable = true; }; }; - } + }; +} #+end_src *** Home I want cuda in home manager too. #+begin_src nix :tangle ../nix/systems/affinity/home.nix - { ... }: - { - imports = [ - ../home-common.nix - ]; - } +{ ... }: +{ + imports = [ + ../home-common.nix + ]; +} #+end_src ** rpi-zero #+begin_src nix :tangle ../nix/systems/rpi-zero/default.nix - { ... }: - { - imports = [ - ../common.nix - ]; - config = { - zramSwap = { - enable = true; - algorithm = "zstd"; - memoryPercent = 100; - }; - boot.loader.grub.enable = false; - boot.loader.generic-extlinux-compatible.enable = true; - monorepo = { - vars.device = "/dev/mmcblk0"; - profiles = { - ttyonly.enable = true; - }; +{ ... }: +{ + imports = [ + ../common.nix + ]; + config = { + zramSwap = { + enable = true; + algorithm = "zstd"; + memoryPercent = 100; + }; + boot.loader.grub.enable = false; + boot.loader.generic-extlinux-compatible.enable = true; + monorepo = { + vars.device = "/dev/mmcblk0"; + profiles = { + ttyonly.enable = true; }; }; - } + }; +} #+end_src *** Home #+begin_src nix :tangle ../nix/systems/rpi-zero/home.nix - { ... }: - { - imports = [ - ../home-common.nix - ]; - config.monorepo.profiles.enable = false; - } +{ ... }: +{ + imports = [ + ../home-common.nix + ]; + config.monorepo.profiles.enable = false; +} #+end_src ** Spontaneity Spontaneity is my VPS instance. Note that much of this is not fully reproducible; you must change the IPs yourself and you must change some DNS records to match what you have on your system after deployment. #+begin_src nix :tangle ../nix/systems/spontaneity/default.nix - { ... }: - { - imports = [ - ../common.nix - # nixos-anywhere generates this file - ./hardware-configuration.nix - ]; - config = { - monorepo = { - vars.device = "/dev/vda"; - profiles = { - server = { - enable = true; - ipv4 = "66.42.84.130"; - gateway = "66.42.84.1"; - ipv6 = "2001:19f0:5401:10d0:5400:5ff:fe4a:7794"; - interface = "ens3"; - }; - grub.enable = true; - pipewire.enable = false; - tor.enable = false; +{ ... }: +{ + imports = [ + ../common.nix + # nixos-anywhere generates this file + ./hardware-configuration.nix + ]; + config = { + monorepo = { + vars.device = "/dev/vda"; + profiles = { + server = { + enable = true; + ipv4 = "66.42.84.130"; + gateway = "66.42.84.1"; + ipv6 = "2001:19f0:5401:10d0:5400:5ff:fe4a:7794"; + interface = "ens3"; }; + grub.enable = true; + pipewire.enable = false; + tor.enable = false; }; - boot.loader.grub.device = "nodev"; }; - } + boot.loader.grub.device = "nodev"; + }; +} #+end_src ** Home #+begin_src nix :tangle ../nix/systems/spontaneity/home.nix - { ... }: - { - imports = [ - ../home-common.nix - ]; - } +{ ... }: +{ + imports = [ + ../home-common.nix + ]; +} #+end_src ** Installer My installer installs my systems almost completely without interaction. You can also make them @@ -4908,51 +4927,51 @@ always work in the exact same deterministic way. *** ISO Default Profile This contains the installation script I use to install my systems. #+begin_src nix :tangle ../nix/systems/installer/default.nix - { pkgs, lib, modulesPath, disko, monorepoSelf ? null, self, ... }: - let - commits = { - diskoCommitHash = disko.rev or "dirty"; - monorepoCommitHash = if monorepoSelf != null then (monorepoSelf.rev or "dirty") else (self.rev or "dirty"); - monorepoUrl = "https://github.com/ret2pop/monorepo"; - }; - in - { - imports = [ - (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") - ]; +{ pkgs, lib, modulesPath, disko, monorepoSelf ? null, self, ... }: +let + commits = { + diskoCommitHash = disko.rev or "dirty"; + monorepoCommitHash = if monorepoSelf != null then (monorepoSelf.rev or "dirty") else (self.rev or "dirty"); + monorepoUrl = "https://github.com/ret2pop/monorepo"; + }; +in +{ + imports = [ + (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") + ]; - networking = { - networkmanager = { - enable = true; - }; - firewall = { - allowedTCPPorts = [ 22 ]; - allowedUDPPorts = [ ]; - }; - wireless.enable = lib.mkForce false; - }; - services.openssh = { + networking = { + networkmanager = { enable = true; - ports = [ 22 ]; - settings = { - PasswordAuthentication = false; - AllowUsers = null; - UseDns = true; - PermitRootLogin = lib.mkForce "prohibit-password"; - }; }; + firewall = { + allowedTCPPorts = [ 22 ]; + allowedUDPPorts = [ ]; + }; + wireless.enable = lib.mkForce false; + }; + services.openssh = { + enable = true; + ports = [ 22 ]; + settings = { + PasswordAuthentication = false; + AllowUsers = null; + UseDns = true; + PermitRootLogin = lib.mkForce "prohibit-password"; + }; + }; - users.users = { - root.openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICts6+MQiMwpA+DfFQxjIN214Jn0pCw/2BDvOzPhR/H2 preston@continuity-dell" - ]; - nixos = { - packages = with pkgs; [ - gitFull - curl - gum - (writeShellScriptBin "nix_installer" - '' + users.users = { + root.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICts6+MQiMwpA+DfFQxjIN214Jn0pCw/2BDvOzPhR/H2 preston@continuity-dell" + ]; + nixos = { + packages = with pkgs; [ + gitFull + curl + gum + (writeShellScriptBin "nix_installer" + '' #!/usr/bin/env bash set -euo pipefail @@ -5052,18 +5071,18 @@ This contains the installation script I use to install my systems. echo "rebooting..."; sleep 3; reboot '') - ]; - }; + ]; }; + }; - systemd = { - services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target" ]; - targets = { - sleep.enable = false; - suspend.enable = false; - hibernate.enable = false; - hybrid-sleep.enable = false; - }; + systemd = { + services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target" ]; + targets = { + sleep.enable = false; + suspend.enable = false; + hibernate.enable = false; + hybrid-sleep.enable = false; }; - } + }; +} #+end_src diff --git a/flake.nix b/flake.nix index 60ac688..c3f3c97 100644 --- a/flake.nix +++ b/flake.nix @@ -29,7 +29,7 @@ pkgs = import nixpkgs { inherit system; }; emacsPackages = import "${nixmacs}/modules/home/emacs-packages.nix"; - ci-emacs = pkgs.emacs-nox.pkgs.withPackages emacsPackages; + ci-emacs = pkgs.emacs-gtk.pkgs.withPackages emacsPackages; specialArgs = { monorepoSelf = self; }; installer = nixmacs.nixosConfigurations.installer.extendModules { @@ -131,10 +131,10 @@ if [ $BUILD_STATUS -eq 0 ] && [ -d "$RESULT_PATH" ]; then exit 1 fi - INJECT_HASH="$(python3 tests/test-csp-hash.py "$RESULT_PATH/index.html")" - CSS_HASH="$(openssl dgst -sha256 -binary "$RESULT_PATH/combined.css" | openssl base64)" + INJECT_HASH="$(python3 tests/test-csp-hash.py "$RESULT_PATH/blog/index.html")" + HEADER_HASH="$(cat "$RESULT_PATH/csp_header.conf" | grep -oP "sha256-\K[^']+")" - if [ "$INJECT_HASH" != "$CSS_HASH" ]; then + if [ "$INJECT_HASH" != "$HEADER_HASH" ]; then echo "Security headers test failed!" ${mkNotification "CI checks failed: CSP hash mismatch!"} exit 1 @@ -217,6 +217,8 @@ fi pkgs.minify pkgs.woff2 pkgs.openssl + pkgs.xvfb-run + pkgs.python3 (pkgs.texlive.combine { inherit (pkgs.texlive) @@ -242,15 +244,6 @@ cd $HOME/monorepo mkdir -p mindmap/img rsass style.scss | minify --type=css > style.css -minify --type=css -o syntax.css syntax.css - -# I want to do this so I can generate the CSP policy carefully -cat style.css syntax.css > combined.css - -CSS_HASH=$(openssl dgst -sha256 -binary combined.css | openssl base64) -cat < csp_header.conf -add_header Content-Security-Policy "default-src 'self'; style-src 'self' 'sha256-$CSS_HASH'; font-src 'self';"; -EOF cat < $TMPDIR/policy.xml @@ -261,8 +254,17 @@ export MAGICK_CONFIGURE_PATH=$TMPDIR export FONTCONFIG_FILE=${pkgs.fontconfig.out}/etc/fonts/fonts.conf export FONTCONFIG_PATH=${pkgs.fontconfig.out}/etc/fonts/ export XDG_CACHE_HOME=$TMPDIR/.cache - -emacs -q --batch \ +printf "hello?\n" + +xvfb-run -a emacs -q \ + --eval '(setq inhibit-startup-screen t)' \ + --eval '(setq inhibit-startup-message t)' \ + --eval '(setq enable-local-variables :all)' \ + --eval '(defalias (quote yes-or-no-p) (lambda (&rest args) t))' \ + --eval '(defalias (quote y-or-n-p) (lambda (&rest args) t))' \ + --eval '(setq message-log-max t)' \ + --eval '(setq standard-output (quote external-debugging-output))' \ + --eval '(princ "STEP 0: tf\n" (quote external-debugging-output))' \ --eval '(setq noninteractive t)' \ --eval '(setq system-email "lol@troll.com")' \ --eval '(setq system-username "ci-runner")' \ @@ -289,12 +291,14 @@ emacs -q --batch \ --eval '(setq gc-cons-threshold 100000000)' \ --eval '(setq vc-handled-backends nil)' \ --eval '(setq make-backup-files nil auto-save-default nil create-lockfiles nil)' \ + --eval '(princ "STEP 1: init.el?\n" (quote external-debugging-output))' \ -l ${nixmacs}/init.el \ - --eval '(setq custom-safe-themes t)' \ + --eval '(princ "STEP 2: init.el.\n" (quote external-debugging-output))' \ --eval '(setq org-roam-directory (expand-file-name "mindmap" (expand-file-name "~/monorepo")))' \ --eval '(setq org-id-track-globally t)' \ --eval '(org-roam-db-sync)' \ --eval '(setq term-file-prefix nil)' \ + --eval '(princ "STEP 3: after org roam\n" (quote external-debugging-output))' \ --eval '(force-mode-line-update)' \ --eval '(setq org-html-link-use-abs-url nil)' \ --eval '(setq default-directory (expand-file-name "~/monorepo"))' \ @@ -303,8 +307,15 @@ emacs -q --batch \ --eval '(require (quote htmlize))' \ --eval '(require (quote nix-mode))' \ --eval '(setq org-html-htmlize-output-type (quote css))' \ + --eval '(princ "STEP 4: before publish-all\n" (quote external-debugging-output))' \ --eval '(org-publish-all t)' \ - --eval '(org-publish-all nil)' || (echo "FAIL:" && cat /build/*.log && exit 1) + --eval '(org-publish-all nil)' \ + --eval '(kill-emacs 0)' || (echo "FAIL:" && cat /build/*.log && exit 1) + +CSS_HASH="$(python3 $HOME/monorepo/tests/test-csp-hash.py $HOME/website_html/index.html)" +cat < $HOME/website_html/csp_header.conf +add_header Content-Security-Policy "default-src 'self'; style-src 'self' 'sha256-$CSS_HASH'; font-src 'self';"; +EOF echo "Setting up Graph View..." ${publish-org-roam-ui.packages.${system}.default}/bin/build-org-roam-graph \ diff --git a/nix b/nix index 4836246..64773f0 160000 --- a/nix +++ b/nix @@ -1 +1 @@ -Subproject commit 48362468b1c9a9a1bd3f7e9ed68d67edde69beb2 +Subproject commit 64773f043d24d75e8d070393c965f457135c3494 diff --git a/style.scss b/style.scss index 2956572..d76f106 100644 --- a/style.scss +++ b/style.scss @@ -9,6 +9,19 @@ $fonts: ( ('CormorantGaramond', 'CormorantGaramond-MediumItalic', 700, italic), ); +$breakpoints: ( + 'mobile': 768px, + 'toc': 1250px +); + +/* text color, background color (hex) */ +$isa: ( + ("info", #00529b, #bde5f8), + ("success", #4f8a10, #dff2bf), + ("warning", #9f6000, #fad776), + ("error", #d8000c, #feebe3) +); + @each $family, $file, $weight, $style in $fonts { @font-face { font-family: '#{$family}'; @@ -19,14 +32,6 @@ $fonts: ( } } -/* text color, background color (hex) */ -$isa: ( - ("info", #00529b, #bde5f8), - ("success", #4f8a10, #dff2bf), - ("warning", #9f6000, #fad776), - ("error", #d8000c, #feebe3) -); - @each $name, $textcolor, $bgcolor in $isa { .isa_#{$name} { color: $textcolor; @@ -48,11 +53,6 @@ $isa: ( overflow-x: auto; } -$breakpoints: ( - 'mobile': 768px, - 'toc': 1250px -); - @mixin bp($name) { $value: map.get($breakpoints, $name); @@ -65,17 +65,15 @@ $breakpoints: ( } } -@function accent_rgba($aval) { - @return rgb(from var(--accent) r g b / $aval); -} +@function accent_rgba($aval) { @return rgb(from var(--accent) r g b / $aval); } :root { --bg-main: #FBF8F1; --text-main: #4A3F35; --text-highlight: #ffe066; --accent: #D4A373; - --toc-bg: #F3E4D4; - --link-color: #8C6239; + --toc-bg: #F2EFE7; + --link-color: #B0413E; --code-bg: #1e1e2e; --code-text: #cdd6f4; @@ -96,6 +94,29 @@ $breakpoints: ( box-sizing: border-box; } +/* scrollbar */ +::-webkit-scrollbar { + width: 12px; + height: 12px; +} + +::-webkit-scrollbar-track { background: var(--bg-main); } + +::-webkit-scrollbar-thumb { + background-color: color-mix(in srgb, var(--accent) 60%, var(--bg-main)); + border-radius: 8px; + border: 3px solid var(--bg-main); + + &:hover { + background-color: var(--accent); + } +} + +html { + scrollbar-color: color-mix(in srgb, var(--accent) 60%, var(--bg-main)) var(--bg-main); + scrollbar-width: thin; +} + body { background: radial-gradient(rgba(0,0,0,0.02) 1px, transparent 1px), @@ -111,13 +132,10 @@ body { line-height: 1.75; font-weight: 500; font-variant-ligatures: common-ligatures; - -webkit-font-smoothing: antialiased; - - // display: flex; - flex-direction: column; - align-items: center; min-height: 100vh; + -webkit-font-smoothing: antialiased; + @include bp('toc') { padding-left: 0; font-size: 20px; @@ -166,12 +184,13 @@ h6 { font-size: 0.85rem; font-weight: 400; text-transform: uppercase; letter-spa p, ul, ol { margin-top: 1rem; margin-bottom: 1rem; } li { margin-top: 0.3rem; } -a { +a, .org-link { color: var(--link-color); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; transition: all 0.2s ease-in-out; + &:hover { color: color-mix(in srgb, var(--link-color) 80%, black); text-decoration-thickness: 4px; @@ -200,6 +219,23 @@ img { @include bp('mobile') { max-width: 100%; } } +/* inline code blocks */ +:not(pre) > code { + font-family: var(--font-mono), monospace; + background: var(--code-bg); + color: var(--code-text); + padding: 0.15em 0.4em; + border-radius: 4px; + font-size: 0.85em; + white-space: pre-wrap; + word-break: break-word; +} + +pre { + font-family: var(--font-mono), monospace; + &.src-stem::before { content: "Stem"; } +} + blockquote { width: 80%; margin: 40px auto; @@ -250,11 +286,6 @@ math { } } - -#content { - padding-top: 0; -} - h1.title { padding-top: 1.5rem; margin-top: 0.5rem; @@ -301,41 +332,6 @@ h1.title { &:not(:last-child)::after { content: ", "; font-style: normal; } } -#preamble { - margin-top: 10px; - margin-bottom: 0; - - .preamble { - font-family: var(--font-mono), monospace; - font-size: 0.85rem; - text-transform: uppercase; - letter-spacing: 1px; - color: color-mix(in srgb, var(--text-main) 50%, transparent); - } - - a { - color: var(--text-main); - text-decoration: none; - padding: 4px 8px; - border-radius: 4px; - transition: all 0.2s ease; - &:hover { - background: color-mix(in srgb, var(--accent) 15%, transparent); - color: var(--link-color); - } - } - - & hr { - border: none; - height: 1px; - background: linear-gradient(to right, var(--accent), transparent); - opacity: 0.5; - - width: 100%; - margin: 1rem 0 0 0; - } -} - .todo, .done, .tag { font-family: var(--font-mono), monospace; font-size: 0.75em; @@ -390,23 +386,7 @@ h1.title { @include bp('mobile') { columns: 1; } } -/* inline code blocks */ -:not(pre) > code { - font-family: var(--font-mono), monospace; - background: var(--code-bg); - color: var(--code-text); - padding: 0.15em 0.4em; - border-radius: 4px; - font-size: 0.85em; - white-space: pre-wrap; - word-break: break-word; -} - -pre { - font-family: var(--font-mono), monospace; - &.src-stem::before { content: "Stem"; } -} - +.org-svg { width: 100%; max-width: none; } .src, .example { @include hide-scrollbar; @@ -434,8 +414,6 @@ pre { } } -.org-svg { width: 100%; max-width: none; } - .org-src-container { position: relative; margin: 1.2em 0; @@ -443,7 +421,6 @@ pre { pre.src { overflow: visible; margin: 0; - // padding: 0; border: none; & > code { @@ -504,6 +481,41 @@ pre { color: var(--text-main); } +#preamble { + margin-top: 10px; + margin-bottom: 0; + + .preamble { + font-family: var(--font-mono), monospace; + font-size: 0.85rem; + text-transform: uppercase; + letter-spacing: 1px; + color: color-mix(in srgb, var(--text-main) 50%, transparent); + } + + a { + color: var(--text-main); + text-decoration: none; + padding: 4px 8px; + border-radius: 4px; + transition: all 0.2s ease; + &:hover { + background: color-mix(in srgb, var(--accent) 15%, transparent); + color: var(--link-color); + } + } + + & hr { + border: none; + height: 1px; + background: linear-gradient(to right, var(--accent), transparent); + opacity: 0.5; + + width: 100%; + margin: 1rem 0 0 0; + } +} + #table-of-contents { height: 100vh; width: 250px; @@ -577,8 +589,11 @@ pre { } } } + h2 { display: none; } @include bp('toc') { display: none; } } #postamble { text-align: center; } + +#content { padding-top: 0; } diff --git a/syntax.css b/syntax.css deleted file mode 100644 index 6af8637..0000000 --- a/syntax.css +++ /dev/null @@ -1,4777 +0,0 @@ -.org-abbrev-table-name { - /* abbrev-table-name */ - color: #F9B5AC; -} -.org-all-the-icons-blue { - /* all-the-icons-blue */ - color: #6e94b9; -} -.org-all-the-icons-blue-alt { - /* all-the-icons-blue-alt */ - color: #7ea9a9; -} -.org-all-the-icons-cyan { - /* all-the-icons-cyan */ - color: #88C0D0; -} -.org-all-the-icons-cyan-alt { - /* all-the-icons-cyan-alt */ - color: #88C0D0; -} -.org-all-the-icons-dblue { - /* all-the-icons-dblue */ - color: #1E6378; -} -.org-all-the-icons-dcyan { - /* all-the-icons-dcyan */ - color: #507681; -} -.org-all-the-icons-dgreen { - /* all-the-icons-dgreen */ - color: #727b6b; -} -.org-all-the-icons-dmaroon { - /* all-the-icons-dmaroon */ - color: #7b617b; -} -.org-all-the-icons-dorange { - /* all-the-icons-dorange */ - color: #a3856b; -} -.org-all-the-icons-dpink { - /* all-the-icons-dpink */ - color: #ce8d91; -} -.org-all-the-icons-dpurple { - /* all-the-icons-dpurple */ - color: #415979; -} -.org-all-the-icons-dred { - /* all-the-icons-dred */ - color: #8a5458; -} -.org-all-the-icons-dsilver { - /* all-the-icons-dsilver */ - color: #73808a; -} -.org-all-the-icons-dyellow { - /* all-the-icons-dyellow */ - color: #ac9e7a; -} -.org-all-the-icons-green { - /* all-the-icons-green */ - color: #A3B09A; -} -.org-all-the-icons-lblue { - /* all-the-icons-lblue */ - color: #99b4ce; -} -.org-all-the-icons-lcyan { - /* all-the-icons-lcyan */ - color: #abd2de; -} -.org-all-the-icons-lgreen { - /* all-the-icons-lgreen */ - color: #bec7b8; -} -.org-all-the-icons-lmaroon { - /* all-the-icons-lmaroon */ - color: #c8adc8; -} -.org-all-the-icons-lorange { - /* all-the-icons-lorange */ - color: #f0d1b8; -} -.org-all-the-icons-lpink { - /* all-the-icons-lpink */ - color: #e5c2c4; -} -.org-all-the-icons-lpurple { - /* all-the-icons-lpurple */ - color: #8da6c6; -} -.org-all-the-icons-lred { - /* all-the-icons-lred */ - color: #d7a1a4; -} -.org-all-the-icons-lsilver { - /* all-the-icons-lsilver */ - color: #d0d4d8; -} -.org-all-the-icons-lyellow { - /* all-the-icons-lyellow */ - color: #f9ebc7; -} -.org-all-the-icons-maroon { - /* all-the-icons-maroon */ - color: #b18bb1; -} -.org-all-the-icons-orange { - /* all-the-icons-orange */ - color: #eabe9a; -} -.org-all-the-icons-pink { - /* all-the-icons-pink */ - color: #d9a7ab; -} -.org-all-the-icons-purple { - /* all-the-icons-purple */ - color: #5D80AE; -} -.org-all-the-icons-purple-alt { - /* all-the-icons-purple-alt */ - color: #627484; -} -.org-all-the-icons-red { - /* all-the-icons-red */ - color: #c6797e; -} -.org-all-the-icons-red-alt { - /* all-the-icons-red-alt */ - color: #72737d; -} -.org-all-the-icons-silver { - /* all-the-icons-silver */ - color: #a9b1b7; -} -.org-all-the-icons-yellow { - /* all-the-icons-yellow */ - color: #F7E3AF; -} -.org-ansi-color-black { - /* ansi-color-black */ - color: #172030; - background-color: #172030; -} -.org-ansi-color-blue { - /* ansi-color-blue */ - color: #6e94b9; - background-color: #6e94b9; -} -.org-ansi-color-bold { - /* ansi-color-bold */ - font-weight: bold; -} -.org-ansi-color-bright-black { - /* ansi-color-bright-black */ - color: #B16E75; - background-color: #B16E75; -} -.org-ansi-color-bright-blue { - /* ansi-color-bright-blue */ - color: #83a4c3; - background-color: #83a4c3; -} -.org-ansi-color-bright-cyan { - /* ansi-color-bright-cyan */ - color: #99c9d7; - background-color: #99c9d7; -} -.org-ansi-color-bright-green { - /* ansi-color-bright-green */ - color: #b0bba9; - background-color: #b0bba9; -} -.org-ansi-color-bright-magenta { - /* ansi-color-bright-magenta */ - color: #bc9cbc; - background-color: #bc9cbc; -} -.org-ansi-color-bright-red { - /* ansi-color-bright-red */ - color: #ce8d91; - background-color: #ce8d91; -} -.org-ansi-color-bright-white { - /* ansi-color-bright-white */ - color: #F0F4FC; - background-color: #F0F4FC; -} -.org-ansi-color-bright-yellow { - /* ansi-color-bright-yellow */ - color: #f8e7bb; - background-color: #f8e7bb; -} -.org-ansi-color-cyan { - /* ansi-color-cyan */ - color: #88C0D0; - background-color: #88C0D0; -} -.org-ansi-color-green { - /* ansi-color-green */ - color: #A3B09A; - background-color: #A3B09A; -} -.org-ansi-color-italic { - /* ansi-color-italic */ - font-style: italic; -} -.org-ansi-color-magenta { - /* ansi-color-magenta */ - color: #b18bb1; - background-color: #b18bb1; -} -.org-ansi-color-red { - /* ansi-color-red */ - color: #c6797e; - background-color: #c6797e; -} -.org-ansi-color-underline { - /* ansi-color-underline */ - text-decoration: underline; -} -.org-ansi-color-white { - /* ansi-color-white */ - color: #FAFFF6; - background-color: #FAFFF6; -} -.org-ansi-color-yellow { - /* ansi-color-yellow */ - color: #F7E3AF; - background-color: #F7E3AF; -} -.org-battery-load-critical { - /* battery-load-critical */ - color: #c6797e; -} -.org-battery-load-low { - /* battery-load-low */ - color: #F7E3AF; -} -.org-blink-matching-paren-offscreen { - /* blink-matching-paren-offscreen */ - color: #00ff00; -} -.org-bold { - /* bold */ - font-weight: bold; -} -.org-bookmark { - /* bookmark-face */ - background-color: #262736; -} -.org-bookmark-menu-bookmark { - /* bookmark-menu-bookmark */ - font-weight: bold; -} -.org-border { -} -.org-bracket { - /* font-lock-bracket-face */ - color: #e7e2e4; -} -.org-browse-url-button { - /* browse-url-button */ - color: #B16E75; - font-weight: bold; - text-decoration: underline; -} -.org-buffer-menu-buffer { - /* buffer-menu-buffer */ - font-weight: bold; -} -.org-builtin { - /* font-lock-builtin-face */ - color: #DB6E8F; -} -.org-button { - /* button */ - color: #B16E75; - font-weight: bold; - text-decoration: underline; -} -.org-c-annotation { - /* c-annotation-face */ - color: #c6797e; -} -.org-calendar-month-header { - /* calendar-month-header */ - color: #F9B5AC; -} -.org-calendar-today { - /* calendar-today */ - text-decoration: underline; -} -.org-calendar-weekday-header { - /* calendar-weekday-header */ - color: #c6797e; -} -.org-calendar-weekend-header { - /* calendar-weekend-header */ - color: #64727d; - font-style: italic; -} -.org-centaur-tabs--doom-rouge-bar { - /* centaur-tabs-doom-rouge-bar-face */ - color: #101828; - background-color: #101828; -} -.org-centaur-tabs-active-bar { - /* centaur-tabs-active-bar-face */ - background-color: #172030; -} -.org-centaur-tabs-close-mouse { - /* centaur-tabs-close-mouse-face */ - text-decoration: underline; -} -.org-centaur-tabs-close-selected { - /* centaur-tabs-close-selected */ - color: #F0F4FC; - background-color: #B16E75; -} -.org-centaur-tabs-close-unselected { - /* centaur-tabs-close-unselected */ - color: #A7ACB9; - background-color: #101828; -} -.org-centaur-tabs-default { - /* centaur-tabs-default */ - color: #101828; - background-color: #101828; -} -.org-centaur-tabs-dim-buffer { - /* centaur-tabs-dim-buffer-face */ - color: #666666; -} -.org-centaur-tabs-jump-identifier-selected { - /* centaur-tabs-jump-identifier-selected */ - color: #F0F4FC; - background-color: #B16E75; -} -.org-centaur-tabs-jump-identifier-unselected { - /* centaur-tabs-jump-identifier-unselected */ - color: #F0F4FC; - background-color: #101828; -} -.org-centaur-tabs-modified-marker-selected { - /* centaur-tabs-modified-marker-selected */ - color: #F0F4FC; - background-color: #B16E75; -} -.org-centaur-tabs-modified-marker-unselected { - /* centaur-tabs-modified-marker-unselected */ - color: #F0F4FC; - background-color: #101828; -} -.org-centaur-tabs-name-mouse { -} -.org-centaur-tabs-selected { - /* centaur-tabs-selected */ - color: #F0F4FC; - background-color: #B16E75; -} -.org-centaur-tabs-selected-modified { - /* centaur-tabs-selected-modified */ - color: #F0F4FC; - background-color: #B16E75; -} -.org-centaur-tabs-unselected { - /* centaur-tabs-unselected */ - color: #A7ACB9; - background-color: #101828; -} -.org-centaur-tabs-unselected-modified { - /* centaur-tabs-unselected-modified */ - color: #F0F4FC; - background-color: #172030; -} -.org-change-log-acknowledgment { - /* change-log-acknowledgment */ - color: #64727d; - font-style: italic; -} -.org-change-log-conditionals { - /* change-log-conditionals */ - color: #c6797e; -} -.org-change-log-date { - /* change-log-date */ - color: #A3B09A; -} -.org-change-log-email { - /* change-log-email */ - color: #c6797e; -} -.org-change-log-file { - /* change-log-file */ - color: #F9B5AC; -} -.org-change-log-function { - /* change-log-function */ - color: #c6797e; -} -.org-change-log-list { - /* change-log-list */ - color: #b18bb1; - font-style: italic; -} -.org-change-log-name { - /* change-log-name */ - color: #c6797e; -} -.org-child-frame-border { -} -.org-comint-highlight-input { - /* comint-highlight-input */ - font-weight: bold; -} -.org-comint-highlight-prompt { - /* comint-highlight-prompt */ - color: #B16E75; -} -.org-comment { - /* font-lock-comment-face */ - color: #64727d; - font-style: italic; -} -.org-comment-delimiter { - /* font-lock-comment-delimiter-face */ - color: #64727d; - font-style: italic; -} -.org-company-echo { -} -.org-company-echo-common { - /* company-echo-common */ - color: #ff3030; -} -.org-company-preview { - /* company-preview */ - color: #64727d; -} -.org-company-preview-common { - /* company-preview-common */ - color: #B16E75; - background-color: #1F2A3F; -} -.org-company-preview-search { - /* company-preview-search */ - color: #172030; - background-color: #B16E75; - font-weight: bold; -} -.org-company-template-field { - /* company-template-field */ - color: #A3B09A; - background-color: #070A0E; - font-weight: bold; -} -.org-company-tooltip { - /* company-tooltip */ - color: #A7ACB9; - background-color: #1F2A3F; -} -.org-company-tooltip-annotation { - /* company-tooltip-annotation */ - color: #5D80AE; -} -.org-company-tooltip-annotation-selection { - /* company-tooltip-annotation-selection */ - color: #5D80AE; -} -.org-company-tooltip-common { - /* company-tooltip-common */ - color: #B16E75; - font-weight: bold; -} -.org-company-tooltip-common-selection { - /* company-tooltip-common-selection */ - color: #B16E75; - font-weight: bold; -} -.org-company-tooltip-deprecated { - /* company-tooltip-deprecated */ - text-decoration: line-through; -} -.org-company-tooltip-mouse { - /* company-tooltip-mouse */ - color: #172030; - background-color: #b18bb1; -} -.org-company-tooltip-quick-access { - /* company-tooltip-quick-access */ - color: #5D80AE; -} -.org-company-tooltip-quick-access-selection { - /* company-tooltip-quick-access-selection */ - color: #5D80AE; -} -.org-company-tooltip-scrollbar-thumb { - /* company-tooltip-scrollbar-thumb */ - background-color: #545454; -} -.org-company-tooltip-scrollbar-track { - /* company-tooltip-scrollbar-track */ - background-color: #474747; -} -.org-company-tooltip-search { - /* company-tooltip-search */ - color: #172030; - background-color: #B16E75; - font-weight: bold; -} -.org-company-tooltip-search-selection { - /* company-tooltip-search-selection */ - background-color: #454a52; -} -.org-company-tooltip-selection { - /* company-tooltip-selection */ - background-color: #5D636E; - font-weight: bold; -} -.org-compilation-column-number { - /* compilation-column-number */ - color: #64727d; - font-style: italic; -} -.org-compilation-error { - /* compilation-error */ - color: #c6797e; - font-weight: bold; -} -.org-compilation-info { - /* compilation-info */ - color: #A3B09A; -} -.org-compilation-line-number { - /* compilation-line-number */ - color: #B16E75; -} -.org-compilation-mode-line-exit { - /* compilation-mode-line-exit */ - color: #A3B09A; -} -.org-compilation-mode-line-fail { - /* compilation-mode-line-fail */ - color: #c6797e; - font-weight: bold; -} -.org-compilation-mode-line-run { - /* compilation-mode-line-run */ - color: #F7E3AF; - font-style: italic; -} -.org-compilation-warning { - /* compilation-warning */ - color: #F7E3AF; - font-style: italic; -} -.org-completions-common-part { - /* completions-common-part */ - color: #add8e6; -} -.org-completions-first-difference { - /* completions-first-difference */ - font-weight: bold; -} -.org-completions-group-separator { - /* completions-group-separator */ - color: #64727d; - text-decoration: line-through; -} -.org-completions-group-title { - /* completions-group-title */ - color: #64727d; - font-style: italic; -} -.org-completions-highlight { - /* completions-highlight */ - color: #070A0E; - background-color: #B16E75; -} -.org-confusingly-reordered { - /* confusingly-reordered */ - text-decoration: underline; -} -.org-constant { - /* font-lock-constant-face */ - color: #c6797e; -} -.org-counsel--mark-ring-highlight { - /* counsel-mark-ring-highlight */ - color: #070A0E; - background-color: #B16E75; -} -.org-counsel-active-mode { - /* counsel-active-mode */ - color: #DB6E8F; -} -.org-counsel-application-name { - /* counsel-application-name */ - color: #DB6E8F; -} -.org-counsel-evil-register { - /* counsel-evil-register-face */ - color: #6e94b9; - font-weight: bold; -} -.org-counsel-key-binding { - /* counsel-key-binding */ - color: #b18bb1; - font-style: italic; -} -.org-counsel-outline-1 { - /* counsel-outline-1 */ - color: #6e94b9; - font-weight: bold; -} -.org-counsel-outline-2 { - /* counsel-outline-2 */ - color: #b18bb1; - font-weight: bold; -} -.org-counsel-outline-3 { - /* counsel-outline-3 */ - color: #5D80AE; - font-weight: bold; -} -.org-counsel-outline-4 { - /* counsel-outline-4 */ - color: #92aeca; - font-weight: bold; -} -.org-counsel-outline-5 { - /* counsel-outline-5 */ - color: #c4a8c4; - font-weight: bold; -} -.org-counsel-outline-6 { - /* counsel-outline-6 */ - color: #b6c9dc; - font-weight: bold; -} -.org-counsel-outline-7 { - /* counsel-outline-7 */ - color: #d8c4d8; - font-weight: bold; -} -.org-counsel-outline-8 { - /* counsel-outline-8 */ - color: #e2e9f1; - font-weight: bold; -} -.org-counsel-outline-default { - /* counsel-outline-default */ - color: #B16E75; -} -.org-counsel-variable-documentation { - /* counsel-variable-documentation */ - color: #64727d; - font-style: italic; -} -.org-cua-global-mark { - /* cua-global-mark */ - color: #000000; - background-color: #ffff00; -} -.org-cua-rectangle { - /* cua-rectangle */ - color: #ffffff; - background-color: #b03060; -} -.org-cua-rectangle-noselect { - /* cua-rectangle-noselect */ - color: #ffffff; - background-color: #696969; -} -.org-cursor { - /* cursor */ - background-color: #B16E75; -} -.org-dashboard-banner-logo-title { - /* dashboard-banner-logo-title */ - color: #FAFFF6; - background-color: #172030; -} -.org-dashboard-footer { - /* dashboard-footer-face */ - color: #A3B09A; - font-style: italic; -} -.org-dashboard-footer-icon { - /* dashboard-footer-icon-face */ - color: #A3B09A; - font-style: italic; -} -.org-dashboard-heading { - /* dashboard-heading */ - color: #b18bb1; - font-style: italic; -} -.org-dashboard-items { - /* dashboard-items-face */ - font-weight: bold; -} -.org-dashboard-navigator { - /* dashboard-navigator */ - color: #b18bb1; - font-style: italic; -} -.org-dashboard-no-items { - /* dashboard-no-items-face */ - font-weight: bold; -} -.org-dashboard-text-banner { - /* dashboard-text-banner */ - color: #b18bb1; - font-style: italic; -} -.org-default { - /* default */ - color: #FAFFF6; - background-color: #172030; -} -.org-delimiter { - /* font-lock-delimiter-face */ - color: #e7e2e4; -} -.org-diary { - /* diary */ - color: #ffff00; -} -.org-diff-added { - /* diff-added */ - color: #A3B09A; - background-color: #101828; -} -.org-diff-changed { - /* diff-changed */ - color: #5D80AE; -} -.org-diff-changed-unspecified { - /* diff-changed-unspecified */ - color: #5D80AE; - background-color: #333333; -} -.org-diff-context { - /* diff-context */ - color: #dbe0d8; -} -.org-diff-error { - /* diff-error */ - color: #ff0000; - background-color: #000000; - font-weight: bold; -} -.org-diff-file-header { - /* diff-file-header */ - color: #6e94b9; -} -.org-diff-function { - /* diff-function */ - color: #88C0D0; -} -.org-diff-header { - /* diff-header */ - color: #88C0D0; -} -.org-diff-hunk-header { - /* diff-hunk-header */ - color: #5D80AE; -} -.org-diff-index { - /* diff-index */ - color: #6e94b9; -} -.org-diff-indicator-added { - /* diff-indicator-added */ - color: #A3B09A; -} -.org-diff-indicator-changed { - /* diff-indicator-changed */ - color: #eabe9a; -} -.org-diff-indicator-removed { - /* diff-indicator-removed */ - color: #c6797e; -} -.org-diff-nonexistent { - /* diff-nonexistent */ - color: #6e94b9; -} -.org-diff-refine-added { - /* diff-refine-added */ - color: #A3B09A; - background-color: #101828; -} -.org-diff-refine-changed { - /* diff-refine-changed */ - color: #5D80AE; -} -.org-diff-refine-removed { - /* diff-refine-removed */ - color: #c6797e; - background-color: #1F2A3F; -} -.org-diff-removed { - /* diff-removed */ - color: #c6797e; - background-color: #1F2A3F; -} -.org-dired-broken-symlink { - /* dired-broken-symlink */ - color: #ffff00; - background-color: #ff0000; - font-weight: bold; -} -.org-dired-directory { - /* dired-directory */ - color: #DB6E8F; -} -.org-dired-flagged { - /* dired-flagged */ - color: #c6797e; -} -.org-dired-header { - /* dired-header */ - color: #6e94b9; - font-weight: bold; -} -.org-dired-ignored { - /* dired-ignored */ - color: #64727d; -} -.org-dired-mark { - /* dired-mark */ - color: #eabe9a; - font-weight: bold; -} -.org-dired-marked { - /* dired-marked */ - color: #b18bb1; - font-weight: bold; -} -.org-dired-perm-write { - /* dired-perm-write */ - color: #FAFFF6; - text-decoration: underline; -} -.org-dired-set-id { - /* dired-set-id */ - color: #F7E3AF; -} -.org-dired-special { - /* dired-special */ - color: #c6797e; -} -.org-dired-symlink { - /* dired-symlink */ - color: #88C0D0; - font-weight: bold; -} -.org-dired-warning { - /* dired-warning */ - color: #F7E3AF; -} -.org-display-time-date-and-time { -} -.org-doc { - /* font-lock-doc-face */ - color: #A3B09A; - font-style: italic; -} -.org-doc-markup { - /* font-lock-doc-markup-face */ - color: #c6797e; -} -.org-doc-view-svg { - /* doc-view-svg-face */ - color: #000000; - background-color: #ffffff; -} -.org-doom-modeline { -} -.org-doom-modeline-bar { - /* doom-modeline-bar */ - color: #070A0E; - background-color: #B16E75; -} -.org-doom-modeline-bar-inactive { -} -.org-doom-modeline-battery-charging { - /* doom-modeline-battery-charging */ - color: #A3B09A; -} -.org-doom-modeline-battery-critical { - /* doom-modeline-battery-critical */ - color: #c6797e; -} -.org-doom-modeline-battery-error { - /* doom-modeline-battery-error */ - color: #c6797e; -} -.org-doom-modeline-battery-full { - /* doom-modeline-battery-full */ - color: #A3B09A; -} -.org-doom-modeline-battery-warning { - /* doom-modeline-battery-warning */ - color: #F7E3AF; -} -.org-doom-modeline-boon-command-state { - /* doom-modeline-boon-command-state */ - color: #A3B09A; -} -.org-doom-modeline-buffer-timemachine { - /* doom-modeline-buffer-timemachine */ - font-weight: bold; - font-style: italic; -} -.org-doom-modeline-compilation { - /* doom-modeline-compilation */ - color: #F7E3AF; - font-size: 90%; - font-style: italic; -} -.org-doom-modeline-debug-visual { - /* doom-modeline-debug-visual */ - color: #915B2D; -} -.org-doom-modeline-evil-normal-state { - /* doom-modeline-evil-normal-state */ - color: #A3B09A; -} -.org-doom-modeline-evil-replace-state { - /* doom-modeline-evil-replace-state */ - color: #c6797e; -} -.org-doom-modeline-evil-user-state { - /* doom-modeline-evil-user-state */ - color: #F7E3AF; -} -.org-doom-modeline-evil-visual-state { - /* doom-modeline-evil-visual-state */ - color: #F7E3AF; -} -.org-doom-modeline-fly-normal-state { - /* doom-modeline-fly-normal-state */ - color: #A3B09A; -} -.org-doom-modeline-god { - /* doom-modeline-god */ - color: #A3B09A; -} -.org-doom-modeline-lsp-error { - /* doom-modeline-lsp-error */ - color: #c6797e; -} -.org-doom-modeline-lsp-success { - /* doom-modeline-lsp-success */ - color: #A3B09A; -} -.org-doom-modeline-lsp-warning { - /* doom-modeline-lsp-warning */ - color: #F7E3AF; -} -.org-doom-modeline-meow-beacon-state { - /* doom-modeline-meow-beacon-state */ - color: #F7E3AF; -} -.org-doom-modeline-meow-insert-state { - /* doom-modeline-meow-insert-state */ - color: #b18bb1; - font-style: italic; -} -.org-doom-modeline-meow-keypad-state { - /* doom-modeline-meow-keypad-state */ - background-color: #0E131D; -} -.org-doom-modeline-meow-motion-state { - /* doom-modeline-meow-motion-state */ - color: #A3B09A; -} -.org-doom-modeline-meow-normal-state { - /* doom-modeline-meow-normal-state */ - color: #A3B09A; -} -.org-doom-modeline-notification { - /* doom-modeline-notification */ - color: #F7E3AF; -} -.org-doom-modeline-overwrite { - /* doom-modeline-overwrite */ - color: #c6797e; -} -.org-doom-modeline-panel { - /* doom-modeline-panel */ - color: #070A0E; - background-color: #B16E75; -} -.org-doom-modeline-project-root-dir { - /* doom-modeline-project-root-dir */ - color: #B16E75; -} -.org-doom-modeline-repl-success { - /* doom-modeline-repl-success */ - color: #A3B09A; -} -.org-doom-modeline-repl-warning { - /* doom-modeline-repl-warning */ - color: #F7E3AF; -} -.org-doom-modeline-ryo { - /* doom-modeline-ryo */ - color: #A3B09A; -} -.org-doom-modeline-time { -} -.org-doom-modeline-unread-number { - /* doom-modeline-unread-number */ - font-style: italic; -} -.org-doom-themes-org-at-tag { - /* doom-themes-org-at-tag */ - color: #88C0D0; -} -.org-doom-themes-org-hash-tag { - /* doom-themes-org-hash-tag */ - color: #A3B09A; -} -.org-doom-themes-treemacs-file { - /* doom-themes-treemacs-file-face */ - color: #B16E75; -} -.org-doom-themes-treemacs-root { - /* doom-themes-treemacs-root-face */ - color: #B16E75; - font-size: 120%; -} -.org-doom-themes-visual-bell { - /* doom-themes-visual-bell */ - background-color: #c6797e; -} -.org-edmacro-label { - /* edmacro-label */ - color: #add8e6; - font-weight: bold; -} -.org-eldoc-highlight-function-argument { - /* eldoc-highlight-function-argument */ - font-weight: bold; -} -.org-elfeed-log-date { - /* elfeed-log-date-face */ - color: #c6797e; -} -.org-elfeed-log-debug-level { - /* elfeed-log-debug-level-face */ - color: #64727d; -} -.org-elfeed-log-error-level { - /* elfeed-log-error-level-face */ - color: #c6797e; -} -.org-elfeed-log-info-level { - /* elfeed-log-info-level-face */ - color: #A3B09A; -} -.org-elfeed-log-warn-level { - /* elfeed-log-warn-level-face */ - color: #F7E3AF; -} -.org-elfeed-search-date { - /* elfeed-search-date-face */ - color: #5D80AE; -} -.org-elfeed-search-feed { - /* elfeed-search-feed-face */ - color: #6e94b9; -} -.org-elfeed-search-filter { - /* elfeed-search-filter-face */ - color: #5D80AE; -} -.org-elfeed-search-last-update { -} -.org-elfeed-search-tag { - /* elfeed-search-tag-face */ - color: #64727d; -} -.org-elfeed-search-title { - /* elfeed-search-title-face */ - color: #64727d; -} -.org-elfeed-search-unread-count { - /* elfeed-search-unread-count-face */ - color: #F7E3AF; -} -.org-elfeed-search-unread-title { - /* elfeed-search-unread-title-face */ - color: #FAFFF6; - font-weight: bold; -} -.org-elisp-shorthand-font-lock { - /* elisp-shorthand-font-lock-face */ - color: #00ffff; - font-style: italic; -} -.org-emms-browser-album { - /* emms-browser-album-face */ - color: #aaaaff; - font-size: 110%; -} -.org-emms-browser-albumartist { - /* emms-browser-albumartist-face */ - color: #aaaabb; - font-size: 130%; -} -.org-emms-browser-artist { - /* emms-browser-artist-face */ - color: #aaaaff; - font-size: 130%; -} -.org-emms-browser-composer { - /* emms-browser-composer-face */ - color: #aaaaff; - font-size: 130%; -} -.org-emms-browser-performer { - /* emms-browser-performer-face */ - color: #aaaaff; - font-size: 130%; -} -.org-emms-browser-track { - /* emms-browser-track-face */ - color: #aaaaff; -} -.org-emms-browser-yearXgenre { - /* emms-browser-year/genre-face */ - color: #aaaaff; - font-size: 150%; -} -.org-emms-metaplaylist-mode { - /* emms-metaplaylist-mode-face */ - color: #cdc0b0; -} -.org-emms-metaplaylist-mode-current { - /* emms-metaplaylist-mode-current-face */ - color: #ee0000; -} -.org-emms-playlist-selected { - /* emms-playlist-selected-face */ - color: #4f94cd; -} -.org-emms-playlist-track { - /* emms-playlist-track-face */ - color: #8fbc8f; -} -.org-epa-field-body { - /* epa-field-body */ - color: #40e0d0; - font-style: italic; -} -.org-epa-field-name { - /* epa-field-name */ - color: #afeeee; - font-weight: bold; -} -.org-epa-mark { - /* epa-mark */ - color: #ffa500; - font-weight: bold; -} -.org-epa-string { - /* epa-string */ - color: #ffffe0; -} -.org-epa-validity-disabled { - /* epa-validity-disabled */ - font-style: italic; -} -.org-epa-validity-high { - /* epa-validity-high */ - color: #afeeee; - font-weight: bold; -} -.org-epa-validity-low { - /* epa-validity-low */ - font-style: italic; -} -.org-epa-validity-medium { - /* epa-validity-medium */ - color: #afeeee; - font-style: italic; -} -.org-error { - /* error */ - color: #c6797e; -} -.org-escape { - /* font-lock-escape-face */ - color: #b18bb1; - font-weight: bold; -} -.org-escape-glyph { - /* escape-glyph */ - color: #88C0D0; -} -.org-eshell-prompt { - /* eshell-prompt */ - color: #B16E75; - font-weight: bold; -} -.org-evil-ex-commands { - /* evil-ex-commands */ - font-style: italic; - text-decoration: underline; -} -.org-evil-ex-info { - /* evil-ex-info */ - color: #c6797e; - font-style: italic; -} -.org-evil-ex-lazy-highlight { - /* evil-ex-lazy-highlight */ - background-color: #5D636E; -} -.org-evil-ex-search { - /* evil-ex-search */ - color: #070A0E; - background-color: #B16E75; - font-weight: bold; -} -.org-evil-ex-substitute-matches { - /* evil-ex-substitute-matches */ - color: #c6797e; - background-color: #070A0E; - font-weight: bold; - text-decoration: line-through; -} -.org-evil-ex-substitute-replacement { - /* evil-ex-substitute-replacement */ - color: #A3B09A; - background-color: #070A0E; - font-weight: bold; -} -.org-eww-form-checkbox { - /* eww-form-checkbox */ - color: #FAFFF6; - background-color: #101828; -} -.org-eww-form-file { - /* eww-form-file */ - color: #FAFFF6; - background-color: #101828; -} -.org-eww-form-select { - /* eww-form-select */ - color: #FAFFF6; - background-color: #101828; -} -.org-eww-form-submit { - /* eww-form-submit */ - color: #FAFFF6; - background-color: #151D2B; -} -.org-eww-form-text { - /* eww-form-text */ - color: #FAFFF6; - background-color: #172030; -} -.org-eww-form-textarea { - /* eww-form-textarea */ - color: #FAFFF6; - background-color: #172030; -} -.org-eww-invalid-certificate { - /* eww-invalid-certificate */ - color: #c6797e; -} -.org-eww-valid-certificate { - /* eww-valid-certificate */ - color: #B16E75; -} -.org-ffap { - /* ffap */ - color: #070A0E; - background-color: #B16E75; -} -.org-file-name-shadow { - /* file-name-shadow */ - color: #64727d; -} -.org-fill-column-indicator { - /* fill-column-indicator */ - color: #64727d; -} -.org-fixed-pitch { -} -.org-fixed-pitch-serif { -} -.org-flycheck-delimited-error { -} -.org-flycheck-error { - /* flycheck-error */ - text-decoration: underline; -} -.org-flycheck-error-delimiter { -} -.org-flycheck-error-list-checker-name { - /* flycheck-error-list-checker-name */ - color: #F9B5AC; -} -.org-flycheck-error-list-column-number { -} -.org-flycheck-error-list-error { - /* flycheck-error-list-error */ - color: #c6797e; -} -.org-flycheck-error-list-error-message { -} -.org-flycheck-error-list-filename { -} -.org-flycheck-error-list-highlight { - /* flycheck-error-list-highlight */ - font-weight: bold; -} -.org-flycheck-error-list-id { - /* flycheck-error-list-id */ - color: #c6797e; -} -.org-flycheck-error-list-id-with-explainer { - /* flycheck-error-list-id-with-explainer */ - color: #c6797e; -} -.org-flycheck-error-list-info { - /* flycheck-error-list-info */ - color: #A3B09A; -} -.org-flycheck-error-list-line-number { -} -.org-flycheck-error-list-warning { - /* flycheck-error-list-warning */ - color: #F7E3AF; -} -.org-flycheck-fringe-error { - /* flycheck-fringe-error */ - color: #c6797e; - background-color: #172030; -} -.org-flycheck-fringe-info { - /* flycheck-fringe-info */ - color: #A3B09A; - background-color: #172030; -} -.org-flycheck-fringe-warning { - /* flycheck-fringe-warning */ - color: #F7E3AF; - background-color: #172030; -} -.org-flycheck-info { - /* flycheck-info */ - text-decoration: underline; -} -.org-flycheck-verify-select-checker { -} -.org-flycheck-warning { - /* flycheck-warning */ - text-decoration: underline; -} -.org-flyspell-duplicate { - /* flyspell-duplicate */ - text-decoration: underline; -} -.org-flyspell-incorrect { - /* flyspell-incorrect */ - text-decoration: underline; -} -.org-fringe { - /* fringe */ - color: #5D636E; - background-color: #172030; -} -.org-function-call { - /* font-lock-function-call-face */ - color: #f9cbc2; - font-style: italic; -} -.org-function-name { - /* font-lock-function-name-face */ - color: #F9B5AC; -} -.org-git-commit-comment-action { - /* git-commit-comment-action */ - font-weight: bold; -} -.org-git-commit-comment-branch-local { - /* git-commit-comment-branch-local */ - color: #b18bb1; -} -.org-git-commit-comment-branch-remote { - /* git-commit-comment-branch-remote */ - color: #A3B09A; -} -.org-git-commit-comment-detached { - /* git-commit-comment-detached */ - color: #eabe9a; -} -.org-git-commit-comment-file { - /* git-commit-comment-file */ - color: #5D80AE; -} -.org-git-commit-comment-heading { - /* git-commit-comment-heading */ - color: #b18bb1; -} -.org-git-commit-keyword { - /* git-commit-keyword */ - color: #88C0D0; - font-style: italic; -} -.org-git-commit-nonempty-second-line { - /* git-commit-nonempty-second-line */ - color: #c6797e; - background-color: #070A0E; - font-weight: bold; - font-style: italic; -} -.org-git-commit-overlong-summary { - /* git-commit-overlong-summary */ - color: #c6797e; - background-color: #070A0E; - font-weight: bold; - font-style: italic; -} -.org-git-commit-summary { - /* git-commit-summary */ - color: #A3B09A; -} -.org-git-commit-trailer-token { - /* git-commit-trailer-token */ - color: #b18bb1; - font-style: italic; -} -.org-git-commit-trailer-value { - /* git-commit-trailer-value */ - color: #A3B09A; -} -.org-glyphless-char { - /* glyphless-char */ - font-size: 60%; -} -.org-gnus-button { - /* gnus-button */ - font-weight: bold; -} -.org-gnus-emphasis-bold { - /* gnus-emphasis-bold */ - font-weight: bold; -} -.org-gnus-emphasis-bold-italic { - /* gnus-emphasis-bold-italic */ - font-weight: bold; - font-style: italic; -} -.org-gnus-emphasis-highlight-words { - /* gnus-emphasis-highlight-words */ - color: #ffff00; - background-color: #000000; -} -.org-gnus-emphasis-italic { - /* gnus-emphasis-italic */ - font-style: italic; -} -.org-gnus-emphasis-strikethru { - /* gnus-emphasis-strikethru */ - text-decoration: line-through; -} -.org-gnus-emphasis-underline { - /* gnus-emphasis-underline */ - text-decoration: underline; -} -.org-gnus-emphasis-underline-bold { - /* gnus-emphasis-underline-bold */ - font-weight: bold; - text-decoration: underline; -} -.org-gnus-emphasis-underline-bold-italic { - /* gnus-emphasis-underline-bold-italic */ - font-weight: bold; - font-style: italic; - text-decoration: underline; -} -.org-gnus-emphasis-underline-italic { - /* gnus-emphasis-underline-italic */ - font-style: italic; - text-decoration: underline; -} -.org-gnus-group-mail-1 { - /* gnus-group-mail-1 */ - color: #FAFFF6; - font-weight: bold; -} -.org-gnus-group-mail-1-empty { - /* gnus-group-mail-1-empty */ - color: #64727d; -} -.org-gnus-group-mail-2 { - /* gnus-group-mail-2 */ - color: #FAFFF6; - font-weight: bold; -} -.org-gnus-group-mail-2-empty { - /* gnus-group-mail-2-empty */ - color: #64727d; -} -.org-gnus-group-mail-3 { - /* gnus-group-mail-3 */ - color: #FAFFF6; - font-weight: bold; -} -.org-gnus-group-mail-3-empty { - /* gnus-group-mail-3-empty */ - color: #64727d; -} -.org-gnus-group-mail-low { - /* gnus-group-mail-low */ - color: #FAFFF6; -} -.org-gnus-group-mail-low-empty { - /* gnus-group-mail-low-empty */ - color: #64727d; -} -.org-gnus-group-news-1 { - /* gnus-group-news-1 */ - color: #FAFFF6; - font-weight: bold; -} -.org-gnus-group-news-1-empty { - /* gnus-group-news-1-empty */ - color: #64727d; -} -.org-gnus-group-news-2 { - /* gnus-group-news-2 */ - color: #FAFFF6; - font-weight: bold; -} -.org-gnus-group-news-2-empty { - /* gnus-group-news-2-empty */ - color: #64727d; -} -.org-gnus-group-news-3 { - /* gnus-group-news-3 */ - color: #FAFFF6; - font-weight: bold; -} -.org-gnus-group-news-3-empty { - /* gnus-group-news-3-empty */ - color: #64727d; -} -.org-gnus-group-news-4 { - /* gnus-group-news-4 */ - color: #FAFFF6; - font-weight: bold; -} -.org-gnus-group-news-4-empty { - /* gnus-group-news-4-empty */ - color: #64727d; -} -.org-gnus-group-news-5 { - /* gnus-group-news-5 */ - color: #FAFFF6; - font-weight: bold; -} -.org-gnus-group-news-5-empty { - /* gnus-group-news-5-empty */ - color: #64727d; -} -.org-gnus-group-news-6 { - /* gnus-group-news-6 */ - color: #FAFFF6; - font-weight: bold; -} -.org-gnus-group-news-6-empty { - /* gnus-group-news-6-empty */ - color: #64727d; -} -.org-gnus-group-news-low { - /* gnus-group-news-low */ - color: #64727d; - font-weight: bold; -} -.org-gnus-group-news-low-empty { - /* gnus-group-news-low-empty */ - color: #64727d; -} -.org-gnus-header { - /* gnus-header */ - font-size: 110%; -} -.org-gnus-header-content { - /* gnus-header-content */ - color: #5D80AE; -} -.org-gnus-header-from { - /* gnus-header-from */ - color: #5D80AE; -} -.org-gnus-header-name { - /* gnus-header-name */ - color: #A3B09A; -} -.org-gnus-header-newsgroups { - /* gnus-header-newsgroups */ - color: #5D80AE; -} -.org-gnus-header-subject { - /* gnus-header-subject */ - color: #B16E75; - font-weight: bold; -} -.org-gnus-signature { - /* gnus-signature */ - color: #F7E3AF; -} -.org-gnus-splash { - /* gnus-splash */ - color: #cccccc; -} -.org-gnus-summary-cancelled { - /* gnus-summary-cancelled */ - color: #c6797e; - text-decoration: line-through; -} -.org-gnus-summary-high-ancient { - /* gnus-summary-high-ancient */ - color: #838e96; - font-style: italic; -} -.org-gnus-summary-high-read { - /* gnus-summary-high-read */ - color: #fbfff7; -} -.org-gnus-summary-high-ticked { - /* gnus-summary-high-ticked */ - color: #c0a2c0; -} -.org-gnus-summary-high-undownloaded { - /* gnus-summary-high-undownloaded */ - color: #d3d3d3; - font-weight: bold; -} -.org-gnus-summary-high-unread { - /* gnus-summary-high-unread */ - color: #b5bfae; -} -.org-gnus-summary-low-ancient { - /* gnus-summary-low-ancient */ - color: #505b64; - font-style: italic; -} -.org-gnus-summary-low-read { - /* gnus-summary-low-read */ - color: #c8ccc4; -} -.org-gnus-summary-low-ticked { - /* gnus-summary-low-ticked */ - color: #8d6f8d; -} -.org-gnus-summary-low-undownloaded { - /* gnus-summary-low-undownloaded */ - color: #d3d3d3; - font-style: italic; -} -.org-gnus-summary-low-unread { - /* gnus-summary-low-unread */ - color: #828c7b; -} -.org-gnus-summary-normal-ancient { - /* gnus-summary-normal-ancient */ - color: #64727d; - font-style: italic; -} -.org-gnus-summary-normal-read { - /* gnus-summary-normal-read */ - color: #FAFFF6; -} -.org-gnus-summary-normal-ticked { - /* gnus-summary-normal-ticked */ - color: #b18bb1; -} -.org-gnus-summary-normal-undownloaded { - /* gnus-summary-normal-undownloaded */ - color: #d3d3d3; -} -.org-gnus-summary-normal-unread { - /* gnus-summary-normal-unread */ - color: #A3B09A; - font-weight: bold; -} -.org-gnus-summary-selected { - /* gnus-summary-selected */ - color: #6e94b9; - font-weight: bold; -} -.org-grep-heading { - /* grep-heading */ - color: #A3B09A; -} -.org-header-line { - /* header-line */ - background-color: #0E131D; -} -.org-header-line-highlight { - /* header-line-highlight */ - color: #070A0E; - background-color: #B16E75; -} -.org-help-argument-name { - /* help-argument-name */ - font-style: italic; -} -.org-help-for-help-header { - /* help-for-help-header */ - font-size: 126%; -} -.org-help-key-binding { - /* help-key-binding */ - color: #add8e6; - background-color: #303030; -} -.org-highlight { - /* highlight */ - color: #070A0E; - background-color: #B16E75; -} -.org-hl-line { - /* hl-line */ - background-color: #101828; -} -.org-holiday { - /* holiday */ - background-color: #8b4513; -} -.org-homoglyph { - /* homoglyph */ - color: #00ffff; -} -.org-ibuffer-locked-buffer { - /* ibuffer-locked-buffer */ - color: #bc8f8f; -} -.org-icon { -} -.org-icon-button { - /* icon-button */ - color: #000000; - background-color: #808080; -} -.org-info-header-node { - /* info-header-node */ - color: #ffffff; - font-weight: bold; - font-style: italic; -} -.org-info-header-xref { - /* info-header-xref */ - color: #B16E75; - font-weight: bold; - text-decoration: underline; -} -.org-info-index-match { - /* info-index-match */ - color: #A3B09A; - background-color: #070A0E; - font-weight: bold; -} -.org-info-menu-header { - /* info-menu-header */ - font-weight: bold; -} -.org-info-menu-star { - /* info-menu-star */ - color: #ff0000; -} -.org-info-node { - /* info-node */ - color: #ffffff; - font-weight: bold; - font-style: italic; -} -.org-info-quoted { -} -.org-info-title-1 { - /* info-title-1 */ - font-size: 172%; - font-weight: bold; -} -.org-info-title-2 { - /* info-title-2 */ - font-size: 144%; - font-weight: bold; -} -.org-info-title-3 { - /* info-title-3 */ - font-size: 120%; - font-weight: bold; -} -.org-info-title-4 { - /* info-title-4 */ - font-weight: bold; -} -.org-info-xref { - /* info-xref */ - color: #B16E75; - font-weight: bold; - text-decoration: underline; -} -.org-internal-border { -} -.org-isearch { - /* isearch */ - background-color: #5D636E; - font-weight: bold; -} -.org-isearch-fail { - /* isearch-fail */ - color: #070A0E; - background-color: #c6797e; - font-weight: bold; -} -.org-isearch-group-1 { - /* isearch-group-1 */ - color: #8b2323; - background-color: #ff82ab; -} -.org-isearch-group-2 { - /* isearch-group-2 */ - color: #8b2323; - background-color: #cd6889; -} -.org-italic { - /* italic */ - font-style: italic; -} -.org-ivy-action { - /* ivy-action */ - color: #DB6E8F; -} -.org-ivy-completions-annotations { - /* ivy-completions-annotations */ - color: #64727d; - font-style: italic; -} -.org-ivy-confirm { - /* ivy-confirm-face */ - color: #A3B09A; -} -.org-ivy-current-match { - /* ivy-current-match */ - background-color: #1F2A3F; -} -.org-ivy-cursor { - /* ivy-cursor */ - color: #000000; - background-color: #ffffff; -} -.org-ivy-grep-info { - /* ivy-grep-info */ - color: #A3B09A; -} -.org-ivy-grep-line-number { - /* ivy-grep-line-number */ - color: #B16E75; -} -.org-ivy-highlight { - /* ivy-highlight-face */ - color: #5D80AE; -} -.org-ivy-match-required { - /* ivy-match-required-face */ - color: #c6797e; -} -.org-ivy-minibuffer-match-face-1 { - /* ivy-minibuffer-match-face-1 */ - color: #79858f; -} -.org-ivy-minibuffer-match-face-2 { - /* ivy-minibuffer-match-face-2 */ - color: #B16E75; -} -.org-ivy-minibuffer-match-face-3 { - /* ivy-minibuffer-match-face-3 */ - color: #A3B09A; -} -.org-ivy-minibuffer-match-face-4 { - /* ivy-minibuffer-match-face-4 */ - color: #F7E3AF; -} -.org-ivy-minibuffer-match-highlight { - /* ivy-minibuffer-match-highlight */ - color: #5D80AE; -} -.org-ivy-modified-buffer { - /* ivy-modified-buffer */ - color: #F7E3AF; - font-weight: bold; -} -.org-ivy-modified-outside-buffer { - /* ivy-modified-outside-buffer */ - color: #FAFFF6; - background-color: #172030; -} -.org-ivy-org { - /* ivy-org */ - color: #92aeca; - font-weight: bold; -} -.org-ivy-prompt-match { - /* ivy-prompt-match */ - background-color: #1F2A3F; -} -.org-ivy-remote { - /* ivy-remote */ - color: #7B6BFF; -} -.org-ivy-separator { - /* ivy-separator */ - color: #A3B09A; - font-style: italic; -} -.org-ivy-subdir { - /* ivy-subdir */ - color: #DB6E8F; -} -.org-ivy-virtual { - /* ivy-virtual */ - color: #A3B09A; - font-style: italic; -} -.org-ivy-yanked-word { - /* ivy-yanked-word */ - color: #070A0E; - background-color: #B16E75; -} -.org-keyword { - /* font-lock-keyword-face */ - color: #b18bb1; - font-style: italic; -} -.org-kmacro-menu-flagged { - /* kmacro-menu-flagged */ - color: #c6797e; -} -.org-kmacro-menu-mark { - /* kmacro-menu-mark */ - color: #c6797e; -} -.org-kmacro-menu-marked { - /* kmacro-menu-marked */ - color: #F7E3AF; -} -.org-lazy-highlight { - /* lazy-highlight */ - background-color: #5D636E; -} -.org-line-number { - /* line-number */ - color: #838e96; - background-color: #172030; -} -.org-line-number-major-tick { - /* line-number-major-tick */ - background-color: #bfbfbf; - font-weight: bold; -} -.org-line-number-minor-tick { - /* line-number-minor-tick */ - background-color: #8c8c8c; - font-weight: bold; -} -.org-link { - /* link */ - color: #B16E75; - font-weight: bold; - text-decoration: underline; -} -.org-link-visited { - /* link-visited */ - color: #ee82ee; - font-weight: bold; - text-decoration: underline; -} -.org-llama-XX-macro { - /* llama-\#\#-macro */ - color: #f9cbc2; - font-style: italic; -} -.org-llama-deleted-argument { -} -.org-llama-llama-macro { - /* llama-llama-macro */ - color: #b18bb1; - font-style: italic; -} -.org-llama-mandatory-argument { - /* llama-mandatory-argument */ - color: #e0bcba; -} -.org-llama-optional-argument { - /* llama-optional-argument */ - color: #c6797e; -} -.org-log-edit-header { - /* log-edit-header */ - color: #b18bb1; - font-style: italic; -} -.org-log-edit-headers-separator { - /* log-edit-headers-separator */ - font-size: 10%; -} -.org-log-edit-summary { - /* log-edit-summary */ - color: #F9B5AC; -} -.org-log-edit-unknown-header { - /* log-edit-unknown-header */ - color: #64727d; - font-style: italic; -} -.org-lsp-details { - /* lsp-details-face */ - color: #64727d; - font-size: 80%; -} -.org-lsp-erlang-elp-bound-modifier { - /* lsp-erlang-elp-bound-modifier-face */ - text-decoration: underline; -} -.org-lsp-erlang-elp-deprecated-function-modifier { - /* lsp-erlang-elp-deprecated-function-modifier-face */ - text-decoration: line-through; -} -.org-lsp-erlang-elp-exported-function-modifier { - /* lsp-erlang-elp-exported-function-modifier-face */ - text-decoration: underline; -} -.org-lsp-erlang-elp-exported-type-modifier { - /* lsp-erlang-elp-exported-type-modifier-face */ - text-decoration: underline; -} -.org-lsp-erlang-elp-type-dynamic-modifier { - /* lsp-erlang-elp-type-dynamic-modifier-face */ - font-weight: bold; -} -.org-lsp-face-highlight-read { - /* lsp-face-highlight-read */ - color: #F0F4FC; - background-color: #453744; - font-weight: bold; -} -.org-lsp-face-highlight-textual { - /* lsp-face-highlight-textual */ - color: #F0F4FC; - background-color: #453744; - font-weight: bold; -} -.org-lsp-face-highlight-write { - /* lsp-face-highlight-write */ - color: #F0F4FC; - background-color: #453744; - font-weight: bold; -} -.org-lsp-face-rename { - /* lsp-face-rename */ - text-decoration: underline; -} -.org-lsp-face-semhl-class { - /* lsp-face-semhl-class */ - color: #c6797e; -} -.org-lsp-face-semhl-comment { - /* lsp-face-semhl-comment */ - color: #64727d; - font-style: italic; -} -.org-lsp-face-semhl-constant { - /* lsp-face-semhl-constant */ - color: #c6797e; -} -.org-lsp-face-semhl-default-library { - /* lsp-face-semhl-default-library */ - color: #DB6E8F; -} -.org-lsp-face-semhl-definition { - /* lsp-face-semhl-definition */ - color: #F9B5AC; - font-weight: bold; -} -.org-lsp-face-semhl-deprecated { - /* lsp-face-semhl-deprecated */ - text-decoration: line-through; -} -.org-lsp-face-semhl-enum { - /* lsp-face-semhl-enum */ - color: #c6797e; -} -.org-lsp-face-semhl-event { - /* lsp-face-semhl-event */ - color: #c6797e; -} -.org-lsp-face-semhl-function { - /* lsp-face-semhl-function */ - color: #F9B5AC; -} -.org-lsp-face-semhl-implementation { - /* lsp-face-semhl-implementation */ - color: #F9B5AC; - font-weight: bold; -} -.org-lsp-face-semhl-interface { - /* lsp-face-semhl-interface */ - color: #c6797e; -} -.org-lsp-face-semhl-keyword { - /* lsp-face-semhl-keyword */ - color: #b18bb1; - font-style: italic; -} -.org-lsp-face-semhl-label { - /* lsp-face-semhl-label */ - color: #64727d; - font-style: italic; -} -.org-lsp-face-semhl-macro { - /* lsp-face-semhl-macro */ - color: #b18bb1; - font-style: italic; -} -.org-lsp-face-semhl-member { - /* lsp-face-semhl-member */ - color: #c6797e; -} -.org-lsp-face-semhl-method { - /* lsp-face-semhl-method */ - color: #F9B5AC; -} -.org-lsp-face-semhl-namespace { - /* lsp-face-semhl-namespace */ - color: #c6797e; - font-weight: bold; -} -.org-lsp-face-semhl-number { - /* lsp-face-semhl-number */ - color: #c6797e; -} -.org-lsp-face-semhl-operator { - /* lsp-face-semhl-operator */ - color: #F9B5AC; -} -.org-lsp-face-semhl-parameter { - /* lsp-face-semhl-parameter */ - color: #c6797e; -} -.org-lsp-face-semhl-property { - /* lsp-face-semhl-property */ - color: #c6797e; -} -.org-lsp-face-semhl-regexp { - /* lsp-face-semhl-regexp */ - color: #A3B09A; - font-style: italic; -} -.org-lsp-face-semhl-static { - /* lsp-face-semhl-static */ - color: #b18bb1; - font-style: italic; -} -.org-lsp-face-semhl-string { - /* lsp-face-semhl-string */ - color: #A3B09A; -} -.org-lsp-face-semhl-struct { - /* lsp-face-semhl-struct */ - color: #c6797e; -} -.org-lsp-face-semhl-type { - /* lsp-face-semhl-type */ - color: #c6797e; -} -.org-lsp-face-semhl-type-parameter { - /* lsp-face-semhl-type-parameter */ - color: #c6797e; -} -.org-lsp-face-semhl-variable { - /* lsp-face-semhl-variable */ - color: #c6797e; -} -.org-lsp-flycheck-warning-unnecessary { - /* lsp-flycheck-warning-unnecessary-face */ - color: #bebebe; - text-decoration: underline; -} -.org-lsp-headerline-breadcrumb-deprecated { - /* lsp-headerline-breadcrumb-deprecated-face */ - color: #A3B09A; - font-weight: bold; - font-style: italic; - text-decoration: line-through; -} -.org-lsp-headerline-breadcrumb-path { - /* lsp-headerline-breadcrumb-path-face */ - color: #A3B09A; -} -.org-lsp-headerline-breadcrumb-path-error { - /* lsp-headerline-breadcrumb-path-error-face */ - color: #A3B09A; - text-decoration: underline; -} -.org-lsp-headerline-breadcrumb-path-hint { - /* lsp-headerline-breadcrumb-path-hint-face */ - color: #A3B09A; - text-decoration: underline; -} -.org-lsp-headerline-breadcrumb-path-info { - /* lsp-headerline-breadcrumb-path-info-face */ - color: #A3B09A; - text-decoration: underline; -} -.org-lsp-headerline-breadcrumb-path-warning { - /* lsp-headerline-breadcrumb-path-warning-face */ - color: #A3B09A; - text-decoration: underline; -} -.org-lsp-headerline-breadcrumb-project-prefix { - /* lsp-headerline-breadcrumb-project-prefix-face */ - color: #A3B09A; - font-weight: bold; -} -.org-lsp-headerline-breadcrumb-separator { - /* lsp-headerline-breadcrumb-separator-face */ - color: #64727d; -} -.org-lsp-headerline-breadcrumb-symbols { - /* lsp-headerline-breadcrumb-symbols-face */ - color: #A3B09A; - font-weight: bold; - font-style: italic; -} -.org-lsp-headerline-breadcrumb-symbols-error { - /* lsp-headerline-breadcrumb-symbols-error-face */ - color: #A3B09A; - font-weight: bold; - font-style: italic; - text-decoration: underline; -} -.org-lsp-headerline-breadcrumb-symbols-hint { - /* lsp-headerline-breadcrumb-symbols-hint-face */ - color: #A3B09A; - font-weight: bold; - font-style: italic; - text-decoration: underline; -} -.org-lsp-headerline-breadcrumb-symbols-info { - /* lsp-headerline-breadcrumb-symbols-info-face */ - color: #A3B09A; - font-weight: bold; - font-style: italic; - text-decoration: underline; -} -.org-lsp-headerline-breadcrumb-symbols-warning { - /* lsp-headerline-breadcrumb-symbols-warning-face */ - color: #A3B09A; - font-weight: bold; - font-style: italic; - text-decoration: underline; -} -.org-lsp-headerline-breadcrumb-unknown-project-prefix { - /* lsp-headerline-breadcrumb-unknown-project-prefix-face */ - color: #64727d; - font-weight: bold; -} -.org-lsp-inlay-hint { - /* lsp-inlay-hint-face */ - color: #64727d; - font-style: italic; -} -.org-lsp-inlay-hint-parameter { - /* lsp-inlay-hint-parameter-face */ - color: #64727d; - font-style: italic; -} -.org-lsp-inlay-hint-type { - /* lsp-inlay-hint-type-face */ - color: #64727d; - font-style: italic; -} -.org-lsp-installation-buffer { - /* lsp-installation-buffer-face */ - color: #00ff00; -} -.org-lsp-installation-finished-buffer { - /* lsp-installation-finished-buffer-face */ - color: #ffa500; -} -.org-lsp-lens { - /* lsp-lens-face */ - color: #64727d; - font-size: 80%; -} -.org-lsp-lens-mouse { - /* lsp-lens-mouse-face */ - color: #B16E75; - font-size: 80%; - font-weight: bold; - text-decoration: underline; -} -.org-lsp-modeline-code-actions { - /* lsp-modeline-code-actions-face */ - color: #00ffff; -} -.org-lsp-modeline-code-actions-preferred { - /* lsp-modeline-code-actions-preferred-face */ - color: #ffff00; -} -.org-lsp-ocaml-highlight-region { - /* lsp-ocaml-highlight-region-face */ - background-color: #5D636E; -} -.org-lsp-rename-placeholder { - /* lsp-rename-placeholder-face */ - color: #c6797e; -} -.org-lsp-rust-analyzer-abstract-modifier { -} -.org-lsp-rust-analyzer-async-modifier { -} -.org-lsp-rust-analyzer-attribute-modifier { -} -.org-lsp-rust-analyzer-callable-modifier { -} -.org-lsp-rust-analyzer-constant-modifier { -} -.org-lsp-rust-analyzer-consuming-modifier { -} -.org-lsp-rust-analyzer-control-flow-modifier { -} -.org-lsp-rust-analyzer-crate-root-modifier { -} -.org-lsp-rust-analyzer-declaration-modifier { -} -.org-lsp-rust-analyzer-default-library-modifier { -} -.org-lsp-rust-analyzer-definition-modifier { -} -.org-lsp-rust-analyzer-deprecated-modifier { -} -.org-lsp-rust-analyzer-documentation-modifier { -} -.org-lsp-rust-analyzer-injected-modifier { -} -.org-lsp-rust-analyzer-intra-doc-link-modifier { -} -.org-lsp-rust-analyzer-library-modifier { -} -.org-lsp-rust-analyzer-mutable-modifier { - /* lsp-rust-analyzer-mutable-modifier-face */ - text-decoration: underline; -} -.org-lsp-rust-analyzer-public-modifier { -} -.org-lsp-rust-analyzer-readonly-modifier { -} -.org-lsp-rust-analyzer-reference-modifier { - /* lsp-rust-analyzer-reference-modifier-face */ - font-weight: bold; -} -.org-lsp-rust-analyzer-static-modifier { -} -.org-lsp-rust-analyzer-trait-modifier { -} -.org-lsp-rust-analyzer-unsafe-modifier { -} -.org-lsp-signature { - /* lsp-signature-face */ - color: #64727d; - font-size: 80%; -} -.org-lsp-signature-highlight-function-argument { - /* lsp-signature-highlight-function-argument */ - font-weight: bold; -} -.org-lsp-signature-posframe { - /* lsp-signature-posframe */ - color: #A7ACB9; - background-color: #1F2A3F; -} -.org-lv-separator { - /* lv-separator */ - background-color: #4d4d4d; -} -.org-magit-bisect-bad { - /* magit-bisect-bad */ - color: #c6797e; -} -.org-magit-bisect-good { - /* magit-bisect-good */ - color: #A3B09A; -} -.org-magit-bisect-skip { - /* magit-bisect-skip */ - color: #eabe9a; -} -.org-magit-blame-date { - /* magit-blame-date */ - color: #c6797e; -} -.org-magit-blame-dimmed { - /* magit-blame-dimmed */ - color: #A7ACB9; -} -.org-magit-blame-hash { - /* magit-blame-hash */ - color: #88C0D0; -} -.org-magit-blame-heading { - /* magit-blame-heading */ - color: #eabe9a; - background-color: #1F2A3F; -} -.org-magit-blame-highlight { - /* magit-blame-highlight */ - color: #ffffff; - background-color: #404040; -} -.org-magit-blame-margin { - /* magit-blame-margin */ - color: #ffffff; - background-color: #404040; -} -.org-magit-blame-name { -} -.org-magit-blame-summary { -} -.org-magit-branch-current { - /* magit-branch-current */ - color: #6e94b9; -} -.org-magit-branch-local { - /* magit-branch-local */ - color: #88C0D0; -} -.org-magit-branch-remote { - /* magit-branch-remote */ - color: #A3B09A; -} -.org-magit-branch-remote-head { - /* magit-branch-remote-head */ - color: #A3B09A; -} -.org-magit-branch-upstream { - /* magit-branch-upstream */ - font-style: italic; -} -.org-magit-branch-warning { - /* magit-branch-warning */ - color: #F7E3AF; -} -.org-magit-cherry-equivalent { - /* magit-cherry-equivalent */ - color: #5D80AE; -} -.org-magit-cherry-unmatched { - /* magit-cherry-unmatched */ - color: #88C0D0; -} -.org-magit-diff-added { - /* magit-diff-added */ - color: #828c7b; - background-color: #242e3a; -} -.org-magit-diff-added-highlight { - /* magit-diff-added-highlight */ - color: #A3B09A; - background-color: #333c45; - font-weight: bold; -} -.org-magit-diff-base { - /* magit-diff-base */ - color: #bb987b; - background-color: #2c2f3a; -} -.org-magit-diff-base-highlight { - /* magit-diff-base-highlight */ - color: #eabe9a; - background-color: #413f45; - font-weight: bold; -} -.org-magit-diff-conflict-heading { - /* magit-diff-conflict-heading */ - color: #172030; - background-color: #453744; -} -.org-magit-diff-conflict-heading-highlight { - /* magit-diff-conflict-heading-highlight */ - color: #172030; - background-color: #B16E75; - font-weight: bold; -} -.org-magit-diff-context { - /* magit-diff-context */ - color: #959993; - background-color: #172030; -} -.org-magit-diff-context-highlight { - /* magit-diff-context-highlight */ - color: #FAFFF6; - background-color: #101828; -} -.org-magit-diff-file-heading { - /* magit-diff-file-heading */ - color: #FAFFF6; - font-weight: bold; -} -.org-magit-diff-file-heading-highlight { - /* magit-diff-file-heading-highlight */ - background-color: #101828; -} -.org-magit-diff-file-heading-selection { - /* magit-diff-file-heading-selection */ - color: #b18bb1; - background-color: #1E6378; - font-weight: bold; -} -.org-magit-diff-hunk-heading { - /* magit-diff-hunk-heading */ - color: #172030; - background-color: #453744; -} -.org-magit-diff-hunk-heading-highlight { - /* magit-diff-hunk-heading-highlight */ - color: #172030; - background-color: #B16E75; - font-weight: bold; -} -.org-magit-diff-hunk-heading-selection { - /* magit-diff-hunk-heading-selection */ - color: #cd8162; - background-color: #B16E75; - font-weight: bold; -} -.org-magit-diff-hunk-region { - /* magit-diff-hunk-region */ - font-weight: bold; -} -.org-magit-diff-lines-boundary { - /* magit-diff-lines-boundary */ - color: #F7E3AF; - background-color: #c6797e; -} -.org-magit-diff-lines-heading { - /* magit-diff-lines-heading */ - color: #F7E3AF; - background-color: #c6797e; -} -.org-magit-diff-our { - /* magit-diff-our */ - color: #9e6064; - background-color: #2f3145; -} -.org-magit-diff-our-highlight { - /* magit-diff-our-highlight */ - color: #c6797e; - background-color: #40394b; - font-weight: bold; -} -.org-magit-diff-removed { - /* magit-diff-removed */ - color: #9e6064; - background-color: #2f3145; -} -.org-magit-diff-removed-highlight { - /* magit-diff-removed-highlight */ - color: #c6797e; - background-color: #40394b; - font-weight: bold; -} -.org-magit-diff-revision-summary { - /* magit-diff-revision-summary */ - color: #172030; - background-color: #453744; -} -.org-magit-diff-revision-summary-highlight { - /* magit-diff-revision-summary-highlight */ - color: #172030; - background-color: #B16E75; - font-weight: bold; -} -.org-magit-diff-their { - /* magit-diff-their */ - color: #828c7b; - background-color: #242e3a; -} -.org-magit-diff-their-highlight { - /* magit-diff-their-highlight */ - color: #A3B09A; - background-color: #333c45; - font-weight: bold; -} -.org-magit-diff-whitespace-warning { - /* magit-diff-whitespace-warning */ - background-color: #c6797e; -} -.org-magit-diffstat-added { - /* magit-diffstat-added */ - color: #A3B09A; -} -.org-magit-diffstat-removed { - /* magit-diffstat-removed */ - color: #c6797e; -} -.org-magit-dimmed { - /* magit-dimmed */ - color: #A7ACB9; -} -.org-magit-filename { - /* magit-filename */ - color: #5D80AE; -} -.org-magit-hash { - /* magit-hash */ - color: #64727d; -} -.org-magit-head { - /* magit-head */ - color: #88C0D0; -} -.org-magit-header-line { - /* magit-header-line */ - color: #F0F4FC; - background-color: #1E6378; - font-weight: bold; -} -.org-magit-header-line-key { - /* magit-header-line-key */ - color: #DB6E8F; -} -.org-magit-header-line-log-select { - /* magit-header-line-log-select */ - font-weight: bold; -} -.org-magit-keyword { - /* magit-keyword */ - color: #A3B09A; -} -.org-magit-keyword-squash { - /* magit-keyword-squash */ - color: #F7E3AF; -} -.org-magit-left-margin { - /* magit-left-margin */ - color: #FAFFF6; - background-color: #172030; -} -.org-magit-log-author { - /* magit-log-author */ - color: #eabe9a; -} -.org-magit-log-date { - /* magit-log-date */ - color: #6e94b9; -} -.org-magit-log-graph { - /* magit-log-graph */ - color: #64727d; -} -.org-magit-mode-line-process { - /* magit-mode-line-process */ - color: #B16E75; -} -.org-magit-mode-line-process-error { - /* magit-mode-line-process-error */ - color: #c6797e; -} -.org-magit-process-ng { - /* magit-process-ng */ - color: #c6797e; -} -.org-magit-process-ok { - /* magit-process-ok */ - color: #A3B09A; -} -.org-magit-reflog-amend { - /* magit-reflog-amend */ - color: #b18bb1; -} -.org-magit-reflog-checkout { - /* magit-reflog-checkout */ - color: #6e94b9; -} -.org-magit-reflog-cherry-pick { - /* magit-reflog-cherry-pick */ - color: #A3B09A; -} -.org-magit-reflog-commit { - /* magit-reflog-commit */ - color: #A3B09A; -} -.org-magit-reflog-merge { - /* magit-reflog-merge */ - color: #A3B09A; -} -.org-magit-reflog-other { - /* magit-reflog-other */ - color: #88C0D0; -} -.org-magit-reflog-rebase { - /* magit-reflog-rebase */ - color: #b18bb1; -} -.org-magit-reflog-remote { - /* magit-reflog-remote */ - color: #88C0D0; -} -.org-magit-reflog-reset { - /* magit-reflog-reset */ - color: #c6797e; -} -.org-magit-refname { - /* magit-refname */ - color: #64727d; -} -.org-magit-refname-pullreq { - /* magit-refname-pullreq */ - color: #64727d; -} -.org-magit-refname-stash { - /* magit-refname-stash */ - color: #64727d; -} -.org-magit-refname-wip { - /* magit-refname-wip */ - color: #64727d; -} -.org-magit-section-child-count { -} -.org-magit-section-heading { - /* magit-section-heading */ - color: #B16E75; -} -.org-magit-section-heading-selection { - /* magit-section-heading-selection */ - color: #eabe9a; - font-weight: bold; -} -.org-magit-section-highlight { - /* magit-section-highlight */ - background-color: #101828; -} -.org-magit-section-secondary-heading { - /* magit-section-secondary-heading */ - color: #5D80AE; - font-weight: bold; -} -.org-magit-sequence-done { - /* magit-sequence-done */ - color: #64727d; -} -.org-magit-sequence-drop { - /* magit-sequence-drop */ - color: #c6797e; -} -.org-magit-sequence-exec { - /* magit-sequence-exec */ - color: #64727d; -} -.org-magit-sequence-head { - /* magit-sequence-head */ - color: #6e94b9; -} -.org-magit-sequence-onto { - /* magit-sequence-onto */ - color: #64727d; -} -.org-magit-sequence-part { - /* magit-sequence-part */ - color: #eabe9a; -} -.org-magit-sequence-pick { - /* magit-sequence-pick */ - color: #FAFFF6; - background-color: #172030; -} -.org-magit-sequence-stop { - /* magit-sequence-stop */ - color: #A3B09A; -} -.org-magit-signature-bad { - /* magit-signature-bad */ - color: #c6797e; -} -.org-magit-signature-error { - /* magit-signature-error */ - color: #c6797e; -} -.org-magit-signature-expired { - /* magit-signature-expired */ - color: #eabe9a; -} -.org-magit-signature-expired-key { - /* magit-signature-expired-key */ - color: #eabe9a; -} -.org-magit-signature-good { - /* magit-signature-good */ - color: #A3B09A; -} -.org-magit-signature-revoked { - /* magit-signature-revoked */ - color: #b18bb1; -} -.org-magit-signature-untrusted { - /* magit-signature-untrusted */ - color: #F7E3AF; -} -.org-magit-tag { - /* magit-tag */ - color: #F7E3AF; -} -.org-markdown-blockquote { - /* markdown-blockquote-face */ - color: #A3B09A; - font-style: italic; -} -.org-markdown-bold { - /* markdown-bold-face */ - color: #eabe9a; - font-weight: bold; -} -.org-markdown-code { - /* markdown-code-face */ - background-color: #2a3448; -} -.org-markdown-comment { - /* markdown-comment-face */ - color: #64727d; - font-style: italic; -} -.org-markdown-footnote-marker { - /* markdown-footnote-marker-face */ - color: #64727d; -} -.org-markdown-footnote-text { - /* markdown-footnote-text-face */ - color: #64727d; - font-style: italic; -} -.org-markdown-gfm-checkbox { - /* markdown-gfm-checkbox-face */ - color: #DB6E8F; -} -.org-markdown-header { - /* markdown-header-face */ - color: #c6797e; - font-weight: bold; -} -.org-markdown-header-delimiter { - /* markdown-header-delimiter-face */ - color: #c6797e; - font-weight: bold; -} -.org-markdown-header-face-1 { - /* markdown-header-face-1 */ - color: #c6797e; - font-weight: bold; -} -.org-markdown-header-face-2 { - /* markdown-header-face-2 */ - color: #c6797e; - font-weight: bold; -} -.org-markdown-header-face-3 { - /* markdown-header-face-3 */ - color: #c6797e; - font-weight: bold; -} -.org-markdown-header-face-4 { - /* markdown-header-face-4 */ - color: #c6797e; - font-weight: bold; -} -.org-markdown-header-face-5 { - /* markdown-header-face-5 */ - color: #c6797e; - font-weight: bold; -} -.org-markdown-header-face-6 { - /* markdown-header-face-6 */ - color: #c6797e; - font-weight: bold; -} -.org-markdown-header-rule { - /* markdown-header-rule-face */ - color: #64727d; -} -.org-markdown-highlight { - /* markdown-highlight-face */ - color: #070A0E; - background-color: #B16E75; -} -.org-markdown-highlighting { - /* markdown-highlighting-face */ - color: #000000; - background-color: #ffff00; -} -.org-markdown-hr { - /* markdown-hr-face */ - color: #64727d; -} -.org-markdown-html-attr-name { - /* markdown-html-attr-name-face */ - color: #c6797e; -} -.org-markdown-html-attr-value { - /* markdown-html-attr-value-face */ - color: #A3B09A; -} -.org-markdown-html-entity { - /* markdown-html-entity-face */ - color: #c6797e; -} -.org-markdown-html-tag-delimiter { - /* markdown-html-tag-delimiter-face */ - color: #64727d; -} -.org-markdown-html-tag-name { - /* markdown-html-tag-name-face */ - color: #b18bb1; - font-style: italic; -} -.org-markdown-italic { - /* markdown-italic-face */ - color: #5D80AE; - font-style: italic; -} -.org-markdown-language-info { - /* markdown-language-info-face */ - color: #A3B09A; -} -.org-markdown-language-keyword { - /* markdown-language-keyword-face */ - color: #c6797e; -} -.org-markdown-line-break { - /* markdown-line-break-face */ - color: #c6797e; - text-decoration: underline; -} -.org-markdown-link { - /* markdown-link-face */ - color: #B16E75; -} -.org-markdown-link-title { - /* markdown-link-title-face */ - color: #64727d; - font-style: italic; -} -.org-markdown-list { - /* markdown-list-face */ - color: #c6797e; -} -.org-markdown-markup { - /* markdown-markup-face */ - color: #64727d; -} -.org-markdown-math { - /* markdown-math-face */ - color: #A3B09A; -} -.org-markdown-metadata-key { - /* markdown-metadata-key-face */ - color: #c6797e; -} -.org-markdown-metadata-value { - /* markdown-metadata-value-face */ - color: #A3B09A; -} -.org-markdown-missing-link { - /* markdown-missing-link-face */ - color: #F7E3AF; -} -.org-markdown-plain-url { - /* markdown-plain-url-face */ - color: #B16E75; -} -.org-markdown-pre { - /* markdown-pre-face */ - color: #A3B09A; -} -.org-markdown-reference { - /* markdown-reference-face */ - color: #A3B09A; -} -.org-markdown-strike-through { - /* markdown-strike-through-face */ - text-decoration: line-through; -} -.org-markdown-url { - /* markdown-url-face */ - color: #b18bb1; -} -.org-match { - /* match */ - color: #A3B09A; - background-color: #070A0E; - font-weight: bold; -} -.org-menu { -} -.org-message-cited-text-1 { - /* message-cited-text-1 */ - color: #F7E3AF; -} -.org-message-cited-text-2 { - /* message-cited-text-2 */ - color: #b18bb1; -} -.org-message-cited-text-3 { - /* message-cited-text-3 */ - color: #A3B09A; -} -.org-message-cited-text-4 { - /* message-cited-text-4 */ - color: #A3B09A; -} -.org-message-header-cc { - /* message-header-cc */ - color: #965d63; - font-weight: bold; -} -.org-message-header-name { - /* message-header-name */ - color: #A3B09A; -} -.org-message-header-newsgroups { - /* message-header-newsgroups */ - color: #F7E3AF; -} -.org-message-header-other { - /* message-header-other */ - color: #5D80AE; -} -.org-message-header-subject { - /* message-header-subject */ - color: #B16E75; - font-weight: bold; -} -.org-message-header-to { - /* message-header-to */ - color: #B16E75; - font-weight: bold; -} -.org-message-header-xheader { - /* message-header-xheader */ - color: #A3B09A; -} -.org-message-mml { - /* message-mml */ - color: #64727d; - font-style: italic; -} -.org-message-separator { - /* message-separator */ - color: #64727d; -} -.org-message-signature-separator { - /* message-signature-separator */ - font-weight: bold; -} -.org-minibuffer-prompt { - /* minibuffer-prompt */ - color: #B16E75; -} -.org-minuet-suggestion { - /* minuet-suggestion-face */ - color: #64727d; -} -.org-misc-punctuation { - /* font-lock-misc-punctuation-face */ - color: #e7e2e4; -} -.org-mm-command-output { - /* mm-command-output */ - color: #228b22; -} -.org-mm-uu-extract { - /* mm-uu-extract */ - color: #efe9e2; - background-color: #1f2230; -} -.org-mode-line { - /* mode-line */ - background-color: #0E131D; -} -.org-mode-line-active { - /* mode-line-active */ - background-color: #0E131D; -} -.org-mode-line-buffer-id { - /* mode-line-buffer-id */ - font-weight: bold; -} -.org-mode-line-buffer-id-inactive { - /* mode-line-buffer-id-inactive */ - font-weight: bold; -} -.org-mode-line-emphasis { - /* mode-line-emphasis */ - color: #B16E75; -} -.org-mode-line-highlight { - /* mode-line-highlight */ - color: #070A0E; - background-color: #B16E75; -} -.org-mode-line-inactive { - /* mode-line-inactive */ - color: #B16E75; - background-color: #141c2b; -} -.org-mouse { -} -.org-mouse-drag-and-drop-region { - /* mouse-drag-and-drop-region */ - background-color: #5D636E; -} -.org-negation-char { - /* font-lock-negation-char-face */ - color: #b18bb1; - font-weight: bold; -} -.org-nerd-icons-blue { - /* nerd-icons-blue */ - color: #6e94b9; -} -.org-nerd-icons-blue-alt { - /* nerd-icons-blue-alt */ - color: #7ea9a9; -} -.org-nerd-icons-cyan { - /* nerd-icons-cyan */ - color: #88C0D0; -} -.org-nerd-icons-cyan-alt { - /* nerd-icons-cyan-alt */ - color: #88C0D0; -} -.org-nerd-icons-dblue { - /* nerd-icons-dblue */ - color: #1E6378; -} -.org-nerd-icons-dcyan { - /* nerd-icons-dcyan */ - color: #507681; -} -.org-nerd-icons-dgreen { - /* nerd-icons-dgreen */ - color: #727b6b; -} -.org-nerd-icons-dmaroon { - /* nerd-icons-dmaroon */ - color: #7b617b; -} -.org-nerd-icons-dorange { - /* nerd-icons-dorange */ - color: #a3856b; -} -.org-nerd-icons-dpink { - /* nerd-icons-dpink */ - color: #ce8d91; -} -.org-nerd-icons-dpurple { - /* nerd-icons-dpurple */ - color: #415979; -} -.org-nerd-icons-dred { - /* nerd-icons-dred */ - color: #8a5458; -} -.org-nerd-icons-dsilver { - /* nerd-icons-dsilver */ - color: #73808a; -} -.org-nerd-icons-dyellow { - /* nerd-icons-dyellow */ - color: #ac9e7a; -} -.org-nerd-icons-green { - /* nerd-icons-green */ - color: #A3B09A; -} -.org-nerd-icons-lblue { - /* nerd-icons-lblue */ - color: #99b4ce; -} -.org-nerd-icons-lcyan { - /* nerd-icons-lcyan */ - color: #abd2de; -} -.org-nerd-icons-lgreen { - /* nerd-icons-lgreen */ - color: #bec7b8; -} -.org-nerd-icons-lmaroon { - /* nerd-icons-lmaroon */ - color: #c8adc8; -} -.org-nerd-icons-lorange { - /* nerd-icons-lorange */ - color: #f0d1b8; -} -.org-nerd-icons-lpink { - /* nerd-icons-lpink */ - color: #e5c2c4; -} -.org-nerd-icons-lpurple { - /* nerd-icons-lpurple */ - color: #8da6c6; -} -.org-nerd-icons-lred { - /* nerd-icons-lred */ - color: #d7a1a4; -} -.org-nerd-icons-lsilver { - /* nerd-icons-lsilver */ - color: #d0d4d8; -} -.org-nerd-icons-lyellow { - /* nerd-icons-lyellow */ - color: #f9ebc7; -} -.org-nerd-icons-maroon { - /* nerd-icons-maroon */ - color: #b18bb1; -} -.org-nerd-icons-orange { - /* nerd-icons-orange */ - color: #eabe9a; -} -.org-nerd-icons-pink { - /* nerd-icons-pink */ - color: #d9a7ab; -} -.org-nerd-icons-purple { - /* nerd-icons-purple */ - color: #5D80AE; -} -.org-nerd-icons-purple-alt { - /* nerd-icons-purple-alt */ - color: #627484; -} -.org-nerd-icons-red { - /* nerd-icons-red */ - color: #c6797e; -} -.org-nerd-icons-red-alt { - /* nerd-icons-red-alt */ - color: #72737d; -} -.org-nerd-icons-silver { - /* nerd-icons-silver */ - color: #a9b1b7; -} -.org-nerd-icons-yellow { - /* nerd-icons-yellow */ - color: #F7E3AF; -} -.org-next-error { - /* next-error */ - background-color: #5D636E; -} -.org-next-error-message { - /* next-error-message */ - color: #070A0E; - background-color: #B16E75; -} -.org-nix-antiquote { - /* nix-antiquote-face */ - color: #b18bb1; - font-style: italic; -} -.org-nix-attribute { - /* nix-attribute-face */ - color: #c6797e; -} -.org-nix-builtin { - /* nix-builtin-face */ - color: #DB6E8F; -} -.org-nix-constant { - /* nix-constant-face */ - color: #c6797e; -} -.org-nix-keyword { - /* nix-keyword-face */ - color: #b18bb1; - font-style: italic; -} -.org-nix-keyword-warning { - /* nix-keyword-warning-face */ - color: #F7E3AF; -} -.org-nobreak-hyphen { - /* nobreak-hyphen */ - color: #00ffff; -} -.org-nobreak-space { - /* nobreak-space */ - color: #88C0D0; - text-decoration: underline; -} -.org-number { - /* font-lock-number-face */ - color: #eabe9a; -} -.org-operator { - /* font-lock-operator-face */ - color: #b18bb1; -} -.org-org-agenda-calendar-daterange { - /* org-agenda-calendar-daterange */ - color: #FAFFF6; - background-color: #172030; -} -.org-org-agenda-calendar-event { - /* org-agenda-calendar-event */ - color: #FAFFF6; - background-color: #172030; -} -.org-org-agenda-calendar-sexp { - /* org-agenda-calendar-sexp */ - color: #FAFFF6; - background-color: #172030; -} -.org-org-agenda-clocking { - /* org-agenda-clocking */ - background-color: #28374b; -} -.org-org-agenda-column-dateline { - /* org-agenda-column-dateline */ - background-color: #4d4d4d; -} -.org-org-agenda-current-time { - /* org-agenda-current-time */ - color: #64727d; -} -.org-org-agenda-date { - /* org-agenda-date */ - color: #5D80AE; -} -.org-org-agenda-date-today { - /* org-agenda-date-today */ - color: #9db2ce; -} -.org-org-agenda-date-weekend { - /* org-agenda-date-weekend */ - color: #374c68; -} -.org-org-agenda-date-weekend-today { - /* org-agenda-date-weekend-today */ - color: #9db2ce; -} -.org-org-agenda-diary { - /* org-agenda-diary */ - color: #FAFFF6; - background-color: #172030; -} -.org-org-agenda-dimmed-todo { - /* org-agenda-dimmed-todo-face */ - color: #64727d; -} -.org-org-agenda-done { - /* org-agenda-done */ - color: #64727d; - font-weight: bold; -} -.org-org-agenda-filter-category { - /* org-agenda-filter-category */ - background-color: #0E131D; -} -.org-org-agenda-filter-effort { - /* org-agenda-filter-effort */ - background-color: #0E131D; -} -.org-org-agenda-filter-regexp { - /* org-agenda-filter-regexp */ - background-color: #0E131D; -} -.org-org-agenda-filter-tags { - /* org-agenda-filter-tags */ - background-color: #0E131D; -} -.org-org-agenda-restriction-lock { - /* org-agenda-restriction-lock */ - background-color: #1C1C1C; -} -.org-org-agenda-structure { - /* org-agenda-structure */ - color: #FAFFF6; -} -.org-org-agenda-structure-secondary { - /* org-agenda-structure-secondary */ - color: #FAFFF6; -} -.org-org-archived { - /* org-archived */ - color: #A3B09A; -} -.org-org-block { - /* org-block */ - background-color: #1F2A3F; -} -.org-org-block-begin-line { - /* org-block-begin-line */ - color: #64727d; - background-color: #1F2A3F; -} -.org-org-block-end-line { - /* org-block-end-line */ - color: #64727d; - background-color: #1F2A3F; -} -.org-org-checkbox { - /* org-checkbox */ - color: #A3B09A; - font-weight: bold; -} -.org-org-checkbox-statistics-done { - /* org-checkbox-statistics-done */ - color: #64727d; - font-weight: bold; -} -.org-org-checkbox-statistics-todo { - /* org-checkbox-statistics-todo */ - color: #A3B09A; - font-weight: bold; -} -.org-org-cite { - /* org-cite */ - color: #8ab1b0; -} -.org-org-cite-key { - /* org-cite-key */ - color: #afcbc7; - text-decoration: underline; -} -.org-org-clock-overlay { - /* org-clock-overlay */ - color: #ffffff; - background-color: #4a708b; -} -.org-org-code { - /* org-code */ - color: #eabe9a; - background-color: #1F2A3F; -} -.org-org-column { - /* org-column */ - background-color: #4d4d4d; -} -.org-org-column-title { - /* org-column-title */ - background-color: #4d4d4d; - font-weight: bold; - text-decoration: underline; -} -.org-org-date { - /* org-date */ - color: #F7E3AF; -} -.org-org-date-selected { - /* org-date-selected */ - color: #ffc0cb; -} -.org-org-dispatcher-highlight { - /* org-dispatcher-highlight */ - color: #ffd700; - background-color: #333333; - font-weight: bold; -} -.org-org-document-info { - /* org-document-info */ - color: #DB6E8F; -} -.org-org-document-info-keyword { - /* org-document-info-keyword */ - color: #64727d; -} -.org-org-document-title { - /* org-document-title */ - color: #DB6E8F; - font-weight: bold; -} -.org-org-done { - /* org-done */ - color: #64727d; - font-weight: bold; -} -.org-org-drawer { - /* org-drawer */ - color: #64727d; -} -.org-org-ellipsis { - /* org-ellipsis */ - color: #64727d; -} -.org-org-footnote { - /* org-footnote */ - color: #eabe9a; -} -.org-org-formula { - /* org-formula */ - color: #88C0D0; -} -.org-org-habit-alert { - /* org-habit-alert-face */ - background-color: #837d6b; - font-weight: bold; -} -.org-org-habit-alert-future { - /* org-habit-alert-future-face */ - background-color: #555450; - font-weight: bold; -} -.org-org-habit-clear { - /* org-habit-clear-face */ - background-color: #5D636E; - font-weight: bold; -} -.org-org-habit-clear-future { - /* org-habit-clear-future-face */ - background-color: #1F2A3F; - font-weight: bold; -} -.org-org-habit-overdue { - /* org-habit-overdue-face */ - background-color: #6b4853; - font-weight: bold; -} -.org-org-habit-overdue-future { - /* org-habit-overdue-future-face */ - background-color: #463541; - font-weight: bold; -} -.org-org-habit-ready { - /* org-habit-ready-face */ - background-color: #3f5670; - font-weight: bold; -} -.org-org-habit-ready-future { - /* org-habit-ready-future-face */ - background-color: #2c3d53; - font-weight: bold; -} -.org-org-headline-done { - /* org-headline-done */ - color: #64727d; -} -.org-org-headline-todo { - /* org-headline-todo */ - color: #eea9b8; -} -.org-org-hide { - /* org-hide */ - color: #172030; -} -.org-org-imminent-deadline { - /* org-imminent-deadline */ - color: #F7E3AF; -} -.org-org-indent { - /* org-indent */ - color: #172030; -} -.org-org-inline-src-block { - /* org-inline-src-block */ - background-color: #1F2A3F; -} -.org-org-journal-calendar-entry { - /* org-journal-calendar-entry-face */ - color: #b18bb1; - font-style: italic; -} -.org-org-journal-calendar-scheduled { - /* org-journal-calendar-scheduled-face */ - color: #c6797e; - font-style: italic; -} -.org-org-journal-highlight { - /* org-journal-highlight */ - color: #B16E75; -} -.org-org-latex-and-related { - /* org-latex-and-related */ - color: #F0F4FC; - font-weight: bold; -} -.org-org-level-1 { - /* org-level-1 */ - color: #6e94b9; - font-weight: bold; -} -.org-org-level-2 { - /* org-level-2 */ - color: #b18bb1; - font-weight: bold; -} -.org-org-level-3 { - /* org-level-3 */ - color: #5D80AE; - font-weight: bold; -} -.org-org-level-4 { - /* org-level-4 */ - color: #92aeca; - font-weight: bold; -} -.org-org-level-5 { - /* org-level-5 */ - color: #c4a8c4; - font-weight: bold; -} -.org-org-level-6 { - /* org-level-6 */ - color: #b6c9dc; - font-weight: bold; -} -.org-org-level-7 { - /* org-level-7 */ - color: #d8c4d8; - font-weight: bold; -} -.org-org-level-8 { - /* org-level-8 */ - color: #e2e9f1; - font-weight: bold; -} -.org-org-link { - /* org-link */ - color: #B16E75; - font-weight: bold; - text-decoration: underline; -} -.org-org-list-dt { - /* org-list-dt */ - color: #B16E75; -} -.org-org-macro { - /* org-macro */ - color: #F0F4FC; - font-weight: bold; -} -.org-org-meta-line { - /* org-meta-line */ - color: #A3B09A; -} -.org-org-mode-line-clock { - /* org-mode-line-clock */ - background-color: #0E131D; -} -.org-org-mode-line-clock-overrun { - /* org-mode-line-clock-overrun */ - background-color: #ff0000; -} -.org-org-priority { - /* org-priority */ - color: #c6797e; -} -.org-org-property-value { - /* org-property-value */ - color: #A3B09A; -} -.org-org-quote { - /* org-quote */ - background-color: #1F2A3F; - font-style: italic; -} -.org-org-roam-dim { - /* org-roam-dim */ - color: #666666; -} -.org-org-roam-header-line { - /* org-roam-header-line */ - color: #eedc82; - font-weight: bold; -} -.org-org-roam-olp { - /* org-roam-olp */ - color: #666666; -} -.org-org-roam-preview-heading { - /* org-roam-preview-heading */ - color: #b3b3b3; - background-color: #404040; -} -.org-org-roam-preview-heading-highlight { - /* org-roam-preview-heading-highlight */ - color: #b3b3b3; - background-color: #595959; -} -.org-org-roam-preview-heading-selection { - /* org-roam-preview-heading-selection */ - color: #cd8162; - background-color: #595959; -} -.org-org-roam-preview-region { - /* org-roam-preview-region */ - font-weight: bold; -} -.org-org-roam-title { - /* org-roam-title */ - font-weight: bold; -} -.org-org-scheduled { - /* org-scheduled */ - color: #FAFFF6; -} -.org-org-scheduled-previously { - /* org-scheduled-previously */ - color: #F0F4FC; -} -.org-org-scheduled-today { - /* org-scheduled-today */ - color: #E8E9EB; -} -.org-org-sexp-date { - /* org-sexp-date */ - color: #FAFFF6; -} -.org-org-special-keyword { - /* org-special-keyword */ - color: #A3B09A; -} -.org-org-superstar-first { - /* org-superstar-first */ - color: #F7E3AF; -} -.org-org-superstar-item { - /* org-superstar-item */ - color: #FAFFF6; - background-color: #172030; -} -.org-org-superstar-leading { - /* org-superstar-leading */ - color: #bebebe; - background-color: #172030; -} -.org-org-superstar-ordered-item { - /* org-superstar-ordered-item */ - color: #FAFFF6; - background-color: #172030; -} -.org-org-table { - /* org-table */ - color: #5D80AE; -} -.org-org-table-header { - /* org-table-header */ - color: #000000; - background-color: #d3d3d3; -} -.org-org-table-row { - /* org-table-row */ - color: #5D80AE; -} -.org-org-tag { - /* org-tag */ - color: #A3B09A; -} -.org-org-tag-group { - /* org-tag-group */ - color: #A3B09A; -} -.org-org-target { - /* org-target */ - text-decoration: underline; -} -.org-org-time-grid { - /* org-time-grid */ - color: #64727d; -} -.org-org-todo { - /* org-todo */ - color: #A3B09A; - font-weight: bold; -} -.org-org-upcoming-deadline { - /* org-upcoming-deadline */ - color: #ccd2ce; -} -.org-org-upcoming-distant-deadline { - /* org-upcoming-distant-deadline */ - color: #888f93; -} -.org-org-verbatim { - /* org-verbatim */ - color: #A3B09A; -} -.org-org-verse { - /* org-verse */ - background-color: #1F2A3F; -} -.org-org-warning { - /* org-warning */ - color: #F7E3AF; -} -.org-outline-1 { - /* outline-1 */ - color: #6e94b9; - font-weight: bold; -} -.org-outline-2 { - /* outline-2 */ - color: #b18bb1; - font-weight: bold; -} -.org-outline-3 { - /* outline-3 */ - color: #5D80AE; - font-weight: bold; -} -.org-outline-4 { - /* outline-4 */ - color: #92aeca; - font-weight: bold; -} -.org-outline-5 { - /* outline-5 */ - color: #c4a8c4; - font-weight: bold; -} -.org-outline-6 { - /* outline-6 */ - color: #b6c9dc; - font-weight: bold; -} -.org-outline-7 { - /* outline-7 */ - color: #d8c4d8; - font-weight: bold; -} -.org-outline-8 { - /* outline-8 */ - color: #e2e9f1; - font-weight: bold; -} -.org-package-description { - /* package-description */ - color: #FAFFF6; - background-color: #172030; -} -.org-package-name { - /* package-name */ - color: #B16E75; - font-weight: bold; - text-decoration: underline; -} -.org-package-status-avail-obso { - /* package-status-avail-obso */ - color: #c6797e; -} -.org-package-status-available { - /* package-status-available */ - color: #FAFFF6; - background-color: #172030; -} -.org-package-status-built-in { - /* package-status-built-in */ - color: #DB6E8F; -} -.org-package-status-dependency { - /* package-status-dependency */ - color: #64727d; - font-style: italic; -} -.org-package-status-disabled { - /* package-status-disabled */ - color: #F7E3AF; -} -.org-package-status-external { - /* package-status-external */ - color: #DB6E8F; -} -.org-package-status-from-source { - /* package-status-from-source */ - color: #b18bb1; - font-weight: bold; -} -.org-package-status-held { - /* package-status-held */ - color: #c6797e; -} -.org-package-status-incompat { - /* package-status-incompat */ - color: #c6797e; -} -.org-package-status-installed { - /* package-status-installed */ - color: #64727d; - font-style: italic; -} -.org-package-status-unsigned { - /* package-status-unsigned */ - color: #F7E3AF; -} -.org-page-break-lines { - /* page-break-lines */ - color: #64727d; -} -.org-powerline-active0 { - /* powerline-active0 */ - background-color: #172030; -} -.org-powerline-active1 { - /* powerline-active1 */ - background-color: #1c2535; -} -.org-powerline-active2 { - /* powerline-active2 */ - color: #F0F4FC; - background-color: #293140; -} -.org-powerline-inactive0 { - /* powerline-inactive0 */ - color: #B16E75; - background-color: #151D2B; -} -.org-powerline-inactive1 { - /* powerline-inactive1 */ - color: #B16E75; - background-color: #19212f; -} -.org-powerline-inactive2 { - /* powerline-inactive2 */ - color: #B16E75; - background-color: #1e2633; -} -.org-preprocessor { - /* font-lock-preprocessor-face */ - color: #b18bb1; - font-style: italic; -} -.org-property-name { - /* font-lock-property-name-face */ - color: #ceb9cc; - font-weight: bold; -} -.org-property-use { - /* font-lock-property-use-face */ - color: #ceb9cc; -} -.org-pulse-highlight { - /* pulse-highlight-face */ - background-color: #AAAA33; -} -.org-pulse-highlight-start { - /* pulse-highlight-start-face */ - background-color: #AAAA33; -} -.org-punctuation { - /* font-lock-punctuation-face */ - color: #e7e2e4; -} -.org-query-replace { - /* query-replace */ - background-color: #5D636E; - font-weight: bold; -} -.org-rectangle-preview { - /* rectangle-preview */ - background-color: #5D636E; -} -.org-regexp { - /* font-lock-regexp-face */ - color: #A3B09A; -} -.org-regexp-grouping-backslash { - /* font-lock-regexp-grouping-backslash */ - color: #b18bb1; - font-weight: bold; -} -.org-regexp-grouping-construct { - /* font-lock-regexp-grouping-construct */ - color: #b18bb1; - font-weight: bold; -} -.org-region { - /* region */ - background-color: #5D636E; -} -.org-secondary-selection { - /* secondary-selection */ - background-color: #64727d; -} -.org-separator-line { - /* separator-line */ - background-color: #505050; - font-size: 10%; -} -.org-sh-escaped-newline { - /* sh-escaped-newline */ - color: #A3B09A; -} -.org-sh-heredoc { - /* sh-heredoc */ - color: #A3B09A; -} -.org-sh-quoted-exec { - /* sh-quoted-exec */ - color: #b18bb1; - font-style: italic; -} -.org-shadow { - /* shadow */ - color: #64727d; -} -.org-show-paren-match { - /* show-paren-match */ - color: #c6797e; - background-color: #1F2A3F; -} -.org-show-paren-match-expression { - /* show-paren-match-expression */ - color: #c6797e; - background-color: #1F2A3F; -} -.org-show-paren-mismatch { - /* show-paren-mismatch */ - color: #1F2A3F; - background-color: #c6797e; -} -.org-shr-abbreviation { - /* shr-abbreviation */ - text-decoration: underline; -} -.org-shr-h1 { - /* shr-h1 */ - font-size: 130%; - font-weight: bold; -} -.org-shr-h2 { - /* shr-h2 */ - font-weight: bold; -} -.org-shr-h3 { - /* shr-h3 */ - font-style: italic; -} -.org-shr-h4 { - /* shr-h4 */ - color: #FAFFF6; - background-color: #172030; -} -.org-shr-h5 { - /* shr-h5 */ - color: #FAFFF6; - background-color: #172030; -} -.org-shr-h6 { - /* shr-h6 */ - color: #FAFFF6; - background-color: #172030; -} -.org-shr-link { - /* shr-link */ - color: #B16E75; - font-weight: bold; - text-decoration: underline; -} -.org-shr-mark { - /* shr-mark */ - color: #000000; - background-color: #ffff00; -} -.org-shr-selected-link { - /* shr-selected-link */ - color: #B16E75; - background-color: #ff0000; - font-weight: bold; - text-decoration: underline; -} -.org-shr-strike-through { - /* shr-strike-through */ - text-decoration: line-through; -} -.org-shr-sup { - /* shr-sup */ - font-size: 80%; -} -.org-shr-text { - /* shr-text */ - font-size: 110%; -} -.org-smerge-base { - /* smerge-base */ - background-color: #28374b; -} -.org-smerge-lower { - /* smerge-lower */ - background-color: #333c45; -} -.org-smerge-markers { - /* smerge-markers */ - color: #172030; - background-color: #64727d; - font-weight: bold; -} -.org-smerge-refined-added { - /* smerge-refined-added */ - color: #A3B09A; - background-color: #101828; -} -.org-smerge-refined-removed { - /* smerge-refined-removed */ - color: #c6797e; - background-color: #1F2A3F; -} -.org-smerge-upper { - /* smerge-upper */ - background-color: #40394b; -} -.org-string { - /* font-lock-string-face */ - color: #A3B09A; -} -.org-success { - /* success */ - color: #A3B09A; -} -.org-swiper-background-match-face-1 { - /* swiper-background-match-face-1 */ - color: #64727d; - background-color: #2a32b13bfb; -} -.org-swiper-background-match-face-2 { - /* swiper-background-match-face-2 */ - color: #070A0E; - background-color: #f53adcf9c6f0; - font-weight: bold; -} -.org-swiper-background-match-face-3 { - /* swiper-background-match-face-3 */ - color: #070A0E; - background-color: #d547bd00d547; - font-weight: bold; -} -.org-swiper-background-match-face-4 { - /* swiper-background-match-face-4 */ - color: #070A0E; - background-color: #ccabd4adc6f0; - font-weight: bold; -} -.org-swiper-line { - /* swiper-line-face */ - color: #070A0E; - background-color: #6e94b9; -} -.org-swiper-match-face-1 { - /* swiper-match-face-1 */ - color: #64727d; - background-color: #070A0E; -} -.org-swiper-match-face-2 { - /* swiper-match-face-2 */ - color: #070A0E; - background-color: #eabe9a; - font-weight: bold; -} -.org-swiper-match-face-3 { - /* swiper-match-face-3 */ - color: #070A0E; - background-color: #b18bb1; - font-weight: bold; -} -.org-swiper-match-face-4 { - /* swiper-match-face-4 */ - color: #070A0E; - background-color: #A3B09A; - font-weight: bold; -} -.org-tab-bar { - /* tab-bar */ - color: #101828; - background-color: #101828; -} -.org-tab-bar-tab { - /* tab-bar-tab */ - color: #FAFFF6; - background-color: #172030; -} -.org-tab-bar-tab-group-current { - /* tab-bar-tab-group-current */ - color: #FAFFF6; - background-color: #172030; - font-weight: bold; -} -.org-tab-bar-tab-inactive { - /* tab-bar-tab-inactive */ - color: #A7ACB9; - background-color: #101828; -} -.org-tab-line { - /* tab-line */ - color: #101828; - background-color: #101828; -} -.org-table-cell { - /* table-cell */ - color: #e5e5e5; - background-color: #0000ff; -} -.org-tabulated-list-fake-header { - /* tabulated-list-fake-header */ - font-weight: bold; - text-decoration: underline; - text-decoration: overline; -} -.org-term { - /* term */ - color: #FAFFF6; -} -.org-term-bold { - /* term-bold */ - font-weight: bold; -} -.org-term-color-black { - /* term-color-black */ - color: #070A0E; - background-color: #070A0E; -} -.org-term-color-blue { - /* term-color-blue */ - color: #6e94b9; - background-color: #6e94b9; -} -.org-term-color-bright-black { - /* term-color-bright-black */ - color: #B16E75; - background-color: #B16E75; -} -.org-term-color-bright-blue { - /* term-color-bright-blue */ - color: #83a4c3; - background-color: #83a4c3; -} -.org-term-color-bright-cyan { - /* term-color-bright-cyan */ - color: #99c9d7; - background-color: #99c9d7; -} -.org-term-color-bright-green { - /* term-color-bright-green */ - color: #b0bba9; - background-color: #b0bba9; -} -.org-term-color-bright-magenta { - /* term-color-bright-magenta */ - color: #bc9cbc; - background-color: #bc9cbc; -} -.org-term-color-bright-red { - /* term-color-bright-red */ - color: #ce8d91; - background-color: #ce8d91; -} -.org-term-color-bright-white { - /* term-color-bright-white */ - color: #F0F4FC; - background-color: #F0F4FC; -} -.org-term-color-bright-yellow { - /* term-color-bright-yellow */ - color: #f8e7bb; - background-color: #f8e7bb; -} -.org-term-color-cyan { - /* term-color-cyan */ - color: #88C0D0; - background-color: #88C0D0; -} -.org-term-color-green { - /* term-color-green */ - color: #A3B09A; - background-color: #A3B09A; -} -.org-term-color-magenta { - /* term-color-magenta */ - color: #b18bb1; - background-color: #b18bb1; -} -.org-term-color-red { - /* term-color-red */ - color: #c6797e; - background-color: #c6797e; -} -.org-term-color-white { - /* term-color-white */ - color: #F0F4FC; - background-color: #F0F4FC; -} -.org-term-color-yellow { - /* term-color-yellow */ - color: #F7E3AF; - background-color: #F7E3AF; -} -.org-term-italic { - /* term-italic */ - font-style: italic; -} -.org-term-underline { - /* term-underline */ - text-decoration: underline; -} -.org-tool-bar { - /* tool-bar */ - color: #000000; - background-color: #bfbfbf; -} -.org-tooltip { - /* tooltip */ - color: #A7ACB9; - background-color: #1F2A3F; -} -.org-trailing-whitespace { - /* trailing-whitespace */ - background-color: #c6797e; -} -.org-transient-active-infix { - /* transient-active-infix */ - color: #070A0E; - background-color: #B16E75; -} -.org-transient-argument { - /* transient-argument */ - color: #A3B09A; - font-weight: bold; -} -.org-transient-delimiter { - /* transient-delimiter */ - color: #64727d; -} -.org-transient-disabled-suffix { - /* transient-disabled-suffix */ - color: #000000; - background-color: #ff0000; - font-weight: bold; -} -.org-transient-enabled-suffix { - /* transient-enabled-suffix */ - color: #000000; - background-color: #00ff00; - font-weight: bold; -} -.org-transient-heading { - /* transient-heading */ - color: #b18bb1; - font-style: italic; -} -.org-transient-inactive-argument { - /* transient-inactive-argument */ - color: #64727d; -} -.org-transient-inactive-value { - /* transient-inactive-value */ - color: #64727d; -} -.org-transient-inapt-argument { - /* transient-inapt-argument */ - color: #64727d; - font-weight: bold; -} -.org-transient-inapt-suffix { - /* transient-inapt-suffix */ - color: #64727d; - font-style: italic; -} -.org-transient-key { - /* transient-key */ - color: #DB6E8F; -} -.org-transient-key-exit { - /* transient-key-exit */ - color: #ffdddd; -} -.org-transient-key-noop { - /* transient-key-noop */ - color: #4d4d4d; -} -.org-transient-key-recurse { - /* transient-key-recurse */ - color: #2299ff; -} -.org-transient-key-return { - /* transient-key-return */ - color: #ffffcc; -} -.org-transient-key-stack { - /* transient-key-stack */ - color: #ff6699; -} -.org-transient-key-stay { - /* transient-key-stay */ - color: #ddffdd; -} -.org-transient-unreachable { - /* transient-unreachable */ - color: #64727d; -} -.org-transient-value { - /* transient-value */ - color: #A3B09A; - font-weight: bold; -} -.org-treemacs-fringe-indicator { - /* treemacs-fringe-indicator-face */ - color: #B16E75; -} -.org-treemacs-help-column { - /* treemacs-help-column-face */ - color: #b18bb1; - font-style: italic; - text-decoration: underline; -} -.org-treemacs-help-title { - /* treemacs-help-title-face */ - color: #c6797e; -} -.org-treemacs-hl-line { - /* treemacs-hl-line-face */ - background-color: #101828; -} -.org-treemacs-marked-file { - /* treemacs-marked-file-face */ - color: #F0C674; - background-color: #AB3737; - font-weight: bold; -} -.org-treemacs-on-failure-pulse { - /* treemacs-on-failure-pulse-face */ - color: #070A0E; - background-color: #c6797e; -} -.org-treemacs-on-success-pulse { - /* treemacs-on-success-pulse-face */ - color: #070A0E; - background-color: #A3B09A; -} -.org-treemacs-peek-mode-indicator { - /* treemacs-peek-mode-indicator-face */ - background-color: #669966; -} -.org-treemacs-root-remote-unreadable { - /* treemacs-root-remote-unreadable-face */ - color: #B16E75; - font-size: 120%; - text-decoration: line-through; -} -.org-treemacs-root-unreadable { - /* treemacs-root-unreadable-face */ - color: #B16E75; - font-size: 120%; - text-decoration: line-through; -} -.org-treemacs-term-node { - /* treemacs-term-node-face */ - color: #A3B09A; -} -.org-treemacs-window-background { - /* treemacs-window-background-face */ - color: #FAFFF6; - background-color: #172030; -} -.org-treesit-explorer-anonymous-node { - /* treesit-explorer-anonymous-node */ - color: #64727d; -} -.org-tty-menu-disabled { - /* tty-menu-disabled-face */ - color: #d3d3d3; - background-color: #0000ff; -} -.org-tty-menu-enabled { - /* tty-menu-enabled-face */ - color: #ffff00; - background-color: #0000ff; - font-weight: bold; -} -.org-tty-menu-selected { - /* tty-menu-selected-face */ - background-color: #ff0000; -} -.org-type { - /* font-lock-type-face */ - color: #c6797e; -} -.org-underline { - /* underline */ - text-decoration: underline; -} -.org-variable-name { - /* font-lock-variable-name-face */ - color: #c6797e; -} -.org-variable-pitch-text { - /* variable-pitch-text */ - font-size: 110%; -} -.org-variable-use { - /* font-lock-variable-use-face */ - color: #e0bcba; -} -.org-vc-git-log-edit-summary-max-warning { - /* vc-git-log-edit-summary-max-warning */ - color: #c6797e; -} -.org-vc-git-log-edit-summary-target-warning { - /* vc-git-log-edit-summary-target-warning */ - color: #F7E3AF; -} -.org-vertical-border { - /* vertical-border */ - color: #B16E75; -} -.org-vterm-color-black { - /* vterm-color-black */ - color: #070A0E; - background-color: #45474a; -} -.org-vterm-color-blue { - /* vterm-color-blue */ - color: #6e94b9; - background-color: #92aeca; -} -.org-vterm-color-bright-black { - /* vterm-color-bright-black */ - color: #B16E75; - background-color: #B16E75; -} -.org-vterm-color-bright-blue { - /* vterm-color-bright-blue */ - color: #83a4c3; - background-color: #83a4c3; -} -.org-vterm-color-bright-cyan { - /* vterm-color-bright-cyan */ - color: #99c9d7; - background-color: #99c9d7; -} -.org-vterm-color-bright-green { - /* vterm-color-bright-green */ - color: #b0bba9; - background-color: #b0bba9; -} -.org-vterm-color-bright-magenta { - /* vterm-color-bright-magenta */ - color: #bc9cbc; - background-color: #bc9cbc; -} -.org-vterm-color-bright-red { - /* vterm-color-bright-red */ - color: #ce8d91; - background-color: #ce8d91; -} -.org-vterm-color-bright-white { - /* vterm-color-bright-white */ - color: #F0F4FC; - background-color: #F0F4FC; -} -.org-vterm-color-bright-yellow { - /* vterm-color-bright-yellow */ - color: #f8e7bb; - background-color: #f8e7bb; -} -.org-vterm-color-cyan { - /* vterm-color-cyan */ - color: #88C0D0; - background-color: #a5cfdb; -} -.org-vterm-color-green { - /* vterm-color-green */ - color: #A3B09A; - background-color: #bac3b3; -} -.org-vterm-color-inverse-video { - /* vterm-color-inverse-video */ - color: #FAFFF6; - background-color: #172030; -} -.org-vterm-color-magenta { - /* vterm-color-magenta */ - color: #b18bb1; - background-color: #c4a8c4; -} -.org-vterm-color-red { - /* vterm-color-red */ - color: #c6797e; - background-color: #d49a9e; -} -.org-vterm-color-underline { - /* vterm-color-underline */ - color: #FAFFF6; - background-color: #172030; -} -.org-vterm-color-white { - /* vterm-color-white */ - color: #F0F4FC; - background-color: #f3f6fc; -} -.org-vterm-color-yellow { - /* vterm-color-yellow */ - color: #F7E3AF; - background-color: #f9eac3; -} -.org-warning { - /* warning */ - color: #F7E3AF; -} -.org-warning-1 { - /* font-lock-warning-face */ - color: #F7E3AF; -} -.org-wgrep { - /* wgrep-face */ - color: #A3B09A; - background-color: #64727d; - font-weight: bold; -} -.org-wgrep-delete { - /* wgrep-delete-face */ - color: #1F2A3F; - background-color: #c6797e; -} -.org-wgrep-done { - /* wgrep-done-face */ - color: #6e94b9; -} -.org-wgrep-file { - /* wgrep-file-face */ - color: #64727d; -} -.org-wgrep-reject { - /* wgrep-reject-face */ - color: #c6797e; - font-weight: bold; -} -.org-which-func { - /* which-func */ - color: #6e94b9; -} -.org-which-key-command-description { - /* which-key-command-description-face */ - color: #6e94b9; -} -.org-which-key-docstring { - /* which-key-docstring-face */ - color: #64727d; - font-style: italic; -} -.org-which-key-group-description { - /* which-key-group-description-face */ - color: #5D80AE; -} -.org-which-key-key { - /* which-key-key-face */ - color: #A3B09A; -} -.org-which-key-local-map-description { - /* which-key-local-map-description-face */ - color: #b18bb1; -} -.org-which-key-note { - /* which-key-note-face */ - color: #64727d; - font-style: italic; -} -.org-which-key-separator { - /* which-key-separator-face */ - color: #64727d; - font-style: italic; -} -.org-which-key-special-key { - /* which-key-special-key-face */ - color: #A3B09A; - font-weight: bold; -} -.org-widget-button { - /* widget-button */ - font-weight: bold; -} -.org-widget-button-pressed { - /* widget-button-pressed */ - color: #c6797e; -} -.org-widget-documentation { - /* widget-documentation */ - color: #A3B09A; -} -.org-widget-field { - /* widget-field */ - background-color: #1F2A3F; -} -.org-widget-inactive { - /* widget-inactive */ - color: #64727d; -} -.org-widget-single-line-field { - /* widget-single-line-field */ - background-color: #1F2A3F; -} -.org-widget-unselected { - /* widget-unselected */ - color: #64727d; -} -.org-window-divider { - /* window-divider */ - color: #B16E75; -} -.org-window-divider-first-pixel { - /* window-divider-first-pixel */ - color: #B16E75; -} -.org-window-divider-last-pixel { - /* window-divider-last-pixel */ - color: #B16E75; -} -.org-world-clock-label { - /* world-clock-label */ - color: #c6797e; -} -.org-writegood-duplicates { - /* writegood-duplicates-face */ - text-decoration: underline; -} -.org-writegood-passive-voice { - /* writegood-passive-voice-face */ - text-decoration: underline; -} -.org-writegood-weasels { - /* writegood-weasels-face */ - text-decoration: underline; -} -.org-xref-file-header { - /* xref-file-header */ - color: #A3B09A; -} -.org-xref-line-number { - /* xref-line-number */ - color: #B16E75; -} -.org-xref-match { - /* xref-match */ - color: #A3B09A; - background-color: #070A0E; - font-weight: bold; -} -.org-yaml-tab { - /* yaml-tab-face */ - color: #ff0000; - background-color: #ff0000; - font-weight: bold; -} -.org-yas-field-highlight { - /* yas-field-highlight-face */ - color: #A3B09A; - background-color: #070A0E; - font-weight: bold; -} -- cgit v1.3