Commit graph

1275 commits

Author SHA1 Message Date
William Carroll
73db632090 Support unclutter with home-manager
I removed the code that initializes unclutter from .profile - preferring to
start it with home-manager.
2020-03-10 23:07:30 +00:00
William Carroll
d784c1d157 Support keynav with home-manager
I removed the startup code from .profile. I also depend on a fork of
home-manager until I submit my PR from wpcarro/home-manager into
rycee/home-manager.
2020-03-10 23:07:30 +00:00
William Carroll
405be98069 Manage xsession with home-manager
redshift didn't properly work because it couldn't read the DISPLAY environment
variable. I can fix this ad-hoc with `systemctl --user import-environment
DISPLAY`, but home-manager will do this automatically if I allow it to manage my
xsession.
2020-03-10 23:07:30 +00:00
William Carroll
a7ad2e3712 Support redshift
redshift is the f.lux of Linux; it filters blue light from your screen.
2020-03-10 23:07:30 +00:00
William Carroll
8c0a56a03e Restore Emacs server
I think I removed the `(server-start)` call when I was debugging some EXWM
issues. I have stabilized my configuration considerably since then, and I'd like
to use the Emacs server.
2020-03-10 23:07:30 +00:00
William Carroll
921e6c2905 Remove dockerd startup from .profile
1. I haven't used docker in awhile.
2. If I need to restore the docker daemon, I will reach for a home-manager
   solution.
2020-03-10 23:07:30 +00:00
William Carroll
8e5152cd84 Remove PATH additions from .profile
I'd like to remove this and prefer using Nix-based solutions for PATH
maintenance.
2020-03-10 23:07:30 +00:00
William Carroll
0239f92d30 Remove RUST_SRC_PATH from .profile
I'm not doing enough Rust development to justify supporting this. I'm also in
the midst of a cleaning frenzy, so it's possible that this is just collateral
damage. I don't think it is because I can always use lorri to set this value
when I'm writing Rust (hopefully the second 1/2 of this year).
2020-03-10 23:07:30 +00:00
William Carroll
57fbee288b Define additional systemctl fish abbreviations
I often run `systemctl --user status <some-unit>`
2020-03-10 23:07:30 +00:00
William Carroll
3ae100e468 Manage session variables with home-manager
If you haven't noticed, home-manager is managing increasingly more of my
configuration.

- Migrate session variables to home.nix
- Drop support for unused session variables like TERMINAL, VISUAL
2020-03-10 23:07:30 +00:00
William Carroll
82b2c8c27c Remove ssh-agent code from .profile
TIL: gpg-agent sets the SSH_AUTH_SOCK and other values. Since I already use
home-manager to start gpg-agent and SSH has been functioning without issues, I'm
removing the obsolete ssh-agent code.
2020-03-10 23:07:30 +00:00
William Carroll
ad77311c94 Configure keyboard preference with home-manager
Preferring home-manager to reduce some of the clutter I've created.
2020-03-10 23:07:30 +00:00
William Carroll
b6a803d99d Configure bat to use a different theme
Whatever bat's default theme for syntax highlight is, I cannot read it with my
current theme.
2020-03-10 23:07:30 +00:00
William Carroll
452a8fd4c7 WIP: Partially solve InterviewCake's find duplicate number
Write a function that finds one duplicate number from a list of numbers 1..n.

The function should satisfy the following performance objectives:
Runtime complexity: O(n*log(n))
Space complexity:   O(1)
2020-03-10 15:01:30 +00:00
William Carroll
d408915cfd Add Google Analytics to learn.wpcarro.dev
Ten people have visited https://learn.wpcarro.dev, but no one has emailed me
yet. I'd like to learn more about how people are using my website.
2020-03-10 15:00:41 +00:00
William Carroll
c06d93a275 Ad Google AdSense script to blog.wpcarro.dev
I'm adding Google Ads to my blog to:
- learn more about Google AdSense
- attempt to offset the my advertising costs for learn.wpcarro.dev

I may need to surround the <script></script> tags with markup to positions the
ads optimally. I will publish this first, see what it looks like without any
markup, and then progress.
2020-03-10 13:27:11 +00:00
William Carroll
a37e10ced5 Lint hugo Tailwind theme
My Emacs automatically trims trailing whitespace when I save a buffer. As a
result, this diff appears whenever I edit the baseof.html file. Instead of
continuing to ignore the diff, I'm committing it.
2020-03-10 13:27:11 +00:00
William Carroll
118b7b9668 Draft blog post about March's cell phone challenge
Started working on my debut blog post about giving up my cell phone during
march.

