2024-07-02 17:27:08 -07:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
from pathlib import Path
|
|
|
|
import shutil
|
|
|
|
|
|
|
|
|
|
|
|
def main() -> None:
|
|
|
|
with open("/etc/hostname", "r") as f:
|
|
|
|
content = f.read()
|
|
|
|
hostname = content.strip()
|
|
|
|
source = Path("/etc/nixos")
|
|
|
|
destination = Path(__file__).parent / hostname
|
|
|
|
print(source, destination)
|
2024-07-19 20:24:50 -07:00
|
|
|
shutil.copytree(source, destination / "etc" / "nixos", dirs_exist_ok=True)
|
2024-07-02 17:27:08 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|