WIP podman-compose
This commit is contained in:
parent
3dcadd5e40
commit
8d5371229d
8 changed files with 60 additions and 10 deletions
12
flake.lock
12
flake.lock
|
@ -2,16 +2,18 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1601906239,
|
"lastModified": 1621356929,
|
||||||
"narHash": "sha256-P1jBYbYeFswig/0FKbgh+BpVhh9iurD3m0T2ae4gdx8=",
|
"narHash": "sha256-lD43MQ+bDFioz6eTxMmc5/tZ2nGUQ2e26CFRKp8JlF4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "c2bb4af48d26ed091e5674394bacbf8d488c7939",
|
"rev": "6be706bbe5d892de78ce2c3b757508701ac592a6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"owner": "NixOS",
|
||||||
"type": "indirect"
|
"ref": "master",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
description = "Arion - use Docker Compose via Nix";
|
description = "Arion - use Docker Compose via Nix";
|
||||||
|
|
||||||
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/master";
|
||||||
|
|
||||||
outputs = { self, nixpkgs }:
|
outputs = { self, nixpkgs }:
|
||||||
let
|
let
|
||||||
lib = import (nixpkgs + "/lib");
|
lib = import (nixpkgs + "/lib");
|
||||||
|
|
|
@ -47,15 +47,22 @@ in
|
||||||
haskellPkgs.cabal-install
|
haskellPkgs.cabal-install
|
||||||
haskellPkgs.ghcid
|
haskellPkgs.ghcid
|
||||||
haskellPkgs.haskell-language-server
|
haskellPkgs.haskell-language-server
|
||||||
super.docker-compose
|
self.docker-compose
|
||||||
super.podman
|
self.podman
|
||||||
super.podman-compose
|
self.podman-compose
|
||||||
self.niv
|
self.niv
|
||||||
self.releaser
|
self.releaser
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
podman-compose = super.podman-compose.overrideAttrs(o: {
|
||||||
|
src = ~/h/podman-compose;
|
||||||
|
# patches = (o.patches or []) ++ [
|
||||||
|
# ./podman-compose-stop_signal.patch
|
||||||
|
# ];
|
||||||
|
});
|
||||||
|
|
||||||
inherit (import (sources.niv) {}) niv;
|
inherit (import (sources.niv) {}) niv;
|
||||||
releaser = self.haskellPackages.callCabal2nix "releaser" sources.releaser {};
|
releaser = self.haskellPackages.callCabal2nix "releaser" sources.releaser {};
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ let
|
||||||
mv $out/bin/arion $out/libexec
|
mv $out/bin/arion $out/libexec
|
||||||
makeWrapper $out/libexec/arion $out/bin/arion \
|
makeWrapper $out/libexec/arion $out/bin/arion \
|
||||||
--unset PYTHONPATH \
|
--unset PYTHONPATH \
|
||||||
--prefix PATH : ${lib.makeBinPath [ pkgs.docker-compose ]} \
|
--prefix PATH : ${lib.makeBinPath [ pkgs.docker-compose pkgs.podman pkgs.podman-compose ]} \
|
||||||
;
|
;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
"-l"
|
"-l"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"technology": "docker"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
15
src/nix/modules/composition/deployment.nix
Normal file
15
src/nix/modules/composition/deployment.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkOption types;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
deployment.technology = mkOption {
|
||||||
|
description = "Which container technology to use.";
|
||||||
|
type = types.enum [];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = {
|
||||||
|
docker-compose.raw.x-arion.technology = config.deployment.technology;
|
||||||
|
};
|
||||||
|
}
|
12
src/nix/modules/composition/deployment/docker.nix
Normal file
12
src/nix/modules/composition/deployment/docker.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkOption types;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
deployment.technology = mkOption {
|
||||||
|
type = types.enum ["docker"];
|
||||||
|
default = "docker";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
11
src/nix/modules/composition/deployment/podman.nix
Normal file
11
src/nix/modules/composition/deployment/podman.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkOption types;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
deployment.technology = mkOption {
|
||||||
|
type = types.enum ["podman"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue