summaryrefslogtreecommitdiff
path: root/pkgs/setup-manager
diff options
context:
space:
mode:
authoroutremonde <outremonde@vivaldi.net>2025-06-10 22:44:49 -0400
committeroutremonde <outremonde@vivaldi.net>2025-06-10 22:44:49 -0400
commitd18013caf60f168031810abc1e676247659ca949 (patch)
tree01e3edf7435a6d793501f795517c72ba4131c36b /pkgs/setup-manager
parent5b06a00bb7df4a2b0875c5da4e099a50b6e03b23 (diff)
edited setup util
Former-commit-id: 8af3af3a4e6e4fd7c5ef29e32089bee170e63469
Diffstat (limited to 'pkgs/setup-manager')
-rw-r--r--pkgs/setup-manager/setup.nu11
1 files changed, 9 insertions, 2 deletions
diff --git a/pkgs/setup-manager/setup.nu b/pkgs/setup-manager/setup.nu
index 46ab637..65d7f34 100644
--- a/pkgs/setup-manager/setup.nu
+++ b/pkgs/setup-manager/setup.nu
@@ -18,6 +18,8 @@ def "main" [] {}
# | Syncronization Commands |
# +-------------------------+
+def "main sync" [] {}
+
# Syncronize the system with its config.
def "main sync system" [
sys?: string # The name of the system config to syncronize.
@@ -29,12 +31,17 @@ def "main sync system" [
# Syncronize the userland with its config.
def "main sync user" [
usr?: string # The name of the user config to syncronize.
-] {}
+] {
+ if ($usr == null) {let usr = (whoami)}
+ home-manager switch --flake $"($flake_dir)#($usr)"
+}
# Syncronize both the system and the userland with their configs.
def "main sync all" [
usr_sys?: string # The name of the user and system configs to syncronize. In the format "user@system".
-] {}
+] {
+ main sync system ; main sync user
+}
# +----------------+
# | Other Commands |