Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bbec58acba |
Generated
+9
-9
@@ -25,11 +25,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1782233665,
|
||||
"narHash": "sha256-h/xOtrByoA/Ak1lWHn0O1lVZz4qWYbwOSLQ8YSwQO0I=",
|
||||
"lastModified": 1779969295,
|
||||
"narHash": "sha256-HwIJ3tOcwSMiV75L7KqJXciXR9UfT+d7rwOZMX7cTnA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "062581938b4a378a82dfbb294b494808157153a1",
|
||||
"rev": "61e2c9659324181e0f0ed911958c536333b1d4f6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -65,11 +65,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1782030356,
|
||||
"narHash": "sha256-h4WpMr455AfRub0FXBaon6Vcpe0waUyJ4GivIW6oyd4=",
|
||||
"lastModified": 1779604987,
|
||||
"narHash": "sha256-ZQ5z+fVhxYKtIFwtqGp5O0PD84BM1riASvqDaN5Xs+s=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "3017088b49efd404f78e3b104f553b97e4af786b",
|
||||
"rev": "8fba98c80b48fa013820e0163c5096922fea4ddd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -80,11 +80,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1781577229,
|
||||
"narHash": "sha256-lrp67w8AulE9Ks53n27I45ADSzbOCn4H+CNW1Ck8B+8=",
|
||||
"lastModified": 1779560665,
|
||||
"narHash": "sha256-tpyBcxPpcQb8ukyNF7DoCwfSY3VPsxHoYwj00Cayv5o=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "567a49d1913ce81ac6e9582e3553dd90a955875f",
|
||||
"rev": "64c08a7ca051951c8eae34e3e3cb1e202fe36786",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
'';
|
||||
};
|
||||
in {
|
||||
homeConfigurations.redbook =
|
||||
homeConfigurations.shibumi =
|
||||
let pkgs = import nixpkgs { system = "aarch64-darwin"; config.allowUnfree = true; };
|
||||
modules = modules-for-system pkgs;
|
||||
in home-manager.lib.homeManagerConfiguration {
|
||||
@@ -50,16 +50,14 @@
|
||||
modules =
|
||||
[
|
||||
nix-index-database.homeModules.default
|
||||
"${modules}/base.nix"
|
||||
"${modules}/desktop.nix"
|
||||
"${modules}/redbook.nix"
|
||||
"${modules}/redbook-desktop.nix"
|
||||
"${modules}"
|
||||
] ++
|
||||
[{
|
||||
home.stateVersion = "22.05";
|
||||
home.username = "jfrikker";
|
||||
home.homeDirectory = "/Users/jfrikker";
|
||||
home.packages = [ pkgs.pinentry_mac ];
|
||||
jfrikker.desktop.enable = true;
|
||||
}];
|
||||
|
||||
extraSpecialArgs = { kube = kube.packages.aarch64-darwin.default; };
|
||||
|
||||
@@ -1,36 +1,32 @@
|
||||
#+PROPERTY: header-args :mkdirp yes
|
||||
#+PROPERTY: header-args:elisp :lexical t
|
||||
* Categories
|
||||
* Base
|
||||
|
||||
#+BEGIN_SRC nix :tangle target/base.nix
|
||||
{lib, ...}: {
|
||||
imports = lib.filter
|
||||
(n: lib.strings.hasSuffix ".nix" n)
|
||||
(lib.filesystem.listFilesRecursive ./base);
|
||||
#+BEGIN_SRC nix :tangle target/default.nix
|
||||
{
|
||||
imports = [
|
||||
./base_options.nix
|
||||
./sbcl.nix
|
||||
./crypto.nix
|
||||
./rust-reimpls.nix
|
||||
./ledger.nix
|
||||
./nil.nix
|
||||
./magic-wormhole.nix
|
||||
./desktop-packages.nix
|
||||
./shibumi.nix
|
||||
./slack.nix
|
||||
];
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC nix :tangle target/desktop.nix
|
||||
{lib, ...}: {
|
||||
imports = lib.filter
|
||||
(n: lib.strings.hasSuffix ".nix" n)
|
||||
(lib.filesystem.listFilesRecursive ./desktop);
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC nix :tangle target/redbook.nix
|
||||
{lib, ...}: {
|
||||
imports = lib.filter
|
||||
(n: lib.strings.hasSuffix ".nix" n)
|
||||
(lib.filesystem.listFilesRecursive ./redbook);
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC nix :tangle target/redbook-desktop.nix
|
||||
{lib, ...}: {
|
||||
imports = lib.filter
|
||||
(n: lib.strings.hasSuffix ".nix" n)
|
||||
(lib.filesystem.listFilesRecursive ./redbook-desktop);
|
||||
#+BEGIN_SRC nix :tangle target/base_options.nix
|
||||
{lib, ...}:
|
||||
with lib;
|
||||
{
|
||||
options = {
|
||||
jfrikker.desktop.enable = mkEnableOption "desktop tools";
|
||||
jfrikker.shibumi.enable = mkEnableOption "shibumi-specific tools";
|
||||
};
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
@@ -45,7 +41,7 @@ in a ~nix~ devshell I think I'd also like to use it for scripting / exploratory
|
||||
so I'm installing it globally with a useful set of libraries. I should curate this somewhat
|
||||
carefully so it doesn't get carried away...
|
||||
|
||||
#+BEGIN_SRC nix :tangle target/base/sbcl.nix
|
||||
#+BEGIN_SRC nix :tangle target/sbcl.nix
|
||||
{pkgs, ...}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
@@ -96,7 +92,7 @@ the name implies, allows generating and storing ~age~ keys on a Yubikey. ~rage~
|
||||
~age~ when using ~age.el~, because it supports ~pinentry~. That allows it to prompt for yubikey pins
|
||||
using a dialog, rather than a command line prompt.
|
||||
|
||||
#+BEGIN_SRC nix :tangle target/base/crypto.nix
|
||||
#+BEGIN_SRC nix :tangle target/crypto.nix
|
||||
{pkgs, ...}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
@@ -116,7 +112,7 @@ tools. They boost better speed, or simply more streamlined features.
|
||||
| ~ripgrep~ | ~grep~ |
|
||||
| ~xh~ | ~curl~ |
|
||||
|
||||
#+BEGIN_SRC nix :tangle target/base/rust-reimpls.nix
|
||||
#+BEGIN_SRC nix :tangle target/rust-reimpls.nix
|
||||
{pkgs, ...}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
@@ -131,7 +127,7 @@ tools. They boost better speed, or simply more streamlined features.
|
||||
|
||||
[[https://ledger-cli.org/][~ledger~]] is how I manage my budget. It's a plain-text accounting tool that's really awesome.
|
||||
|
||||
#+BEGIN_SRC nix :tangle target/base/ledger.nix
|
||||
#+BEGIN_SRC nix :tangle target/ledger.nix
|
||||
{pkgs, ...}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
@@ -142,7 +138,7 @@ tools. They boost better speed, or simply more streamlined features.
|
||||
|
||||
~nil~ is an LSP server for nix files.
|
||||
|
||||
#+BEGIN_SRC nix :tangle target/base/nil.nix
|
||||
#+BEGIN_SRC nix :tangle target/nil.nix
|
||||
{pkgs, ...}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
@@ -155,57 +151,64 @@ tools. They boost better speed, or simply more streamlined features.
|
||||
computers in the world, assuming that you have an out-of-band way to communicate a passphrase
|
||||
between them. Once installed, the actual command is ~wormhole~.
|
||||
|
||||
#+begin_src nix :tangle target/base/magic-wormhole.nix
|
||||
#+begin_src nix :tangle target/magic-wormhole.nix
|
||||
{pkgs, ...}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
magic-wormhole
|
||||
magic-wormhole
|
||||
];
|
||||
}
|
||||
#+end_src
|
||||
|
||||
These are the other programs I have installed globally. A few (like ~awscli~, ~mysql-client~, etc.)
|
||||
are still Redbook-specific; ideally I'd find another way to install them.
|
||||
are still Shibumi-specific; ideally I'd find another way to install them.
|
||||
|
||||
#+BEGIN_SRC nix :tangle target/redbook/other-packages.nix
|
||||
{pkgs, kube, ...}:
|
||||
#+BEGIN_SRC nix :tangle target/shibumi.nix
|
||||
{lib, pkgs, kube, config, ...}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
postgresql
|
||||
openssh
|
||||
];
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
config = lib.mkIf config.jfrikker.shibumi.enable {
|
||||
home.packages = with pkgs; [
|
||||
aws-iam-authenticator
|
||||
awscli2
|
||||
kube
|
||||
kubectl
|
||||
mariadb.client
|
||||
openssh
|
||||
];
|
||||
};
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
These programs require a full desktop environment:
|
||||
|
||||
#+BEGIN_SRC nix :tangle target/desktop/desktop-packages.nix
|
||||
{pkgs, ...}:
|
||||
#+BEGIN_SRC nix :tangle target/desktop-packages.nix
|
||||
{lib, pkgs, config, ...}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
google-chrome
|
||||
nerd-fonts.jetbrains-mono
|
||||
nerd-fonts.symbols-only
|
||||
(iosevka-bin.override { variant = "Aile"; })
|
||||
(iosevka-bin.override { variant = "Etoile"; })
|
||||
(iosevka-bin.override { variant = "SGr-IosevkaTerm"; })
|
||||
keymapp
|
||||
proton-pass
|
||||
wireshark
|
||||
];
|
||||
config = lib.mkIf config.jfrikker.desktop.enable {
|
||||
home.packages = with pkgs; [
|
||||
google-chrome
|
||||
nerd-fonts.jetbrains-mono
|
||||
(iosevka-bin.override { variant = "Aile"; })
|
||||
(iosevka-bin.override { variant = "Etoile"; })
|
||||
(iosevka-bin.override { variant = "SGr-IosevkaTerm"; })
|
||||
keymapp
|
||||
proton-pass
|
||||
wireshark
|
||||
];
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
};
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC nix :tangle target/redbook-desktop/desktop-packages.nix
|
||||
{pkgs, ...}:
|
||||
#+BEGIN_SRC nix :tangle target/slack.nix
|
||||
{lib, pkgs, config, ...}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
linear
|
||||
slack
|
||||
teams
|
||||
];
|
||||
config = lib.mkIf (config.jfrikker.shibumi.enable && config.jfrikker.desktop.enable) {
|
||||
home.packages = with pkgs; [
|
||||
slack
|
||||
];
|
||||
};
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
@@ -312,8 +315,7 @@ We all know what ~git~ does.
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings.user.name = "Joe Frikker";
|
||||
settings.user.email = "joe@redbookcattle.com";
|
||||
settings.github.user = "joe@redbookcattle.com";
|
||||
settings.user.email = "joe.frikker@shibumi.com";
|
||||
};
|
||||
|
||||
programs.delta = {
|
||||
@@ -913,7 +915,6 @@ Use variable-width fonts in text buffers. ~mixed-pitch-mode~ keeps most code blo
|
||||
|
||||
(add-hook 'yaml-ts-mode-hook 'no-mixed-pitch)
|
||||
(add-hook 'mhtml-mode 'no-mixed-pitch)
|
||||
(add-hook 'nxml-mode 'no-mixed-pitch)
|
||||
#+END_SRC
|
||||
|
||||
A basic ace-window setup. Allows switching between windows quickly (although avy can do the same...).
|
||||
@@ -985,23 +986,6 @@ windows. I place windows in the bottom or on the right mostly depending on how w
|
||||
content to be.
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(defun jf/100-px-window (window)
|
||||
(let* ((desired (min (/ (frame-width) 2) 101))
|
||||
(current (window-width window))
|
||||
(delta (- desired current)))
|
||||
(window-resize window delta :horizontal t)))
|
||||
|
||||
(defun jf/enforce-right-side-heights (win)
|
||||
(let ((slot-heights '((-1 . 10)))
|
||||
(parent (window-parent win)))
|
||||
(when parent
|
||||
(let ((child (window-child parent)))
|
||||
(while child
|
||||
(when-let* (((eq (window-parameter child 'window-side) 'right))
|
||||
(height (alist-get (window-parameter child 'window-slot) slot-heights)))
|
||||
(window-resize child (- height (window-height child))))
|
||||
(setq child (window-next-sibling child)))))))
|
||||
|
||||
(setq display-buffer-alist
|
||||
'(((or "\\*Flymake diagnostics .*"
|
||||
"\\*Embark Export: .*"
|
||||
@@ -1014,8 +998,7 @@ content to be.
|
||||
"\\*EGLOT connections\\*"
|
||||
"\\*trace-output\\*"
|
||||
"\\*occur\\*"
|
||||
".*eshell\\*"
|
||||
"\\*SQL: .*")
|
||||
".*eshell\\*")
|
||||
(display-buffer-in-side-window)
|
||||
(side . bottom)
|
||||
(slot . 0)
|
||||
@@ -1025,28 +1008,25 @@ content to be.
|
||||
((or "magit: *"
|
||||
"magit-revision: .*"
|
||||
"magit-log*"
|
||||
"\\*eldoc\\*"
|
||||
"\\*Help\\*"
|
||||
"\\*rustfmt\\*"
|
||||
"\\*slack: .*"
|
||||
"\\*forge: .*"
|
||||
"new-pullreq"
|
||||
"\\*claude:.*"
|
||||
"\\*Man .*"
|
||||
"\\*List .*")
|
||||
"\\*Man .*")
|
||||
(display-buffer-reuse-window display-buffer-in-side-window)
|
||||
(side . right)
|
||||
(slot . 0)
|
||||
(window-width . jf/100-px-window)
|
||||
(window-height . jf/enforce-right-side-heights)
|
||||
(window-width . 0.5)
|
||||
(window-parameters (no-delete-other-windows . t)
|
||||
(no-other-window . t)))
|
||||
((or "\\*Embark Actions\\*"
|
||||
"\\*eldoc\\*")
|
||||
("\\*Embark Actions\\*"
|
||||
(display-buffer-in-side-window)
|
||||
(side . right)
|
||||
(slot . -1)
|
||||
(window-width . jf/100-px-window)
|
||||
(window-height . jf/enforce-right-side-heights)
|
||||
(window-width . 0.5)
|
||||
(window-parameters (no-delete-other-windows . t)
|
||||
(no-other-window . t)))))
|
||||
|
||||
@@ -1072,11 +1052,9 @@ This configuration affects general text editing, across all modes. First, some p
|
||||
avy
|
||||
edit-indirect
|
||||
embark
|
||||
format-all
|
||||
god-mode
|
||||
# evil
|
||||
# evil-collection
|
||||
# evil-org
|
||||
evil
|
||||
evil-collection
|
||||
evil-org
|
||||
string-inflection
|
||||
];
|
||||
extraConfig = builtins.readFile ./emacs-editing.el;
|
||||
@@ -1096,32 +1074,17 @@ cancel them more frequently). In the end, I opted for Devil mode. It avoids modi
|
||||
its own devil-mode-only repeat maps that don't interfere when using normal modifier key sequences.
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
;; (setopt evil-want-keybinding nil)
|
||||
;; (require 'evil)
|
||||
;; (evil-mode 1)
|
||||
;; (require 'evil-collection)
|
||||
;; (evil-collection-init)
|
||||
(setopt evil-want-keybinding nil)
|
||||
(require 'evil)
|
||||
(evil-mode 1)
|
||||
(require 'evil-collection)
|
||||
(evil-collection-init)
|
||||
|
||||
;; (require 'evil-org)
|
||||
;; (add-hook 'org-mode-hook 'evil-org-mode)
|
||||
;; (evil-org-set-key-theme '(navigation insert textobjects additional calendar))
|
||||
;; (require 'evil-org-agenda)
|
||||
;; (evil-org-agenda-set-keys)
|
||||
(require 'god-mode)
|
||||
(require 'which-key)
|
||||
|
||||
(bind-keys :map god-local-mode-map
|
||||
("i" . (lambda () (interactive) (god-mode-all -1)))
|
||||
("z" . repeat))
|
||||
(bind-keys ("<escape>" . (lambda () (interactive) (god-mode-all 1))))
|
||||
(defun my-god-mode-update-cursor-type ()
|
||||
(setq cursor-type (cond
|
||||
(org-present-mode nil)
|
||||
((or (and (featurep 'god-mode) god-local-mode) buffer-read-only) 'box)
|
||||
(t 'bar))))
|
||||
|
||||
(add-hook 'post-command-hook 'my-god-mode-update-cursor-type)
|
||||
(which-key-enable-god-mode-support)
|
||||
(require 'evil-org)
|
||||
(add-hook 'org-mode-hook 'evil-org-mode)
|
||||
(evil-org-set-key-theme '(navigation insert textobjects additional calendar))
|
||||
(require 'evil-org-agenda)
|
||||
(evil-org-agenda-set-keys)
|
||||
#+END_SRC
|
||||
|
||||
Avy allows jumping to any place on the screen with just a few keystrokes. I've stolen most of these
|
||||
@@ -1179,34 +1142,6 @@ Just "silently" wrap when searching at the bottom of a document.
|
||||
(bind-keys ("C-x 4 n" . edit-indirect-region))
|
||||
#+END_SRC
|
||||
|
||||
** Workflow
|
||||
:PROPERTIES:
|
||||
:header-args:elisp: :tangle target/desktop/emacs-workflow.el
|
||||
:END:
|
||||
|
||||
#+BEGIN_SRC nix :tangle target/desktop/emacs-workflow.nix
|
||||
{
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
extraPackages = epkgs: with epkgs; [
|
||||
bufferlo
|
||||
];
|
||||
extraConfig = builtins.readFile ./emacs-workflow.el;
|
||||
};
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(bufferlo-mode)
|
||||
|
||||
(with-eval-after-load 'bufferlo
|
||||
(setq mode-line-misc-info
|
||||
(assq-delete-all 'bufferlo-mode mode-line-misc-info)))
|
||||
|
||||
(bind-keys
|
||||
("s-b" . bufferlo-switch-to-buffer))
|
||||
#+END_SRC
|
||||
|
||||
** Language Support
|
||||
:PROPERTIES:
|
||||
:header-args:elisp: :tangle target/desktop/emacs-languages.el
|
||||
@@ -1223,11 +1158,11 @@ Just "silently" wrap when searching at the bottom of a document.
|
||||
jq-mode
|
||||
(lispy.overrideAttrs {
|
||||
packageRequires = [
|
||||
ace-window iedit swiper zoutline hydra
|
||||
ace-window iedit swiper zoutline
|
||||
];
|
||||
ignoreCompilationError = true;
|
||||
})
|
||||
# lispyville
|
||||
lispyville
|
||||
lua-mode
|
||||
nix-mode
|
||||
rust-mode
|
||||
@@ -1408,15 +1343,15 @@ for completion. That makes it really annoying to use; don't use yasnippet with e
|
||||
(setopt lispy-compat '(god-mode edebug))
|
||||
(add-hook 'emacs-lisp-mode-hook (lambda () (lispy-mode 1)))
|
||||
(add-hook 'lisp-mode-hook (lambda () (lispy-mode 1)))
|
||||
;; (with-eval-after-load 'lispy
|
||||
;; (require 'lispyville)
|
||||
;; (add-hook 'lispy-mode-hook #'lispyville-mode)
|
||||
;; (bind-keys :map lispy-mode-map
|
||||
;; ("i" . (lambda ()
|
||||
;; (interactive)
|
||||
;; (if (and (featurep 'god-mode) god-global-mode)
|
||||
;; (god-mode-all -1)
|
||||
;; (special-lispy-tab))))))
|
||||
(with-eval-after-load 'lispy
|
||||
(require 'lispyville)
|
||||
(add-hook 'lispy-mode-hook #'lispyville-mode)
|
||||
(bind-keys :map lispy-mode-map
|
||||
("i" . (lambda ()
|
||||
(interactive)
|
||||
(if (and (featurep 'god-mode) god-global-mode)
|
||||
(god-mode-all -1)
|
||||
(special-lispy-tab))))))
|
||||
#+END_SRC
|
||||
|
||||
*** Typescript
|
||||
@@ -1425,7 +1360,7 @@ for completion. That makes it really annoying to use; don't use yasnippet with e
|
||||
(push '(typescript-mode . typescript-ts-mode) major-mode-remap-alist)
|
||||
(push '("\\.tsx\\'" . tsx-mode) auto-mode-alist)
|
||||
(push '(tsx-mode . tsx-ts-mode) major-mode-remap-alist)
|
||||
(setopt typescript-ts-mode-indent-offset 2)
|
||||
(setopt typescript-ts-mode-indent-offset 4)
|
||||
(with-eval-after-load 'typescript-ts-mode
|
||||
(defun my-tsx-ts-mode--indent-compatibility-b893426 ()
|
||||
"Indent rules helper, to handle different releases of tree-sitter-tsx.
|
||||
@@ -1585,6 +1520,7 @@ for completion. That makes it really annoying to use; don't use yasnippet with e
|
||||
|
||||
;; ("C-x M-:" . consult-complex-command)
|
||||
("C-x b" . consult-buffer)
|
||||
("s-b" . consult-project-buffer)
|
||||
("s-B" . consult-buffer)
|
||||
("C-x 4 b" . consult-buffer-other-window)
|
||||
("C-x 5 b" . consult-buffer-other-frame)
|
||||
|
||||
Reference in New Issue
Block a user