refactor(wpcarro): Remove briefcase references

TL;DR:
- prefer WPCARRO env-var to BRIEFCASE
- remove repository URLs from Emacs libraries
- prefer tvl-depot-path where possible
- reduce the scope of constants.el
- prune (some not all) stale CI configuration

Change-Id: I21e9130402502ec6fa2fc4b46753c890069be62d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4545
Tested-by: BuildkiteCI
Reviewed-by: wpcarro <wpcarro@gmail.com>
This commit is contained in:
William Carroll 2021-12-23 18:30:31 -05:00 committed by wpcarro
parent 87981e7afd
commit c1e381eecc
90 changed files with 76 additions and 280 deletions

View file

@ -1,8 +1,4 @@
export BRIEFCASE="$(realpath .)"
# I'm ensuring that $NIX_PATH is mostly empty, so that I only depend on
# <briefcase> for now.
# For more information on the NIX_PATH anti-pattern, see here:
# https://nix.dev/tutorials/towards-reproducibility-pinning-nixpkgs.html#pinning-nixpkgs
export NIX_PATH="briefcase=$BRIEFCASE";
source_up
export DESKTOP="zeno.lon.corp.google.com";
export LAPTOP="seneca";
export WPCARRO="$REPO_ROOT/users/wpcarro"

View file

@ -1,8 +1,8 @@
install:
source "${BRIEFCASE}/configs/install"
source "${WPCARRO}/configs/install"
uninstall:
source "${BRIEFCASE}/configs/uninstall"
source "${WPCARRO}/configs/uninstall"
list-broken-links:
find "${HOME}" -maxdepth 1 -xtype l && \

View file

