From 00bacd1e079f3d3b10003a784ca70bd803a5e27e Mon Sep 17 00:00:00 2001 From: outremonde Date: Tue, 10 Jun 2025 22:53:46 -0400 Subject: changed setup util Former-commit-id: 47bdb9736c43d4da8d426c5cecb84875debf1927 --- pkgs/setup-manager/setup.nu | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'pkgs/setup-manager') diff --git a/pkgs/setup-manager/setup.nu b/pkgs/setup-manager/setup.nu index 6a926d7..cc5ea4e 100644 --- a/pkgs/setup-manager/setup.nu +++ b/pkgs/setup-manager/setup.nu @@ -11,8 +11,8 @@ # Settings let flake_dir = "~/Sync/setup/" | path expand -let default_sys = hostname -let default_usr = whoami +let default_system = hostname +let default_user = whoami def "main" [] {} @@ -25,16 +25,17 @@ def "main sync" [] {} # Syncronize the system with its config. def "main sync system" [ - sys?: string # The name of the system config to syncronize. + system?: string # The name of the system config to syncronize. ] { - sudo nixos-rebuild switch --flake $"($flake_dir)#($sys | default $default_sys)" + sudo nixos-rebuild switch --flake $"($flake_dir)#($system | default $default_system)" } # Syncronize the userland with its config. def "main sync user" [ - usr?: string # The name of the user config to syncronize. + user?: string # The name of the user config to syncronize. + system?: string # The name of the system the user falls under. ] { - home-manager switch --flake $"($flake_dir)#($usr | default $default_usr)" + home-manager switch --flake $"($flake_dir)#($user | default $default_user)@($system | default $default_system)" } # Syncronize both the system and the userland with their configs. -- cgit v1.2.3