From d18013caf60f168031810abc1e676247659ca949 Mon Sep 17 00:00:00 2001 From: outremonde Date: Tue, 10 Jun 2025 22:44:49 -0400 Subject: edited setup util Former-commit-id: 8af3af3a4e6e4fd7c5ef29e32089bee170e63469 --- pkgs/setup-manager/setup.nu | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'pkgs') 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 | -- cgit v1.2.3