about summary refs log tree commit diff
path: root/nixos (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-09-01 Delete comment monzo_ynab deploymentWilliam Carroll1-22/+0
I haven't used this since I wrote it months ago...
2020-08-20 Move buildkite's SSH key out of /home/wpcarro into /etc/sshWilliam Carroll1-0/+1
After enabling buildkite-agent using NixOS, it runs as its own user, buildkite-agent-socrates, which does not have its own home directory. I moved the SSH key that I made when running buildkite-agent as wpcarro into /etc/ssh and `chown`'d it for buildkite-agent-socrates.
2020-08-20 Enable services.buildkite-agentsWilliam Carroll1-7/+7
Instead of enabling `buildkite-agent` ad hoc, use NixOS to configure it.
2020-08-20 Support build-briefcase.shWilliam Carroll1-1/+1
For now, I'm supporting two CI pipelines: - build-socrates - build-briefcase Conceptually, build-briefcase should cover what build-socrates does now, but eventually I would like build-socrates to call `switch-to-configuration` so that all of my websites, etc. stay fresh.
2020-08-20 Revise previous opinions about absolute paths GT <bracket-notation>William Carroll3-13/+2
Unforeseen problem: `buildkite-agent` runs its builds in a separate directory, so if I want the `nix-build` command to build the newly checked out code, I need to set <briefcase> to the CWD.
2020-08-20 Attempt nix-build instead of nixos-rebuild switchWilliam Carroll2-27/+13
I've encountered a few problems with attempting to support nixos-rebuild: - the activation step requires `sudo` privileges - the `buildkite-agent` runs on the same machine, socrates, that is rebuilding itself. This means that when the activation step runs, it will attempt to restart `buildkite-agent` when the agent is still working I'm slowly removing places in my nix code that rely on '<bracket>' notation, so that I no longer depend on NIX_PATH being set. I still have more work to do. {covid-uk,sandbox}/default.nix are breaking when I attempt to run my build-socrates.sh script locally, so I'm temporarily disabling them until I can get CI working as I expect.
2020-08-20 Define buildkite-agent userWilliam Carroll1-0/+7
I'd like my buildkite-agent to run as its own user, so I'm defining that user here.
2020-08-20 Log all polkit actions to find action.id for nixos-rebuildWilliam Carroll1-0/+6
I would like to setup a polkit rule to allow `buildkite-agent` (i.e. a forthcoming user) to call `nixos-rebuild`. I need to know the `action.id` before I can write a reliable rule.
2020-08-20 Attempt to build Socrates using BuildKiteWilliam Carroll1-1/+1
Let's see what happens...
2020-08-20 Define the monoserver as a systemd serviceWilliam Carroll1-0/+10
Much better than manually running: ```shell $ cd ~/briefcase && git pull --rebase origin master $ nix-rebuild switch $ nix-build -A zoo $ pkill zoo $ ./result/zoo & $ job -l $ disown %<job-number> ```
2020-08-20 Add host field for nginx JSON logsWilliam Carroll1-0/+1
I'd like to filter logs from {blog,git,zoo}.wpcarro.dev, etc.
2020-08-20 Remove logging prefix from Nginx logsWilliam Carroll1-9/+10
Problem: The JSON that Nginx outputs cannot be successfully parsed by journaldriver because Nginx prefixes it with "socrates nginx:". Adding `nohostname` to `access_log` should solve this problem. I borrow this from @tazjin's most recent definition of `commonHttpConfig`.
2020-08-20 Use journaldriver to view journald logs from SocratesWilliam Carroll1-0/+7
Attempting to use @tazjin's delightful simple logging library!
2020-08-20 Disabling the monzo-token-serverWilliam Carroll1-21/+19
I haven't used this since I wrote it... and now the .tokens attribute is missing and it's screwing up my other deployment... *sigh*
2020-08-20 Forward zoo.wpcarro.dev connections to :8000William Carroll1-0/+7
Right now the 8000 port is hard-coded into the zoo server, which isn't ideal, but "it works" (TM).
2020-06-30 Now removing "Closed"William Carroll1-1/+0
At this point, I'm starting to lose interest.
2020-06-30 Prefer "Closed" authModeWilliam Carroll1-1/+1
Setting `authMode = "Registered"` prevents me from running the `register <password>` command from inside of `bitlbee`, which I *believe* I need to run...
2020-06-30 Remove auth from BitlbeeWilliam Carroll1-1/+0
I'm having trouble getting PAM auth to work, so I'm temporarily disabling it. TIL that I can use the following to verify that PAM is properly setup for a program (e.g. `bitlbee`). ``` pamtester -v bitlbee $(whoami) authenticate ``` ...but despite this succeeding, I still cannot use the `identify` command in `bitlbee` to successfully authenticate. It just tells me "Incorrect password" even though I'm providing it the same password that I type when doing the `pamtester` command from above. Computers!
2020-06-30 Add auth to bitlbeeWilliam Carroll1-0/+2
Use Linux's PAM for Bitlbee's auth.
2020-06-30 Support bitlbee + stunnelWilliam Carroll1-1/+19
TLS support for bitlbee...
2020-06-30 Open :6667William Carroll1-1/+2
Attempt to access Bitlbee from IRCCloud.com client...
2020-06-30 Support bitlbeeWilliam Carroll1-0/+8
I'm still not entirely sure what bitlbee does, but I know this: I want as many messengers in the same place as possible: IRC, Slack, Telegram. @tazjin tells me that Bitlbee will help me get to the promised land. This is hopefully one step of many in that direction.
2020-04-18 "Chord Drill Sergeant" -> "Learn Piano Chords"William Carroll1-1/+1
In the spirit of "keep it simple, stupid", I am naming this application as closely to the functionality as I can imagine.
2020-04-17 Nixify build for Chord Drill SergeantWilliam Carroll1-0/+5
Thankfully @tazjin builds Gemma (an Elm project) with Nix, so I could reference Gemma's default.nix to help me with mine. Elm problematically attempts to HTTP-fetch a list of packages to verify my project's dependencies. Because Nix builds derivations in a sandbox without network access, I need to use some escape hatches (i.e. NIX_REDIRECTS, LD_PRELOAD, SYSTEM_CERTIFICATE_PATH). Welp... it's packaged now... I'm also pointing learnpianochords.app to this project's index.html. It will be live soon! :) TODO(wpcarro): Rename "Chord Drill Sergeant" -> "Learn Piano Chords" (KISS)
2020-04-05 Change Gitea's rootUrlWilliam Carroll1-1/+6
This value defaults to localhost:3000, which works, but then Gitea renders "http://localhost:3000/wpcarro/briefcase" as the URL to clone my briefcase repository.
2020-04-05 Forward git.wpcarro.dev connections to :3000William Carroll1-0/+7
Gitea is running a web server on localhost:3000.
2020-04-05 Prefer gitea to gogsWilliam Carroll1-8/+1
Gitea's announcement notes explain some of the benefits of Gitea over Gogs: https://blog.gitea.io/2016/12/welcome-to-gitea/ Also, I never configured Gogs such that I could use it, so the cost of switching from Gogs to Gitea was basically zero.
2020-03-27 Drop support for lorriWilliam Carroll1-2/+0
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-20 Move sandbox into websiteWilliam Carroll1-1/+1
Nest the sandbox work under ./website.
2020-03-20 Move learn to website/learnWilliam Carroll1-1/+1
Nest the learn directory in the website directory.
2020-03-20 Move blog into website/blogWilliam Carroll1-1/+1
Nest the blog work within the website directory.
2020-03-20 Add sitemap to wpcarro.devWilliam Carroll1-3/+6
- Create ./website directory - Add a sitemap to wpcarro.dev - Move covid-uk directory to sandbox directory TODO: Next sandbox, blog, and learn in the website directory
2020-03-19 Attempt to serve sandbox.wpcarro.dev/covid-19William Carroll1-1/+3
Right now my website is serving at sandbox.wpcarro.dev, but I would rather people view it at sandbox.wpcarro.dev/covid-19. I previously tried to accomplish this with the following Nginx configuration: ```nix locations."/covid-19" = { root = briefcase.covid-uk; } ``` I am now trying `alias = ...` instead of `root = ...`. I got the idea from this SO question, https://stackoverflow.com/questions/10631933/nginx-static-file-serving-confusion-with-root-alias.
2020-03-19 Update COVID-19 webpageWilliam Carroll1-2/+2
- Prefer hosting on sandbox.wpcarro.dev; I would prefer to host it at sandbox.wpcarro.dev/covid-19, but I haven't figure out how to use Nginx to do serve locations like /covid-19 yet. - Splice the src directory: When I develop locally and index.html exists within ./src, I cannot access ./node_modules because ./node_modules is in a parent directory. I could fix this if I used a bundler like Parcel or Webpack, but I do not want to set that up at this time. - Introduce Tailwind for CSS. This complicates my build a bit as well. For now, I'm including output.css even though ideally I should not version-control this file. I haven't figured out how to `yarn install` and run commands like `npx tailwindcss build styles.css -o output.css` in a Nix derivation yet. Hopefully I will learn and refactor this. - Add some content about why I made this chart - Add some content about some of my covid-19 predictions - Add a footer to the webpage - Delete timeseries.json and prefer fetching the published data instead
2020-03-18 Remove git.wpcarro.dev entry fron Nginx configWilliam Carroll1-7/+0
This is not currently working and it is causing Nginx to enter a retry loop. I am removing it until I choose to focus on it.
2020-03-18 Create line chart of UK confirmed corona virus casesWilliam Carroll1-0/+5
I was having trouble tracking the growth of corona virus cases in the UK. Thankfully someone is publishing some daily COVID data as JSON. I downloaded that data manually and plotted it using the chart.js library as a programming exercise with Mimi. Now I'm attempting to deploy to https://wpcarro.dev/covid-uk. TODO(wpcarro): Prefer the live API data instead my soon-to-be-stale downloaded.
2020-03-16 Create derivation for learn.wpcarro.devWilliam Carroll1-3/+1
Creating a derivation to abstract over the build process for learn.wpcarro.dev.
2020-03-10 Attempt to support gogsWilliam Carroll1-0/+17
Gogs claims to be an easy-to-use Git server and web frontend written in golang. I'm eager to try it as an alternative to cgit.
2020-03-09 Nixify hugo deploymentWilliam Carroll1-1/+1
Create a derivation for building the static files of my blog.
2020-03-08 Replace ~ with /home/wpcarroWilliam Carroll1-1/+1
Nix runs the `rebuild` command as root, so ~ resolves to /root, which is not what I want.
2020-03-08 Use static directory path as root for learn.wpcarro.devWilliam Carroll1-1/+3
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-07 Rename socrates/default.nix -> socrates/configuration.nixWilliam Carroll2-1/+1
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 Ensure socrates/default.nix is a functionWilliam Carroll1-0/+2
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 Attempt to serve {learn,blog}.wpcarro.devWilliam Carroll1-10/+12
Reading an Nginx tutorial and trying to port the information over to NixOS.
2020-03-07 Remove fix-point recursion from socrates/default.nixWilliam Carroll1-2/+2
The fixed-point recursion isn't necessary.
2020-03-01 Manually require dependencies for <nixpkgs>, <briefcase>William Carroll1-2/+8
When I build socrates using `sudo nixos-rebuild [...] switch`, my `nixos-config` (i.e. <briefcase/nixos/socrates/default.nix>) is a simple Nix anonymous function. Typically readTree populates my pkgs, briefcase, depot function parameters with <nixpkgs>, <briefcase>, <depot>, but `nixos-rebuild` is unaware of `readTree`. For now I'm manually importing these dependencies, and I'm leaving a TODO to reconsider switching to the `{ pkgs, briefcase, ... }` style when I better understand NixOS.
2020-03-01 Removing unused parameters in installer.nixWilliam Carroll1-1/+1
I'm neither using config nor pkgs, so I'm deleteing them.
2020-03-01 Nest configuration beneath socrates directoryWilliam Carroll3-10/+5
Create a socrates directory to store configuration for socrates.
2020-02-23 Expose depot and briefcase to rebuild scriptWilliam Carroll1-0/+2
At the moment, I don't think nixos-rebuild is reading $NIX_PATH, which appropriately sets the paths for depot and briefcase. I'm going to explicitly expose these values in the rebuild script for now.
2020-02-23 Define monzo-token-server as a root systemd serviceWilliam Carroll1-4/+10
After I considered the security implications of calling `systemctl --user cat monzo-token-server`, I realized that monzo-token-server should be a root service instead of a user service. This service unit now also explicitly depends on briefcase.monzo_ynab.tokens, which is a big improvement.