https://github.com/nullishamy/nacl
manage and deploy your homelab with easy to use static binaries. it's saltstack in nim.
https://github.com/nullishamy/nacl
Last synced: 11 months ago
JSON representation
manage and deploy your homelab with easy to use static binaries. it's saltstack in nim.
- Host: GitHub
- URL: https://github.com/nullishamy/nacl
- Owner: nullishamy
- Created: 2025-02-06T01:16:19.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-24T23:44:35.000Z (over 1 year ago)
- Last Synced: 2025-06-23T13:52:14.267Z (about 1 year ago)
- Language: Nim
- Size: 1.11 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nacl - saltstack but with extra Nim
## get started:
build the binary:
```sh
nim --passL:-static --out=bin/nacl --opt:speed compile src/main.nim
```
start the server:
```sh
./bin/nacl server
```
create the agent file (agent.cl):
```cl
'(
'('host "your server")
'('port 6969))
```
copy the nacl binary and agent file to the server,
then start the agent:
```sh
./nacl agent
```
the agent will now handshake with the server, and then await instruction
you can execute instructions through the CLI:
```nushell
# This is nushell syntax, replace open with `cat` or similar
./bin/nacl exec (open ./init-server.cl)
```
```cl
; init-server.cl
(defun install-package (pkg)
(exec "apt" '("install" pkg)))
(defun update-package-set ()
(exec "apt" '("update")))
(set 'do-docker 1)
(defun docker-init ()
(exec "echo" '("docker installation not implemented yet")))
(plan "initialise new server"
((update-package-set)
(install-package "git")
(install-package "net-tools")
(if do-docker
(docker-init))))
```
observe the results!