hologram: 8d86e3f -> d20d1c3
- Updates dependencies - Adds configuration module - Tested on Nixos Unstable
This commit is contained in:
parent
dbd4a35060
commit
1d85e0bbab
|
@ -498,7 +498,8 @@
|
||||||
./services/security/frandom.nix
|
./services/security/frandom.nix
|
||||||
./services/security/haka.nix
|
./services/security/haka.nix
|
||||||
./services/security/haveged.nix
|
./services/security/haveged.nix
|
||||||
./services/security/hologram.nix
|
./services/security/hologram-server.nix
|
||||||
|
./services/security/hologram-agent.nix
|
||||||
./services/security/munge.nix
|
./services/security/munge.nix
|
||||||
./services/security/oauth2_proxy.nix
|
./services/security/oauth2_proxy.nix
|
||||||
./services/security/physlock.nix
|
./services/security/physlock.nix
|
||||||
|
|
57
nixos/modules/services/security/hologram-agent.nix
Normal file
57
nixos/modules/services/security/hologram-agent.nix
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
{pkgs, config, lib, ...}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.hologram-agent;
|
||||||
|
|
||||||
|
cfgFile = pkgs.writeText "hologram-agent.json" (builtins.toJSON {
|
||||||
|
host = cfg.dialAddress;
|
||||||
|
});
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
services.hologram-agent = {
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Whether to enable the Hologram agent for AWS instance credentials";
|
||||||
|
};
|
||||||
|
|
||||||
|
dialAddress = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "localhost:3100";
|
||||||
|
description = "Hologram server and port.";
|
||||||
|
};
|
||||||
|
|
||||||
|
httpPort = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "80";
|
||||||
|
description = "Port for metadata service to listen on.";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
networking.interfaces.dummy0 = {
|
||||||
|
ipAddress = "169.254.169.254";
|
||||||
|
prefixLength = 32;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.hologram-agent = {
|
||||||
|
description = "Provide EC2 instance credentials to machines outside of EC2";
|
||||||
|
after = [ "network.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
requires = [ "network-link-dummy0.service" "network-addresses-dummy0.service" ];
|
||||||
|
preStart = ''
|
||||||
|
/run/current-system/sw/bin/rm -fv /var/run/hologram.sock
|
||||||
|
'';
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${pkgs.hologram.bin}/bin/hologram-agent -debug -conf ${cfgFile} -port ${cfg.httpPort}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
meta.maintainers = with lib.maintainers; [ nand0p ];
|
||||||
|
}
|
|
@ -2,16 +2,24 @@
|
||||||
|
|
||||||
buildGoPackage rec {
|
buildGoPackage rec {
|
||||||
name = "hologram-${version}";
|
name = "hologram-${version}";
|
||||||
version = "20160209-${stdenv.lib.strings.substring 0 7 rev}";
|
version = "20170130-${stdenv.lib.strings.substring 0 7 rev}";
|
||||||
rev = "8d86e3fdcbfd967ba58d8de02f5e8173c101212e";
|
rev = "d20d1c30379e7010e8f9c428a5b9e82f54d390e1";
|
||||||
|
|
||||||
goPackagePath = "github.com/AdRoll/hologram";
|
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
inherit rev;
|
inherit rev;
|
||||||
url = "https://github.com/AdRoll/hologram";
|
url = "https://github.com/AdRoll/hologram";
|
||||||
sha256 = "0i0p170brdsczfz079mqbc5y7x7mdph04p3wgqsd7xcrddvlkkaf";
|
sha256 = "0dg5kfs16kf2gzhpmzsg83qzi2pxgnc9g81lw5zpa6fmzpa9kgsn";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
goPackagePath = "github.com/AdRoll/hologram";
|
||||||
|
|
||||||
goDeps = ./deps.nix;
|
goDeps = ./deps.nix;
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = https://github.com/AdRoll/hologram/;
|
||||||
|
description = "Easy, painless AWS credentials on developer laptops.";
|
||||||
|
maintainers = with maintainers; [ nand0p ];
|
||||||
|
platforms = platforms.all;
|
||||||
|
license = licenses.asl20;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,4 +98,13 @@
|
||||||
sha256 = "179lwaf0hvczl8g4xzkpcpzq25p1b23f7399bx5zl55iin62d8yz";
|
sha256 = "179lwaf0hvczl8g4xzkpcpzq25p1b23f7399bx5zl55iin62d8yz";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
goPackagePath = "github.com/aws/aws-sdk-go";
|
||||||
|
fetch = {
|
||||||
|
type = "git";
|
||||||
|
url = "https://github.com/aws/aws-sdk-go";
|
||||||
|
rev = "3f8f870ec9939e32b3372abf74d24e468bcd285d";
|
||||||
|
sha256 = "0a4hycs3d87s50z4prf5h6918r0fa2rvrrwlbffs430ilc4y8ghv";
|
||||||
|
};
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue