# SoftwareFactory

## Getting started

### Pre

Make sure Podman API socket is running and enabled

```bash
sudo systemctl enable --now podman.socket
```

### Running terraform

Make sure the socket path is correct

First init

```bash
sudo podman run --rm -it \
  -v /run/podman/podman.sock:/run/podman/podman.sock \
  -v $(pwd)/terraform:/workspace \
  -w /workspace \
  -e PODMAN_SOCK=unix:///run/podman/podman.sock \
  hashicorp/terraform:1.13 init
```

Then plan

```bash
sudo podman run --rm -it \
  -v /run/podman/podman.sock:/run/podman/podman.sock \
  -v $(pwd)/terraform:/workspace \
  -w /workspace \
  -e PODMAN_SOCK=unix:///run/podman/podman.sock \
  hashicorp/terraform:1.13 plan
```

Then apply

```bash
sudo podman run --rm -it \
  -v /run/podman/podman.sock:/run/podman/podman.sock \
  -v $(pwd)/terraform:/workspace \
  -w /workspace \
  -e PODMAN_SOCK=unix:///run/podman/podman.sock \
  hashicorp/terraform:1.13 apply
```

## Development

### NixOS

Start nix container with

```bash
nix develop
```
