summary refs log tree commit diff stats
path: root/user/settings/fish
diff options
context:
space:
mode:
authorAlan Pearce2023-08-22 19:10:47 +0200
committerAlan Pearce2023-08-22 19:10:47 +0200
commitd6ff15479a8863724c28f94ab5cdc216a2b897c8 (patch)
tree9cb330d6159cd575237af953a08fd672f22bb3be /user/settings/fish
parentf8f5398d96b34adb178b9b73ee8228e78eddd329 (diff)
downloadnixfiles-d6ff15479a8863724c28f94ab5cdc216a2b897c8.tar.lz
nixfiles-d6ff15479a8863724c28f94ab5cdc216a2b897c8.tar.zst
nixfiles-d6ff15479a8863724c28f94ab5cdc216a2b897c8.zip
Port home-manager rollback function to fish
Diffstat (limited to 'user/settings/fish')
-rw-r--r--user/settings/fish/functions/home-manager-rollback.fish3
1 files changed, 3 insertions, 0 deletions
diff --git a/user/settings/fish/functions/home-manager-rollback.fish b/user/settings/fish/functions/home-manager-rollback.fish
new file mode 100644
index 00000000..c3b585b0
--- /dev/null
+++ b/user/settings/fish/functions/home-manager-rollback.fish
@@ -0,0 +1,3 @@
+function home-manager-rollback
+    (nix-shell -p home-manager --run 'home-manager --generations' | head -n2 | tail -n1 | field 7)/activate
+end