home-manager: inital commit

This commit is contained in:
Evar Smith 2025-06-25 01:35:01 -04:00
parent faaaa3d324
commit 24717f490e
31 changed files with 1560 additions and 0 deletions

View file

@ -12,6 +12,14 @@
'';
};
home = {
config = import ./home // {
description = ''
My home manager configs
'';
};
};
};
};
}

8
home/bitwarden.nix Normal file
View file

@ -0,0 +1,8 @@
{
pkgs,
...
}: {
home.packages = with pkgs; [
bitwarden-desktop
];
}

42
home/default.nix Normal file
View file

@ -0,0 +1,42 @@
{
pkgs,
...
}: let
variables = {
# VISUAL = "emacs";
EDITOR = "nvim";
SHELL = "fish";
};
in {
# TODO: this should be moved
# once I migrate to using a shared flake
imports = [
./bitwarden.nix
./dev
./work
./firefox.nix
./fonts.nix
./obsidian.nix
./syncthing.nix
];
home.sessionVariables = variables;
systemd.user.sessionVariables = variables;
xdg.enable = true; # TODO: what is this?
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "24.11";
# Let Home Manager install and manage itself.
# programs.home-manager.enable = true;
}

18
home/dev/default.nix Normal file
View file

@ -0,0 +1,18 @@
{
pkgs,
...
}: {
imports = [
./emacs.nix
./git.nix
./terminal.nix
./vscode.nix
./zed.nix
];
home.packages = with pkgs; [
pulumi-bin
jq
];
}

View file

