From 9865e974f51cfca8ce02d434f7f47fc238fc2d08 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 14 Nov 2022 21:55:46 +0100 Subject: modularize tools --- shell.nix | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) (limited to 'shell.nix') diff --git a/shell.nix b/shell.nix index 14125d02..5d8e2c5a 100644 --- a/shell.nix +++ b/shell.nix @@ -1,32 +1,13 @@ -{ system, self, deploy-rs, nvfetcher, mach-nix, leapseconds, ... }: +inputs@{ system, self, deploy-rs, nvfetcher, nixpkgs, ... }: let pkgs = self.legacyPackages.${system}; + utils = import ./utils { inherit (nixpkgs) lib; }; + inherit (utils) nixImport; - ca = mach-nix.lib.${system}.buildPythonPackage { - pname = "ca"; - src = ./tools/ca; - version = "0.0.0"; - ignoreDataOutdated = true; - - requirements = '' - cryptography >=38.0.0 - fqdn - atomicwrites - leapseconddata - xkcdpass - ''; - - _.cryptography.buildInputs = with pkgs; [ openssl ]; - - postInstall = '' - wrapProgram $out/bin/ca \ - --set-default LEAPSECONDS_FILE ${leapseconds} \ - --prefix PATH : ${pkgs.lib.makeBinPath (with pkgs; [sops])} - ''; - }; + tools = nixImport rec { dir = ./tools; _import = _path: name: import "${toString dir}/${name}" inputs; }; in pkgs.mkShell { name = "nixos"; - nativeBuildInputs = with pkgs; [ + nativeBuildInputs = builtins.attrValues tools ++ (with pkgs; [ sops wireguard-tools gup @@ -35,6 +16,5 @@ in pkgs.mkShell { knot-dns yq nvfetcher.defaultPackage.${system} - ca - ]; + ]); } -- cgit v1.2.3