@ -1,8 +1,6 @@
# briefcase
# wpcarro
[![Build status](https://badge.buildkite.com/aa0d413bfeedcafd8719f977eadd40e04d0b5334fc7f58e8ee.svg)](https://buildkite.com/wpcarros-infrastructure/post-receive)
Welcome to my monorepo: briefcase.
Welcome to my monorepo.
Herein you will find a variety of libraries, packages, and documents. Some of
this work in finished and other work is incomplete or just a sketch for a
@ -11,54 +9,23 @@ future project.
Where applicable, I try to include `README.md` files in some of the
subdirectories to help orient both myself and any onlookers.
## Languages
To give you a general idea of the source code inside of this monorepo, here is
the latest output from `tokei --hidden --sort code .`:
```text
-------------------------------------------------------------------------------
Language Files Lines Code Comments Blanks
-------------------------------------------------------------------------------
Emacs Lisp 81 22267 13847 5661 2759
Python 177 10575 7930 885 1760
Elm 34 5345 4277 219 849
Haskell 50 4263 3111 428 724
Nix 66 1581 1379 66 136
TypeScript 19 1345 1067 90 188
Go 17 1256 926 173 157
Vim Script 2 766 470 87 209
Elixir 13 358 301 8 49
JavaScript 9 77 73 0 4
Lisp 3 83 43 23 17
Shell 3 55 30 11 14
Clojure 2 10 8 0 2
C 1 6 5 0 1
Rust 1 5 3 1 1
-------------------------------------------------------------------------------
Total 478 47992 33470 7652 6870
-------------------------------------------------------------------------------
```
## Sign posts
Below I have outlined a few projects that you might find interesting. I am
using `//` to indicate the root of my monorepo, the directory in which this
`README.md` resides.
Below I have outlined a few projects that you might find interesting.
- `//boilerplate`: scaffolding for projects. Boilerplate's goal is to
reduce the startup costs of a project.
- `//configs`: my dotfiles (e.g. `config.fish`, `init.vim`).
- `//emacs`: Emacs is both my preferred text editor and my window manager; with
- `boilerplate`: scaffolding for projects. Boilerplate's goal is to reduce the
startup costs of a project.
- `configs`: my dotfiles (e.g. `config.fish`, `init.vim`).
- `emacs`: Emacs is both my preferred text editor and my window manager; with
tens of thousands of lines of Emacs Lisp, you can safely assume that this
directory hosts a lot of libraries and packages.
- `//monzo_ynab`: `systemd` timer unit that imports my Monzo (i.e. a U.K.-based
- `monzo_ynab`: `systemd` timer unit that imports my Monzo (i.e. a U.K.-based
online bank) transactions into the personal finance tool YNAB (i.e.
youneedabudget.com).
- `//nixos`: my declarative configuration for my NixOS machines. If you are
- `nixos`: my declarative configuration for my NixOS machines. If you are
unfamiliar with Nix, I recommend reading about the NixOS project.
- `//tools`: some scripts and projects that simplify my life.
- `//website`: everything required to build my website, wpcarro.dev.
- `tools`: some scripts and projects that simplify my life.
- `website`: everything required to build my website, https://wpcarro.dev.
## Notes to self

View file

@ -10,7 +10,7 @@ Let's say that you would like to create a game for
following:
```shell
$ cp ~/briefcase/boilerplate/typescript ~/briefcase/website/sandbox/game
$ cp -r typescript path/to/new-project
```
This initializes the project. To start developing, run:

View file

@ -7,7 +7,7 @@ This boilerplate uses `lein` to manage the project.
To use this boilerplate, run the following in a shell:
```shell
$ cp ~/briefcase/boilerplate/clojure path/to/new-project
$ cp -r . path/to/new-project
```
After running the above command, change the following files to remove the

View file

@ -15,14 +15,6 @@ let
command = "${pkgs.git-secrets}/bin/git-secrets --scan-history";
label = ":broom: lint secrets";
}
{
key = "build-briefcase";
command = ''
nix-build . -I briefcase="$(pwd)" --no-out-link --show-trace
'';
label = ":nix: build briefcase";
depends_on = "lint-secrets";
}
{
key = "init-emacs";
command = let
@ -32,25 +24,10 @@ let
};
runScriptEl = runScript {
script = scriptEl;
briefcasePath = "$(pwd)";
};
in "${runScriptEl} ${initEl}";
label = ":gnu: initialize Emacs";
depends_on = "build-briefcase";
}
{
key = "build-socrates";
command = ''
nix-build '<nixpkgs/nixos>' \
-I briefcase="$(pwd)" \
-I nixpkgs=/var/lib/buildkite-agent-socrates/nixpkgs-channels \
-I nixos-config=nixos/socrates/default.nix \
-A system \
--no-out-link \
--show-trace
'';
label = ":nix: build socrates";
depends_on = "build-briefcase";
depends_on = "lint-secrets";
}
];
in pkgs.writeText "pipeline.yaml" (toJSON pipeline)

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash
configs="$BRIEFCASE/configs"
configs="$WPCARRO/configs"
(cd "$configs" && stow --target="$HOME" .)

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash
configs="$BRIEFCASE/configs"
configs="$WPCARRO/configs"
(cd "$configs" && stow --delete --target="$HOME" .)

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:
@ -59,12 +58,9 @@ Otherwise, open with `counsel-find-file'."
(defconst bookmark-whitelist
(list
(make-bookmark :label "briefcase"
:path constants-briefcase
:kbd "b")
(make-bookmark :label "current project"
:path constants-current-project
:kbd "p"))
(make-bookmark :label "depot"
:path constants-depot
:kbd "d"))
"List of registered bookmarks.")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:
@ -14,42 +13,14 @@
;; Dependencies
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'prelude)
(require 'f)
(require 'maybe)
(prelude-assert (f-exists? (getenv "BRIEFCASE")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Configuration
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defconst constants-ci?
(maybe-some? (getenv "CI"))
(defconst constants-ci? (maybe-some? (getenv "CI"))
"Encoded as t when Emacs is running in CI.")
(defconst constants-briefcase
(getenv "BRIEFCASE")
"Path to my monorepo, which various parts of my configuration rely on.")
;; TODO: Consider merging `ui.el' and `misc.el' because those are the only
;; current consumers of these constants, and I'm unsure if the indirection that
;; globally defined constants introduces is worth it.
(defconst constants-current-project
constants-briefcase
"Variable holding the directory for my currently active project.")
(defconst constants-mouse-kbds
'([mouse-1] [down-mouse-1] [drag-mouse-1] [double-mouse-1] [triple-mouse-1]
[mouse-2] [down-mouse-2] [drag-mouse-2] [double-mouse-2] [triple-mouse-2]
[mouse-3] [down-mouse-3] [drag-mouse-3] [double-mouse-3] [triple-mouse-3]
[mouse-4] [down-mouse-4] [drag-mouse-4] [double-mouse-4] [triple-mouse-4]
[mouse-5] [down-mouse-5] [drag-mouse-5] [double-mouse-5] [triple-mouse-5])
"All of the mouse-related keybindings that Emacs recognizes.")
(defconst constants-fill-column 80
"Variable used to set the defaults for wrapping, highlighting, etc.")
(provide 'constants)
;;; constants.el ends here

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:
@ -19,7 +18,6 @@
(require 'prelude)
(require 'cycle)
(require 'device)
(require 'maybe)
(require 'cl-lib)
@ -31,11 +29,8 @@
;; TODO: Consider having a different font size when I'm using my 4K monitor.
(defconst fonts-size
(pcase (device-classify)
('work-laptop "10")
('work-desktop "10"))
"My preferred default font-size, which is device specific.")
(defconst fonts-size "10"
"My preferred default font-size.")
(defconst fonts-size-step 10
"The amount (%) by which to increase or decrease a font.")

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:
@ -36,7 +35,7 @@
(require 'device)
(require 'fonts)
(require 'bookmark)
(require 'constants)
(require 'tvl)
(require 'window-manager)
;; Note: The following lines must be sorted this way.
@ -222,9 +221,7 @@
"N" #'smerge-next
"W" #'balance-windows
"gss" #'magit-status
"gsb" (lambda ()
(interactive)
(magit-status constants-briefcase))
"gsd" #'tvl-depot-status
"E" #'refine
"es" #'functions-create-snippet
"l" #'linum-mode

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "24.3"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; Containing some useful mathematical functions.

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "24"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; Inspired by Elm's Maybe library.

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "25.1"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; Because I use EXWM, I treat my Emacs mode-line like my system bar: I need to

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "24.3"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; Some of these ideas are scattered across other modules like `fs',

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "24"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; Because everything in my configuration is turning into Elisp these days.

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "24"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; Functions for working with randomness. Some of this code is not as

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "25.1"))
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;;; Commentary:
;; This is the home of any configuration that couldn't find a better home.
@ -17,7 +16,7 @@
(require 'project)
(require 'f)
(require 'dash)
(require 'constants)
(require 'tvl)
(require 'region)
(require 'general)
@ -190,7 +189,7 @@
create-lockfiles nil)
;; ensure code wraps at 80 characters by default
(setq-default fill-column constants-fill-column)
(setq-default fill-column 80)
(put 'narrow-to-region 'disabled nil)
@ -201,7 +200,10 @@
(add-hook 'after-save-hook
(lambda ()
(when (f-equal? (buffer-file-name)
(f-join constants-briefcase "secrets.json"))
(f-join tvl-depot-path
"users"
"wpcarro"
"secrets.json"))
(shell-command "git secret hide"))))
;; use tabs instead of spaces
@ -222,21 +224,21 @@
:config
(projectile-mode t))
;; TODO: Consider moving this into a briefcase.el module.
(defun wpc-misc--briefcase-find (dir)
;; TODO(wpcarro): Consider replacing this with a TVL version if it exists.
(defun wpc-misc--depot-find (dir)
"Find the default.nix nearest to DIR."
;; I use 'vc only at the root of my monorepo because 'transient doesn't use my
;; .gitignore, which slows things down. Ideally, I could write a version that
;; behaves like 'transient but also respects my monorepo's .gitignore and any
;; ancestor .gitignore files.
(if (f-equal? constants-briefcase dir)
(if (f-equal? tvl-depot-path dir)
(cons 'vc dir)
(when (f-ancestor-of? constants-briefcase dir)
(when (f-ancestor-of? tvl-depot-path dir)
(if (f-exists? (f-join dir "default.nix"))
(cons 'transient dir)
(wpc-misc--briefcase-find (f-parent dir))))))
(wpc-misc--depot-find (f-parent dir))))))
(add-to-list 'project-find-functions #'wpc-misc--briefcase-find)
(add-to-list 'project-find-functions #'wpc-misc--depot-find)
(defun wpc-misc-pkill (name)
"Call the pkill executable using NAME as its argument."

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "25.1"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; Configuration to support working with Nix.
@ -14,8 +13,7 @@
;; Dependencies
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'device)
(require 'constants)
(require 'tvl)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Library
@ -24,49 +22,16 @@
(use-package nix-mode
:mode "\\.nix\\'")
;; TODO(wpcarro): Ensure the sub-process can resolve <briefcase>.
(defun wpc-nix-rebuild-emacs ()
"Use nix-env to rebuild wpcarros-emacs."
(interactive)
(let* ((pname (format "nix-build <briefcase/emacs.nixos>"))
(let* ((pname (format "nix-env -iA users.wpcarro.emacs.nixos"))
(bname (format "*%s*" pname)))
(start-process pname bname
"nix-env"
"-I" (format "briefcase=%s" constants-briefcase)
"-f" "<briefcase>" "-iA" "emacs.nixos")
"-f" tvl-depot-path
"-iA" "users.wpcarro.emacs.nixos")
(display-buffer bname)))
(defun wpc-nix-sly-from-briefcase (attr)
"Start a Sly REPL configured using the derivation pointed at by ATTR.
The derivation invokes nix.buildLisp.sbclWith and is built asynchronously.
The build output is included in the error thrown on build failures."
(interactive "sAttribute: ")
(lexical-let* ((outbuf (get-buffer-create (format "*briefcase-out/%s*" attr)))
(errbuf (get-buffer-create (format "*briefcase-errors/%s*" attr)))
(expression (format "let briefcase = import <briefcase> {}; in briefcase.third_party.depot.nix.buildLisp.sbclWith [ briefcase.%s ]" attr))
(command (list "nix-build" "-E" expression)))
(message "Acquiring Lisp for <briefcase>.%s" attr)
(make-process :name (format "nix-build/%s" attr)
:buffer outbuf
:stderr errbuf
:command command
:sentinel
(lambda (process event)
(unwind-protect
(pcase event
("finished\n"
(let* ((outpath (s-trim (with-current-buffer outbuf
(buffer-string))))
(lisp-path (s-concat outpath "/bin/sbcl")))
(message "Acquired Lisp for <briefcase>.%s at %s"
attr lisp-path)
(sly lisp-path)))
(_ (with-current-buffer errbuf
(error "Failed to build '%s':\n%s" attr
(buffer-string)))))
(kill-buffer outbuf)
(kill-buffer errbuf))))))
(provide 'wpc-nix)
;;; wpc-nix.el ends here

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "24.1"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; Hosts my org mode preferences

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "24.1"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; This module hosts all of the settings required to work with ELPA,

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "24"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; Code configuring my Prolog work.

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "24"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; My Python configuration settings

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "24"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; Supports my Rust work.

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "24"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; Helpers for my shell scripting. Includes bash, zsh, etc.

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:
@ -15,6 +14,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'constants)
(require 'tvl)
(require 'prelude)
(require 'al)
(require 'fonts)
@ -71,7 +71,7 @@
(tool-bar-mode -1)
;; set default buffer for Emacs
(setq initial-buffer-choice constants-current-project)
(setq initial-buffer-choice tvl-depot-path)
;; premium Emacs themes
(use-package doom-themes
@ -131,13 +131,13 @@
;; reduce noisiness of auto-revert-mode
(setq auto-revert-verbose nil)
;; highlight lines that are over `constants-fill-column' characters long
;; highlight lines that are over 80 characters long
(use-package whitespace
:config
;; TODO: This should change depending on the language and project. For
;; example, Google Java projects prefer 100 character width instead of 80
;; character width.
(setq whitespace-line-column constants-fill-column)
(setq whitespace-line-column 80)
(setq whitespace-style '(face lines-tail))
(add-hook 'prog-mode-hook #'whitespace-mode))

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -5,9 +5,9 @@ as central to my workflow as `git` and `nix`.
## Installing
If you already have `briefcase` on your local file system, run the following
from the top-level `briefcase` directory:
If you already have `depot` on your local file system, run the following from
the top-level `depot` directory:
```shell
$ nix-build -f . -iA emacs.nixos
$ nix-env -iA users.wpcarro.emacs.nixos
```

View file

@ -154,10 +154,9 @@ let
"${wpcarrosEmacs.deps}/share/emacs/site-lisp:"
];
withEmacsPath = { emacsBin, briefcasePath ? "$HOME/briefcase" }:
withEmacsPath = { emacsBin }:
writeShellScriptBin "wpcarros-emacs" ''
export XMODIFIERS=emacs
export BRIEFCASE=${briefcasePath}
export GOOGLE_BRIEFCASE="$HOME/google-briefcase"
export PATH="${emacsBinPath}:$PATH"
export EMACSLOADPATH="${loadPath}"
@ -173,9 +172,8 @@ in {
inherit initEl withEmacsPath;
# I need to start my Emacs from CI without the call to `--load ${initEl}`.
runScript = { script, briefcasePath }:
runScript = { script }:
writeShellScript "run-emacs-script" ''
export BRIEFCASE=${briefcasePath}
export PATH="${emacsBinPath}:$PATH"
export EMACSLOADPATH="${wpcDir}:${vendorDir}:${wpcarrosEmacs.deps}/share/emacs/site-lisp"
exec ${wpcarrosEmacs}/bin/emacs \
@ -186,10 +184,9 @@ in {
"$@"
'';
# Use `nix-env -f '<briefcase>' emacs.nixos` to install `wpcarros-emacs` on
# NixOS machines.
nixos = { briefcasePath ? "$HOME/briefcase" }: withEmacsPath {
inherit briefcasePath;
nixos = withEmacsPath {
emacsBin = "${wpcarrosEmacs}/bin/emacs";
};
meta.targets = [ "nixos" ];
}

View file

@ -1,11 +1,8 @@
{ depot, pkgs, lib, ... }:
{ config, ... }:
{ ... }:
let
# TODO(wpcarro): Drop dependency on the briefcase concept.
wpcarros-emacs = depot.users.wpcarro.emacs.nixos {
briefcasePath = "$HOME/depot/users/wpcarro";
};
wpcarrosEmacs = depot.users.wpcarro.emacs.nixos;
in {
imports = [
(depot.path + "/users/wpcarro/nixos/marcus/hardware.nix")
@ -54,7 +51,7 @@ in {
'';
windowManager.session = lib.singleton {
name = "exwm";
start = "${wpcarros-emacs}/bin/wpcarros-emacs";
start = "${wpcarrosEmacs}/bin/wpcarros-emacs";
};
};
@ -127,7 +124,7 @@ in {
tdesktop
vim
weechat
wpcarros-emacs
wpcarrosEmacs
xclip
xsecurelock
];

View file

@ -1,8 +1,9 @@
source_up
use_nix
export monzo_client_id="$(jq -j '.monzo | .clientId' < ~/briefcase/secrets.json)"
export monzo_client_secret="$(jq -j '.monzo | .clientSecret' < ~/briefcase/secrets.json)"
export ynab_personal_access_token="$(jq -j '.ynab | .personalAccessToken' < ~/briefcase/secrets.json)"
export ynab_account_id="$(jq -j '.ynab | .accountId' < ~/briefcase/secrets.json)"
export ynab_budget_id="$(jq -j '.ynab | .budgetId' < ~/briefcase/secrets.json)"
# TODO(wpcarro): Prefer age-nix solution if possible.
export monzo_client_id="$(jq -j '.monzo | .clientId' < $WPCARRO/secrets.json)"
export monzo_client_secret="$(jq -j '.monzo | .clientSecret' < $WPCARRO/secrets.json)"
export ynab_personal_access_token="$(jq -j '.ynab | .personalAccessToken' < $WPCARRO/secrets.json)"
export ynab_account_id="$(jq -j '.ynab | .accountId' < $WPCARRO/secrets.json)"
export ynab_budget_id="$(jq -j '.ynab | .budgetId' < $WPCARRO/secrets.json)"
export store_path="$(pwd)"

View file

@ -24,7 +24,7 @@ Or you can install using `nix-env` if you'd like to create the `monzo_ynab`
symlink.
```shell
> nix-env -f ~/briefcase/monzo_ynab -i
> nix-env -iA users.wpcarro.monzo_ynab
```
## Deployment

View file

@ -26,5 +26,5 @@ file.ts` will run.
Install `run` using Nix.
```shell
> nix-env -iA briefcase.run
> nix-env -iA users.wpcarro.run
```

View file

@ -1,6 +1,6 @@
# Dotfile Symlink Manager
Find and delete all symlinks to the dotfiles defined in `$BRIEFCASE`.
Find and delete all symlinks to my dotfiles.
Oftentimes I corrupt the state of my configuration files. The intention with
this script is to help me clean things up when this happens. An example workflow
@ -9,6 +9,4 @@ might look like:
```shell
> symlink-mgr --audit
> symlink-mgr --seriously
> briefcase # changes directory to $BRIEFCASE
> make install
```

View file

@ -36,7 +36,7 @@ file `~/.config/url-blocker/rules.json` with the following contents and
## Installation
```shell
$ nix-env -iA 'briefcase.tools.url-blocker'
$ nix-env -iA users.wpcarro.tools.url-blocker
```
## How does it work?

View file

@ -1,4 +1,5 @@
source_up
use_nix
export CONTENTFUL_SPACE_ID="$(jq -j '.contentful | .spaceId' < ~/briefcase/secrets.json)"
export CONTENTFUL_ACCESS_TOKEN="$(jq -j '.contentful | .accessToken' < ~/briefcase/secrets.json)"
# TODO(wpcarro): Prefer age-nix solution if possible.
export CONTENTFUL_SPACE_ID="$(jq -j '.contentful | .spaceId' < $WPCARRO/secrets.json)"
export CONTENTFUL_ACCESS_TOKEN="$(jq -j '.contentful | .accessToken' < $WPCARRO/secrets.json)"

View file

@ -2,5 +2,6 @@ source_up
use_nix
export SERVER_PORT=3000
export CLIENT_PORT=8000
export GOOGLE_CLIENT_ID="$(jq -j '.google | .clientId' < ~/briefcase/secrets.json)"
export STRIPE_API_KEY="$(jq -j '.stripe | .apiKey' < ~/briefcase/secrets.json)"
# TODO(wpcarro): Prefer age-nix solution if possible.
export GOOGLE_CLIENT_ID="$(jq -j '.google | .clientId' < $WPCARRO/secrets.json)"
export STRIPE_API_KEY="$(jq -j '.stripe | .apiKey' < $WPCARRO/secrets.json)"