summaryrefslogtreecommitdiff
path: root/pkgs/setup-manager/setup.nu
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/setup-manager/setup.nu')
-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 |