aboutsummaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-11-16 16:28:18 +0100
committerAlex Auvolat <alex@adnab.me>2022-11-16 16:28:18 +0100
commit49b0dc2d5bfe9b92e6e02e6f0fa1076c4204f8b8 (patch)
treedcbf0f2b2c214f135a24dc9adc24d3a9856bdaf4 /nix
parenteac950c47f3bcedbd02b5bd71a8f42084c643854 (diff)
downloadnixcfg-49b0dc2d5bfe9b92e6e02e6f0fa1076c4204f8b8.tar.gz
nixcfg-49b0dc2d5bfe9b92e6e02e6f0fa1076c4204f8b8.zip
poc 2 for nix containers: use nomad-driver-nix
Diffstat (limited to 'nix')
-rw-r--r--nix/nomad-driver-nix.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/nix/nomad-driver-nix.nix b/nix/nomad-driver-nix.nix
new file mode 100644
index 0000000..9d3638d
--- /dev/null
+++ b/nix/nomad-driver-nix.nix
@@ -0,0 +1,31 @@
+{
+ pkgs ? import <nixpkgs> {}
+}:
+pkgs.buildGoModule rec {
+ pname = "nomad-driver-nix";
+ version = "0.1.0";
+
+ src = pkgs.fetchFromGitHub {
+ owner = "input-output-hk";
+ repo = "nomad-driver-nix";
+ rev = "010b09c680887d0cade86e8ac136c3a04609e04a";
+ sha256 = "sha256-hET+b7XhDLSuVQwXLI2V5nYCcdvxQQj9BAG8z4ta6CE=";
+ };
+
+ vendorSha256 = "sha256-FDJpbNtcFEHnZvWip2pvUHF3BFyfcSohrr/3nk9YS24=";
+
+ ldflags = [
+ "-X github.com/input-output-hk/nomad-driver-nix/nix.pluginVersion=${version}"
+ ];
+
+ postInstall = ''
+ mv $out/bin/nomad-driver-nix $out/bin/nix-driver
+ '';
+
+ meta = with pkgs.lib; {
+ description = "Nomad driver to run Nix packages / NixOS in systemd-nspawn containers";
+ homepage = "https://github.com/input-output-hk/nomad-driver-nix";
+ license = licenses.mpl20;
+ platforms = platforms.linux;
+ };
+}