about summary refs log tree commit diff stats
path: root/home-manager
diff options
context:
space:
mode:
authorene <ene@sils.li>2023-04-03 18:44:08 +0200
committerene <ene@sils.li>2023-04-03 18:44:08 +0200
commit446c20e6bccd26f8e11b8efd5f66d7d471a85c64 (patch)
tree79f03dfdf4d7c72990c91cf3073cd5d06ed4f2fd /home-manager
parentFix(hm/mpd): Set client (diff)
downloadnixos-config-446c20e6bccd26f8e11b8efd5f66d7d471a85c64.tar.gz
nixos-config-446c20e6bccd26f8e11b8efd5f66d7d471a85c64.zip
Fix(hm/packages/scripts): Add update script
Diffstat (limited to '')
-rw-r--r--home-manager/packages/scripts.nix8
-rwxr-xr-xhome-manager/packages/scripts/small_functions/update10
2 files changed, 17 insertions, 1 deletions
diff --git a/home-manager/packages/scripts.nix b/home-manager/packages/scripts.nix
index b4354d82..af9983c5 100644
--- a/home-manager/packages/scripts.nix
+++ b/home-manager/packages/scripts.nix
@@ -42,7 +42,12 @@
   mocs-scr = write_script {
     name = "mocs";
     path = "small_functions";
-    dependencies = builtins.attrValues {inherit (pkgs) moc procps;}; # TODO add mymocp
+    dependencies = builtins.attrValues {inherit (pkgs) nmcpc procps;}; # TODO add mymocp
+  };
+  update-scr = write_script {
+    name = "update";
+    path = "small_functions";
+    dependencies = builtins.attrValues {inherit (pkgs) git nixos-rebuild;};
   };
 
   backsnap-scr = write_script {
@@ -82,6 +87,7 @@ in [
   gtk-themes-scr
   screen_shot-scr
   mocs-scr
+  update-scr
   backsnap-scr
   ll-scr
   # llp-scr # TODO see above
diff --git a/home-manager/packages/scripts/small_functions/update b/home-manager/packages/scripts/small_functions/update
new file mode 100755
index 00000000..453e8bc8
--- /dev/null
+++ b/home-manager/packages/scripts/small_functions/update
@@ -0,0 +1,10 @@
+#!/usr/bin/env dash
+# shellcheck disable=SC2086
+# shellcheck source=/dev/null
+. %SHELL_LIBRARY_PATH
+
+cd /etc/nixos
+git pull
+nixos-rebuild switch
+
+