34 Commits

Author SHA1 Message Date
f0707ed8c2 [NixOS] Host docs.railbird.ai 2024-08-19 14:31:17 -06:00
43aeab6fda kubernets WIP 2024-08-18 21:33:58 -06:00
79908fae93 [NixOS] Add ryzen-shine kubernetes token 2024-08-18 15:32:36 -06:00
b597b6e239 [Emacs] Use rubocop in ruby-mode 2024-08-18 15:32:10 -06:00
9e8cd58d7f [nix-darwin] Add gitea-runner token for mac-demarco-mini 2024-08-15 01:52:05 -06:00
6643428fca Revert "[NixOS] Use yshui's picom version from git"
This reverts commit 6cb9597df7.
2024-08-14 01:33:19 -06:00
10a732ad75 [taffybar] Bump version 2024-08-11 17:54:49 -06:00
e6a75734fb [NixOS] [zsh] Enable bracketed-paste-magic 2024-08-11 17:54:03 -06:00
eb22968ab4 [NixOS] Package renames 2024-08-11 17:52:53 -06:00
b12f84c007 [NixOS] Bump nixpkgs version 2024-08-11 17:52:37 -06:00
54645ba497 [NixOS] Fix deprecated option use in ryzen-shine 2024-08-11 17:52:17 -06:00
6cb9597df7 [NixOS] Use yshui's picom version from git 2024-08-11 17:51:56 -06:00
51e6116100 [Emacs] Search hidden files when doing directory based consult-rg search 2024-08-10 12:40:01 -06:00
4fd99eae63 [NixOS] Add interview user 2024-08-09 12:41:32 -06:00
b8f2452d11 [NixOS] Add ns function for incrementally searching through nixpkgs 2024-08-04 22:21:13 -06:00
ddb4a257cf Add nix-darwin justfile 2024-08-04 22:20:33 -06:00
Kat
3a6c9fbb49 Add nix-darwin 2024-08-04 22:20:33 -06:00
Kat
f3b8a769c6 [Emacs] Add swift-mode 2024-08-04 22:20:33 -06:00
4a27118f24 Delete travis 2024-08-04 22:20:33 -06:00
7ddc215dcc [Emacs] Remove indent-guide 2024-08-04 22:02:59 -06:00
3559edb3a5 [git] Don't ignore .sw* files (swift) 2024-07-28 14:20:58 -06:00
0e611dbb57 Fix location of DISABLE_REGISTRATION 2024-07-20 01:18:56 -06:00
3a71c8600c [NixOS] Remove sound.enable 2024-07-18 15:57:42 -06:00
280debd530 [NixOS] Disable gitea registration 2024-07-18 15:55:59 -06:00
e34248ede3 [NixOS] Add dean to syncthing 2024-07-18 14:09:37 -06:00
ea3ba8e2d6 [Emacs] Replace highlight-indent-guides with indent-bars 2024-07-11 01:44:13 -06:00
69411c14f6 [NixOS] Use testing kernel on strixi-minaj to fix audio 2024-07-04 12:44:23 -06:00
f560d87aa3 [linux] Allow selection of specific path for case where multiple brightness paths 2024-07-03 22:49:29 -06:00
e188936253 [NixOS] Use module from nixos-hardware for strixy-minaj 2024-07-03 02:12:56 -06:00
f91ff8c987 Revert "[NixOS] Use intel drivers on strixi-minaj"
This reverts commit 204569fff1.
2024-07-03 02:12:56 -06:00
f4b87c40eb Remove gtkrc 2024-07-02 17:19:51 -06:00
26fb168ec5 [NixOS] Set backup extension for home-manager 2024-07-02 17:18:03 -06:00
16e6b980ba [NixOS] Flake update past ssh issue 2024-07-01 22:45:03 -06:00
204569fff1 [NixOS] Use intel drivers on strixi-minaj 2024-07-01 22:44:44 -06:00
32 changed files with 1080 additions and 412 deletions

View File

@@ -1,8 +0,0 @@
language: generic
script: bash ./gen-gh-pages/deploy.sh
env:
global:
- ENCRYPTION_LABEL: "73e6c870aa87"
- COMMIT_AUTHOR_EMAIL: "IvanMalison@gmail.com"
- COMMIT_AUTHOR_NAME: "Ivan Malison"

View File

@@ -361,8 +361,6 @@ but provide support for writing custom elisp.
*** shut-up
#+BEGIN_SRC emacs-lisp
(use-package shut-up
:demand t
:ensure (:inherit t :wait t)
:config
(defun imalison:shut-up-around (function &rest args)
(shut-up (apply function args))))
@@ -858,7 +856,6 @@ details.
(directory-files filepath))))
(use-package eshell
:ensure nil
:commands (eshell-parse-colon-path imalison:get-executables-on-path)
:config
(defun imalison:get-executables-on-path ()
@@ -1236,7 +1233,6 @@ This makes ~forward-word~ and ~backward-word~ understand snake and camel case.
proced is an top like utility that runs inside of emacs. The following sets auto updating automatically and makes the update interval faster.
#+BEGIN_SRC emacs-lisp
(use-package proced
:ensure nil
:defer t
:config
(progn
@@ -1380,7 +1376,6 @@ Paradox is a package.el extension. I have no use for it now that I use straight.
** server
#+BEGIN_SRC emacs-lisp
(use-package server
:ensure nil
:demand t
:config
(progn
@@ -1449,6 +1444,19 @@ The file server file for this emacs instance no longer exists.")
(use-package refine
:disabled t)
#+END_SRC
** winner
#+BEGIN_SRC emacs-lisp
(use-package winner
:commands (winner-undo winner-redo)
:bind ("C-c q" . imalison:winner-hydra/body)
:config
(progn
(defhydra imalison:winner-hydra ()
"Winner"
("p" winner-undo "back")
("n" winner-redo "forward" :exit t))
(winner-mode 1)))
#+END_SRC
** eyebrowse
I don't have any use for this now that I use frames mode, but its an interesting idea.
#+BEGIN_SRC emacs-lisp
@@ -1506,26 +1514,31 @@ https://github.com/alpaker/Fill-Column-Indicator/issues/21 for more details
(advice-add 'company-call-frontends :before #'fci-on-off-fci-before-company)
(add-hook 'prog-mode-hook 'fci-mode)))
#+END_SRC
** highlight-indent-guides
If the load-theme hook from this package starts causing trouble check for
custom-set-faces in your custom file.
#+BEGIN_SRC emacs-lisp
(use-package highlight-indent-guides
:commands highlight-indent-guides-mode
:diminish highlight-indent-guides-mode
:demand t
** indent-bars
#+begin_src emacs-lisp
(use-package indent-bars
:straight (indent-bars :type git :host github :repo "jdtsmith/indent-bars")
:config
(progn
(add-hook 'prog-mode-hook 'highlight-indent-guides-mode)
(setq highlight-indent-guides-method 'fill)))
#+END_SRC
(require 'indent-bars-ts) ; not needed with straight
:custom
(indent-bars-treesit-support t)
(indent-bars-treesit-ignore-blank-lines-types '("module"))
;; Add other languages as needed
(indent-bars-treesit-scope '((python function_definition class_definition for_statement
if_statement with_statement while_statement)))
;; wrap may not be needed if no-descend-list is enough
;; (indent-bars-treesit-wrap '((python argument_list parameters ; for python, as an example
;; list list_comprehension
;; dictionary dictionary_comprehension
;; parenthesized_expression subscript)))
:hook ((prog-mode) . indent-bars-mode))
#+end_src
** man-mode
Man page escape sequences aren't properly handled by emacs pager. This function
fixes that, but for now, it needs to be run manually, since I haven't figured
out how to detect that a buffer is a man mode buffer.
#+BEGIN_SRC emacs-lisp
(use-package man
:ensure nil
:config
(progn
(defun imalison:fontify-man-page-buffer ()
@@ -1751,7 +1764,6 @@ bind-key and global-set-key forms.
#+END_SRC
** projectile
#+BEGIN_SRC emacs-lisp
(use-package projectile
:demand t
:bind (:map projectile-mode-map
@@ -1765,7 +1777,7 @@ bind-key and global-set-key forms.
(projectile-git-submodule-command nil)
(project-vc-merge-submodules nil)
(projectile-current-project-on-switch 'keep))
:config
:preface
(progn
(defmacro imalison:projectile-do-in-project (project-dir &rest forms)
`(imalison:with-default-directory ,project-dir
@@ -1778,7 +1790,8 @@ bind-key and global-set-key forms.
(defun imalison:do-rg-default-directory (&rest args)
(interactive)
(apply 'consult-ripgrep default-directory args))
(let ((consult-ripgrep-args (concat consult-ripgrep-args " --no-ignore" " --hidden")))
(apply 'consult-ripgrep default-directory args)))
(emit-prefix-selector imalison:do-rg
consult-ripgrep
@@ -1797,7 +1810,9 @@ bind-key and global-set-key forms.
(write-region "" nil
(expand-file-name
(concat directory "/"
(nth 0 file-info) "/.projectile"))))))
(nth 0 file-info) "/.projectile")))))))
:config
(progn
(projectile-global-mode)
(diminish 'projectile-mode)))
#+END_SRC
@@ -1846,8 +1861,7 @@ bind-key and global-set-key forms.
** avy
#+BEGIN_SRC emacs-lisp
(use-package avy
:after emit
:config
:preface
(progn
(emit-prefix-selector imalison:avy
avy-goto-word-1
@@ -1859,13 +1873,11 @@ bind-key and global-set-key forms.
** ace-window
#+BEGIN_SRC emacs-lisp
(use-package ace-window
:after emit
:config
(progn
(emit-prefix-selector imalison:ace-window
ace-select-window
ace-swap-window)
(setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)))
:preface
(emit-prefix-selector imalison:ace-window
ace-select-window
ace-swap-window)
:config (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l))
:bind ("C-c w" . imalison:ace-window))
#+END_SRC
** neotree
@@ -1891,41 +1903,41 @@ Neotree is useless with frame mode for now, so I've disabled it.
* Completion
** vertico
#+begin_src emacs-lisp
(use-package vertico
:demand t
:config
(progn
(defmacro imalison:use-vertico-extension (extension-name &rest forms)
(let ((extension-symbol (intern (concat "vertico-" (symbol-name extension-name)))))
`(use-package ,extension-symbol
:after vertico
:straight (,extension-symbol
:repo "emacs-straight/vertico"
:host github
:files ,(list (concat "extensions/" (symbol-name extension-symbol) ".el")))
,@forms)))
(use-package vertico
:demand t
:config
(progn
(defmacro imalison:use-vertico-extension (extension-name &rest forms)
(let ((extension-symbol (intern (concat "vertico-" (symbol-name extension-name)))))
`(use-package ,extension-symbol
:after vertico
:straight (,extension-symbol
:repo "emacs-straight/vertico"
:host github
:files ,(list (concat "extensions/" (symbol-name extension-symbol) ".el")))
,@forms)))
(put 'imalison:use-vertico-extension 'lisp-indent-function 'defun)
(put 'imalison:use-vertico-extension 'lisp-indent-function 'defun)
(imalison:use-vertico-extension directory
:bind (:map vertico-map
("RET" . vertico-directory-enter)
("DEL" . vertico-directory-delete-char)
("M-DEL" . vertico-directory-delete-word)
("TAB" . embark-act)))
(imalison:use-vertico-extension directory
:bind (:map vertico-map
("RET" . vertico-directory-enter)
("DEL" . vertico-directory-delete-char)
("M-DEL" . vertico-directory-delete-word)
("TAB" . embark-act)))
(imalison:use-vertico-extension grid)
(imalison:use-vertico-extension buffer)
(imalison:use-vertico-extension flat)
(imalison:use-vertico-extension multiform
:config
(progn
(vertico-multiform-mode +1)
(setq vertico-multiform-commands
'((consult-imenu grid)
(consult-ripgrep buffer)))))
(imalison:use-vertico-extension grid)
(imalison:use-vertico-extension buffer)
(imalison:use-vertico-extension flat)
(imalison:use-vertico-extension multiform
:config
(progn
(vertico-multiform-mode +1)
(setq vertico-multiform-commands
'((consult-imenu grid)
(consult-ripgrep buffer)))))
(vertico-mode +1)))
(vertico-mode +1)))
#+end_src
** orderless
#+begin_src emacs-lisp
@@ -2020,12 +2032,10 @@ Neotree is useless with frame mode for now, so I've disabled it.
** company
#+BEGIN_SRC emacs-lisp
(use-package company
:after emit
:commands company-mode imalison:company
:bind (("C-\\" . imalison:company))
:config
(progn
(add-hook 'prog-mode-hook (lambda () (company-mode t)))
(emit-prefix-selector imalison:company
company-complete
company-yasnippet)
@@ -2035,7 +2045,9 @@ Neotree is useless with frame mode for now, so I've disabled it.
:demand t
:config (company-prescient-mode +1))
(global-company-mode)
(diminish 'company-mode)))
(diminish 'company-mode))
:init
(add-hook 'prog-mode-hook (lambda () (company-mode t))))
#+END_SRC
*** company-flx
#+BEGIN_SRC emacs-lisp
@@ -2208,7 +2220,6 @@ I don't use auto-complete at all, so I have set up a hook to automatically disab
** align
#+BEGIN_SRC emacs-lisp
(use-package align
:ensure nil
:bind ("C-c C-a" . imalison:align-regexp-hydra/body)
:config
(progn
@@ -2237,10 +2248,9 @@ I don't use auto-complete at all, so I have set up a hook to automatically disab
#+BEGIN_SRC emacs-lisp
(use-package flycheck
:commands flycheck-mode
:defer 1
:init (add-hook 'prog-mode-hook 'flycheck-mode)
:config
(progn
(add-hook 'prog-mode-hook 'flycheck-mode)
(use-package flycheck-package
:disabled t
:config (flycheck-package-setup))
@@ -2257,6 +2267,12 @@ I don't use auto-complete at all, so I have set up a hook to automatically disab
(global-flycheck-mode))
:diminish flycheck-mode)
#+END_SRC
* straight
#+BEGIN_SRC emacs-lisp
(use-package straight
:config
(setq straight-vc-git-auto-fast-forward t))
#+END_SRC
* auth-source
#+begin_src emacs-lisp
(use-package auth-source
@@ -2306,98 +2322,105 @@ I don't use auto-complete at all, so I have set up a hook to automatically disab
(unbind-key "C-j" python-mode-map)
(add-hook 'python-mode-hook #'imalison:python-mode)))
#+END_SRC
*** ruby
#+begin_src emacs-lisp
(use-package ruby-mode
:config
(setf (alist-get 'ruby-ts-mode apheleia-mode-alist)
'(rubocop)))
#+end_src
*** go
#+BEGIN_SRC emacs-lisp
;; (use-package go-mode
;; :mode (("\\.go\\'" . go-mode))
;; :after emit
;; :config
;; (progn
;; (defun imalison:glide-novendor ()
;; (projectile-with-default-dir (projectile-project-root)
;; (shell-command-to-string "glide novendor")))
(use-package go-mode
:mode (("\\.go\\'" . go-mode))
:preface
(progn
(defun imalison:glide-novendor ()
(projectile-with-default-dir (projectile-project-root)
(shell-command-to-string "glide novendor")))
;; (defun imalison:go-mode-create-imenu-index ()
;; "Create and return an imenu index alist. Unlike the default
;; alist created by go-mode, this method creates an alist where
;; items follow a style that is consistent with other prog-modes."
;; (let* ((patterns '(("type" "^type *\\([^ \t\n\r\f]*\\)" 1)))
;; (type-index (imenu--generic-function patterns))
;; (func-index))
;; (save-excursion
;; (goto-char (point-min))
;; (while (re-search-forward go-func-meth-regexp (point-max) t)
;; (let* ((var (match-string-no-properties 1))
;; (func (match-string-no-properties 2))
;; (name (if var
;; (concat (substring var 0 -1) "." func)
;; func))
;; (beg (match-beginning 0))
;; (marker (copy-marker beg))
;; (item (cons name marker)))
;; (setq func-index (cons item func-index)))))
;; (nconc type-index (list (cons "func" func-index)))))
(defun imalison:go-mode-create-imenu-index ()
"Create and return an imenu index alist. Unlike the default
alist created by go-mode, this method creates an alist where
items follow a style that is consistent with other prog-modes."
(let* ((patterns '(("type" "^type *\\([^ \t\n\r\f]*\\)" 1)))
(type-index (imenu--generic-function patterns))
(func-index))
(save-excursion
(goto-char (point-min))
(while (re-search-forward go-func-meth-regexp (point-max) t)
(let* ((var (match-string-no-properties 1))
(func (match-string-no-properties 2))
(name (if var
(concat (substring var 0 -1) "." func)
func))
(beg (match-beginning 0))
(marker (copy-marker beg))
(item (cons name marker)))
(setq func-index (cons item func-index)))))
(nconc type-index (list (cons "func" func-index)))))
;; (defun imalison:go-workspace-path ()
;; (file-relative-name (projectile-project-root)
;; (concat (file-name-as-directory
;; (imalison:get-go-path)) "src")))
(defun imalison:go-workspace-path ()
(file-relative-name (projectile-project-root)
(concat (file-name-as-directory
(imalison:get-go-path)) "src")))
;; (defun imalison:install-current-go-project ()
;; (interactive)
;; (start-process
;; "go install" "go install log" "go" "install"
;; (concat (file-name-as-directory (imalison:go-workspace-path)) "...")))
(defun imalison:install-current-go-project ()
(interactive)
(start-process
"go install" "go install log" "go" "install"
(concat (file-name-as-directory (imalison:go-workspace-path)) "...")))
;; (defun imalison:get-go-path ()
;; (let ((environment-go-path (getenv "GOPATH")))
;; (if environment-go-path
;; (file-name-as-directory (car (s-split ":" environment-go-path)))
;; "~/go")))
(defun imalison:get-go-path ()
(let ((environment-go-path (getenv "GOPATH")))
(if environment-go-path
(file-name-as-directory (car (s-split ":" environment-go-path)))
"~/go")))
;; (defmacro imalison:get-go-src (&rest paths)
;; `(imalison:join-paths (imalison:get-go-path) "src" ,@paths))
(defmacro imalison:get-go-src (&rest paths)
`(imalison:join-paths (imalison:get-go-path) "src" ,@paths))
;; (imalison:let-advise-around imalison:advise-normal-go-command
;; (go-command "go"))
(imalison:let-advise-around imalison:advise-normal-go-command
(go-command "go"))
;; (defun imalison:go-mode-hook ()
;; (go-eldoc-setup)
;; (set (make-local-variable 'company-backends) '(company-go))
;; (make-local-variable 'projectile-globally-ignored-files)
;; (add-hook 'after-save-hook 'imalison:install-current-go-project nil
;; 'yes-do-local)
;; (add-to-list 'projectile-globally-ignored-files
;; "vendor"))
;; (use-package gotest
;; :demand t
;; :after emit
;; :bind (:map go-mode-map
;; ("C-c t" . imalison:gotest))
;; :preface
;; (progn
;; (emit-prefix-selector imalison:gotest
;; go-test-current-test
;; go-test-current-file)
(defun imalison:go-mode-hook ()
(go-eldoc-setup)
(set (make-local-variable 'company-backends) '(company-go))
(make-local-variable 'projectile-globally-ignored-files)
(add-hook 'after-save-hook 'imalison:install-current-go-project nil
'yes-do-local)
(add-to-list 'projectile-globally-ignored-files
"vendor")))
:config
(progn
(use-package gotest
:demand t
:bind (:map go-mode-map
("C-c t" . imalison:gotest))
:preface
(progn
(emit-prefix-selector imalison:gotest
go-test-current-test
go-test-current-file)
;; (defun imalison:add-expected-test-name-for-suite (suite-name test-name)
;; (if (> (length suite-name) 0)
;; (concat " -run Test" suite-name)
;; "")))
;; :config
;; (progn
;; (setq go-test-verbose t
;; go-test-additional-arguments-function
;; 'imalison:add-expected-test-name-for-suite)))
;; (use-package company-go
;; :config (setq company-go-show-annotation t))
(defun imalison:add-expected-test-name-for-suite (suite-name test-name)
(if (> (length suite-name) 0)
(concat " -run Test" suite-name)
"")))
:config
(progn
(setq go-test-verbose t
go-test-additional-arguments-function
'imalison:add-expected-test-name-for-suite)))
(use-package company-go
:config (setq company-go-show-annotation t))
;; (advice-add 'go-import-add :around 'imalison:advise-normal-go-command)
(advice-add 'go-import-add :around 'imalison:advise-normal-go-command)
;; (setq gofmt-command "goimports")
(setq gofmt-command "goimports")
;; (add-hook 'go-mode-hook 'imalison:go-mode-hook)
;; (add-hook 'before-save-hook 'gofmt-before-save t)))
(add-hook 'go-mode-hook 'imalison:go-mode-hook)
(add-hook 'before-save-hook 'gofmt-before-save t)))
#+END_SRC
**** Show diffs of testify output
#+BEGIN_SRC emacs-lisp
@@ -2439,25 +2462,13 @@ I don't use auto-complete at all, so I have set up a hook to automatically disab
**** elisp-slime-nav
#+BEGIN_SRC emacs-lisp
(use-package elisp-slime-nav
:after emit
:commands elisp-slime-nav-mode
:config
(progn
(defvar imalison:check-parens nil)
(defun imalison:maybe-check-parens ()
(if imalison:check-parens
(check-parens)))
(defun imalison:emacs-lisp-hook ()
(elisp-slime-nav-mode t)
(add-hook 'write-file-functions 'imalison:maybe-check-parens nil t))
(add-hook 'emacs-lisp-mode-hook 'imalison:emacs-lisp-hook)
(diminish 'elisp-slime-nav-mode)
(emit-prefix-selector imalison:elisp-slime-nav
elisp-slime-nav-find-elisp-thing-at-point
elisp-slime-nav-describe-elisp-thing-at-point))
(diminish 'elisp-slime-nav-mode)
:preface
(emit-prefix-selector imalison:elisp-slime-nav
elisp-slime-nav-find-elisp-thing-at-point
elisp-slime-nav-describe-elisp-thing-at-point)
:bind (:map elisp-slime-nav-mode-map
("M-." . imalison:elisp-slime-nav)))
#+END_SRC
@@ -2467,7 +2478,6 @@ it's supposed to do, but instead uses its own collection of functions to control
where the definition is popped up. This fixes that.
#+BEGIN_SRC emacs-lisp
(use-package find-func
:ensure nil
:preface
(progn
(defun imalison:find-function-display-buffer (function)
@@ -2487,6 +2497,14 @@ Macrostep is an indespensible tool for writing emacs lisp macros. It lets you se
:bind (:map lisp-mode-shared-map
("C-c e" . macrostep-expand)))
#+END_SRC
**** emr
#+BEGIN_SRC emacs-lisp
(use-package emr
:bind ("M-RET" . emr-show-refactor-menu)
:config
(progn
(add-hook 'prog-mode-hook 'emr-initialize)))
#+END_SRC
**** Editing configuration
Reduce indentation for some functions
#+BEGIN_SRC emacs-lisp
@@ -2500,7 +2518,6 @@ Reduce indentation for some functions
**** edebug
#+BEGIN_SRC emacs-lisp
(use-package edebug
:ensure nil
:defer t
:config
(progn (setq edebug-trace t)))
@@ -2539,7 +2556,6 @@ Reduce indentation for some functions
:commands (eros-mode)
:config
(progn
(add-hook 'emacs-lisp-mode-hook 'eros-mode)
(advice-add 'eval-defun :around 'eros-around-eval-defun)
(advice-add 'eval-last-sexp :around 'eros-around-eval-last-sexp))
:preface
@@ -2560,7 +2576,9 @@ Reduce indentation for some functions
(save-excursion
(end-of-defun)
(point))))
result))))
result))
(add-hook 'emacs-lisp-mode-hook 'eros-mode)))
#+END_SRC
**** Reevalute defvars when running eval-last-sexp
We noflet elisp--preceding-sexp to munge defvars into sexps only for
@@ -2578,10 +2596,27 @@ eval-last-sexp.
#+END_SRC
**** Init hook
#+BEGIN_SRC emacs-lisp
(defvar imalison:check-parens nil)
(defun imalison:maybe-check-parens ()
(if imalison:check-parens
(check-parens)))
(defun imalison:emacs-lisp-hook ()
(elisp-slime-nav-mode t)
(add-hook 'write-file-functions 'imalison:maybe-check-parens nil t))
(add-hook 'emacs-lisp-mode-hook 'imalison:emacs-lisp-hook)
#+END_SRC
**** Keybinds
#+BEGIN_SRC emacs-lisp
(emit-compose
imalison:copy-eval-last-sexp kill-new prin1-to-string eval-last-sexp)
(emit-prefix-selector imalison:eval-last-sexp
eval-region-or-last-sexp
imalison:copy-eval-last-sexp)
(define-key lisp-mode-shared-map (kbd "C-c C-c") 'eval-defun)
(define-key lisp-mode-shared-map (kbd "C-x C-e") 'imalison:eval-last-sexp)
(unbind-key "C-j" lisp-interaction-mode-map)
@@ -2682,6 +2717,11 @@ The following is taken from [[https://github.com/syl20bnr/spacemacs/blob/a650877
cider-preferred-build-tool "boot")
(add-hook 'clojure-mode-hook 'cider-mode)))
#+END_SRC
**** clj-refactor
#+BEGIN_SRC emacs-lisp
(use-package clj-refactor
:commands clj-refactor-mode)
#+END_SRC
*** scala
#+BEGIN_SRC emacs-lisp
(use-package scala-mode
@@ -2865,6 +2905,10 @@ The following is taken from [[https://github.com/syl20bnr/spacemacs/blob/a650877
:defer t
:mode ("\\.kt\\'"))
#+END_SRC
*** swift
#+begin_src emacs-lisp
(use-package swift-mode)
#+end_src
*** groovy
#+begin_src emacs-lisp
(use-package groovy-mode)
@@ -2881,7 +2925,7 @@ The following is taken from [[https://github.com/syl20bnr/spacemacs/blob/a650877
#+END_SRC
*** C/C++
#+BEGIN_SRC emacs-lisp
(use-package cc-mode :ensure nil)
(use-package cc-mode)
#+END_SRC
*** C--
#+BEGIN_SRC emacs-lisp
@@ -3086,10 +3130,9 @@ My org-mode configuration now lives in its own file org-config.org.
** magit
#+BEGIN_SRC emacs-lisp
(use-package magit
:after emit
:commands magit-status
:bind (("C-x g" . imalison:magit-status))
:config
:preface
(progn
(emit-let-around imalison:magit-status-traditional
magit-status
@@ -3100,7 +3143,9 @@ My org-mode configuration now lives in its own file org-config.org.
imalison:magit-status-traditional)
(defun imalison:after-magit-visit-file (&rest args)
(when (derived-mode-p 'org-mode)
(org-show-context 'magit-goto)))
(org-show-context 'magit-goto))))
:config
(progn
(when frame-mode
(setq magit-commit-show-diff t))
(unbind-key "C-j" magit-status-mode-map)
@@ -3111,6 +3156,7 @@ My org-mode configuration now lives in its own file org-config.org.
magit-display-buffer-function
'magit-display-buffer-same-window-except-diff-v1)
(magit-auto-revert-mode)
(add-to-list 'org-show-context-detail '(magit-goto . lineage))
(advice-add 'magit-diff-visit-file :after 'imalison:after-magit-visit-file)
(add-hook 'magit-popup-mode-hook 'imalison:disable-show-trailing-whitespace)))
@@ -3121,6 +3167,20 @@ My org-mode configuration now lives in its own file org-config.org.
:disabled t
:after magit)
#+end_src
** vc
#+begin_src emacs-lisp
(use-package vc
:config
(progn
(defun vc-find-revision-of-file (revision)
(interactive
(list (vc-read-revision
"Revision to visit: "
(list (imalison:join-paths (magit-toplevel) (car (magit-list-files)))))))
(let* ((file (completing-read "Select file to visit: " (magit-revision-files revision)))
(full-file (imalison:join-paths (magit-toplevel) file)))
(switch-to-buffer (vc-find-revision full-file revision))))))
#+end_src
** git-link
#+BEGIN_SRC emacs-lisp
(use-package git-link
@@ -3245,6 +3305,14 @@ modeline and with excessive http requests to github.
gist-unstar gist-list-starred gist-fork))
#+END_SRC
* Programming
** emr
emr (emacs refactor) provides support for refactoring in many programming languages
#+BEGIN_SRC emacs-lisp
(use-package emr
:bind (:map prog-mode-map
("M-RET" . emr-show-refactor-menu))
:config (emr-initialize))
#+END_SRC
** semantic
#+BEGIN_SRC emacs-lisp
(use-package semantic
@@ -3301,7 +3369,8 @@ modeline and with excessive http requests to github.
(file-name-directory
(file-truename (imalison:join-paths eat--install-path "eat.el"))))
(eat-compile-terminfo)
(setq eat-term-shell-integration-directory (imalison:join-paths eat--install-path "integration"))))
(setq eat-term-shell-integration-directory
(imalison:join-paths eat--install-path "integration"))))
#+end_src
** term
The main thing I do here is restore a bunch of keybindings that are eliminated
@@ -3310,7 +3379,6 @@ in term-mode. This makes term-mode 1000% more useful
#+BEGIN_SRC emacs-lisp
(use-package term
:demand t
:ensure nil
:preface
(progn
(defun imalison:avy-term (arg)
@@ -3375,7 +3443,6 @@ in term-mode. This makes term-mode 1000% more useful
#+BEGIN_SRC emacs-lisp
(use-package term-projectile
:bind ("C-c 7" . imalison:term-hydra-global/body)
:after emit
:commands
(term-projectile-backward
term-projectile-create-new
@@ -3547,7 +3614,6 @@ I don't use iedit directly, but it is used by [[*emr][emr]] and I need to disabl
** narrow-indirect
#+BEGIN_SRC emacs-lisp
(use-package narrow-indirect
:ensure nil
:init
(progn
(define-key ctl-x-4-map "nd" 'ni-narrow-to-defun-indirect-other-window)
@@ -3583,20 +3649,11 @@ I had to disable this mode because something that it does messes with coding set
(interactive)
(setq dtrt-indent-original-indent nil)
(dtrt-indent-adapt)))
:init (add-hook 'prog-mode-hook 'dtrt-indent-mode)
:config
(progn
(add-hook 'prog-mode-hook 'dtrt-indent-mode)
(setq dtrt-indent-active-mode-line-info " [⟼]")))
#+END_SRC
** indent-guide
#+BEGIN_SRC emacs-lisp
(use-package indent-guide
:disabled t
:config
(progn
(indent-guide-global-mode -1)
(setq indent-guide-delay 0.1)))
#+END_SRC
** rainbow-delimiters
#+BEGIN_SRC emacs-lisp
(use-package rainbow-delimiters
@@ -3626,9 +3683,7 @@ Disabled because it makes it hard to redo things
** recentf
#+BEGIN_SRC emacs-lisp
(use-package recentf
:ensure nil
:demand t
:after shut-up
:config
(progn
(setq recentf-max-saved-items 1000
@@ -3724,7 +3779,6 @@ Not really sure what this is
#+BEGIN_SRC emacs-lisp
(use-package epg
:after shut-up
:ensure nil
:config
(shut-up
(epa-file-enable)))
@@ -3747,6 +3801,113 @@ Not really sure what this is
:disabled t ;; fails to load eieio on startup
)
#+END_SRC
** mu4e
#+BEGIN_SRC emacs-lisp
;; (eval-when-compile
;; (require 's)
;; (defvar mu4e-elisp-directory
;; (s-trim (shell-command-to-string "mu4e_directory"))))
(use-package mu4e
:disabled t
:load-path mu4e-elisp-directory
:straight nil
:commands (mu4e mu4e-view-message-with-msgid mu4e-update-index email)
:bind ("C-c 0" . email)
:config
(progn
(defun email (&optional arg)
(interactive "P")
(if (string-equal (persp-name persp-curr) "email")
(progn (delete-other-windows) (mu4e))
(progn
(persp-switch "email")
(when (or (not (mu4e-running-p)) arg)
(delete-other-windows) (mu4e)))))
;; enable inline images
(setq mu4e-view-show-images t)
;; show images
(setq mu4e-show-images t)
;; Try to display html as text
(setq mu4e-view-prefer-html nil)
(setq mu4e-html2text-command "html2text -width 80 -nobs -utf8")
;; use imagemagick, if available
(when (fboundp 'imagemagick-register-types)
(imagemagick-register-types))
(setq mail-user-agent 'mu4e-user-agent)
(require 'org-mu4e)
(setq mu4e-compose-complete-only-after nil)
(setq mu4e-maildir "~/Mail")
(setq mu4e-drafts-folder "/[Gmail].Drafts")
(setq mu4e-sent-folder "/[Gmail].Sent Mail")
(setq mu4e-trash-folder "/[Gmail].Trash")
(setq mu4e-sent-messages-behavior 'delete)
(setq mu4e-headers-skip-duplicates t)
(setq mu4e-update-interval (* 60 20))
(setq message-kill-buffer-on-exit t)
(setq mail-user-agent 'mu4e-user-agent) ;; make mu4e the default mail client
;; don't save message to Sent Messages, Gmail/IMAP takes care of this
(setq mu4e-sent-messages-behavior 'delete)
;; allow for updating mail using 'U' in the main view:
(setq mu4e-get-mail-command "timeout 60 offlineimap")
(add-hook 'mu4e-compose-mode-hook
(defun my-do-compose-stuff () (flyspell-mode)))
(add-to-list 'mu4e-headers-actions '("view in browser" . mu4e-action-view-in-browser))
(add-to-list 'mu4e-view-actions '("view in browser" . mu4e-action-view-in-browser))
(defun mu4e-view (msg headersbuf)
"Display the message MSG in a new buffer, and keep in sync with HDRSBUF.
'In sync' here means that moving to the next/previous message in
the the message view affects HDRSBUF, as does marking etc.
As a side-effect, a message that is being viewed loses its 'unread'
marking if it still had that."
(let* ((embedded ;; is it as an embedded msg (ie. message/rfc822 att)?
(when (gethash (mu4e-message-field msg :path)
mu4e~path-parent-docid-map) t))
(buf
(if embedded
(mu4e~view-embedded-winbuf)
(get-buffer-create mu4e~view-buffer-name))))
;; note: mu4e~view-mark-as-read will pseudo-recursively call mu4e-view again
;; by triggering mu4e~view again as it marks the message as read
(with-current-buffer buf
(switch-to-buffer buf)
(setq mu4e~view-msg msg)
;;(or embedded (not (mu4e~view-mark-as-read msg)))
(when (or (mu4e~view-mark-as-read msg) t)
(let ((inhibit-read-only t))
(erase-buffer)
(mu4e~delete-all-overlays)
(insert (mu4e-view-message-text msg))
(goto-char (point-min))
(mu4e~fontify-cited)
(mu4e~fontify-signature)
(mu4e~view-make-urls-clickable)
(mu4e~view-show-images-maybe msg)
(setq
mu4e~view-buffer buf
mu4e~view-headers-buffer headersbuf)
(when embedded (local-set-key "q" 'kill-buffer-and-window))
(mu4e-view-mode))))))
(require 'smtpmail)
;; alternatively, for emacs-24 you can use:
(setq message-send-mail-function 'smtpmail-send-it
smtpmail-stream-type 'starttls
smtpmail-default-smtp-server "smtp.gmail.com"
smtpmail-smtp-server "smtp.gmail.com"
smtpmail-smtp-service 587)))
#+END_SRC
** gmail-message-mode
This is useful with server mode when editing gmail messages. I think that it is not currently working, or it may need to be manually enabled.
#+BEGIN_SRC emacs-lisp
@@ -3781,6 +3942,56 @@ This is useful with server mode when editing gmail messages. I think that it is
:notifier 'imalison:windows-toast-notify)
(setq alert-default-style 'windows-toast))))
#+END_SRC
** sauron
#+BEGIN_SRC emacs-lisp
(use-package sauron
:disabled t
:defer 5
:commands (sauron-start sauron-start-hidden)
:init
(progn
(when (eq system-type 'darwin)
(setq sauron-modules '(sauron-erc sauron-org sauron-notifications
sauron-twittering sauron-jabber sauron-identica))
(defun sauron-dbus-start ()
nil)
(makunbound 'dbus-path-emacs)))
:config
(progn
(sauron-start-hidden)
;; This should really check (featurep 'dbus) but for some reason
;; this is always true even if support is not there.
(setq sauron-prio-sauron-started 2)
(setq sauron-min-priority 3)
;; (setq sauron-dbus-cookie t) ;; linux only?
(setq sauron-separate-frame nil)
(setq sauron-nick-insensitivity 1)
(defun sauron:jabber-notify (origin priority message &optional properties)
(funcall notify-function "gtalk" message))
(defun sauron:erc-notify (origin priority message &optional properties)
(let ((event (plist-get properties :event)))
(funcall notify-function "IRC" message)))
(defun sauron:mu4e-notify (origin priority message &optional properties)
nil)
(defun sauron:dbus-notify (origin priority message &optional properties)
(funcall notify-function "GMail" message))
(defun sauron:dispatch-notify (origin priority message &optional properties)
(let ((handler (cond ((string= origin "erc") 'sauron:erc-notify)
((string= origin "jabber") 'sauron:jabber-notify)
((string= origin "mu4e") 'sauron:mu4e-notify)
((string= origin "dbus") 'sauron:dbus-notify)
(t (lambda (&rest r) nil)))))
(funcall handler origin priority message properties)))
;; Prefering alert.el for now ;; (add-hook 'sauron-event-added-functions 'sauron:dispatch-notify)
(sauron-start-hidden)
(add-hook 'sauron-event-added-functions 'sauron-alert-el-adapter)))
#+END_SRC
** screenshot
#+BEGIN_SRC emacs-lisp
(use-package screenshot
:commands screenshot)
#+END_SRC
** libmpdee
#+BEGIN_SRC emacs-lisp
(use-package libmpdee
@@ -3911,16 +4122,20 @@ This also adds syntax highlighting for gradle
** jsx-mode
#+BEGIN_SRC emacs-lisp
(use-package jsx-mode
:ensure nil
:defer t)
#+END_SRC
** css
#+BEGIN_SRC emacs-lisp
(use-package css-mode
:ensure nil
:mode (("\\.css\\'" . css-mode)
("\\.rasi\\'" . css-mode)))
#+END_SRC
** sgml-mode
#+BEGIN_SRC emacs-lisp
(use-package sgml-mode
;; :bind ("C-c b" . web-beautify-html) TODO: mode specific, change binding
:commands sgml-mode)
#+END_SRC
** evil
#+BEGIN_SRC emacs-lisp
(use-package evil
@@ -3949,9 +4164,6 @@ Ensure all themes that I use are installed:
(progn
(setq solarized-high-contrast-mode-line t)))
(defun elpaca-function (pkg)
(eval `(elpaca ,pkg)))
(defvar-setq packages-appearance
'(monokai-theme zenburn-theme base16-theme molokai-theme moe-theme
tango-2-theme gotham-theme sublime-themes rainbow-delimiters
@@ -3960,7 +4172,7 @@ Ensure all themes that I use are installed:
forest-blue-theme flatland-theme afternoon-theme
cyberpunk-theme dracula-theme))
(mapcar 'elpaca-function packages-appearance)
(mapcar 'straight-use-package packages-appearance)
(use-package doom-themes
:defer t)
@@ -4115,15 +4327,14 @@ load-theme hook (See the heading below).
(unless imalison:appearance-setup-done
(unless (member imalison:dark-theme custom-enabled-themes)
(load-theme imalison:dark-theme t))
(doom-modeline-mode +1)
(apply 'imalison:appearance args)
(message "running appearance")
(doom-modeline-mode +1)
(setq imalison:default-font-size-pt (face-attribute 'default :height))
(setq imalison:appearance-setup-done t)))
(add-hook 'elpaca-after-init-hook
(lambda () (add-hook 'after-make-frame-functions 'imalison:appearance-setup-hook)))
(add-hook 'elpaca-after-init-hook 'imalison:appearance-setup-hook)
(add-hook 'after-make-frame-functions 'imalison:appearance-setup-hook)
(add-hook 'after-init-hook 'imalison:appearance-setup-hook)
#+END_SRC
* Post Init Custom
#+BEGIN_SRC emacs-lisp

View File

@@ -1,28 +1,41 @@
;; -*- no-byte-compile: t -*-
(let ((bootstrap-file (concat user-emacs-directory "straight/bootstrap.el"))
(bootstrap-version 2))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(setq native-comp-deferred-compilation-deny-list '("magit"))
(setq native-comp-always-compile t)
(setq load-no-native t)
(setq no-native-compile t)
(setq warning-minimum-level :emergency)
(setq straight-disable-native-compile t)
;; This is a workaround for an issue in emacs28 with symlinks. See https://github.com/radian-software/straight.el/issues/701
(defun my-patch-package-find-file-visit-truename (oldfun &rest r)
(let ((find-file-visit-truename nil))
(apply oldfun r)))
(advice-add #'straight--build-autoloads :around
#'my-patch-package-find-file-visit-truename)
(setq package-enable-at-startup nil
straight-use-package-by-default t
straight-vc-git-default-protocol 'ssh)
(straight-use-package 'use-package)
(require 'use-package)
(setq use-package-enable-imenu-support t)
(setq use-package-always-ensure t)
(setq use-package-ensure-function 'straight-use-package-ensure-function)
(defvar imalison:do-benchmark nil)
(defun emacs-directory-filepath (filename)
(concat (file-name-directory load-file-name) filename))
(load (emacs-directory-filepath "elpaca.el"))
(setq use-package-always-ensure t)
(let ((bench-file (concat (file-name-directory user-init-file) "benchmark.el")))
(when (file-exists-p bench-file) (load bench-file)))
@@ -42,9 +55,6 @@
(setq mac-option-modifier 'meta)
(setq mac-command-modifier 'super))
(use-package transient
:demand t)
;; See https://github.com/magit/magit/discussions/4997 . Without this magit is broken.
(use-package magit
:demand t)
@@ -52,56 +62,29 @@
;; This seems to fix issues with helm not explicitly declaring its dependency on async
(use-package async :demand t)
(use-package s :demand t)
;; Without this, org can behave very strangely
(use-package org
:ensure
:straight
(org :type git :host github :repo "colonelpanic8/org-mode" :local-repo "org"
:branch "my-main"
:depth full
:build
:wait t
:depth full :pre-build (straight-recipes-org-elpa--build) :build
(:not autoloads) :files
(:defaults "lisp/*.el" ("etc/styles/" "etc/styles/*"))))
(:defaults "lisp/*.el" ("etc/styles/" "etc/styles/*")))
:defer t)
(use-package dash :demand t)
(use-package emit
:ensure (emit :type git :host github :repo "colonelpanic8/emit")
:demand t
:config
(progn
(emit-prefix-selector imalison:mark-ring mark-ring)
(emit-prefix-selector imalison:shell-command-on-region
imalison:copy-shell-command-on-region
imalison:shell-command-on-region-replace
imalison:jq-replace)
(defun imalison:jq-replace (start end)
(interactive (region-if-active-otherwise-buffer))
(imalison:shell-command-on-region-replace start end "jq ."))
(emit-compose
imalison:copy-eval-last-sexp kill-new prin1-to-string eval-last-sexp)
(emit-prefix-selector imalison:eval-last-sexp
eval-region-or-last-sexp
imalison:copy-eval-last-sexp)))
(use-package s
:ensure (:inherit t :wait t)
:config
(when (or (equal (s-trim (shell-command-to-string "whoami")) "kat")
imalison:kat-mode)
(let ((debug-on-error t))
(org-babel-load-file
(concat (file-name-directory load-file-name) "kat-mode.org")))))
(let ((debug-on-error t))
(org-babel-load-file
(concat (file-name-directory load-file-name) "README.org")))
;; (when imalison:do-benchmark (benchmark-init/deactivate))
(when (or (equal (s-trim (shell-command-to-string "whoami")) "kat")
imalison:kat-mode)
(let ((debug-on-error t))
(org-babel-load-file
(concat (file-name-directory load-file-name) "kat-mode.org"))))
(when imalison:do-benchmark (benchmark-init/deactivate))
;; Local Variables:
;; flycheck-disabled-checkers: (emacs-lisp-checkdoc)

View File

@@ -803,7 +803,7 @@ alphanumeric characters only."
** Use org-tempo to allow inserting templates using e.g. <s
#+begin_src emacs-lisp
(use-package org-tempo
:ensure nil
:straight nil
:after org)
#+end_src
* Packages
@@ -938,6 +938,9 @@ alphanumeric characters only."
#+end_src
***** ui
#+begin_src emacs-lisp
(use-package emacs-http-server
:demand t)
(use-package org-roam-ui
:after org-roam
:custom

View File

@@ -24,7 +24,6 @@ pom.xml
TAGS
# Vim
*.sw*
*.tmp*
# JavaScript

View File

@@ -1,20 +0,0 @@
binding "gtk-emacs-text-entry"
{
bind "<alt>BackSpace" { "delete-from-cursor" (word-ends, -1) }
}
gtk-theme-name="Paper"
gtk-icon-theme-name="Paper"
gtk-font-name="Roboto 11"
gtk-cursor-theme-name="Paper"
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle="hintfull"

View File

@@ -2,18 +2,25 @@
import argparse
import os
import sys
import logging
logger = logging.getLogger(__name__)
class BrightnessManager(object):
@classmethod
def find_brightness(cls):
items_in_backlight_directory = os.listdir("/sys/class/backlight")
if len(items_in_backlight_directory) > 1:
logger.warning(f"More than one entry in the backlight directory {items_in_backlight_directory}")
return cls.from_path(
os.path.join("/sys/class/backlight", os.listdir("/sys/class/backlight")[0])
os.path.join("/sys/class/backlight", items_in_backlight_directory[0])
)
@classmethod
def from_path(cls, path):
logger.warning(f"Using path {path}")
return cls(
set_brightness_filepath=os.path.join(path, "brightness"),
actual_brightness_filepath=os.path.join(path, "actual_brightness"),
@@ -21,7 +28,7 @@ class BrightnessManager(object):
)
def __init__(
self, set_brightness_filepath, max_brightness_filepath, actual_brightness_filepath
self, set_brightness_filepath, max_brightness_filepath, actual_brightness_filepath
):
self.set_brightness_filepath = set_brightness_filepath
self.max_brightness_filepath = max_brightness_filepath
@@ -71,6 +78,11 @@ def build_parser():
if __name__ == '__main__':
args = build_parser().parse_args()
BrightnessManager.find_brightness().increment_by_proportion(float(args.change) / 100)
symlink_path = os.readlink("/home/imalison/.config/brightness_manager/symlink")
if os.path.exists(symlink_path):
manager = BrightnessManager.from_path(symlink_path)
else:
manager = BrightnessManager.find_brightness()
manager.increment_by_proportion(float(args.change) / 100)
if args.do_print:
print(int(IntelBrightnessManager.current_proportion * 100))
print(int(manager.current_proportion * 100))

7
dotfiles/lib/functions/ns Executable file
View File

@@ -0,0 +1,7 @@
#!/usr/bin/env sh
function nr {
sk --ansi -i -c 'nix-search "{}"' | get_cols 1
}
nr "$@"

355
nix-darwin/flake.lock generated Normal file
View File

@@ -0,0 +1,355 @@
{
"nodes": {
"agenix": {
"inputs": {
"darwin": "darwin",
"home-manager": "home-manager",
"nixpkgs": [
"railbird-secrets",
"nixpkgs"
],
"systems": "systems_2"
},
"locked": {
"lastModified": 1707830867,
"narHash": "sha256-PAdwm5QqdlwIqGrfzzvzZubM+FXtilekQ/FA0cI49/o=",
"owner": "ryantm",
"repo": "agenix",
"rev": "8cb01a0e717311680e0cbca06a76cbceba6f3ed6",
"type": "github"
},
"original": {
"owner": "ryantm",
"repo": "agenix",
"type": "github"
}
},
"brew-src": {
"flake": false,
"locked": {
"lastModified": 1718075954,
"narHash": "sha256-4TeUhv5VLEufP+Z/NkKnUk4NUaf59cMsj6NvsVbE+8w=",
"owner": "Homebrew",
"repo": "brew",
"rev": "3f08c75e7b950d4340dab462f3e7f77e8093fa2b",
"type": "github"
},
"original": {
"owner": "Homebrew",
"ref": "4.3.5",
"repo": "brew",
"type": "github"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
"railbird-secrets",
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1700795494,
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
"type": "github"
},
"original": {
"owner": "lnl7",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1709126324,
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"railbird-secrets",
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1703113217,
"narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"homebrew-cask": {
"flake": false,
"locked": {
"lastModified": 1722820732,
"narHash": "sha256-Y8TBYxYeUVvgYFylqBUtWxFuOZVstXW+yylI2wz2eQ0=",
"owner": "homebrew",
"repo": "homebrew-cask",
"rev": "9e3db5dd3130f9bf388409f39ce1706ca7b59efe",
"type": "github"
},
"original": {
"owner": "homebrew",
"repo": "homebrew-cask",
"type": "github"
}
},
"homebrew-core": {
"flake": false,
"locked": {
"lastModified": 1722823168,
"narHash": "sha256-3sKYVUrhuS1fZJkrYAtB+O67dvaKyTvXXI9UqjAgI8A=",
"owner": "homebrew",
"repo": "homebrew-core",
"rev": "dd20841f7fe7375738708bc2f458152906a71f1d",
"type": "github"
},
"original": {
"owner": "homebrew",
"repo": "homebrew-core",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1722609272,
"narHash": "sha256-Kkb+ULEHVmk07AX+OhwyofFxBDpw+2WvsXguUS2m6e4=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "f7142b8024d6b70c66fd646e1d099d3aa5bfec49",
"type": "github"
},
"original": {
"owner": "LnL7",
"repo": "nix-darwin",
"type": "github"
}
},
"nix-darwin_2": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1716329735,
"narHash": "sha256-ap51w+VqG21vuzyQ04WrhI2YbWHd3UGz0e7dc/QQmoA=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "eac4f25028c1975a939c8f8fba95c12f8a25e01c",
"type": "github"
},
"original": {
"owner": "LnL7",
"repo": "nix-darwin",
"type": "github"
}
},
"nix-homebrew": {
"inputs": {
"brew-src": "brew-src",
"flake-utils": "flake-utils",
"nix-darwin": "nix-darwin_2",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1719720211,
"narHash": "sha256-FNK5ZxmNC+V/wOuioc5HqkUy0ld4eW3NqcsZHLYg9HI=",
"owner": "zhaofengli-wip",
"repo": "nix-homebrew",
"rev": "0afc51fd86693c73e4b60be8ed8c782c4c09b4cc",
"type": "github"
},
"original": {
"owner": "zhaofengli-wip",
"repo": "nix-homebrew",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1687274257,
"narHash": "sha256-TutzPriQcZ8FghDhEolnHcYU2oHIG5XWF+/SUBNnAOE=",
"path": "/nix/store/22qgs3skscd9bmrxv9xv4q5d4wwm5ppx-source",
"rev": "2c9ecd1f0400076a4d6b2193ad468ff0a7e7fdc5",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1716330097,
"narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5710852ba686cc1fd0d3b8e22b3117d43ba374c2",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1722640603,
"narHash": "sha256-TcXjLVNd3VeH1qKPH335Tc4RbFDbZQX+d7rqnDUoRaY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "81610abc161d4021b29199aa464d6a1a521e0cc9",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1709703039,
"narHash": "sha256-6hqgQ8OK6gsMu1VtcGKBxKQInRLHtzulDo9Z5jxHEFY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9df3e30ce24fd28c7b3e2de0d986769db5d6225d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"railbird-secrets": {
"inputs": {
"agenix": "agenix",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1722639965,
"narHash": "sha256-ZRe5Z5s/UNaXI2piyncQ3YrFl5q3GryZAfFTyeJ/vhM=",
"ref": "refs/heads/master",
"rev": "9a92b83c3ad376620db3556c33e51a4300c5badd",
"revCount": 73,
"type": "git",
"url": "ssh://gitea@dev.railbird.ai:1123/railbird/secrets-flake.git"
},
"original": {
"type": "git",
"url": "ssh://gitea@dev.railbird.ai:1123/railbird/secrets-flake.git"
}
},
"root": {
"inputs": {
"homebrew-cask": "homebrew-cask",
"homebrew-core": "homebrew-core",
"nix-darwin": "nix-darwin",
"nix-homebrew": "nix-homebrew",
"nixpkgs": "nixpkgs_3",
"railbird-secrets": "railbird-secrets"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

78
nix-darwin/flake.nix Normal file
View File

@@ -0,0 +1,78 @@
{
description = "Example Darwin system flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nix-darwin.url = "github:LnL7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
railbird-secrets = {
url = "git+ssh://gitea@dev.railbird.ai:1123/railbird/secrets-flake.git";
};
nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew";
# Optional: Declarative tap management
homebrew-core = {
url = "github:homebrew/homebrew-core";
flake = false;
};
homebrew-cask = {
url = "github:homebrew/homebrew-cask";
flake = false;
};
};
outputs = inputs@{ self, nix-darwin, nixpkgs, ... }:
let
configuration = { pkgs, config, ... }: {
environment.systemPackages = with pkgs; [
emacs
slack
gitFull
ripgrep
yarn
nodePackages.prettier
vim
just
];
nixpkgs.config.allowUnfree = true;
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
launchd.user.envVariables.PATH = config.environment.systemPath;
programs.direnv.enable = true;
# Necessary for using flakes on this system.
nix.settings.experimental-features = "nix-command flakes";
# Create /etc/zshrc that loads the nix-darwin environment.
programs.zsh.enable = true;
# Set Git commit hash for darwin-version.
system.configurationRevision = self.rev or self.dirtyRev or null;
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
# The platform the configuration will be used on.
nixpkgs.hostPlatform = "aarch64-darwin";
users.users.kat.openssh.authorizedKeys.keys = inputs.railbird-secrets.keys.kanivanKeys;
};
in
{
# Build darwin flake using:
# $ darwin-rebuild build --flake .#Kats-Mac-mini
darwinConfigurations."Kats-Mac-mini" = nix-darwin.lib.darwinSystem {
modules = [
configuration
];
};
# Expose the package set, including overlays, for convenience.
darwinPackages = self.darwinConfigurations."Kats-Mac-mini".pkgs;
};
}

2
nix-darwin/justfile Normal file
View File

@@ -0,0 +1,2 @@
switch:
nix run nix-darwin -- switch --flake .#

View File

@@ -36,7 +36,6 @@ makeEnable config "modules.base" true {
};
# Audio
sound.enable = true;
hardware.pulseaudio.enable = true;
# Bluetooth

View File

@@ -21,6 +21,7 @@
./internet-computer.nix
./kat.nix
./keybase.nix
./kubernetes.nix
./nix.nix
./nixified.ai.nix
./options.nix

View File

@@ -34,7 +34,7 @@ makeEnable config "modules.desktop" true {
environment.systemPackages = with pkgs; [
# Appearance
gnome.adwaita-icon-theme
adwaita-icon-theme
hicolor-icon-theme
libsForQt5.breeze-gtk
# materia-theme
@@ -60,8 +60,8 @@ makeEnable config "modules.desktop" true {
feh
firefox
gnome.cheese
gnome.gpaste
cheese
gpaste
kleopatra
libnotify
libreoffice
@@ -82,7 +82,7 @@ makeEnable config "modules.desktop" true {
simplescreenrecorder
skippy-xd
synergy
transmission-gtk
transmission_3-gtk
vlc
volnoti
xfce.thunar

View File

@@ -34,6 +34,10 @@ with lib;
eval "$(register-python-argcomplete prod-prb)"
eval "$(register-python-argcomplete railbird)"
[ -n "$EAT_SHELL_INTEGRATION_DIR" ] && source "$EAT_SHELL_INTEGRATION_DIR/zsh"
# Enable bracketed paste
autoload -Uz bracketed-paste-magic
zle -N bracketed-paste bracketed-paste-magic
'';
};

View File

@@ -5,6 +5,7 @@
environment.systemPackages = with pkgs; [
automake
bazel
bento4
bind
binutils
cachix
@@ -16,13 +17,12 @@
emacs
fd
ffmpeg
bento4
file
gawk
gcc
gdb
git-lfs
git-fame
git-lfs
git-sync
gitFull
glxinfo
@@ -42,6 +42,7 @@
neofetch
neovim
nix-index
nix-search-cli
pass
patchelf
pciutils
@@ -51,8 +52,9 @@
rcm
ripgrep
silver-searcher
sysz
skim
sshfs
sysz
tmux
tzupdate
udiskie

215
nixos/flake.lock generated
View File

@@ -8,11 +8,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1715290355,
"narHash": "sha256-2T7CHTqBXJJ3ZC6R/4TXTcKoXWHcvubKNj9SfomURnw=",
"lastModified": 1723293904,
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
"owner": "ryantm",
"repo": "agenix",
"rev": "8d37c5bdeade12b6479c85acd133063ab53187a0",
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
"type": "github"
},
"original": {
@@ -93,11 +93,11 @@
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
@@ -162,11 +162,11 @@
]
},
"locked": {
"lastModified": 1712014858,
"narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
"lastModified": 1719994518,
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
"type": "github"
},
"original": {
@@ -238,21 +238,6 @@
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_2"
},
@@ -270,7 +255,7 @@
"type": "github"
}
},
"flake-utils_4": {
"flake-utils_3": {
"inputs": {
"systems": "systems_3"
},
@@ -288,7 +273,7 @@
"type": "github"
}
},
"flake-utils_5": {
"flake-utils_4": {
"inputs": {
"systems": "systems_5"
},
@@ -306,7 +291,7 @@
"type": "github"
}
},
"flake-utils_6": {
"flake-utils_5": {
"inputs": {
"systems": "systems_7"
},
@@ -324,7 +309,7 @@
"type": "github"
}
},
"flake-utils_7": {
"flake-utils_6": {
"inputs": {
"systems": "systems_8"
},
@@ -390,6 +375,37 @@
"url": "https://hackage.haskell.org/package/fourmolu-0.12.0.0/fourmolu-0.12.0.0.tar.gz"
}
},
"git-hooks-nix": {
"inputs": {
"flake-compat": [
"nix"
],
"gitignore": [
"nix"
],
"nixpkgs": [
"nix",
"nixpkgs"
],
"nixpkgs-stable": [
"nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1721042469,
"narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "f451c19376071a90d8c58ab1a953c6e9840527fd",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"git-ignore-nix": {
"inputs": {
"nixpkgs": [
@@ -566,7 +582,7 @@
"haskell-language-server": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_4",
"flake-utils": "flake-utils_3",
"fourmolu-011": "fourmolu-011",
"fourmolu-012": "fourmolu-012",
"gitignore": "gitignore",
@@ -601,7 +617,7 @@
"haskell-language-server_2": {
"inputs": {
"flake-compat": "flake-compat_4",
"flake-utils": "flake-utils_6",
"flake-utils": "flake-utils_5",
"fourmolu-011": "fourmolu-011_2",
"fourmolu-012": "fourmolu-012_2",
"gitignore": "gitignore_2",
@@ -765,11 +781,11 @@
]
},
"locked": {
"lastModified": 1715380449,
"narHash": "sha256-716+f9Rj3wjSyD1xitCv2FcYbgPz1WIVDj+ZBclH99Y=",
"lastModified": 1723399884,
"narHash": "sha256-97wn0ihhGqfMb8WcUgzzkM/TuAxce2Gd20A8oiruju4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "d7682620185f213df384c363288093b486b2883f",
"rev": "086f619dd991a4d355c07837448244029fc2d9ab",
"type": "github"
},
"original": {
@@ -846,15 +862,16 @@
"libgit2": {
"flake": false,
"locked": {
"lastModified": 1697646580,
"narHash": "sha256-oX4Z3S9WtJlwvj0uH9HlYcWv+x1hqp8mhXl7HsLu2f0=",
"lastModified": 1715853528,
"narHash": "sha256-J2rCxTecyLbbDdsyBWn9w7r3pbKRMkI9E7RvRgAqBdY=",
"owner": "libgit2",
"repo": "libgit2",
"rev": "45fd9ed7ae1a9b74b957ef4f337bc3c8b3df01b5",
"rev": "36f7e21ad757a3dacc58cf7944329da6bc1d6e96",
"type": "github"
},
"original": {
"owner": "libgit2",
"ref": "v1.8.1",
"repo": "libgit2",
"type": "github"
}
@@ -935,17 +952,18 @@
"inputs": {
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"git-hooks-nix": "git-hooks-nix",
"libgit2": "libgit2",
"nixpkgs": "nixpkgs_2",
"nixpkgs-regression": "nixpkgs-regression",
"pre-commit-hooks": "pre-commit-hooks"
"nixpkgs-23-11": "nixpkgs-23-11",
"nixpkgs-regression": "nixpkgs-regression"
},
"locked": {
"lastModified": 1715361977,
"narHash": "sha256-j/PLYYGs+Gjge4JGYxMjOhWQEp+GB4Fdicetbpmp6n0=",
"lastModified": 1723343056,
"narHash": "sha256-ixvBNplVIqUqvshVi5azgPiGIFXlXDmahDcoP/guuTE=",
"owner": "NixOS",
"repo": "nix",
"rev": "87ab3c0ea4e6f85e7b902050365bb75cf2836fbb",
"rev": "18485d2d53622c6ec7beab80c77efbd49ed682e2",
"type": "github"
},
"original": {
@@ -977,15 +995,16 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1707802617,
"narHash": "sha256-29HCocTg8aPr6gaY6VHNxJQpZQJ6GAqjFsKPqNFj5qo=",
"lastModified": 1719989395,
"narHash": "sha256-AppMOCCJ6LYteg4mvlf0xQV+cc9a4iehRWxTOHewouA=",
"owner": "colonelpanic8",
"repo": "nixos-hardware",
"rev": "cb96be8513e2959110c7f90ae5d61ca5aff35862",
"rev": "a91e03ef13614285d5d476fbf2f096ce65de0a71",
"type": "github"
},
"original": {
"owner": "colonelpanic8",
"ref": "add-g834jzr",
"repo": "nixos-hardware",
"type": "github"
}
@@ -993,15 +1012,15 @@
"nixos-wsl": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_3",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1715237610,
"narHash": "sha256-/ZeWQ4mL3DfHsbTZYc80qMrL4vBfENP0RiGv2KrCrEo=",
"lastModified": 1723124175,
"narHash": "sha256-w+rlZdbj4kn70uPJl4WrPDFoGEy0A9oJqw684nvZ9dY=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "61fe33f4194bbbc48c090a2e79f4eb61b47c9b75",
"rev": "be1a6b2e4ddc34b9b6a297e7df2f2a2ecee24690",
"type": "github"
},
"original": {
@@ -1026,6 +1045,22 @@
"type": "github"
}
},
"nixpkgs-23-11": {
"locked": {
"lastModified": 1717159533,
"narHash": "sha256-oamiKNfr2MS6yH64rUn99mIZjc45nGJlj9eGth/3Xuw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446",
"type": "github"
}
},
"nixpkgs-regression": {
"locked": {
"lastModified": 1643052045,
@@ -1044,11 +1079,11 @@
},
"nixpkgs-regression_2": {
"locked": {
"lastModified": 1715484633,
"narHash": "sha256-Es5etYksi9VsAZSBKZe4rdyi9L000MEx9lFb3TF6Eo8=",
"lastModified": 1723405223,
"narHash": "sha256-VSHY8GQ64AseobyeoVkJl+ZDaWPGzKs+CG6RfDM159o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "25e9a6d07dd142bafd94603208a59c107e8f2905",
"rev": "938253e0f8d5c98c4515a10cc388239cc1431db8",
"type": "github"
},
"original": {
@@ -1059,16 +1094,16 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1709083642,
"narHash": "sha256-7kkJQd4rZ+vFrzWu8sTRtta5D1kBG0LSRYAfhtmMlSo=",
"lastModified": 1721548954,
"narHash": "sha256-7cCC8+Tdq1+3OPyc3+gVo9dzUNkNIQfwSDJ2HSi2u3o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b550fe4b4776908ac2a861124307045f8e717c8e",
"rev": "63d37ccd2d178d54e7fb691d7ec76000740ea24a",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-23.11",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
@@ -1091,27 +1126,27 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1714782413,
"narHash": "sha256-tbg0MEuKaPcUrnmGCu4xiY5F+7LW2+ECPKVAJd2HLwM=",
"lastModified": 1722087241,
"narHash": "sha256-2ShmEaFi0kJVOEEu5gmlykN5dwjWYWYUJmlRTvZQRpU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "651b4702e27a388f0f18e1b970534162dec09aff",
"rev": "8c50662509100d53229d4be607f1a3a31157fa12",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1715266358,
"narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=",
"lastModified": 1723175592,
"narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f1010e0469db743d14519a1efd37e23f8513d714",
"rev": "5e0ca22929f3342b19569b21b2f3462f053e497b",
"type": "github"
},
"original": {
@@ -1258,50 +1293,18 @@
"url": "https://hackage.haskell.org/package/ormolu-0.7.1.0/ormolu-0.7.1.0.tar.gz"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": [
"nix"
],
"flake-utils": "flake-utils_2",
"gitignore": [
"nix"
],
"nixpkgs": [
"nix",
"nixpkgs"
],
"nixpkgs-stable": [
"nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1712897695,
"narHash": "sha256-nMirxrGteNAl9sWiOhoN5tIHyjBbVi5e2tgZUgZlK3Y=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "40e6053ecb65fcbf12863338a6dcefb3f55f1bf8",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"railbird-secrets": {
"inputs": {
"agenix": "agenix_2",
"flake-utils": "flake-utils_5",
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_7"
},
"locked": {
"lastModified": 1718069159,
"narHash": "sha256-L66mczMl8BPLwZrTVKrXMZRyxHiPvA3CHywbsQyFHW0=",
"lastModified": 1722639965,
"narHash": "sha256-ZRe5Z5s/UNaXI2piyncQ3YrFl5q3GryZAfFTyeJ/vhM=",
"ref": "refs/heads/master",
"rev": "609f1d32fd1112068d97df0f7d4de82cec878002",
"revCount": 52,
"rev": "9a92b83c3ad376620db3556c33e51a4300c5badd",
"revCount": 73,
"type": "git",
"url": "ssh://gitea@dev.railbird.ai:1123/railbird/secrets-flake.git"
},
@@ -1590,11 +1593,11 @@
},
"unstable": {
"locked": {
"lastModified": 1715266358,
"narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=",
"lastModified": 1723175592,
"narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f1010e0469db743d14519a1efd37e23f8513d714",
"rev": "5e0ca22929f3342b19569b21b2f3462f053e497b",
"type": "github"
},
"original": {
@@ -1606,7 +1609,7 @@
},
"vscode-server": {
"inputs": {
"flake-utils": "flake-utils_7",
"flake-utils": "flake-utils_6",
"nixpkgs": "nixpkgs_9"
},
"locked": {
@@ -1637,11 +1640,11 @@
"unstable": "unstable"
},
"locked": {
"lastModified": 1714229485,
"narHash": "sha256-AOy87dJL0T9wSe1kM0tTzFlV++JwmoGW4BfBXzIUbsI=",
"lastModified": 1722277235,
"narHash": "sha256-fuEgR51OPzwff+ygFhBqJm51oA17rR0KtPfuDLv0Fp0=",
"owner": "xmonad",
"repo": "xmonad",
"rev": "cde1a25bca9b7aeeb24af73588221f5f54ae770b",
"rev": "a58ccac7ba46414915de6c7f2b4da08b37784016",
"type": "github"
},
"original": {

View File

@@ -3,7 +3,7 @@
railbird-secrets = {
url = "git+ssh://gitea@dev.railbird.ai:1123/railbird/secrets-flake.git";
};
nixos-hardware = { url = "github:colonelpanic8/nixos-hardware"; };
nixos-hardware = { url = "github:colonelpanic8/nixos-hardware/add-g834jzr"; };
nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-unstable";

View File

@@ -13,6 +13,7 @@ makeEnable config "modules.gitea" false {
SSH_PORT = 1123;
HTTP_PORT = 3001;
ROOT_URL = "https://dev.railbird.ai";
DISABLE_REGISTRATION = true;
};
settings.actions = {
ENABLED = true;

View File

@@ -1,4 +1,4 @@
{ pkgs, config, specialArgs, ... }:
{ pkgs, ... }:
{
xsession = {
enable = true;

View File

@@ -55,4 +55,7 @@ rec {
benKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAJ6lD0c+frh2vzQjvsrsmJpwM1ovaY59m5NNPml5G+E benjamin.j.corner@gmail.com"
];
interviewKeys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDr3Rim92K0aNWh2wCZjZMj927H6NZMvw+Jg5giVEklv/eeXlJn81xm9kFsqWOmN0IyS4X+2V2G/43t4C+REmzMKjkzTu9u6SJi+pC3jdJRm80sJCz2LBdRjPaY3CEubiUdxWvjisE8wUI1YuxxdegJpcemvhZXBfDU+DOqNEtF9KiPhXFMOoGU18k5AqFatdmE4z0H158cc6rCxdEiM8s+H6AJDA+xZSn9BPSx2I/ySRapoN0qJDloV19795ggnegBOjNuGejnKI0RZ8CyTcf1945Yi8/O/i/IChRlxiArjgAbC2DItkQig8YyQYz6WlKE9bwruMqe+8mgBAfuQXH8yTADwD1156VCRGoYAorAz4CLm73oGKtx4pa6WFsklWAIK1UEAhuLT6FKaJ/mmfKxcqdHxj+29FNo3d2Pam/ecFd0aERi5TExH5GKZr+LI7yKQmgk6laiR0n1wZuDwlNN7+69GH+ScxRngGCkc3RdTToqXzEaN3B6EyiAN/sAUgs= finn@LAPTOP-JI7BSSRJ"
];
}

19
nixos/kubernetes.nix Normal file
View File

@@ -0,0 +1,19 @@
{ pkgs, config, makeEnable, ... }:
makeEnable config "modules.railbirdKubernetesNode" true {
environment.etc."kubernetes/ca.crt" = {
text = builtins.readFile (pkgs.writeText "ca.crt" (builtins.fromBase64 "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUVMVENDQXBXZ0F3SUJBZ0lSQUxOeE9UN0o3Ti9lSzZlZHA5TGJLQUl3RFFZSktvWklodmNOQVFFTEJRQXcKTHpFdE1Dc0dBMVVFQXhNa00ySTJOMk0yTnpndE56STVNeTAwWVRJekxUZzNaV0l0WTJOaU1UWmpZV0ZrTXpGbQpNQ0FYRFRJek1USXlPVEU1TlRRME1sb1lEekl3TlRNeE1qSXhNakExTkRReVdqQXZNUzB3S3dZRFZRUURFeVF6CllqWTNZelkzT0MwM01qa3pMVFJoTWpNdE9EZGxZaTFqWTJJeE5tTmhZV1F6TVdZd2dnR2lNQTBHQ1NxR1NJYjMKRFFFQkFRVUFBNElCandBd2dnR0tBb0lCZ1FDVVlVdVRycERid1VTMkIzU1lVb2E3TEk1bWk4Tk5yMGxEZTF3NAozeVBwVm51NnVidm5UTm0yai92ODhIWXdFamxwcEVnNEhqaFA3WUVKOGdzR2RnVUNwSWFQV1RwaWZWbUE3RTRvCjJEYkpEaWVQa2tVR2tOTDB3aENDbE9PY08waHl4ZGs5UG9sNXdSemNpMGw2elNhbEU2REI0ckpybUI1UHBsL0EKdDJLQVZWcXB3YnlubWJpanI0eVpoN0JwN0xmYUlyRnRobHYyWlBFakxmUEx6N1l0aEJ3OS9pVXQ5NG1MTXlXWgpCcHlnQTV5L0NvY1FRbm5GTW5VMW8wZVVkMzdZTDd6RXJmSXh4L0FtTDEwU3EwcWRGWGlZT0pKcXViVVJiZFM4CkRaNmR5SGRYK1VseFBsczJSbHg5bkRhaU5HRkpkenFISnpEZE9sek4za2tkRFFvTzh4VWRIOWVrRlU3ck93a1AKNU5wdWJTd3JkMUZPR0hoK0VrbnVnbkVRRDRPaXAvWVE3SVVqM0FmbTVBZzJsYTlrNFdKUmdqQUNia1EyK2s5SQpzRm1QbW1NVkhuOW5lcENNaVlRTWpYN0FwWncwaXNEUGVWSzVFdVFlSW1ndTd1Tm9WOFI1VndHMFhvQkNYejRTClVxWXYxMXVFc01xRnUwN1p3bHpuc3hubTB1RUNBd0VBQWFOQ01FQXdEZ1lEVlIwUEFRSC9CQVFEQWdJRU1BOEcKQTFVZEV3RUIvd1FGTUFNQkFmOHdIUVlEVlIwT0JCWUVGSTczR3pubWVFQ0pPZHhKQUV6bWpoWWdHVkt0TUEwRwpDU3FHU0liM0RRRUJDd1VBQTRJQmdRQW0xOXpsbTNXVmVQZmxBNlpoL0Z4dkU4TWlyckpGNmptSnpSckJDRU01CkR3a1NtWTNkdk9OcUNZZWVOYjQreFdYV1E4ZVZLVmxQZGtvVzNWN0g1eG5KNjNkWFJOTjJsUTNKcFNURzMreVAKT21wNlhHWTltbWF0ZEh3eVY3TjRoMTBhS0VXQXVSaHkxNDhzZEpaTFlqMExiUjQycENWWWhFUDREM1FqN0tqTgpQSmUrY1I4TlNwaVltREg1eTg4SnF1Ynp0ajVOVmNEai9pTjloLzcvR2FqYlU2bENnTi9TeFpnaTljTkdqeFNiCkpIRkhFMk1wM3o5c2pzaWVUWE1wbExxSzA0NVRRMklCcW5KeU1kS2t2U05rUlVDYnoyeVhkaUlPS3R2VTRseTAKaDg4NHo5UDVKUTlieGUrNmN3WUM0a3kzRzVXWU1uKytSVXN1Q2s0U2NzcmJadE05anBLbnovVHlnTWRWVEM1dwpTaXE2T0hLdEFuaDhBeDFMRUtpY2c5RkxkNk9EeFIzT1ZLdStmVVBWNFhIQVdKbm12RWxHbGl2am5lSGlFK09MCmR6Z2IvQ2ZCRUdIWUJWYzJQRElod0JtVWRvRVovdDNVanZtU0k0NlpibFlwV29kSnZMRndnZTJIeFNpdlJsTFcKVWgvb1BXWDVOL0NIOUkzNEhUQWhJNDg9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K"));
mode = "0644";
};
services.kubernetes = {
roles = ["node"];
kubelet = {
extraOpts = "--cloud-provider=external";
registerNode = true;
kubeconfig = {
server = "https://34.31.205.230";
caFile = "/etc/kubernetes/ca.crt";
};
};
};
}

View File

@@ -85,6 +85,16 @@ in
'';
};
};
"docs.railbird.ai" = {
enableACME = true;
forceSSL = true;
root = "/var/lib/syncthing/railbird/docs";
locations."/" = {
extraConfig = ''
autoindex on;
'';
};
};
};
};

View File

@@ -45,15 +45,15 @@
boot.initrd.kernelModules = [ "dm-snapshot" ];
# install nvidia drivers in addition to intel one
hardware.opengl.extraPackages = [ pkgs.linuxPackages.nvidia_x11.out ];
hardware.opengl.extraPackages32 = [ pkgs.linuxPackages.nvidia_x11.lib32 ];
hardware.graphics.extraPackages = [ pkgs.linuxPackages.nvidia_x11.out ];
hardware.graphics.extraPackages32 = [ pkgs.linuxPackages.nvidia_x11.lib32 ];
services.xserver = {
videoDrivers = [ "nvidia" ];
};
hardware.nvidia.modesetting.enable = true;
hardware.opengl.driSupport32Bit = true;
hardware.graphics.enable32Bit = true;
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];

View File

@@ -3,6 +3,7 @@
{
imports = [
../configuration.nix
inputs.nixos-hardware.nixosModules.asus-rog-strix-g834jzr
];
modules.base.enable = true;
@@ -23,21 +24,15 @@
];
services.xserver.dpi = 96;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelPackages = pkgs.linuxPackages_testing;
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "thunderbolt" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
services.xserver = {
videoDrivers = [ "nvidia" ];
};
hardware.opengl = {
hardware.graphics = {
enable = true;
driSupport = true;
driSupport32Bit = true;
enable32Bit = true;
};
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.production;
hardware.nvidia.modesetting.enable = true;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;

View File

@@ -18,6 +18,7 @@
};
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
nix = rec {
extraOptions = ''

Binary file not shown.

Binary file not shown.

View File

@@ -10,5 +10,7 @@ in
"gitea-runner-token.jimi-hendnix.age".publicKeys = keys.agenixKeys;
"gitea-runner-token.adele.age".publicKeys = keys.agenixKeys;
"gitea-runner-token.railbird-sf.age".publicKeys = keys.agenixKeys ++ keys.railbird-sf;
"gitea-runner-token.mac-demarco-mini.age".publicKeys = keys.agenixKeys ++ keys.railbird-sf;
"nextcloud-admin.age".publicKeys = keys.agenixKeys;
"ryzen-shine-kubernetes-token.age".publicKeys = keys.agenixKeys;
}

View File

@@ -17,6 +17,7 @@ let
mixos = { id = "7DMMUDT-CO33EMS-LQW65MX-3BVYDBT-ZZWDJC6-SWEF6SW-ICUMWOE-ZC4IBQK"; };
strixi-minaj-wsl = { id = "DOAEFFI-W6EZY3K-GDUHDLX-6DQPVFC-XU3G65X-5KX6RKK-EMF7ZT7-YKKKOAM"; };
strixi-minaj = { id = "IF76WOS-WVYFAQG-ZZMIT3R-ZR6EQQH-YQP3FGZ-BJ3LJKO-56FK2XA-UREADQM"; };
dean-zephyrus = { id = "UVIQVZQ-WFWVUQT-OTXPK7V-RXFKAVV-RY5DV2Z-XZEH3Q2-JQZIQLW-XMSB6AT"; };
};
allDevices = builtins.attrNames devices;
in

View File

@@ -94,6 +94,11 @@ in
name = "railbird";
openssh.authorizedKeys.keys = inputs.railbird-secrets.keys.railbirdDevKeys;
};
interview = userDefaults // {
inherit extraGroups;
name = "interview";
openssh.authorizedKeys.keys = interviewKeys ++ inputs.railbird-secrets.keys.railbirdDevKeys;
};
};
nix.sshServe = {