Skip to content

Commit

Permalink
use path instead of pathInStore
Browse files Browse the repository at this point in the history
  • Loading branch information
aksiksi committed Nov 7, 2023
1 parent 4d2f967 commit 5b2947c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
options.compose2nix = {
# https://nixos.org/manual/nixos/stable/#sec-option-declarations
paths = mkOption {
type = types.listOf types.pathInStore;
type = types.listOf types.path;
description = lib.mdDoc "One or more paths to Docker Compose files.";
};
runtime = mkOption {
Expand All @@ -64,7 +64,7 @@
env = mkOption {
type = types.attrsOf types.str;
default = {};
description = lib.mdDoc "Environment variables. These will be merged with environment files, if any.";
description = lib.mdDoc "Environment to use. Note that these will be merged with environment files, if any.";
};
envFiles = mkOption {
type = types.listOf types.path;
Expand All @@ -74,18 +74,18 @@
envFilesOnly = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc "Only include env files in the output Nix file.";
description = lib.mdDoc "Only include env files in the output Nix file. Useful in cases where env variables contain secrets.";
};
serviceInclude = mkOption {
type = types.str;
default = "";
description = lib.mdDoc "Regex pattern for Docker Compose services to include.";
};
autoStart = mkOption {
type = types.bool;
default = true;
description = lib.mdDoc "Auto-start all containers.";
};
serviceInclude = mkOption {
type = types.bool;
default = "";
description = lib.mdDoc "Regex pattern for Docker Compose services to include.";
};
};
configs = mkIf (cfg.paths != []) {
compose2nix = {
Expand All @@ -100,8 +100,8 @@
-project_separator='${cfg.projectSeparator}' \
-env_files='${concatStringsSep "," cfg.envFiles}' \
-env_files_only=${cfg.envFilesOnly} \
-auto_start=${cfg.autoStart} \
-service_include='${cfg.serviceInclude}' \
-auto_start=${cfg.autoStart} \
-output=$out
'';
};
Expand Down
2 changes: 1 addition & 1 deletion templates/container.nix.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ virtualisation.oci-containers.containers."{{.Name}}" = {
{{- if .EnvFiles}}
environmentFiles = [
{{- range .EnvFiles}}
"${./{{.}}}"
"{{.}}"
{{- end}}
];
{{- end}}
Expand Down

0 comments on commit 5b2947c

Please sign in to comment.