Install jmespath for ansible.

This commit is contained in:
Tom Alexander 2025-01-21 20:56:48 -05:00
parent c33a1b6c50
commit 48c5aebd82
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
3 changed files with 48 additions and 0 deletions

View File

@ -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 = [

View File

@ -33,4 +33,5 @@
me.graphicsCardType = "amd"; me.graphicsCardType = "amd";
me.sway.enable = true; me.sway.enable = true;
me.ansible.enable = true;
} }

View 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 [ ]}
'';
};
})
];
}
]
);
}