diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 0ec991f..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Docker-Build-CI -on: - pull_request: - branches: - - main - types: [closed] - -jobs: - docker: - if: ${{ github.event.pull_request.merged }} - runs-on: ubuntu-latest - steps: - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Login to Github - uses: docker/login-action@v2 - with: - username: ${{ secrets.USERNAME }} - password: ${{ secrets.TOKEN }} - registry: ghcr.io - - name: Build and push - uses: docker/build-push-action@v3 - with: - push: true - tags: ghcr.io/team-ladefuchs/parkfuchs:latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 43b326e..d91347d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ jobs: uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - - name: Login to DockerHub + - name: Login to Github uses: docker/login-action@v2 with: username: ${{ secrets.USERNAME }} diff --git a/nix/default.nix b/nix/default.nix index b13aca1..0b9d3f0 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -35,7 +35,15 @@ in type = types.port; default = 8090; description = '' - Pokcetbase Host Port + Pokcetbase Host Port. + ''; + }; + + pocketBaseAddr = lib.mkOption { + type = types.str; + default = "0.0.0.0"; + description = '' + Pokcetbase Addr to use. ''; }; @@ -43,9 +51,7 @@ in }; config = - let pocketBaseHost = "127.0.0.1:${toString cfg.pocketBasePort}"; - in - lib.mkIf (cfg.enable) + lib.mkIf cfg.enable { users.users.parkfuchs = { isSystemUser = true; @@ -66,7 +72,7 @@ in Group = "parkfuchs"; StateDirectory = stateDir; # Starts the web server (default to 127.0.0.1:8090 if no domain is specified) - ExecStart = "${pkgs.pocketbase}/bin/pocketbase serve --http='${pocketBaseHost}' --dir=/var/lib/${stateDir}"; + ExecStart = "${pkgs.pocketbase}/bin/pocketbase serve --http='${cfg.pocketBaseAddr}:${toString cfg.pocketBasePort}' --dir=/var/lib/${stateDir}"; }; }; @@ -78,7 +84,7 @@ in ADDR = cfg.addr; PORT = toString cfg.port; TOMTOM_KEY = cfg.tomtomKey; - DB_HOST = "http://${pocketBaseHost}"; + DB_HOST = "http://127.0.0.1:${toString cfg.pocketBasePort}"; }; serviceConfig = { Type = "simple";