mirror of
https://github.com/Xevion/dotfiles.git
synced 2025-12-15 06:11:39 -06:00
refactor: migrate private domain to encrypted file and improve configuration
- Replace interactive prompt with encrypted domain.txt.age file - Move encryption config to top level in .chezmoi.toml.tmpl - Add platform-specific shell configuration for chezmoi cd command - Remove unused Perl PATH configuration from commonrc - Add commit-staged slash command for git workflow - Enable nushell banner and improve init_pre.ts logging - Clean up deprecated installation scripts (ovpn, gitconfig) - Update hishtory server configuration to use encrypted domain
This commit is contained in:
@@ -1,15 +1,19 @@
|
||||
#!/usr/bin/env bun
|
||||
console.log("init_pre.ts");
|
||||
|
||||
import { exists } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
import { homedir } from "node:os";
|
||||
import { $ } from "bun";
|
||||
|
||||
// Type-safe wrapper around console.log that prepends [init_pre]
|
||||
const log = (...args: any[]): void => {
|
||||
console.log("[init_pre]", ...args);
|
||||
};
|
||||
|
||||
const filePath = join(homedir(), "key.txt");
|
||||
|
||||
if (await exists(filePath)) {
|
||||
console.log("key.txt already exists");
|
||||
log("key.txt already exists");
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
@@ -24,4 +28,4 @@ if (result.exitCode !== 0) {
|
||||
|
||||
// Write the secret to a file
|
||||
await Bun.write(filePath, result.stdout);
|
||||
console.log("key.txt bootstrapped");
|
||||
log("key.txt bootstrapped");
|
||||
|
||||
Reference in New Issue
Block a user