summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroutremonde <outremonde@vivaldi.net>2025-06-10 22:53:46 -0400
committeroutremonde <outremonde@vivaldi.net>2025-06-10 22:53:46 -0400
commit00bacd1e079f3d3b10003a784ca70bd803a5e27e (patch)
tree9819ba4c82421d268daf81439a5145c6fc82c025
parent66b90b4f429a493f5b9cb4a89bcb14c5b7140fe0 (diff)
changed setup util
Former-commit-id: 47bdb9736c43d4da8d426c5cecb84875debf1927
-rw-r--r--pkgs/setup-manager/setup.nu13
1 files changed, 7 insertions, 6 deletions
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.