depotwide: migrate to git.lukegb.com
This commit is contained in:
parent
96eebb817d
commit
18cc5d7cd9
76 changed files with 117 additions and 117 deletions
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
depot.third_party.buildGo2.package {
|
depot.third_party.buildGo2.package {
|
||||||
name = "asm";
|
name = "asm";
|
||||||
path = "hg.lukegb.com/lukegb/depot/go/buildgo2/asm";
|
path = "git.lukegb.com/lukegb/depot/go/buildgo2/asm";
|
||||||
srcs = [ ./buildgo2.go ./add.S ];
|
srcs = [ ./buildgo2.go ./add.S ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
depot.third_party.buildGo2.package {
|
depot.third_party.buildGo2.package {
|
||||||
name = "cgo";
|
name = "cgo";
|
||||||
path = "hg.lukegb.com/lukegb/depot/go/buildgo2/cgo";
|
path = "git.lukegb.com/lukegb/depot/go/buildgo2/cgo";
|
||||||
srcs = [ ./cgo.go ./cgo.h ./cgo.c ];
|
srcs = [ ./cgo.go ./cgo.h ./cgo.c ];
|
||||||
cgo = true;
|
cgo = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/go/buildgo2/asm"
|
"git.lukegb.com/lukegb/depot/go/buildgo2/asm"
|
||||||
//"hg.lukegb.com/lukegb/depot/go/buildgo2/cgo"
|
//"git.lukegb.com/lukegb/depot/go/buildgo2/cgo"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
module hg.lukegb.com/lukegb/depot/go
|
module git.lukegb.com/lukegb/depot/go
|
||||||
|
|
||||||
go 1.18
|
go 1.18
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,10 @@ import (
|
||||||
"gocloud.dev/blob"
|
"gocloud.dev/blob"
|
||||||
"golang.org/x/sync/errgroup"
|
"golang.org/x/sync/errgroup"
|
||||||
"golang.org/x/sync/singleflight"
|
"golang.org/x/sync/singleflight"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nar/narinfo"
|
"git.lukegb.com/lukegb/depot/go/nix/nar/narinfo"
|
||||||
|
|
||||||
_ "gocloud.dev/blob/gcsblob"
|
_ "gocloud.dev/blob/gcsblob"
|
||||||
_ "hg.lukegb.com/lukegb/depot/go/vault/vaultgcsblob"
|
_ "git.lukegb.com/lukegb/depot/go/vault/vaultgcsblob"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -21,13 +21,13 @@ import (
|
||||||
"gocloud.dev/blob"
|
"gocloud.dev/blob"
|
||||||
"golang.org/x/sync/errgroup"
|
"golang.org/x/sync/errgroup"
|
||||||
"golang.org/x/sync/singleflight"
|
"golang.org/x/sync/singleflight"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nar"
|
"git.lukegb.com/lukegb/depot/go/nix/nar"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nar/narinfo"
|
"git.lukegb.com/lukegb/depot/go/nix/nar/narinfo"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixstore"
|
"git.lukegb.com/lukegb/depot/go/nix/nixstore"
|
||||||
|
|
||||||
_ "gocloud.dev/blob/fileblob"
|
_ "gocloud.dev/blob/fileblob"
|
||||||
_ "gocloud.dev/blob/gcsblob"
|
_ "gocloud.dev/blob/gcsblob"
|
||||||
_ "hg.lukegb.com/lukegb/depot/go/vault/vaultgcsblob"
|
_ "git.lukegb.com/lukegb/depot/go/vault/vaultgcsblob"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -9,10 +9,10 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nar/narinfo"
|
"git.lukegb.com/lukegb/depot/go/nix/nar/narinfo"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixdrv"
|
"git.lukegb.com/lukegb/depot/go/nix/nixdrv"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixpool"
|
"git.lukegb.com/lukegb/depot/go/nix/nixpool"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixstore"
|
"git.lukegb.com/lukegb/depot/go/nix/nixstore"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -11,10 +11,10 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixbuild"
|
"git.lukegb.com/lukegb/depot/go/nix/nixbuild"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixdrv"
|
"git.lukegb.com/lukegb/depot/go/nix/nixdrv"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixpool"
|
"git.lukegb.com/lukegb/depot/go/nix/nixpool"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixstore"
|
"git.lukegb.com/lukegb/depot/go/nix/nixstore"
|
||||||
)
|
)
|
||||||
|
|
||||||
type remoteDefinition struct {
|
type remoteDefinition struct {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{ depot, ... }@args:
|
{ depot, ... }@args:
|
||||||
(depot.third_party.buildGo.package {
|
(depot.third_party.buildGo.package {
|
||||||
name = "nar";
|
name = "nar";
|
||||||
path = "hg.lukegb.com/lukegb/depot/go/nix/nar";
|
path = "git.lukegb.com/lukegb/depot/go/nix/nar";
|
||||||
srcs = [
|
srcs = [
|
||||||
./dirfs.go
|
./dirfs.go
|
||||||
./inmemoryfs.go
|
./inmemoryfs.go
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{ depot, ... }:
|
{ depot, ... }:
|
||||||
depot.third_party.buildGo.package {
|
depot.third_party.buildGo.package {
|
||||||
name = "narinfo";
|
name = "narinfo";
|
||||||
path = "hg.lukegb.com/lukegb/depot/go/nix/nar/narinfo";
|
path = "git.lukegb.com/lukegb/depot/go/nix/nar/narinfo";
|
||||||
srcs = [
|
srcs = [
|
||||||
./narinfo.go
|
./narinfo.go
|
||||||
];
|
];
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"path"
|
"path"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixwire"
|
"git.lukegb.com/lukegb/depot/go/nix/nixwire"
|
||||||
)
|
)
|
||||||
|
|
||||||
type FS interface {
|
type FS interface {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/google/go-cmp/cmp"
|
"github.com/google/go-cmp/cmp"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixwire"
|
"git.lukegb.com/lukegb/depot/go/nix/nixwire"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestHeader(t *testing.T) {
|
func TestHeader(t *testing.T) {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixwire"
|
"git.lukegb.com/lukegb/depot/go/nix/nixwire"
|
||||||
)
|
)
|
||||||
|
|
||||||
type WriteFile interface {
|
type WriteFile interface {
|
||||||
|
|
|
@ -9,9 +9,9 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nar/narinfo"
|
"git.lukegb.com/lukegb/depot/go/nix/nar/narinfo"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixdrv"
|
"git.lukegb.com/lukegb/depot/go/nix/nixdrv"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixpool"
|
"git.lukegb.com/lukegb/depot/go/nix/nixpool"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Fetcher interface {
|
type Fetcher interface {
|
||||||
|
|
|
@ -9,8 +9,8 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixdrv"
|
"git.lukegb.com/lukegb/depot/go/nix/nixdrv"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixstore"
|
"git.lukegb.com/lukegb/depot/go/nix/nixstore"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Coordinator struct {
|
type Coordinator struct {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{ depot, ... }:
|
{ depot, ... }:
|
||||||
depot.third_party.buildGo.package {
|
depot.third_party.buildGo.package {
|
||||||
name = "nixbuild";
|
name = "nixbuild";
|
||||||
path = "hg.lukegb.com/lukegb/depot/go/nix/nixbuild";
|
path = "git.lukegb.com/lukegb/depot/go/nix/nixbuild";
|
||||||
srcs = [
|
srcs = [
|
||||||
./config.go
|
./config.go
|
||||||
./coordinator.go
|
./coordinator.go
|
||||||
|
|
|
@ -13,7 +13,7 @@ import (
|
||||||
"regexp"
|
"regexp"
|
||||||
|
|
||||||
"github.com/numtide/go-nix/nixbase32"
|
"github.com/numtide/go-nix/nixbase32"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nar/narinfo"
|
"git.lukegb.com/lukegb/depot/go/nix/nar/narinfo"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -13,11 +13,11 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"path"
|
"path"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nar"
|
"git.lukegb.com/lukegb/depot/go/nix/nar"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nar/narinfo"
|
"git.lukegb.com/lukegb/depot/go/nix/nar/narinfo"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixdrv"
|
"git.lukegb.com/lukegb/depot/go/nix/nixdrv"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixpool"
|
"git.lukegb.com/lukegb/depot/go/nix/nixpool"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixstore"
|
"git.lukegb.com/lukegb/depot/go/nix/nixstore"
|
||||||
)
|
)
|
||||||
|
|
||||||
type PeerFetcher struct {
|
type PeerFetcher struct {
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixpool"
|
"git.lukegb.com/lukegb/depot/go/nix/nixpool"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixstore"
|
"git.lukegb.com/lukegb/depot/go/nix/nixstore"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DELETE ME
|
// DELETE ME
|
||||||
|
|
|
@ -14,9 +14,9 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nar/narinfo"
|
"git.lukegb.com/lukegb/depot/go/nix/nar/narinfo"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixdrv"
|
"git.lukegb.com/lukegb/depot/go/nix/nixdrv"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixstore"
|
"git.lukegb.com/lukegb/depot/go/nix/nixstore"
|
||||||
)
|
)
|
||||||
|
|
||||||
type WorkItem struct {
|
type WorkItem struct {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{ depot, ... }:
|
{ depot, ... }:
|
||||||
depot.third_party.buildGo.package {
|
depot.third_party.buildGo.package {
|
||||||
name = "nixdrv";
|
name = "nixdrv";
|
||||||
path = "hg.lukegb.com/lukegb/depot/go/nix/nixdrv";
|
path = "git.lukegb.com/lukegb/depot/go/nix/nixdrv";
|
||||||
srcs = [
|
srcs = [
|
||||||
./nixdrv.go
|
./nixdrv.go
|
||||||
./localfs.go
|
./localfs.go
|
||||||
|
|
|
@ -14,7 +14,7 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixhash"
|
"git.lukegb.com/lukegb/depot/go/nix/nixhash"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Output struct {
|
type Output struct {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5,7 +5,7 @@
|
||||||
{ depot, ... }:
|
{ depot, ... }:
|
||||||
depot.third_party.buildGo.package {
|
depot.third_party.buildGo.package {
|
||||||
name = "nixhash";
|
name = "nixhash";
|
||||||
path = "hg.lukegb.com/lukegb/depot/go/nix/nixhash";
|
path = "git.lukegb.com/lukegb/depot/go/nix/nixhash";
|
||||||
srcs = [
|
srcs = [
|
||||||
./nixhash.go
|
./nixhash.go
|
||||||
];
|
];
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{ depot, ... }:
|
{ depot, ... }:
|
||||||
depot.third_party.buildGo.package {
|
depot.third_party.buildGo.package {
|
||||||
name = "nixpool";
|
name = "nixpool";
|
||||||
path = "hg.lukegb.com/lukegb/depot/go/nix/nixpool";
|
path = "git.lukegb.com/lukegb/depot/go/nix/nixpool";
|
||||||
srcs = [
|
srcs = [
|
||||||
./dialer.go
|
./dialer.go
|
||||||
./nixpool.go
|
./nixpool.go
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"golang.org/x/crypto/ssh"
|
"golang.org/x/crypto/ssh"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixstore"
|
"git.lukegb.com/lukegb/depot/go/nix/nixstore"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DaemonFactory is the shape of a factory function.
|
// DaemonFactory is the shape of a factory function.
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixstore"
|
"git.lukegb.com/lukegb/depot/go/nix/nixstore"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Pool struct {
|
type Pool struct {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{ depot, ... }:
|
{ depot, ... }:
|
||||||
depot.third_party.buildGo.package {
|
depot.third_party.buildGo.package {
|
||||||
name = "nixstore";
|
name = "nixstore";
|
||||||
path = "hg.lukegb.com/lukegb/depot/go/nix/nixstore";
|
path = "git.lukegb.com/lukegb/depot/go/nix/nixstore";
|
||||||
srcs = [
|
srcs = [
|
||||||
./activities.go
|
./activities.go
|
||||||
./nixstore.go
|
./nixstore.go
|
||||||
|
|
|
@ -3,7 +3,7 @@ package nixstore
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nar/narinfo"
|
"git.lukegb.com/lukegb/depot/go/nix/nar/narinfo"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Store interface {
|
type Store interface {
|
||||||
|
|
|
@ -13,10 +13,10 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nar"
|
"git.lukegb.com/lukegb/depot/go/nix/nar"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nar/narinfo"
|
"git.lukegb.com/lukegb/depot/go/nix/nar/narinfo"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixdrv"
|
"git.lukegb.com/lukegb/depot/go/nix/nixdrv"
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixwire"
|
"git.lukegb.com/lukegb/depot/go/nix/nixwire"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nar/narinfo"
|
"git.lukegb.com/lukegb/depot/go/nix/nar/narinfo"
|
||||||
|
|
||||||
_ "github.com/mattn/go-sqlite3"
|
_ "github.com/mattn/go-sqlite3"
|
||||||
)
|
)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{ depot, ... }@args:
|
{ depot, ... }@args:
|
||||||
depot.third_party.buildGo.package {
|
depot.third_party.buildGo.package {
|
||||||
name = "nixwire";
|
name = "nixwire";
|
||||||
path = "hg.lukegb.com/lukegb/depot/go/nix/nixwire";
|
path = "git.lukegb.com/lukegb/depot/go/nix/nixwire";
|
||||||
srcs = [
|
srcs = [
|
||||||
./nixwire.go
|
./nixwire.go
|
||||||
];
|
];
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/go/nix/nixdrv"
|
"git.lukegb.com/lukegb/depot/go/nix/nixdrv"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Serializer struct {
|
type Serializer struct {
|
||||||
|
|
|
@ -14,10 +14,10 @@ import (
|
||||||
"github.com/jlaffaye/ftp"
|
"github.com/jlaffaye/ftp"
|
||||||
"gocloud.dev/blob"
|
"gocloud.dev/blob"
|
||||||
"gocloud.dev/blob/s3blob"
|
"gocloud.dev/blob/s3blob"
|
||||||
"hg.lukegb.com/lukegb/depot/go/trains/darwin"
|
"git.lukegb.com/lukegb/depot/go/trains/darwin"
|
||||||
"hg.lukegb.com/lukegb/depot/go/trains/darwin/darwindb"
|
"git.lukegb.com/lukegb/depot/go/trains/darwin/darwindb"
|
||||||
"hg.lukegb.com/lukegb/depot/go/trains/darwin/darwingest"
|
"git.lukegb.com/lukegb/depot/go/trains/darwin/darwingest"
|
||||||
"hg.lukegb.com/lukegb/depot/go/trains/darwin/darwingest/darwingeststomp"
|
"git.lukegb.com/lukegb/depot/go/trains/darwin/darwingest/darwingeststomp"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -18,8 +18,8 @@ import (
|
||||||
"golang.org/x/sync/errgroup"
|
"golang.org/x/sync/errgroup"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/protobuf/encoding/protojson"
|
"google.golang.org/protobuf/encoding/protojson"
|
||||||
"hg.lukegb.com/lukegb/depot/go/trains/webapi"
|
"git.lukegb.com/lukegb/depot/go/trains/webapi"
|
||||||
"hg.lukegb.com/lukegb/depot/go/trains/webapi/summarize"
|
"git.lukegb.com/lukegb/depot/go/trains/webapi/summarize"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -13,7 +13,7 @@ import (
|
||||||
"text/template"
|
"text/template"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/go/trains/webapi"
|
"git.lukegb.com/lukegb/depot/go/trains/webapi"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
pgx "github.com/jackc/pgx/v4"
|
pgx "github.com/jackc/pgx/v4"
|
||||||
"hg.lukegb.com/lukegb/depot/go/trains/darwin"
|
"git.lukegb.com/lukegb/depot/go/trains/darwin"
|
||||||
)
|
)
|
||||||
|
|
||||||
// handleDataResponse handles a Darwin DataResponse message (i.e. a SnapshotResponse or a UpdateResponse).
|
// handleDataResponse handles a Darwin DataResponse message (i.e. a SnapshotResponse or a UpdateResponse).
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
pgx "github.com/jackc/pgx/v4"
|
pgx "github.com/jackc/pgx/v4"
|
||||||
"hg.lukegb.com/lukegb/depot/go/trains/darwin"
|
"git.lukegb.com/lukegb/depot/go/trains/darwin"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ProcessReferenceData updates the database by processing a PportReferenceData message in the given transaction.
|
// ProcessReferenceData updates the database by processing a PportReferenceData message in the given transaction.
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
pgx "github.com/jackc/pgx/v4"
|
pgx "github.com/jackc/pgx/v4"
|
||||||
"hg.lukegb.com/lukegb/depot/go/trains/darwin"
|
"git.lukegb.com/lukegb/depot/go/trains/darwin"
|
||||||
)
|
)
|
||||||
|
|
||||||
type scheduleMode int
|
type scheduleMode int
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
pgx "github.com/jackc/pgx/v4"
|
pgx "github.com/jackc/pgx/v4"
|
||||||
"hg.lukegb.com/lukegb/depot/go/trains/darwin"
|
"git.lukegb.com/lukegb/depot/go/trains/darwin"
|
||||||
)
|
)
|
||||||
|
|
||||||
// handleTrainStatus handles a Darwin "TS" (train status) message.
|
// handleTrainStatus handles a Darwin "TS" (train status) message.
|
||||||
|
|
|
@ -13,7 +13,7 @@ depot.third_party.buildGo.package {
|
||||||
./ddbtrainstatus.go
|
./ddbtrainstatus.go
|
||||||
./tsutil.go
|
./tsutil.go
|
||||||
];
|
];
|
||||||
path = "hg.lukegb.com/lukegb/depot/go/trains/darwin/darwindb";
|
path = "git.lukegb.com/lukegb/depot/go/trains/darwin/darwindb";
|
||||||
deps = with depot.third_party; [
|
deps = with depot.third_party; [
|
||||||
gopkgs."github.com".jackc.pgx.v4
|
gopkgs."github.com".jackc.pgx.v4
|
||||||
depot.go.trains.darwin
|
depot.go.trains.darwin
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/go/trains/darwin"
|
"git.lukegb.com/lukegb/depot/go/trains/darwin"
|
||||||
)
|
)
|
||||||
|
|
||||||
// secondsify adds :00 onto the end of a string if it's HH:MM formatted, otherwise does nothing.
|
// secondsify adds :00 onto the end of a string if it's HH:MM formatted, otherwise does nothing.
|
||||||
|
|
|
@ -15,9 +15,9 @@ import (
|
||||||
"github.com/go-stomp/stomp/v3"
|
"github.com/go-stomp/stomp/v3"
|
||||||
"github.com/jlaffaye/ftp"
|
"github.com/jlaffaye/ftp"
|
||||||
"gocloud.dev/blob"
|
"gocloud.dev/blob"
|
||||||
"hg.lukegb.com/lukegb/depot/go/trains/darwin"
|
"git.lukegb.com/lukegb/depot/go/trains/darwin"
|
||||||
"hg.lukegb.com/lukegb/depot/go/trains/darwin/darwingest/darwingestftp"
|
"git.lukegb.com/lukegb/depot/go/trains/darwin/darwingest/darwingestftp"
|
||||||
"hg.lukegb.com/lukegb/depot/go/trains/darwin/darwingest/darwingests3"
|
"git.lukegb.com/lukegb/depot/go/trains/darwin/darwingest/darwingests3"
|
||||||
)
|
)
|
||||||
|
|
||||||
func degzip(b []byte) ([]byte, error) {
|
func degzip(b []byte) ([]byte, error) {
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jlaffaye/ftp"
|
"github.com/jlaffaye/ftp"
|
||||||
"hg.lukegb.com/lukegb/depot/go/trains/darwin"
|
"git.lukegb.com/lukegb/depot/go/trains/darwin"
|
||||||
)
|
)
|
||||||
|
|
||||||
func loadGzippedFile(ctx context.Context, sc *ftp.ServerConn, fn string, cb func(pp *darwin.PushPort) error) error {
|
func loadGzippedFile(ctx context.Context, sc *ftp.ServerConn, fn string, cb func(pp *darwin.PushPort) error) error {
|
||||||
|
|
|
@ -8,7 +8,7 @@ depot.third_party.buildGo.package {
|
||||||
srcs = [
|
srcs = [
|
||||||
./darwingestftp.go
|
./darwingestftp.go
|
||||||
];
|
];
|
||||||
path = "hg.lukegb.com/lukegb/depot/go/trains/darwin/darwingest/darwingestftp";
|
path = "git.lukegb.com/lukegb/depot/go/trains/darwin/darwingest/darwingestftp";
|
||||||
deps = with depot.third_party; [
|
deps = with depot.third_party; [
|
||||||
gopkgs."github.com".jlaffaye.ftp
|
gopkgs."github.com".jlaffaye.ftp
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gocloud.dev/blob"
|
"gocloud.dev/blob"
|
||||||
"hg.lukegb.com/lukegb/depot/go/trains/darwin"
|
"git.lukegb.com/lukegb/depot/go/trains/darwin"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -8,7 +8,7 @@ depot.third_party.buildGo.package {
|
||||||
srcs = [
|
srcs = [
|
||||||
./darwingests3.go
|
./darwingests3.go
|
||||||
];
|
];
|
||||||
path = "hg.lukegb.com/lukegb/depot/go/trains/darwin/darwingest/darwingests3";
|
path = "git.lukegb.com/lukegb/depot/go/trains/darwin/darwingest/darwingests3";
|
||||||
deps = with depot.third_party; [
|
deps = with depot.third_party; [
|
||||||
gopkgs."gocloud.dev".blob
|
gopkgs."gocloud.dev".blob
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ depot.third_party.buildGo.package {
|
||||||
srcs = [
|
srcs = [
|
||||||
./darwingeststomp.go
|
./darwingeststomp.go
|
||||||
];
|
];
|
||||||
path = "hg.lukegb.com/lukegb/depot/go/trains/darwin/darwingest/darwingeststomp";
|
path = "git.lukegb.com/lukegb/depot/go/trains/darwin/darwingest/darwingeststomp";
|
||||||
deps = with depot.third_party; [
|
deps = with depot.third_party; [
|
||||||
gopkgs."github.com".go-stomp.stomp.v3
|
gopkgs."github.com".go-stomp.stomp.v3
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ depot.third_party.buildGo.package {
|
||||||
srcs = [
|
srcs = [
|
||||||
./darwingest.go
|
./darwingest.go
|
||||||
];
|
];
|
||||||
path = "hg.lukegb.com/lukegb/depot/go/trains/darwin/darwingest";
|
path = "git.lukegb.com/lukegb/depot/go/trains/darwin/darwingest";
|
||||||
deps = with depot.third_party; [
|
deps = with depot.third_party; [
|
||||||
gopkgs."github.com".cenkalti.backoff.v4
|
gopkgs."github.com".cenkalti.backoff.v4
|
||||||
gopkgs."github.com".go-stomp.stomp.v3
|
gopkgs."github.com".go-stomp.stomp.v3
|
||||||
|
|
|
@ -11,7 +11,7 @@ depot.third_party.buildGo.package {
|
||||||
./timezone.go
|
./timezone.go
|
||||||
./util.go
|
./util.go
|
||||||
];
|
];
|
||||||
path = "hg.lukegb.com/lukegb/depot/go/trains/darwin";
|
path = "git.lukegb.com/lukegb/depot/go/trains/darwin";
|
||||||
} // {
|
} // {
|
||||||
darwindb = import ./darwindb args;
|
darwindb = import ./darwindb args;
|
||||||
darwingest = import ./darwingest args;
|
darwingest = import ./darwingest args;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
module hg.lukegb.com/lukegb/depot/go/trains
|
module git.lukegb.com/lukegb/depot/go/trains
|
||||||
|
|
||||||
go 1.16
|
go 1.16
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{ depot, ... }@args:
|
{ depot, ... }@args:
|
||||||
depot.third_party.buildGo.grpc {
|
depot.third_party.buildGo.grpc {
|
||||||
name = "webapi";
|
name = "webapi";
|
||||||
path = "hg.lukegb.com/lukegb/depot/go/trains/webapi";
|
path = "git.lukegb.com/lukegb/depot/go/trains/webapi";
|
||||||
goPackage = "webapi";
|
goPackage = "webapi";
|
||||||
protos = [ ./types.proto ./webapi.proto ];
|
protos = [ ./types.proto ./webapi.proto ];
|
||||||
withGrpc = true;
|
withGrpc = true;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{ depot, ... }:
|
{ depot, ... }:
|
||||||
depot.third_party.buildGo.package {
|
depot.third_party.buildGo.package {
|
||||||
name = "summarize";
|
name = "summarize";
|
||||||
path = "hg.lukegb.com/lukegb/depot/go/trains/webapi/summarize";
|
path = "git.lukegb.com/lukegb/depot/go/trains/webapi/summarize";
|
||||||
srcs = [ ./service.go ];
|
srcs = [ ./service.go ];
|
||||||
deps = with depot.third_party; [
|
deps = with depot.third_party; [
|
||||||
gopkgs."github.com".jackc.pgx.v4
|
gopkgs."github.com".jackc.pgx.v4
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/jackc/pgx/v4"
|
"github.com/jackc/pgx/v4"
|
||||||
"hg.lukegb.com/lukegb/depot/go/trains/webapi"
|
"git.lukegb.com/lukegb/depot/go/trains/webapi"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Querier interface {
|
type Querier interface {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{ depot, ... }:
|
{ depot, ... }:
|
||||||
depot.third_party.buildGo.package {
|
depot.third_party.buildGo.package {
|
||||||
name = "vaultgcp";
|
name = "vaultgcp";
|
||||||
path = "hg.lukegb.com/lukegb/depot/go/vault/vaultgcp";
|
path = "git.lukegb.com/lukegb/depot/go/vault/vaultgcp";
|
||||||
srcs = [
|
srcs = [
|
||||||
./token.go
|
./token.go
|
||||||
];
|
];
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{ depot, ... }:
|
{ depot, ... }:
|
||||||
depot.third_party.buildGo.package {
|
depot.third_party.buildGo.package {
|
||||||
name = "vaultgcsblob";
|
name = "vaultgcsblob";
|
||||||
path = "hg.lukegb.com/lukegb/depot/go/vault/vaultgcsblob";
|
path = "git.lukegb.com/lukegb/depot/go/vault/vaultgcsblob";
|
||||||
srcs = [
|
srcs = [
|
||||||
./vaultgcsblob.go
|
./vaultgcsblob.go
|
||||||
];
|
];
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
"gocloud.dev/blob"
|
"gocloud.dev/blob"
|
||||||
"gocloud.dev/blob/gcsblob"
|
"gocloud.dev/blob/gcsblob"
|
||||||
"gocloud.dev/gcp"
|
"gocloud.dev/gcp"
|
||||||
"hg.lukegb.com/lukegb/depot/go/vault/vaultgcp"
|
"git.lukegb.com/lukegb/depot/go/vault/vaultgcp"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"hg.lukegb.com/lukegb/depot/web/barf/frontend/barfdb"
|
"git.lukegb.com/lukegb/depot/web/barf/frontend/barfdb"
|
||||||
|
|
||||||
_ "github.com/mattn/go-sqlite3"
|
_ "github.com/mattn/go-sqlite3"
|
||||||
)
|
)
|
||||||
|
|
|
@ -14,7 +14,7 @@ import (
|
||||||
"net/http/httputil"
|
"net/http/httputil"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/web/barf/frontend/barfdb"
|
"git.lukegb.com/lukegb/depot/web/barf/frontend/barfdb"
|
||||||
|
|
||||||
_ "github.com/mattn/go-sqlite3"
|
_ "github.com/mattn/go-sqlite3"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
module hg.lukegb.com/lukegb/depot/web/barf/frontend
|
module git.lukegb.com/lukegb/depot/web/barf/frontend
|
||||||
|
|
||||||
go 1.21.7
|
go 1.21.7
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
module hg.lukegb.com/lukegb/depot/web/barf/sapi
|
module git.lukegb.com/lukegb/depot/web/barf/sapi
|
||||||
|
|
||||||
go 1.21
|
go 1.21
|
||||||
|
|
|
@ -13,7 +13,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"hg.lukegb.com/lukegb/depot/web/fup/fupstatic"
|
"git.lukegb.com/lukegb/depot/web/fup/fupstatic"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -16,9 +16,9 @@ import (
|
||||||
"github.com/google/safehtml"
|
"github.com/google/safehtml"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
"hg.lukegb.com/lukegb/depot/web/fup/fuphttp"
|
"git.lukegb.com/lukegb/depot/web/fup/fuphttp"
|
||||||
"hg.lukegb.com/lukegb/depot/web/fup/fupstatic"
|
"git.lukegb.com/lukegb/depot/web/fup/fupstatic"
|
||||||
"hg.lukegb.com/lukegb/depot/web/fup/minicheddar"
|
"git.lukegb.com/lukegb/depot/web/fup/minicheddar"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -25,7 +25,7 @@ pkgs.buildGoModule {
|
||||||
|
|
||||||
meta = with pkgs.lib; {
|
meta = with pkgs.lib; {
|
||||||
description = "Simple file upload manager.";
|
description = "Simple file upload manager.";
|
||||||
homepage = "https://hg.lukegb.com";
|
homepage = "https://git.lukegb.com";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/web/fup/cmd"
|
"git.lukegb.com/lukegb/depot/web/fup/cmd"
|
||||||
|
|
||||||
// Include various gocloud.dev backends.
|
// Include various gocloud.dev backends.
|
||||||
_ "gocloud.dev/blob/fileblob"
|
_ "gocloud.dev/blob/fileblob"
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/web/fup/fuphttp"
|
"git.lukegb.com/lukegb/depot/web/fup/fuphttp"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestTokenAuthMiddlewareNoToken(t *testing.T) {
|
func TestTokenAuthMiddlewareNoToken(t *testing.T) {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/web/fup/fuphttp/fngen"
|
"git.lukegb.com/lukegb/depot/web/fup/fuphttp/fngen"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestIdentityGenerator(t *testing.T) {
|
func TestIdentityGenerator(t *testing.T) {
|
||||||
|
|
|
@ -19,8 +19,8 @@ import (
|
||||||
shuncheckedconversions "github.com/google/safehtml/uncheckedconversions"
|
shuncheckedconversions "github.com/google/safehtml/uncheckedconversions"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"gocloud.dev/blob"
|
"gocloud.dev/blob"
|
||||||
"hg.lukegb.com/lukegb/depot/web/fup/fuphttp/fngen"
|
"git.lukegb.com/lukegb/depot/web/fup/fuphttp/fngen"
|
||||||
"hg.lukegb.com/lukegb/depot/web/fup/hashfs"
|
"git.lukegb.com/lukegb/depot/web/fup/hashfs"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -14,8 +14,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/web/fup/fuphttp"
|
"git.lukegb.com/lukegb/depot/web/fup/fuphttp"
|
||||||
"hg.lukegb.com/lukegb/depot/web/fup/fupstatic"
|
"git.lukegb.com/lukegb/depot/web/fup/fupstatic"
|
||||||
|
|
||||||
"gocloud.dev/blob"
|
"gocloud.dev/blob"
|
||||||
"gocloud.dev/blob/fileblob"
|
"gocloud.dev/blob/fileblob"
|
||||||
|
|
|
@ -16,7 +16,7 @@ import (
|
||||||
|
|
||||||
"github.com/coreos/go-oidc/v3/oidc"
|
"github.com/coreos/go-oidc/v3/oidc"
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
"hg.lukegb.com/lukegb/depot/web/fup/fuphttp"
|
"git.lukegb.com/lukegb/depot/web/fup/fuphttp"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -22,7 +22,7 @@ import (
|
||||||
"github.com/gabriel-vasile/mimetype"
|
"github.com/gabriel-vasile/mimetype"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"gocloud.dev/blob"
|
"gocloud.dev/blob"
|
||||||
"hg.lukegb.com/lukegb/depot/web/fup/fuphttp/fngen"
|
"git.lukegb.com/lukegb/depot/web/fup/fuphttp/fngen"
|
||||||
)
|
)
|
||||||
|
|
||||||
// parseExpiry parses an expiry string.
|
// parseExpiry parses an expiry string.
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"embed"
|
"embed"
|
||||||
"io/fs"
|
"io/fs"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/web/fup/hashfs"
|
"git.lukegb.com/lukegb/depot/web/fup/hashfs"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:embed css js img
|
//go:embed css js img
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
module hg.lukegb.com/lukegb/depot/web/fup
|
module git.lukegb.com/lukegb/depot/web/fup
|
||||||
|
|
||||||
go 1.16
|
go 1.16
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"hg.lukegb.com/lukegb/depot/web/fup/minicheddar"
|
"git.lukegb.com/lukegb/depot/web/fup/minicheddar"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSpawn(t *testing.T) {
|
func TestSpawn(t *testing.T) {
|
||||||
|
|
|
@ -21,7 +21,7 @@ SPDX-License-Identifier: Apache-2.0
|
||||||
<li><a href="https://unifi.int.lukegb.com">unifi</a></li>
|
<li><a href="https://unifi.int.lukegb.com">unifi</a></li>
|
||||||
<li><a href="https://invoices.lukegb.com">invoices</a></li>
|
<li><a href="https://invoices.lukegb.com">invoices</a></li>
|
||||||
<li><a href="https://twitterchiver.int.lukegb.com">twitterchiver</a></li>
|
<li><a href="https://twitterchiver.int.lukegb.com">twitterchiver</a></li>
|
||||||
<li><a href="https://hg.lukegb.com">hg (heptapod)</a></li>
|
<li><a href="https://git.lukegb.com/user/login">git (forgejo)</a></li>
|
||||||
<li><a href="https://rundeck.int.lukegb.com">rundeck</a></li>
|
<li><a href="https://rundeck.int.lukegb.com">rundeck</a></li>
|
||||||
<li><a href="https://netbox.int.lukegb.com">netbox</a></li>
|
<li><a href="https://netbox.int.lukegb.com">netbox</a></li>
|
||||||
<li><a href="https://paperless.int.lukegb.com">paperless</a></li>
|
<li><a href="https://paperless.int.lukegb.com">paperless</a></li>
|
||||||
|
|
|
@ -53,7 +53,7 @@ Broadly speaking, my setup roughly mirrors Kelsey Hightower's [Serverless Vault
|
||||||
with Cloud
|
with Cloud
|
||||||
Run](https://github.com/kelseyhightower/serverless-vault-with-cloud-run) -
|
Run](https://github.com/kelseyhightower/serverless-vault-with-cloud-run) -
|
||||||
although I build the Docker container [using
|
although I build the Docker container [using
|
||||||
Nix](https://hg.lukegb.com/lukegb/depot/-/blob/branch/default/nix/docker/vault/default.nix).
|
Nix](https://git.lukegb.com/lukegb/depot/src/branch/canon/nix/docker/vault/default.nix).
|
||||||
|
|
||||||
It's a relatively neat setup, although... it turns out to be expensive. Maybe
|
It's a relatively neat setup, although... it turns out to be expensive. Maybe
|
||||||
I'll move it to Oracle Cloud's free tier running on one of their ARM64
|
I'll move it to Oracle Cloud's free tier running on one of their ARM64
|
||||||
|
@ -106,7 +106,7 @@ However sometimes there are users which are deployed on more than one machine -
|
||||||
such as `gitlab-runner` - and that user should only get access to secrets on
|
such as `gitlab-runner` - and that user should only get access to secrets on
|
||||||
one specific host. I use this concept for granting access to `gitlab-runner` on
|
one specific host. I use this concept for granting access to `gitlab-runner` on
|
||||||
a server called `clouvider-lon01` to be able to deploy to this blog! It [has
|
a server called `clouvider-lon01` to be able to deploy to this blog! It [has
|
||||||
access](https://hg.lukegb.com/lukegb/depot/-/blob/branch/default/ops/vault/cfg/lukegbcom-deployer.nix)
|
access](https://git.lukegb.com/lukegb/depot/src/branch/canon/ops/vault/cfg/lukegbcom-deployer.nix)
|
||||||
to get an OAuth token to a specific GCP service account with permission to
|
to get an OAuth token to a specific GCP service account with permission to
|
||||||
deploy to Firebase Hosting via the `server/clouvider-lon01/app/gitlab-runner`
|
deploy to Firebase Hosting via the `server/clouvider-lon01/app/gitlab-runner`
|
||||||
policy, but the `gitlab-runner` user anywhere else is not permitted to get
|
policy, but the `gitlab-runner` user anywhere else is not permitted to get
|
||||||
|
@ -135,7 +135,7 @@ Servers are also permitted to have server-wide secrets. This is mostly just
|
||||||
used for `secretsmgr` at the moment - arguably this could be its own app.
|
used for `secretsmgr` at the moment - arguably this could be its own app.
|
||||||
|
|
||||||
By default, servers [have
|
By default, servers [have
|
||||||
access](https://hg.lukegb.com/lukegb/depot/-/blob/branch/default/ops/vault/cfg/policies/server.hcl)
|
access](https://git.lukegb.com/lukegb/depot/src/branch/canon/ops/vault/cfg/policies/server.hcl)
|
||||||
to `kv/server/$HOSTNAME`, and to issue ACME certificates, and the Nix binary
|
to `kv/server/$HOSTNAME`, and to issue ACME certificates, and the Nix binary
|
||||||
cache credentials. They also have the power to issue subtokens with
|
cache credentials. They also have the power to issue subtokens with
|
||||||
lesser-power than themselves.
|
lesser-power than themselves.
|
||||||
|
@ -175,14 +175,14 @@ policy hierarchy, so here's an example:
|
||||||
|
|
||||||
I use the "App ID" mode in Vault to provision secrets to servers; when setting
|
I use the "App ID" mode in Vault to provision secrets to servers; when setting
|
||||||
a machine up (a process I have not yet automated), I run
|
a machine up (a process I have not yet automated), I run
|
||||||
[`reissue-secret-id.sh`](https://hg.lukegb.com/lukegb/depot/-/blob/branch/default/ops/vault/reissue-secret-id.sh)
|
[`reissue-secret-id.sh`](https://git.lukegb.com/lukegb/depot/src/branch/canon/ops/vault/reissue-secret-id.sh)
|
||||||
which revokes all existing secret IDs for that host and dumps out a Vault
|
which revokes all existing secret IDs for that host and dumps out a Vault
|
||||||
[response wrapped
|
[response wrapped
|
||||||
token](https://www.vaultproject.io/docs/concepts/response-wrapping), which can
|
token](https://www.vaultproject.io/docs/concepts/response-wrapping), which can
|
||||||
be used one time only to get the secret ID for that host.
|
be used one time only to get the secret ID for that host.
|
||||||
|
|
||||||
There's a
|
There's a
|
||||||
[`provision-secret-id`](https://hg.lukegb.com/lukegb/depot/-/blob/branch/default/ops/vault/default.nix)
|
[`provision-secret-id`](https://git.lukegb.com/lukegb/depot/src/branch/canon/ops/vault/default.nix)
|
||||||
script installed on every machine which will then install the secret for me.
|
script installed on every machine which will then install the secret for me.
|
||||||
|
|
||||||
Future work in this space for me is binding the secret to the TPM (e.g. using
|
Future work in this space for me is binding the secret to the TPM (e.g. using
|
||||||
|
@ -211,7 +211,7 @@ Unix socket effectively gets all the secrets shared to anything on the server.
|
||||||
The secrets I use it to write to disk are strictly the plain KV type, rather
|
The secrets I use it to write to disk are strictly the plain KV type, rather
|
||||||
than anything more sophisticated, but I do use some [relatively complicated
|
than anything more sophisticated, but I do use some [relatively complicated
|
||||||
Polkit
|
Polkit
|
||||||
rules](https://hg.lukegb.com/lukegb/depot/-/blob/branch/default/ops/nixos/lib/vault-agent-secrets.nix)
|
rules](https://git.lukegb.com/lukegb/depot/src/branch/canon/ops/nixos/lib/vault-agent-secrets.nix)
|
||||||
to allow it to reload/restart services when those secrets change.
|
to allow it to reload/restart services when those secrets change.
|
||||||
|
|
||||||
|
|
||||||
|
@ -219,7 +219,7 @@ to allow it to reload/restart services when those secrets change.
|
||||||
|
|
||||||
The user-based authentication I mentioned above (with the app policies and the
|
The user-based authentication I mentioned above (with the app policies and the
|
||||||
`server-user`) policy is powered by
|
`server-user`) policy is powered by
|
||||||
[`tokend`](https://hg.lukegb.com/lukegb/depot/-/tree/branch/default/go/tokend),
|
[`tokend`](https://git.lukegb.com/lukegb/depot/src/branch/canon/go/tokend),
|
||||||
which is a daemon that listens on a Unix socket and proxies requests through
|
which is a daemon that listens on a Unix socket and proxies requests through
|
||||||
the local Vault Agent, with a token issued that has a subset of the powers of
|
the local Vault Agent, with a token issued that has a subset of the powers of
|
||||||
the original server-wide token.
|
the original server-wide token.
|
||||||
|
@ -239,7 +239,7 @@ checks the remaining lifetime of the certificates it's responsible for, and
|
||||||
then reissues them if required.
|
then reissues them if required.
|
||||||
|
|
||||||
Similar to the Vault Agent above, I use some [Polkit
|
Similar to the Vault Agent above, I use some [Polkit
|
||||||
rules](https://hg.lukegb.com/lukegb/depot/-/blob/branch/default/ops/nixos/lib/secretsmgr.nix)
|
rules](https://git.lukegb.com/lukegb/depot/src/branch/canon/ops/nixos/lib/secretsmgr.nix)
|
||||||
to allow it to restart the ACME certificate consumers (usually nginx or
|
to allow it to restart the ACME certificate consumers (usually nginx or
|
||||||
pomerium), and sshd.
|
pomerium), and sshd.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue