about summary refs log tree commit diff
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2020-08-27 Prefer builtins.pathWilliam Carroll1-1/+6
Following the advice of Domen's nix.dev anti-patterns, I'm preferring something like... ```nix builtins.path { path = /path/to/some.where; name = "some.where"; } ``` ...to ```nix /path/to/some/where ``` While the former is more verbose, it will fail to build when the path doesn't exist, which I prefer.
2020-08-20 Prefer reading secrets.json to using pass showWilliam Carroll1-5/+5
I'm attempting to maintain a top-level secrets.json that defines all of the sensitive data that I'd like to version-control without exposing everything in cleartext to the world. To that end, I'm using `git secret`, which will use `gpg` to encrypt secrets.json everytime I call `git secret hide` and decrypt everytime I call `git secret reveal`. I'm going to try this until I don't like it anymore... if that day comes... I should write a blog post about my setup to solicit useful feedback and share my ideas with others.
2020-08-20 Drop support for dir-locals.nix, <nixpkgs>, etc.William Carroll9-20/+15
In the spirit of Marie Kondo, I'm tidying up! TL;DR: - Prefer .envrc `use_nix` and delete all dir-locals.nix files - Remove ~all references to <nixpkgs>, <unstable>, <depot> and prefer referencing each with briefcase.third_party.{pkgs,unstable,depot} - Delete nixBufferFromShell function since I was only using that in dir-locals.nix files
2020-07-20 Move monzo_ynab into //toolsWilliam Carroll15-0/+815
Optimizing is difficult: I like flat hierarchies because I don't like directory-hopping, but I also would like a cleaner root for my mono-repo. Bombs away! Well it's that time again, folks: spring cleaning! Here I am musing about a few things that bother me: - Should I use kebab-case or snake_case? - It feels ~confusing to have //tools and //utils. What a //projects? Isn't everything a project? *sigh*
2020-07-02 Prefer builtins.pathWilliam Carroll1-3/+1
Thanks to the Nix anti-patterns documented here... https://nix.dev/anti-patterns/language.html#reproducability-referencing-top-level-directory-with ...I'm cleaning up some of my Nix expressions. Read the article for more context.
2020-04-05 Delete //tools/website-blockerWilliam Carroll1-28/+0
I changed the name of this project to url-blocker, which lives both within this repository and at github.com/wpcarro/url-blocker.
2020-03-29 Drop attempt to support a user-local /etc/hostsWilliam Carroll2-2/+0
While the idea of managing the hosts at a per-user level appeals much more to me that running this as root and managing /etc/hosts, I haven't been able to get it to work.
2020-03-29 Delete the stale testsWilliam Carroll2-44/+1
While this project would benefit from having test coverage, the current tests are not providing any useful coverage.
2020-03-29 Read and write to /etc/hostsWilliam Carroll8-25/+182
TL;DR: - Rename website-blocker to url-blocker - Add a README.md - Reads and writes to /etc/hosts
2020-03-29 Parse and serialize rules.jsonWilliam Carroll5-110/+216
TL;DR: - Write FromJSON instances to decode rules.json file - Prefer Text to String and use the OverloadedStrings language extension - Read /etc/hosts and append the serialized rules.json to the end Notes: - I can remove some of the FromJSON instances and use GHC Generics to define them for me. TODO: - Define the systemd timer unit for this to run - Ensure script can run with root privileges
2020-03-29 Experiment with user /etc/hostsWilliam Carroll2-0/+3
I have not been able to get this to work yet, but I hear that it is possible to maintain a user-specific /etc/hosts.
2020-03-29 Implement isToday predicateWilliam Carroll2-23/+17
Use the Data.Time package to implement the isToday predicate.
2020-03-28 Start social-fasting appWilliam Carroll3-0/+143
I'd like to ensure that my /etc/hosts file blocks websites at certains times. I use this to allow / disallow websites at various times of the day. TODO: - Add project README - Add tests - Publish - Create a Nix derivation - Run as a systemd timer unit - Figure out if I can run this as a user rather than root
2020-03-27 Drop support for lorriWilliam Carroll3-4/+8
Lorri does not cleanly integrate with my corporate device, which cannot run NixOS. To expose dependencies to Emacs buffers, I will use nix-buffer.el, which reads its values from dir-locals.nix. To easily expose dependencies from my existing shell.nix files into dir-locals.nix, I wrote a Nix utility function.
2020-03-05 Drop support for cloudtopWilliam Carroll1-3/+2
While I do still technically own a Google cloudtop device, I haven't used it in at least six months. In the interest of pruning non-critical dependencies, I'm deleting it. I can alway restore it thanks to Git.
2020-03-01 Remove default values for Nix expression parametersWilliam Carroll5-16/+5
I'm not sure if this commit breaks everything in my monorepo. I think it will. Why am I doing this? Perhaps it's a bad idea. I don't fully understand how readTree works. My ignorance is costing me hours of time spent debugging. In an effort to better understand readTree, I'm removing the default values for my Nix expression parameters, which I believe have preventing errors from surfacing.
2020-02-12 Nixify simple_vim ideaWilliam Carroll2-0/+108
I previously had an alias defined as `simple_vim`, which would start an instance of Vim with a bare bones config. I had a to-do to Nixify it. That is now (mostly) to-done. When I try and install it with `nix-env -f ~/briefcase -iA tools.simple_vim`, Nix fails and says that pkgs.stdenv is undefined. I will need to fix this one day, but it is neither important nor urgent...
2020-02-12 Tidy up structure of briefcaseWilliam Carroll12-0/+550
I had a spare fifteen minutes and decided that I should tidy up my monorepo. The work of tidying up is not finished; this is a small step in the right direction. TL;DR - Created a tools directory - Created a scratch directory (see README.md for more information) - Added README.md to third_party - Renamed delete_dotfile_symlinks -> symlinkManager - Packaged symlinkManager as an executable symlink-mgr using buildGo