Files
nixos-config/apps/x86_64-linux/build
2026-03-05 15:41:41 +00:00

20 lines
467 B
Plaintext
Executable File

#!/usr/bin/env nu
use ../common.nu *
def main [hostname?: string, ...rest: string] {
let host = if ($hostname | is-empty) {
hostname | str trim
} else { $hostname }
print_info $"Building configuration for ($host)"
nix build $".#nixosConfigurations.($host).config.system.build.toplevel" --show-trace ...$rest
if ("./result" | path exists) {
rm ./result
}
print_success "Build completed successfully"
}