Skip to content

Commit

Permalink
rename package to nixcompose
Browse files Browse the repository at this point in the history
  • Loading branch information
aksiksi committed Nov 7, 2023
1 parent f62253e commit 6c40c97
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions cmd/nixose/main.go → cmd/nix-compose/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import (
"strings"
"time"

"github.com/aksiksi/nixose"
nixcompose "github.com/aksiksi/nix-compose"
)

var paths = flag.String("paths", "", "paths to Compose files")
var envFiles = flag.String("env_files", "", "paths to .env files")
var envFilesOnly = flag.Bool("env_files_only", false, "only use env files in the NixOS container definitions")
var output = flag.String("output", "", "path to output Nix file")
var project = flag.String("project", "", "project name used as a prefix for generated resources")
var projectSeparator = flag.String("project_separator", nixose.DefaultProjectSeparator, "seperator for project prefix")
var projectSeparator = flag.String("project_separator", nixcompose.DefaultProjectSeparator, "seperator for project prefix")
var serviceInclude = flag.String("service_include", "", "regex pattern for services to include")
var autoStart = flag.Bool("auto_start", true, "control auto-start setting for containers")
var runtime = flag.String("runtime", "podman", `"podman" or "docker"`)
Expand All @@ -36,11 +36,11 @@ func main() {
paths := strings.Split(*paths, ",")
envFiles := strings.Split(*envFiles, ",")

var containerRuntime nixose.ContainerRuntime
var containerRuntime nixcompose.ContainerRuntime
if *runtime == "podman" {
containerRuntime = nixose.ContainerRuntimePodman
containerRuntime = nixcompose.ContainerRuntimePodman
} else if *runtime == "docker" {
containerRuntime = nixose.ContainerRuntimeDocker
containerRuntime = nixcompose.ContainerRuntimeDocker
} else {
log.Fatalf("Invalid --runtime: %q", *runtime)
}
Expand All @@ -55,8 +55,8 @@ func main() {
}

start := time.Now()
g := nixose.Generator{
Project: nixose.NewProjectWithSeparator(*project, *projectSeparator),
g := nixcompose.Generator{
Project: nixcompose.NewProjectWithSeparator(*project, *projectSeparator),
Runtime: containerRuntime,
Paths: paths,
EnvFiles: envFiles,
Expand Down
2 changes: 1 addition & 1 deletion compose.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package nixose
package nixcompose

import (
"cmp"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/aksiksi/nixose
module github.com/aksiksi/nix-compose

go 1.21

Expand Down
2 changes: 1 addition & 1 deletion helpers.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package nixose
package nixcompose

import (
"bufio"
Expand Down
2 changes: 1 addition & 1 deletion nixose.go → nix.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package nixose
package nixcompose

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion nixose_test.go → nix_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package nixose
package nixcompose

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion template.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package nixose
package nixcompose

import (
"embed"
Expand Down

0 comments on commit 6c40c97

Please sign in to comment.