refactor: dedupe theme values and app helpers
This commit is contained in:
@@ -3,17 +3,5 @@
|
||||
use ../common.nu *
|
||||
|
||||
def main [hostname?: string, ...rest: string] {
|
||||
let host = if ($hostname | is-empty) {
|
||||
try { scutil --get LocalHostName | str trim } catch { hostname -s | str trim }
|
||||
} else { $hostname }
|
||||
|
||||
print_info $"Building configuration for ($host)"
|
||||
|
||||
nix build $".#darwinConfigurations.($host).system" --show-trace ...$rest
|
||||
|
||||
if ("./result" | path exists) {
|
||||
rm ./result
|
||||
}
|
||||
|
||||
print_success "Build completed successfully"
|
||||
build-config "darwin" $hostname ...$rest
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env nu
|
||||
|
||||
use ../common.nu *
|
||||
|
||||
def main [...inputs: string] {
|
||||
if ($inputs | is-empty) {
|
||||
print_info "Updating all flake inputs"
|
||||
nix flake update
|
||||
} else {
|
||||
print_info $"Updating flake inputs: ($inputs | str join ', ')"
|
||||
nix flake update ...$inputs
|
||||
}
|
||||
|
||||
print_info "Regenerating flake.nix"
|
||||
nix run .#write-flake
|
||||
|
||||
print_info "Formatting"
|
||||
alejandra .
|
||||
|
||||
print_success "Flake updated"
|
||||
}
|
||||
Reference in New Issue
Block a user