about summary refs log tree commit diff
path: root/users/wpcarro/configs/default.nix
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2021-10-23T22·36-0700
committerclbot <clbot@tvl.fyi>2022-01-08T04·28+0000
commitce87105c6d10e83fd03fe64432971e9de2caa440 (patch)
treebe930ffa173ee655ae478cfa3bffd7b8b32e3e6f /users/wpcarro/configs/default.nix
parent7cac51a995f687c4813e8558f3d7fad564a2a084 (diff)
refactor(wpcarro/configs): Nixify configs/{install,uninstall} r/3527
After receiving another computer from Google and attempting to "easily"
install my configuration, I realized that I had some holes. In reality
these could (and perhaps should) be easily tested using CI that attempts
to cleanly install my configuration on various platfoms (e.g. Debian,
NixOS), but I'm not interested in supporting something like that (at
least not at the moment).

For now, it suffices to nixify some of the lingering shell scripts with
implicit dependencies on tools like `stow`.

> Don't let perfect be the enemy of good?

Change-Id: Ifdeac2c855e46973e3a4ea416418109a748eb41d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4790
Tested-by: BuildkiteCI
Reviewed-by: wpcarro <wpcarro@gmail.com>
Autosubmit: wpcarro <wpcarro@gmail.com>
Diffstat (limited to 'users/wpcarro/configs/default.nix')
-rw-r--r--users/wpcarro/configs/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/users/wpcarro/configs/default.nix b/users/wpcarro/configs/default.nix
new file mode 100644
index 000000000000..5b0b6a7dcc31
--- /dev/null
+++ b/users/wpcarro/configs/default.nix
@@ -0,0 +1,11 @@
+{ pkgs, ... }:
+
+{
+  install = pkgs.writeShellScript "install-configs" ''
+    cd "$WPCARRO/configs" && ${pkgs.stow}/bin/stow --target="$HOME" .
+  '';
+
+  uninstall = pkgs.writeShellScript "uninstall-configs" ''
+    cd "$WPCARRO/configs" && ${pkgs.stow}/bin/stow --delete --target="$HOME" .
+  '';
+}