Install jmespath for ansible.
This commit is contained in:
parent
c33a1b6c50
commit
48c5aebd82
@ -57,6 +57,7 @@
|
|||||||
./roles/chromecast
|
./roles/chromecast
|
||||||
./roles/memtest86
|
./roles/memtest86
|
||||||
./roles/kodi
|
./roles/kodi
|
||||||
|
./roles/ansible
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.settings.experimental-features = [
|
nix.settings.experimental-features = [
|
||||||
|
@ -33,4 +33,5 @@
|
|||||||
me.graphicsCardType = "amd";
|
me.graphicsCardType = "amd";
|
||||||
|
|
||||||
me.sway.enable = true;
|
me.sway.enable = true;
|
||||||
|
me.ansible.enable = true;
|
||||||
}
|
}
|
||||||
|
46
nix/configuration/roles/ansible/default.nix
Normal file
46
nix/configuration/roles/ansible/default.nix
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
options.me = {
|
||||||
|
ansible.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Whether we want to install ansible.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.me.ansible.enable (
|
||||||
|
lib.mkMerge [
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
ansible
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(final: prev: {
|
||||||
|
ansible = pkgs.symlinkJoin {
|
||||||
|
name = "ansible";
|
||||||
|
paths = [
|
||||||
|
(prev.ansible.overridePythonAttrs {
|
||||||
|
propagatedBuildInputs = prev.ansible.propagatedBuildInputs ++ [ prev.python3Packages.jmespath ];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
buildInputs = [ pkgs.makeWrapper ];
|
||||||
|
postBuild = ''
|
||||||
|
wrapProgram $out/bin/ansible --prefix PATH : ${lib.makeBinPath [ ]}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user