I'd like to publish this post by the end of the month, once I conclude the
experiment. At that time, I'd like to change the voice of some the content to be
past test. For now, I'm dumping ideas here while they're fresh in my mind. I
will refine and prune the final post later.
2020-03-10 13:27:11 +00:00
William Carroll
1fbdec0d6a Initialize //blog with lorri
To create new posts, I run...
```shell
hugo new name-of-post.md
```

While writing posts, I run...
```shell
hugo serve -D
```

I need hugo available on PATH environment variable, which lorri provides.
2020-03-10 13:27:11 +00:00
William Carroll
1e75f709ee Update Tailwind theme
Thing I changed:
- prefer a white background
- simplify the footer text

Other things that I'd like to change:
- use JetBrains Mono for the mono-font
2020-03-10 13:27:11 +00:00
William Carroll
220c6d138b Rename my-first-post
I created this file while following Hugo's quick-start tutorial. When I publish
a blog post, I will delete this file.
2020-03-10 13:27:11 +00:00
William Carroll
58ed992059 Solve InterviewCake's "find rotation point" problem
Write a function that accepts a rotated cycle of alphabetically sorted strings
and returns the index what should be the first element if the elements were not
rotated.
2020-03-10 13:27:11 +00:00
William Carroll
b929a6bb57 Nixify hugo deployment
Create a derivation for building the static files of my blog.
2020-03-09 15:35:12 +00:00
William Carroll
6e4c721be5 Add 'blog/themes/tailwind/' from commit '2cf446f4ef7bdcc4303ebcb0a3062e87cde4928b'
git-subtree-dir: blog/themes/tailwind
git-subtree-mainline: d206a2812f
git-subtree-split: 2cf446f4ef
2020-03-09 13:31:09 +00:00
William Carroll
d206a2812f Prefer hugo for blog.wpcarro.dev
Instead of creating my own static website generator, I'm trying Hugo. Huge is a
newer alternative to Jekyll. So far, I like what I see.

- Ignoring /blog/public since this is where `huge -D` generates the static
  assets.
- Using a TailwindCSS theme.
- Creating a dumby post about Emacs to test deployments.
- Deleting all Common Lisp and Nix code that powered my previous, half-baked
  blog.
2020-03-09 13:27:35 +00:00
William Carroll
2e0ad09a02 Increase vertical margins for splash text
I'm attempting to follow the principles the TailwindCSS authors wrote in their
design book: To space properly, zealously space.
2020-03-08 22:10:23 +00:00
William Carroll
7924b12fa6 Add "Why delay? Start today." to footer
For now, my slogan is "Why delay? Start today."

Like any slogan, the more you repeat it, the more it sticks.
2020-03-08 22:09:22 +00:00
William Carroll
2285fc8b36 Embolden "You will be coding from day one."
Emphasize the fact that students will start coding on the first day.
2020-03-08 22:08:40 +00:00
William Carroll
4bc9bb4910 Prefer "Learn to code" to "Learn to program"
I think this is more consistent with the main content.
2020-03-08 22:07:57 +00:00
William Carroll
669b728e49 Adjust learn.wpcarro.dev's styles for all devices
- Add a max width to constraint the width of the content
- Add horizontal padding to improve readability on handheld devices
- Reduce the font size of all headings
2020-03-08 19:23:19 +00:00
William Carroll
5fd094d39c Replace ~ with /home/wpcarro
Nix runs the `rebuild` command as root, so ~ resolves to /root, which is not
what I want.
2020-03-08 19:14:08 +00:00
William Carroll
9b49731c02 Use static directory path as root for learn.wpcarro.dev
With this simple change, Nix should copy the static directory and all of its
contents to /nix/store and return the path to that directory.

See TODO for more what I would have liked to do ideally.
2020-03-08 19:11:10 +00:00
William Carroll
a9bd18c440 Move index.html to static directory
I only want nginx to serve files from the static directory, so that I do not
accidentally expose files like default.nix or README.md to the web.
2020-03-08 19:10:35 +00:00
William Carroll
280956a466 Update markup for learn.wpcarro.dev
Adding a personal introduction, overview of coding, pricing, and contact
information.