@ -0,0 +1,92 @@
;;; ../../../../mnt/c/Users/SmithEvar/.doom.d/config-appearance.el -*- lexical-binding: t; -*-
;; Basic IDE settings
(setq doom-theme 'spacemacs-dark) ; Theme
(setq-default indent-tabs-mode nil) ; Prefer spaces
(setq display-line-numbers-type t) ; Line number preference
(setq highlight-indent-guides-method 'character)
(when (modulep! :ui indent-guides) ; Enable indent guides in most programming-esq buffers
(add-hook 'prog-mode-hook 'highlight-indent-guides-mode))
;; Fonts
(setq doom-font (font-spec :family "CommitMono Nerd Font" :size 24 :weight 'regular)
doom-variable-pitch-font (font-spec :family "CommitMono Nerd Font")
doom-big-font (font-spec :family "CommitMono Nerd Font" :size 32))
;; (setq doom-font (font-spec :family "SauceCodePro Nerd Font Mono" :size 18 :weight 'regular)
;; doom-variable-pitch-font (font-spec :family "SauceCodePro Nerd Font Mono")
;; doom-big-font (font-spec :family "SauceCodePro Nerd Font Mono" :size 24))
(if IS-LINUX
(setq browse-url-generic-program (getenv "BROWSER")
browse-url-browser-function 'browse-url-generic))
;; Spaceline
(require 'spaceline-config)
(spaceline-spacemacs-theme)
(setq powerline-height 32)
(setq spaceline-highlight-face-func 'spaceline-highlight-face-evil-state)
(defun simplify-file-name (buffer-name)
"Returns the file combined with the immediate parent directory"
(concat (file-name-as-directory
(file-name-nondirectory
(directory-file-name
(file-name-directory buffer-name))))
(file-name-nondirectory buffer-name)))
(after! spaceline
(spaceline-define-segment simple-buffer-path
"Simplified version of the buffer file name"
(simplify-file-name (buffer-file-name)))
(spaceline-compile
; left side
'(((projectile-root)
:fallback evil-state
:face highlight-face
:priority 100)
(anzu :priority 95)
auto-compile
((buffer-modified simple-buffer-path remote-host)
:priority 98)
(major-mode :priority 79)
(process :when active)
((flycheck-error flycheck-warning flycheck-info)
:when active :priority 89)
; (minor-modes :when active :priority 9)
(mu4e-alert-segment :when active)
(erc-track :when active)
(version-control :when active :priority 78)
(org-pomodoro :when active)
(org-clock :when active)
nyan-cat)
; right side
'(which-function
(python-pyvenv :fallback python-pyenv)
(purpose :priority 94)
(battery :when active)
(selection-info :priority 95)
input-method
((buffer-encoding-abbrev point-position line-column)
:separator " | " :priority 96)
(global :when active)
(buffer-position :priority 99)
(hud :priority 99))))
;; Org mode stuff
(defun my/org-mode-hook ()
(set-face-attribute 'org-level-1 nil :height 1.2)
(set-face-attribute 'org-level-2 nil :height 1.1)
(set-face-attribute 'org-level-3 nil :height 1.0)
(set-face-attribute 'org-level-4 nil :height 1.0)
(set-face-attribute 'org-level-5 nil :height 1.0))
(add-hook 'org-load-hook #'my/org-mode-hook)
;; avy
(evil-define-key 'normal 'global "?" #'evil-avy-goto-char-2)
(setq avy-all-windows t) ; make avy search all windows by default

View file

@ -0,0 +1,141 @@
;;; ../../../../mnt/c/Users/SmithEvar/.doom.d/config-dev.el -*- lexical-binding: t; -*-
;; ink mode
;; (require 'ink-mode)
;; (add-hook 'ink-mode-hook 'flymake-mode) ;; error reporting
;; (defvar my/inklecate-exe (if IS-WINDOWS "C:\dev\engines\inklecate"))
;; (setq ink-inklecate-path my/inklecate-exe)
;; terraform ls using
;; https://github.com/hashicorp/terraform-ls
(setq terraform-path (executable-find "terraform"))
(setq terraform-ls-path (executable-find "terraform-ls"))
(setq HAS-TERRAFORM-LS (and terraform-path terraform-ls-path))
(when HAS-TERRAFORM-LS
(after! lsp-mode
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection (list terraform-ls-path "serve"))
:major-modes '(terraform-mode)
:server-id 'terraform-ls)))
(add-hook 'terraform-mode-hook #'terraform-format-on-save-mode)
(add-hook 'terraform-mode-hook #'lsp))
;; copilot config
(use-package! copilot
:hook (prog-mode . copilot-mode)
:bind (:map copilot-completion-map
("<tab>" . 'copilot-accept-completion)
("TAB" . 'copilot-accept-completion)
("C-TAB" . 'copilot-accept-completion-by-word)
("C-<tab>" . 'copilot-accept-completion-by-word)))
;; (use-package! kubernetes)
;; suppress godot lsp errors per
;; https://github.com/godotengine/emacs-gdscript-mode
(defun lsp--gdscript-ignore-errors (original-function &rest args)
"Ignore the error message resulting from Godot not replying to the `JSONRPC' request."
(if (string-equal major-mode "gdscript-mode")
(let ((json-data (nth 0 args)))
(if (and (string= (gethash "jsonrpc" json-data "") "2.0")
(not (gethash "id" json-data nil))
(not (gethash "method" json-data nil)))
nil ; (message "Method not found")
(apply original-function args)))
(apply original-function args)))
;; Runs the function `lsp--gdscript-ignore-errors` around `lsp--get-message-type` to suppress unknown notification errors.
(advice-add #'lsp--get-message-type :around #'lsp--gdscript-ignore-errors)
;; Web mode for razor files
(add-to-list 'auto-mode-alist '("\\.razor\\'" . web-mode))
;; Projectile project for terraform
(after! projectile
(projectile-register-project-type 'terraform '(".terraform")
:compile "terraform init"
:run "terraform apply"))
; TODO: Eventually make a thing
; to execute org babel src blocks with type
; vterm in a new vterm popup
; In a nutshell, I want to be able to get streaming results from
; org babel. There's a thing that someone made that I copied to my
; private config here from
;
; https://github.com/whacked/ob-shstream
;
; .. and subsequently
;
; https://github.com/excalamus/ob-shstream
;
; since the former was very outdated and couldn't successfully run.
; I configured it with the block below
;
;; ob shstream
;;
;; (load! "modules/tools/ob-shstream")
;; (org-babel-do-load-languages
;; 'org-babel-load-languages
;; '(...
;; (shstream . t)
;; ...))
;
; Which... sort of worked. I didn't like how it felt to use. I thought
; it would just be fine to use vterm, so I did some googling, and found this
;
; https://www.reddit.com/r/emacs/comments/op4fcm/send_command_to_vterm_and_execute_it/
;
; Which, after some hacking together with the source of +vterm/toggle, I
; came to something that's a happy medium.
;
; Might be an idea to get it working with org babel so that I could do something like
;
; #+BEGIN_SRC vterm
; git status
; #+END_SRC
;
; Maybe one weekend.
; Here's that hacked together function below
(defun my/vterm-execute-region-or-current-line ()
"Insert text of current line in vterm and execute."
(interactive)
(require 'vterm)
(eval-when-compile (require 'subr-x))
; grab the command
(let ((command (if (region-active-p)
(string-trim (buffer-substring (save-excursion
(region-beginning))
(save-excursion
(region-end))))
(string-trim (buffer-substring (save-excursion
(beginning-of-line)
(point))
(save-excursion
(end-of-line)
(point)))))))
; find vterm buffer, either switch to it or make a new one
(let ((return-buffer (current-buffer))
(vterm-popup-buffer-name (format "*doom:vterm-popup:%s*"
(if (bound-and-true-p persp-mode)
(safe-persp-name (get-current-persp))
"main"))))
(if-let (existing-buffer (cl-loop for buf in (doom-buffers-in-mode 'vterm-mode)
if (equal (buffer-local-value '+vterm--id buf)
vterm-popup-buffer-name)
return buf))
(pop-to-buffer existing-buffer)
(+vterm/toggle nil))
; send the command
(vterm--goto-line -1)
; (message command) ; uncomment if i want messages
(vterm-send-string command)
(vterm-send-return)
; switch back to where we were
(switch-to-buffer-other-window return-buffer))))

View file

@ -0,0 +1,13 @@
;;; ../../../../mnt/c/Users/SmithEvar/.doom.d/config-org.el -*- lexical-binding: t; -*-
(defvar my/syncthing-dir (if IS-TERMUX "~/storage/shared/Syncthing/"
(if IS-WORK "~/.syncthing/")))
(defvar my/org-dir-work (concat my/syncthing-dir "evar-org-work/"))
(setq org-directory "~/org/")
(setq org-agenda-file-regexp "\\`[^.].*\\.org\\'")
(setq org-agenda-files
`(,(concat my/org-dir-work "work.org")
,(concat my/org-dir-work "daily-reviews.org")
,(concat my/org-dir-work "standups.org")))

View file

@ -0,0 +1,92 @@
;;; ../../../../mnt/c/Users/SmithEvar/.doom.d/config-true-helix.el -*- lexical-binding: t; -*-
;; TH specific stuff
(defvar my/work-devops-base-url "https://dev.azure.com/Helix076/Helix")
(defun make-helix-devops-pullrequest-link (pr-number)
(browse-url (concat my/work-devops-base-url "/_git/Helix/pullrequest/" pr-number)))
(defun make-mobile-devops-pullrequest-link (pr-number)
(browse-url (concat my/work-devops-base-url "/_git/Mobile/pullrequest/" pr-number)))
(defun make-apidomain-devops-pullrequest-link (pr-number)
(browse-url (concat my/work-devops-base-url "/_git/Helix.API.Domain/pullrequest/" pr-number)))
(defun make-infrastructure-devops-pullrequest-link (pr-number)
(browse-url (concat my/work-devops-base-url "/_git/Infrastructure/pullrequest/" pr-number)))
(defun make-devops-workitem-link (story-number)
(browse-url (concat my/work-devops-base-url "/_workitems/edit/" story-number)))
(defvar my/yas-devops-repo-list-expr '("helix" "mobile" "apidomain" "infrastructure"))
;; Work related TH stuff
(defvar my/work-org-file (concat my/org-dir-work "work.org"))
(defvar my/standups-priority-prompt-string "%^{prompt||[#A]|[#B]|[#C]}")
(defvar my/standups-people-prompt-string "%^{prompt|General|Cody|Corey|Emily|Evar|Mike|Nick|Melissa|Heather|Tom|Drew|Liz|Alex|Jared|Denise|Brian|Chris|Sam}")
(defvar my/devops-repo-prompt-string "%^{prompt|AutoHistory|CLinkDataImportTool|Helix|Helix.API.Domain|Mobile|Infrastructure|SampleDataTool}")
(defvar my/standups-default-properties-string "")
(after! org
(setq +org-capture-projects-file my/work-org-file)
(setq org-capture-templates
`(("g" "GTD Captures")
("gi" "inbox" entry
(file+olp ,my/work-org-file "Inbox")
,(concat "* TODO %?"))
("gf" "followup" entry
(file+olp ,my/work-org-file "Inbox")
,(concat "* TODO " my/standups-people-prompt-string " - %?" my/standups-default-properties-string))
;("f" "Followup" entry (file+olp ,my/work-org-file "Active" "Followups")
; ,(concat "* TODO " my/standups-priority-prompt-string " " my/standups-people-prompt-string " - %? :actionable:" my/standups-default-properties-string))
("p" "Centralized templates for projects")
("pt" "Project todo" entry
(function +org-capture-central-project-todo-file)
"* TODO %?\n %i\n %a"
:heading "Tasks"
:parents ("Code Notes")
:prepend nil)
("pn" "Project notes" entry
(function +org-capture-central-project-notes-file)
"* %U %?\n %i\n %a"
:heading "Misc"
:parents ("Code Notes")
:prepend t)
("s" "Standups")
("sa" "Announcement" entry (file+olp ,my/work-org-file "Active" "Announcements")
,(concat "* " my/standups-people-prompt-string " - %? :announcement:"))))
(org-add-link-type "devops-workitem" #'make-devops-workitem-link)
(org-add-link-type "devops-helix-pr" #'make-helix-devops-pullrequest-link)
(org-add-link-type "devops-mobile-pr" #'make-mobile-devops-pullrequest-link)
(org-add-link-type "devops-apidomain-pr" #'make-apidomain-devops-pullrequest-link)
(org-add-link-type "devops-infrastructure-pr" #'make-infrastructure-devops-pullrequest-link))
(defun th-today ()
(interactive)
(let ((file-name "daily-reviews.org")
(header-format (format-time-string "%Y-%m-%d %A")))
(find-file (concat my/org-dir-work file-name))
(-if-let* [(header-pos (org-find-exact-headline-in-buffer header-format (current-buffer) t))]
(goto-char header-pos)
(goto-char (point-max))
(newline 2)
(let ((snippet (yas-lookup-snippet "GTD Daily Review" #'org-mode)))
(yas-expand-snippet snippet)
(org-clock-in)))
(unless (not (eq winum--window-count 1))
(split-window-vertically)
(org-agenda nil "n")
(setq org-agenda-todo-ignore-scheduled 'all)
(org-agenda-goto-today)
(org-agenda-day-view)
(org-agenda-log-mode)
(evil-window-rotate-downwards))))
(defun th-standups ()
(interactive)
(let ((file-name "standups.org")
(header-format (format-time-string "%Y-%m-%d %A")))
(find-file (concat my/org-dir-work file-name))
(-if-let* [(header-pos (org-find-exact-headline-in-buffer header-format (current-buffer) t))]
(goto-char header-pos)
(goto-char (point-max))
(newline 2)
(let ((snippet (yas-lookup-snippet "True Helix standup minutes" #'org-mode)))
(yas-expand-snippet snippet)))))

31
home/dev/doom.d/config.el Normal file
View file

@ -0,0 +1,31 @@
;; Here are some additional functions/macros that could help you configure Doom:
;;
;; - `load!' for loading external *.el files relative to this one
;; - `use-package!' for configuring packages
;; - `after!' for running code after a package has loaded
;; - `add-load-path!' for adding directories to the `load-path', relative to
;; this file. Emacs searches the `load-path' when you load packages with
;; `require' or `use-package'.
;; - `map!' for binding new keys
;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets.
(setq user-full-name "Evar Smith"
user-mail-address "me@evar.dev")
(setq custom-file null-device)
(load! "config-appearance")
(load! "config-org")
(when IS-WORK (load! "config-true-helix"))
(when IS-DEV (load! "config-dev"))
;; dont lazy load on windows
;; because it sucks
;(if IS-WINDOWS
; (progn (use-package! org :demand)
; (use-package! treemacs :demand)
; (use-package! projectile :demand)
; (use-package! workgroups :demand)
; (use-package! treemacs-projectile :demand)))

19
home/dev/doom.d/custom.el Normal file
View file

@ -0,0 +1,19 @@
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-safe-themes
'("f0eb51d80f73b247eb03ab216f94e9f86177863fb7e48b44aacaddbfe3357cf1" "ab058aa22bdaf17b5d8a9e21632a62c8966728ae10ef8fd07e95637e9cdf7a7b" default))
'(gdscript-godot-executable "/Applications/Godot.app/Contents/MacOS/Godot")
'(org-agenda-files
'("c:/Users/Evar/.syncthing/evar-org-work/daily-reviews.org" "c:/Users/Evar/.syncthing/evar-org-work/work.org" "c:/Users/Evar/.syncthing/evar-org-work/standups.org") t)
'(org-babel-remote-temporary-directory "/tmp/")
'(package-selected-packages '(company-quickhelp)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)

98
home/dev/doom.d/init.el Normal file
View file

@ -0,0 +1,98 @@
;;; initmel -*- lexical-binding: t; -*-
;; This file controls what Doom modules are enabled and what order they load
;; in. Remember to run 'doom sync' after modifying it!
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
;; documentation. There you'll find a "Module Index" link where you'll find
;; a comprehensive list of Doom's modules and what flags they support.
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
;; 'C-c c k' for non-vim users) to view its documentation. This works on
;; flags as well (those symbols that start with a plus).
;;
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
;; directory (for easy access to its source code).
(defvar work-systems '("HLXLAP001"))
(defvar IS-TERMUX (getenv "TERMUX_VERSION"))
(defvar IS-WORK (or (member (system-name) work-systems) IS-TERMUX))
(defvar IS-DEV (not IS-TERMUX))
(doom! :completion
(company +childframe) ; the ultimate code completion backend
(vertico +icons) ; the search engine of the future
:ui
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
doom-quit ; DOOM quit-message prompts when you quit Emacs
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
indent-guides ; highlighted indent columns
nav-flash ; blink cursor line after big motions
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
vc-gutter ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
(window-select +numbers) ; visually switch windows
(treemacs +lsp)
workspaces ; tab emulation, persistence & separate workspaces
:editor
(evil +everywhere) ; come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
snippets ; my elves. They type so I don't have to
:emacs
(dired +icons +ranger) ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
(ibuffer +icons) ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:term
vterm ; the best terminal emulation in Emacs
:checkers
syntax ; tasing you for every semicolon you forget
;;(spell +flyspell) ; tasing you for misspelling mispelling
;;grammar ; tasing grammar mistake every you make
:tools
(:if IS-DEV ansible)
(:if IS-DEV (debugger +lsp)) ; FIXME stepping through code, to help you add bugs
(:if IS-DEV direnv)
(:if IS-DEV docker)
editorconfig ; let someone else argue about tabs vs spaces
(eval +overlay) ; run code, run (also, repls)
lookup ; navigate your code and its documentation
(:if IS-DEV lsp)
(:if IS-DEV magit) ; a git porcelain for Emacs
(:if IS-DEV taskrunner) ; taskrunner for all your projects
(:if IS-DEV terraform) ; infrastructure as code
:os
(:if IS-MAC macos) ; improve compatibility with macOS
tty ; improve the terminal Emacs experience
:lang
(:if IS-DEV (csharp +lsp ; unity, .NET, and mono shenanigans
+dotnet))
nix
data ; config/data formats
emacs-lisp ; drown in parentheses
(:if IS-DEV (gdscript +lsp)) ; the language you waited for
(:if IS-DEV (javascript +lsp)) ; all(hope(abandon(ye(who(enter(here))))))
markdown ; writing docs for people to ignore
org ; organize your plain life in plain text
(:if IS-DEV (rust +lsp)) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
sh ; she sells {ba,z,fi}sh shells on the C xor
web ; the tubes
(:if IS-DEV (yaml +lsp)) ; JSON, but readable
:app
(rss +org) ; emacs as an RSS reader
:config
(default +bindings +smartparens))

View file

@ -0,0 +1,190 @@
;;; ob-shstream.el --- org-babel functions for simple async shell eval -*- lexical-binding: t -*-
;; Copyright (C) 2021 Excalamus (excalamus.com), whacked
;; (https://github.com/whacked)
;; Author: Excalamus, whacked (https://github.com/whacked)
;; Keywords: literate programming, reproducible research
;; Version: 0.02
;;; License:
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; The default ob-sh evaluation for shell scripts in org-mode is
;; blocking, so commands like the following freeze Emacs:
;;
;; #+BEGIN_SRC sh
;; ping -c 5 127.0.0.1
;; #+END_SRC
;;
;; Results only become visible when the process terminates.
;;
;; ob-shstream.el works by running the source given in a shell block
;; in a separate process. It does this by creating a temporary file
;; and executing it. Output is appended to a buffer and a hash
;; representing the source code acts as the result until the process
;; finishes. When completed, the hash is replaced with the output
;; buffer contents.
;;
;; NOTE: header arguments (e.g. :session) are not supported and some
;; may not work as expected (e.g. :table). This was only tested with
;; :result output. This is because the org-babel functionality is
;; largely undocumented and it's API inconsistent.
;;; Usage:
;; Load this file and update the org-babel settings:
;;
;; (org-babel-do-load-languages
;; 'org-babel-load-languages
;; '(...
;; (shstream . t)
;; ...))
;;
;; then use like a normal sh block, but replace "sh" with "shstream".
;;
;; Example:
;;
;; #+begin_src shstream :results output
;; echo "hello, world!"
;; sleep 2
;; echo "goodbye, cruel world..."
;; #+end_src
;;
;; Check the source code for user variables.
;;; Requirements:
;;; Code:
(defvar ob-shstream-shell-command "bash"
"Command used to execute code within a shstream block.
It is assumed that the command is on the shell path (i.e. that it
can be called from the shell without providing the path to the
executable).")
(defun ob-shstream-default-insertion-filter (proc string)
"Insert process output in process buffer.
Taken from (elisp) Filter Functions."
(when (buffer-live-p (process-buffer proc))
(display-buffer (process-buffer proc))
(with-current-buffer (process-buffer proc)
(let ((inhibit-read-only t))
(save-excursion
;; Insert the text, advancing the process marker.
(goto-char (process-mark proc))
(insert string)
(set-marker (process-mark proc) (point)))))))
(defvar ob-shstream-filter-function 'ob-shstream-default-insertion-filter
"Filter function to apply to process output before it is
inserted into the process output buffer.")
(defun org-babel-execute:shstream-pass-through (body params)
"Execute a block of shstream-pass-through code with org-babel.
This function is called by `org-babel-execute-src-block' This
particular definition is a dummy source language used strictly to
format shstream output."
body)
(defun org-babel-execute:shstream (body params)
"Execute a block of shstream code with org-babel.
This function is called by `org-babel-execute-src-block'"
(let* ((org-buffer (current-buffer))
(hash (secure-hash 'sha256 body))
(hash-name (concat "ob-shstream-" hash))
(short-hash-name (concat "ob-shstream-" (substring hash 0 7)))
(process-output-buffer-name (concat "*" short-hash-name "*"))
(temp-shell-file (org-babel-temp-file hash-name ".sh"))
;; (info (org-babel-get-src-block-info))
(results-params (cdr (assq :results params)))
(session-name (cdr (assq :session params))))
;; shell source must be in a temp file to be run asynchronously
(with-temp-file temp-shell-file
(insert body))
(with-current-buffer (get-buffer-create process-output-buffer-name)
(display-buffer process-output-buffer-name)
(read-only-mode nil))
(let* ((process (make-process
:name hash-name
:buffer process-output-buffer-name
:command (list ob-shstream-shell-command temp-shell-file)
;; no need to communicate between processes; kill
;; with list-processes if needed
:connection 'pipe
:filter ob-shstream-filter-function
:sentinel `(lambda (process event)
(if (string= event "finished\n")
(progn
;; run process output through shstream-pass-through in order to format
;; (e.g. put colons in front of each line)
(let ((formatted-result
(with-temp-buffer
;; DEBUG:
;; (with-current-buffer (get-buffer-create "*shstream-pass-through*")
;; (erase-buffer)
(insert (format "#+begin_src shstream-pass-through :results %s :session %s\n%s#+end_src"
,results-params
,session-name
(with-current-buffer ,process-output-buffer-name
(buffer-string))))
(org-babel-execute-src-block)
;; get the org formatted result
(let ((result-start (+ (org-babel-where-is-src-block-result) 10)))
(buffer-substring-no-properties result-start (point-max))))))
;; replace hash with formatted results
(save-excursion
(save-restriction
(with-current-buffer ,org-buffer
(widen)
(beginning-of-buffer)
(re-search-forward ,hash nil t)
;; assumes no one has put any text between the results
;; and the source block which contains "shstream"
(goto-char (re-search-backward "shstream" nil t))
(let* ((results-start (+ (org-babel-where-is-src-block-result) 10))
(results-end (when results-start
(save-excursion
(goto-char results-start)
(goto-char (org-babel-result-end))
(point)))))
(delete-region results-start results-end)
(goto-char results-start)
(insert formatted-result)
;; this is probably annoying, but that's Emacs window/buffer
;; management for ya
(switch-to-prev-buffer (get-buffer-window ,process-output-buffer-name) t)
(kill-buffer ,process-output-buffer-name)
(delete-file ,temp-shell-file)))))))))))))
;; use hash as place holder until process completes
hash))
(provide 'ob-shstream)
;;; ob-shstream.el ends here

View file

@ -0,0 +1,23 @@
;;; tools/terraform-plus/init.el -*- lexical-binding: t; -*-
;;; Mode
;; (define-derived-mode terraform-plus-section-mode special-mode "Terraform-Plus-Sections"
;; "Parent major mode that terraform-plus-like sections inherit"
;; (buffer-disable-undo)
;; (setq truncate-lines t)
;; (setq buffer-read-only t)
;; (setq show-trailing-whitespace nil))
;; (defvar terraform-plus-section-mode-map
;; (let ((map (make-keymap)))
;; (suppress-keymap map t)
;; (define-key map (kbd "TAB") 'terraform-plus-section-toggle)
;; map))
;;; Visibility
;; (defun terraform-plus-section-toggle (section)
;; "Toggle the visibility of the current section"
;; ())

View file

@ -0,0 +1,77 @@
;; -*- no-byte-compile: t; -*-
;;; $DOOMDIR/packages.el
;; To install a package with Doom you must declare them here and run 'doom sync'
;; on the command line, then restart Emacs for the changes to take effect -- or
;; use 'M-x doom/reload'.
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
;(package! some-package)
;; To install a package directly from a remote git repo, you must specify a
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
;; https://github.com/raxod502/straight.el#the-recipe-format
;(package! another-package
; :recipe (:host github :repo "username/repo"))
;; If the package you are trying to install does not contain a PACKAGENAME.el
;; file, or is located in a subdirectory of the repo, you'll need to specify
;; `:files' in the `:recipe':
;(package! this-package
; :recipe (:host github :repo "username/repo"
; :files ("some-file.el" "src/lisp/*.el")))
;; If you'd like to disable a package included with Doom, you can do so here
;; with the `:disable' property:
;(package! builtin-package :disable t)
;; You can override the recipe of a built in package without having to specify
;; all the properties for `:recipe'. These will inherit the rest of its recipe
;; from Doom or MELPA/ELPA/Emacsmirror:
;(package! builtin-package :recipe (:nonrecursive t))
;(package! builtin-package-2 :recipe (:repo "myfork/package"))
;; Specify a `:branch' to install a package from a particular branch or tag.
;; This is required for some packages whose default branch isn't 'master' (which
;; our package manager can't deal with; see raxod502/straight.el#279)
;(package! builtin-package :recipe (:branch "develop"))
;; Use `:pin' to specify a particular commit to install.
;(package! builtin-package :pin "1a2b3c4d5e")
;; Doom's packages are pinned to a specific commit and updated from release to
;; release. The `unpin!' macro allows you to unpin single packages...
;(unpin! pinned-package)
;; ...or multiple packages
;(unpin! pinned-package another-pinned-package)
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t)
;; web-mode for .razor files
;; (package! web-mode
;; :recipe (:host github :repo "fxbois/web-mode"
;; :files ("web-mode.el")))
;; nano theme
(package! nano-theme :recipe (:host github :repo "rougier/nano-theme"))
;; org mode stuff
(package! mixed-pitch)
(package! workgroups)
(package! spacemacs-theme)
(package! spaceline)
;; misc packages
(package! ink-mode)
(package! copilot
:recipe (:host github :repo "zerolfx/copilot.el" :files ("*.el" "dist")))
(package! kubernetes)

View file

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# contributor: Evar Smith
# name: devops link
# uuid: devops-link
# key: <#
# condition: t
# group: helix
# --
[[devops-workitem:${1:0}][${1:$(concat "#" yas-text)}]${0:$$(insert "]")}

View file

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# contributor: Evar Smith
# name: devops pr
# uuid: devops-pr
# key: <!
# condition: t
# group: helix
# --
[[devops-${2:$$(yas-choose-value my--yas-devops-repo-list-expr)}-pr:${1:0}][${1:$(concat "!" yas-text)}]${0:$$(insert "]")}

View file

@ -0,0 +1,13 @@
# -*- mode: snippet -*-
# name: GTD Daily Review
# uuid: evar-gtd-daily-review
# condition: t
# group: helix
# --
* `(format-time-string "%Y-%m-%d %A")`
- [ ] Check infrastructure statistics - file notes
- [ ] Check and clear email - record tasks
- [ ] Check devops dashboard - record tasks (followups, etc.)
- [ ] Schedule today's tasks (remember immersive / process)
- [ ] Check appstack candidates

View file

@ -0,0 +1,17 @@
# -*- mode: snippet -*-
# name: GTD Project
# uuid: gtd-project
# key: <proj
# condition: t
# --
${2:`(make-string (org-current-level) ?*)`*} $1
$2* Immersive
:PROPERTIES:
:CATEGORY: immersive
:END:
$2* Process
:PROPERTIES:
:CATEGORY: process
:END:
$2* Notes :archive:

View file

@ -0,0 +1,58 @@
# -*- mode: snippet -*-
# contributor: Emily Susemihl
# name: True Helix standup minutes
# uuid: true-helix-standup-minutes
# key: sup
# condition: t
# group: helix
# --
* `(format-time-string "%Y-%m-%d %A")`
** Developers
*** Cody [`(format-time-string "%Y-%m-%d %a")`] :cody:
- Yesterday
- Today
*** Corey [`(format-time-string "%Y-%m-%d %a")`] :corey:
- Yesterday
- Today
*** Chris [`(format-time-string "%Y-%m-%d %a")`] :chris:
- Yesterday
- Today
*** Nick [`(format-time-string "%Y-%m-%d %a")`] :nick:
- Yesterday
- Today
*** Mike [`(format-time-string "%Y-%m-%d %a")`] :mike:
- Yesterday
- Today
*** Jared [`(format-time-string "%Y-%m-%d %a")`] :jared:
- Yesterday
- Today
*** Emily [`(format-time-string "%Y-%m-%d %a")`] :emily:
- Yesterday
- Today
*** Sam [`(format-time-string "%Y-%m-%d %a")`] :sam:
- Yesterday
- Today
** Others
*** Alex [`(format-time-string "%Y-%m-%d %a")`] :alex:
- Yesterday
- Today
*** Tom [`(format-time-string "%Y-%m-%d %a")`] :tom:
- Yesterday
- Today
*** Drew [`(format-time-string "%Y-%m-%d %a")`] :drew:
- Yesterday
- Today
*** Liz [`(format-time-string "%Y-%m-%d %a")`] :liz:
- Yesterday
- Today
*** Brian [`(format-time-string "%Y-%m-%d %a")`] :brian:
- Yesterday
- Today
*** Heather [`(format-time-string "%Y-%m-%d %a")`] :heather:
- Yesterday
- Today
*** Melissa [`(format-time-string "%Y-%m-%d %a")`] :melissa:
- Yesterday
- Today

View file

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name:
# key: trigger-key
# condition: t
# --

20
home/dev/emacs.nix Normal file
View file

@ -0,0 +1,20 @@
{
pkgs,
inputs,
...
}: {
imports = [
inputs.nix-doom-emacs-unstraightened.homeModule
];
fonts.fontconfig.enable = true; # allows adding fonts from home manager config
home.packages = with pkgs; [
nerd-fonts.commit-mono
nerd-fonts.sauce-code-pro
];
programs.doom-emacs = {
enable = true;
doomDir = ./doom.d;
};
}

48
home/dev/git.nix Normal file
View file

@ -0,0 +1,48 @@
{
...
}: {
programs.git = {
enable = true;
delta = {
enable = true;
options = {
side-by-side = true;
};
};
# WISH: Figure out difftastic
# difftastic.enable = true;
# https://difftastic.wilfred.me.uk/git.html
# https://tsdh.org/posts/2022-08-01-difftastic-diffing-with-magit.html
userEmail = "esmith@true-helix.com";
userName = "Evar Smith";
extraConfig = {
init.defaultBranch = "integration";
# Consider https://jvns.ca/blog/2024/02/16/popular-git-config-options/#pull-ff-only-or-pull-rebase-true
# Make merge conflicts more readable
merge.conflictstyle = "zdiff3";
rebase.autosquash = true;
rebase.autostash = true;
# Consider https://jvns.ca/blog/2024/02/16/popular-git-config-options/#push-default-simple-push-default-current-push-autosetupremote-true
# Add whole commit diff in text editor when writing commit message
#commit.verbose = true;
# Remember how merge conflicts were resolved to restore later
rerere.enabled = true;
# Better diffs
diff.algorithm = "histogram";
status.submoduleSummary = true;
diff.submodule = "log";
submodule.recurse = true;
merge.keepbackup = false;
#merge.tool = "${pkgs.meld}/bin/meld";
};
};
}

303
home/dev/terminal.nix Normal file
View file

@ -0,0 +1,303 @@
{
config,
pkgs,
lib,
inputs,
...
}: {
# TODO: pull in some stuff from
# https://docs.projectbluefin.io/command-line/
imports = [
inputs.nix-index-database.hmModules.nix-index
];
# NOTE: for fish, I need the
# system to have programs.fish.enable = true;
# so that the shell integration can find the nix binary properly.
home.shell.enableFishIntegration = true;
programs.fish = {
enable = true;
interactiveShellInit = ''
#
# bobthefisher appearance config
#
set theme_nerd_fonts yes # use nerd fonts for powerline
set theme_newline_cursor yes # cursor on newline
set theme_color_scheme terminal2
set theme_git_default_branches master main integration
#
# tmux config
#
set -g fish_tmux_autoname_session true
set -g fish_tmux_autostart_once false
set -g fish_tmux_autostart true
'';
plugins = with pkgs; [
# Git-aware powerline style fish theme
{
name = "bobthefisher";
src = fishPlugins.bobthefisher.src;
}
# Makes $CMD_DURATION human readable; goes hand in hand with the above
{
name = "humantime-fish";
src = fishPlugins.humantime-fish;
}
# Adds mnemonic key bindings to find various things
# using fzf.
# https://github.com/PatrickF1/fzf.fish
#
# CHEATSHEET
# Ctrl Alt [F]ile - Search directory for files
# Ctrl Alt [R]everse - Reverse-i-search - Typically overwritten by atuin
# Ctrl Alt [S]tatus - Search git status
# Ctrl Alt [P]rocess - Search list of running processes
# Ctrl Alt [V]ariable - Search all shell variables
{
name = "fzf.fish";
src = fishPlugins.fzf-fish.src;
}
# KILL: use Atuin instead
# use ctrl + o then ctrl + d to remove items from history
#
# Helps keep command history tiday, and lets me
# remove stuff easily if I ever need to
# https://github.com/meaningful-ooo/sponge
#
# CHEATSHEET
# history clear - self explanatory
# {
# name = "sponge";
# src = fishPlugins.sponge.src;
# }
# Lightweight and interactive git in
# the terminal powered by fzf.
# https://github.com/meaningful-ooo/sponge
#
# CHEATSHEET
# ga - git add
# glo - git log
# gi - .gitignore generator
# gd - git diff
# gso - git show
# grh - git reset HEAD <file>
# gbd - git branch -D <branch>
# gcf - git checkout <file>
# gcb - git checkout <branch>
# gct - git checkout <tag>
# gco - git checkout <commit>
# grc - git revert <commit>
# gss - view git stashes
# gsp - git stash push
# gclean - git clean
# gcp - git cherry-pick
# grb - git rebase -i
# grl - git reflog
# gbl - git blame
# gfu - git commit --fixup && git rebase -i --autosquash
{
name = "forgit";
src = fishPlugins.forgit.src;
}
# Fish integration for tmux
# Some useful aliases, autostart tmux, etc.
#
# CHEATSHEET
# ta - tmux attach -t | Attach new tmux session to already running named session
# tad - tmux attach -d -t | Detach named tmux session
# tds - _fish_tmux_directory_session | Creates or attaches to a session for the current path
# tkss - tmux kill-session -t | Terminate named running tmux session
# tl - tmux list-sessions | Displays a list of running tmux sessions
# tmux - _fish_tmux_plugin_run | Start a new tmux session
# ts - tmux new-session -s | Create a new named tmux session
{
name = "tmux.fish";
src = fetchFromGitHub {
owner = "budimanjojo";
repo = "tmux.fish";
rev = "v2.0.1";
sha256 = "sha256-ynhEhrdXQfE1dcYsSk2M2BFScNXWPh3aws0U7eDFtv4=";
};
}
# Faster navigation of directory trees
#
# CHEATSHEET
# use z <dirname> (from anywhere) instead of cd when you want to
# move to a particular folder.
#
# use z on its own to return to the 'root' directory, which it
# figures out intelligently. (e.g. the root of a git repository)
#
# https://github.com/jethrokuan/z/blob/master/man/man1/z.md
{
name = "z";
src = fishPlugins.z.src;
}
];
};
# terminal emulator
home.sessionVariables.TERMINAL = "alacritty";
programs.alacritty = {
enable = true;
# man 5 alacritty
# or
# https://alacritty.org/config-alacritty.html
settings = {
# TODO: make a central place for defining my terminal font
font.normal = { family = "CommitMono Nerd Font"; style = "Regular"; };
font.size = 14.0;
font.builtin_box_drawing = false;
};
};
# command history
programs.atuin = {
enable = true;
settings.store_failed = false; # keep command history clean
settings.update_check = false; # we are nix powered
settings.enter_accept = true; # automatically execute stuff on enter
settings.keymap_mode = "vim-insert"; # i like vim
settings.show_tabs = false; # no real need for these imo
settings.workspaces = true; # filter commands when in git repo; can unfilter with ctrl + r
};
# tmux
# .. probably good to have this here
# https://tmuxcheatsheet.com/
programs.tmux = {
enable = true;
shell = "${pkgs.fish}/bin/fish";
newSession = true; # create new shell when attaching with none running
historyLimit = 7500;
keyMode = "vi";
plugins = with pkgs.tmuxPlugins; [
better-mouse-mode
{
plugin = tmux-which-key;
extraConfig = ''
set -g @tmux-which-key-xdg-enable 1;
'';
}
];
extraConfig = ''
# Mouse works as expected
set-option -g mouse on
# easy-to-remember split pane commands
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
'';
};
xdg.configFile = {
"tmux/plugins/tmux-which-key/config.yaml".text = lib.generators.toYAML {} {
# The starting index to use for the command-alias option, used for macros
# (required). This value must be at least 200
command_alias_start_index = 200;
# The keybindings that open the action menu (required)
keybindings = {
prefix_table = "Space";
root_table = "C-Space";
};
# The menu title config (optional)
title = {
style = "align=centre,bold";
prefix = "tmux"; # A prefix added to every menu title
prefix_style = "fg=green,align=centre,bold";
};
# The menu position (optional)
position = {
x = "R";
y = "P";
};
# tmux-only env vars that can be used in commands and macros (optional)
# custom_variables = {
# foo = "bar";
# };
# User-defined macros that can be triggered by the menu (optional)
# macros = {
# restart-pane = [ # the macro pane
# # the macro commands
# "respawnp -k -c #{pane_current_path}"
# "display \"#{log_info} Pane restarted\""
# ];
# };
# The root menu items (required)
items = [
{
name = "Next pane";
key = "space"; # the key that triggers this action
command = "next-pane"; # a command to run
}
# {
# name = "Respawn pane";
# key = "R";
# macro = "restart-pane"; # a custom macro (defined above)
# }
{
separator = true; # a menu separator
}
{
name = "+Layout"; # a submenu
key = "l";
command = "nextl";
transient = true; # whether to keep the menu open until ESC is pressed
}
];
};
};
programs.bat.enable = true;
programs.fd.enable = true;
programs.fzf.enable = true;
programs.direnv = {
enable = true;
nix-direnv.enable = true;
# Externally located cache
stdlib = ''
declare -A direnv_layout_dirs
direnv_layout_dir() {
local hash path
echo "''${direnv_layout_dirs[$PWD]:=$(
hash="$(sha1sum - <<< "$PWD" | head -c40)"
path="''${PWD//[^a-zA-Z0-9]/-}"
echo "${config.xdg.cacheHome}/direnv/layouts/''${hash}''${path}"
)}"
}
'';
};
# replaces ls
programs.eza = {
enable = true;
git = true;
icons = "auto";
};
# TODO: importing the input doesn't work, so
# I can't enable this from here.. why?
# makes it so that you can run a program without
# installing it by typing , <program>
programs.nix-index.enable = true;
programs.nix-index-database.comma.enable = true;
}

70
home/dev/vscode.nix Normal file
View file

@ -0,0 +1,70 @@
{
pkgs,
lib,
...
}: {
nixpkgs.config.allowUnfree = true;
programs.vscode = {
enable = true;
enableUpdateCheck = false;
extensions = with pkgs.vscode-extensions; [
vscodevim.vim
jnoortheen.nix-ide
mkhl.direnv
ms-vscode-remote.remote-containers
hashicorp.hcl
hashicorp.terraform
dbaeumer.vscode-eslint
esbenp.prettier-vscode
ms-kubernetes-tools.vscode-kubernetes-tools
redhat.vscode-yaml
tim-koehler.helm-intellisense
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "pulumi-vscode-tools";
publisher = "pulumi";
version = "0.3.0";
sha256 = "sha256-7jHXem8jRM9KopC1jWc3r4cz6dnifiJavOTiaNV29Jg=";
}
{
name = "pulumi-lsp-client";
publisher = "pulumi";
version = "0.2.3";
sha256 = "sha256-Ct2Zmwxz1QGo4/RTC/iSsxeac1q2R/2qc78Va0ndlYQ=";
}
{
name = "vt100-syntax-highlighting";
publisher = "tobias-faller";
version = "1.1.0";
sha256 = "sha256-+u98PDVZhGH5tfZ/sE1i+8BmAjFr2IVfO1mMAvKbomo=";
}
{
name = "lisp";
publisher = "mattn";
version = "0.1.12";
sha256 = "sha256-x6aFrcX0YElEFEr0qA669/LPlab15npmXd5Q585pIEw=";
}
];
userSettings = with pkgs; {
# TODO: make a central place for defining my terminal font
"terminal.integrated.defaultProfile.linux" = "fish";
"terminal.integrated.fontFamily" = "CommitMono Nerd Font";
"editor.tabSize" = 2;
"nix.enableLanguageServer" = true;
"nix.serverPath" = nixd + "/bin/nixd";
"nix.formatterPath" = nixfmt + "/bin/nixfmt";
"extensions.autoUpdate" = false;
"typescript.tsserver.maxTsServerMemory" = 8192;
"typescript.tsserver.nodePath" = nodejs + "/bin/node";
"workbench.editorAssociations" = {
"*.txt" = "vt100.preview";
"*.log" = "vt100.preview";
};
};
};
}

22
home/dev/zed.nix Normal file
View file

@ -0,0 +1,22 @@
{ pkgs, ... }:
{
programs.zed-editor = {
enable = true;
extensions = [
"dockerfile"
# disabled until https://github.com/eth0net/zed-docker-compose/issues/2
# "docker-compose"
"nix"
];
installRemoteServer = true;
userSettings = with pkgs; {
"vim_mode" = true;
"terminal"."shell"."program" = "fish";
"lsp"."package-version-server"."binary"."path" = package-version-server + "/bin/package-version-server";
"lsp"."nixd"."binary"."path" = nixd + "/bin/nixd";
"lsp"."nil"."binary"."path" = nil + "/bin/nil";
};
};
}

81
home/firefox.nix Normal file
View file

@ -0,0 +1,81 @@
{
lib,
pkgs,
osConfig,
...
}: let
enablePlasma = osConfig.services.desktopManager.plasma6.enable;
extension = shortId: uuid: {
name = uuid;
value = {
install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
installation_mode = "force_installed";
};
};
oldExtensions = builtins.listToAttrs;
ext = shortId: {
install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
installation_mode = "force_installed";
};
exts = builtins.mapAttrs (_: ext);
in {
programs.firefox = {
enable = true;
nativeMessagingHosts = [
pkgs.tridactyl-native
];
# https://mozilla.github.io/policy-templates/
policies = {
# no need for password manager since we use bitwarden
OfferToSaveLogins = false;
OfferToSaveLoginsDefault = false;
PasswordManagerEnabled = false;
DisableTelemetry = true;
ExtensionSettings = lib.mkMerge [
(oldExtensions [
(extension "sidebery" "{3c078156-979c-498b-8990-85f7987dd929}") # has no email id
(extension "kagi-search-for-firefox" "search@kagi.com")
(extension "ublock-origin" "uBlock0@raymondhill.net")
(extension "privacy-badger17" "jid1-MnnxcxisBPnSXQ@jetpack")
(extension "i-dont-care-about-cookies" "jid1-KKzOGWgsW3Ao4Q@jetpack")
(extension "bitwarden-password-manager" "{446900e4-71c2-419f-a6a7-df9c091e268b}")
# site-specific
(extension "sponsorblock" "sponsorBlocker@ajay.app")
])
# TODO: Can we get this from nixpkgs instead?
(lib.mkIf enablePlasma (exts {
"plasma-browser-integration@kde.org" = "plasma-integration";
}))
];
};
# To add additional extensions, find it on addons.mozilla.org, find
# the short ID in the url (like https://addons.mozilla.org/en-US/firefox/addon/!SHORT_ID!/)
# Then, download the XPI by filling it in to the install_url template, unzip it,
# run `jq .browser_specific_settings.gecko.id manifest.json` or
# `jq .applications.gecko.id manifest.json` to get the UUID
# You dont need to get the UUID from the xpi. You can install it then find the UUID in about:debugging#/runtime/this-firefox.
profiles.default = {
# https://searchfox.org/mozilla-central/source/modules/libpref/init/StaticPrefList.yaml
settings = {
"app.normandy.first_run" = false;
"app.shield.optoutstudies.enabled" = false;
"app.update.channel" = "default";
# "browser.link.open_newwindow" = true;
"browser.shell.checkDefaultBrowser" = true;
"browser.urlbar.showSearchSuggestionsFirst" = false;
"browser.vpn_promo.enabled" = false;
# "extensions.activeThemeID" = "firefox-alpenglow@mozilla.org";
# "extensions.extensions.activeThemeID" = "firefox-alpenglow@mozilla.org";
"extensions.pocket.enabled" = false;
"media.ffmpeg.vaapi.enabled" = true;
};
};
};
}

15
home/fonts.nix Normal file
View file

@ -0,0 +1,15 @@
{
pkgs,
...
}: {
fonts.fontconfig.enable = true; # allows adding fonts from home manager config
home.packages = with pkgs; [
nerd-fonts.ubuntu
nerd-fonts.ubuntu-mono
nerd-fonts.ubuntu-sans
nerd-fonts.commit-mono
nerd-fonts.sauce-code-pro
];
}

8
home/obsidian.nix Normal file
View file

@ -0,0 +1,8 @@
{
pkgs,
...
}: {
home.packages = with pkgs; [
obsidian
];
}

9
home/syncthing.nix Normal file
View file

@ -0,0 +1,9 @@
{
pkgs,
...
}: {
services.syncthing = {
enable = true;
tray = true;
};
}

5
home/work/default.nix Normal file
View file

@ -0,0 +1,5 @@
{
imports = [
./xfreerdp.nix
];
}

16
home/work/xfreerdp.nix Normal file
View file

@ -0,0 +1,16 @@
{
pkgs,
...
}: {
# For remoting into VMs.
# e.g.
# xfreerdp /sec:aad '/u:\AzureAD\esmith@true-helix.com' /v:th-production-m +dynamic-resolution
#
# Do note that hosts file entries are also necessary to map the
# public IP of the device to the computer name (i.e. the /v:)
# to get entra id auth playing nicely.
home.packages = with pkgs; [
freerdp
];
}