{ description = "Portfolio rust configuration"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; flake-utils.url = "github:numtide/flake-utils"; }; outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachSystem flake-utils.lib.allSystems (system: let pkgs = import nixpkgs { inherit system; }; import_pub_gpg = pkgs.writeScriptBin "import_pub_gpg" '' #!${pkgs.runtimeShell} echo "Importing public key" gpg --import <(curl https://gitea.mrdev023.fr/florian.richer.gpg) ''; init_sops = pkgs.writeScriptBin "init_sops" '' #!${pkgs.runtimeShell} echo "Decrypting vars file" sops -d group_vars/all.enc.yml > group_vars/all.yml echo "Decrypt inventory file" sops -d work/inventory.enc.yml > work/inventory.yml ''; clean_sops = pkgs.writeScriptBin "clean_sops" '' #!${pkgs.runtimeShell} echo "Decrypting vars file" sops -d group_vars/all.enc.yml > group_vars/all.yml echo "Decrypt inventory file" sops -d work/inventory.enc.yml > work/inventory.yml ''; in { devShells = { default = pkgs.mkShell { buildInputs = [ pkgs.ansible pkgs.sops import_pub_gpg init_sops clean_sops ]; }; }; }); }