Also using a CDN to install TailwindCSS, which the TailwindCSS authors
discourage, but I don't want to setup a complicated build process at the
moment.
2020-03-08 18:58:06 +00:00
William Carroll
688cd1d912 Add content for learn.wpcarro.dev
See the README.md for more context about this project.

TODO: I configure nginx to serve static files from /var/www/learn. I'd like to
symlink /var/www/learn to briefcase/learn as part of my `rebuild` script, but I
don't currently.
2020-03-08 11:43:33 +00:00
William Carroll
843e37b04f Ignore fish/{config.fish,fish_variables}
- config.fish: home-manager generates this file for me.
- fish_variables: fish generates this file.
2020-03-07 23:03:39 +00:00
William Carroll
94c0081241 Temporarily disable docker and rust from .profile
Attempting to debug nginx.
2020-03-07 16:17:23 +00:00
William Carroll
c187d89f27 Rename socrates/default.nix -> socrates/configuration.nix
readTree uses the output attribute set of default.nix as the value for
nixos.socrates, which disables me from resolving nixos.socrates.rebuild since
there is no rebuild attribute in the output attribute set from default.nix.

If I rename default.nix -> configuration.nix, I can resolve
nixos.socrates.{configuration,hardware,rebuild}.
2020-03-07 16:17:23 +00:00
William Carroll
694ca4a85f Ensure socrates/default.nix is a function
Nix complains that `nixos.socrates` is not a function but a set. By adding
`{ ... }:` to the top of the file, I'm hoping to change it from a set to a
function.
2020-03-07 16:17:23 +00:00
William Carroll
5ba3f2b572 Attempt to serve {learn,blog}.wpcarro.dev
Reading an Nginx tutorial and trying to port the information over to NixOS.
2020-03-07 16:17:22 +00:00
William Carroll
431b4980e4 Remove fix-point recursion from socrates/default.nix
The fixed-point recursion isn't necessary.
2020-03-07 15:07:32 +00:00
William Carroll
b04b1dafd2 Implement an in-place shuffling algorithm
I believe this may be the Fisher-Yates shuffle, but I'm not sure.
2020-03-06 18:45:55 +00:00
William Carroll
a9ac4f925b Support root directory and dirs like /tmp
Properly handle display the root directory and sub directories.
2020-03-06 18:45:55 +00:00
William Carroll
5d656b646f Include notmuch as an Emacs dependency
`(require 'notmuch)` in `email.el` broke my Emacs initialization. This should
fix that.
2020-03-06 18:45:55 +00:00
William Carroll
28af585f3d Include NIX_PATH settings in nix/rebuild-emacs function
I'm currently setting NIX_PATH in ~/briefcase/shell.nix. This means when I call
`nix/rebuild-emacs` from a buffer that is inside the briefcase directory, the
command succeeds because NIX_PATH is properly defined. When I call
`nix/rebuild-emacs` from any other location it fails.

I'm hard-coding the NIX_PATH in this command so that I can call
`nix/rebuild-emacs` from any buffer that is currently active.
2020-03-06 18:45:55 +00:00
William Carroll
96ff26e5ca Support nix/home-manager-switch
As a part of my plan to reduce my dependence on the shell, I defined an Elisp
function to call `home-manager switch` from `M-x`.
2020-03-06 18:45:55 +00:00
William Carroll
2eb9259a1b Manage fish with home-manager
I patched home-manager locally to support fzf keybindings for fish. I will PR
this into home-manager, but I haven't yet, which means that my home.nix file
depends on my local ~/home-manager.
2020-03-06 18:45:55 +00:00
William Carroll
fe61dee511 Splice configs/shared directory
- Move all children from configs/shared into configs.
- Delete "shared" directory.
2020-03-06 10:15:29 +00:00
William Carroll
137bd6dc0c Drop support for terminator
I've been consistently using vterm enough that I don't think I will change
shells anytime soon. Couple this with my previous commit where I hint that I'd
like to curb all terminal usage if possible, and it seems unlikely that I'll
want to keep this terminator configuration.
2020-03-06 10:15:29 +00:00
William Carroll
382ef0be55 Drop support for rofi
Rofi is a nicer alternative to dmenu, but I use neither dmenu nor rofi, so
farewell.
2020-03-06 10:15:29 +00:00