diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-11-14 21:55:46 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-11-14 21:55:46 +0100 |
commit | 9865e974f51cfca8ce02d434f7f47fc238fc2d08 (patch) | |
tree | 274b297267fee48ccdc4ab6cccf0026a10108039 /shell.nix | |
parent | 430d2d0a1ff89ef6dbbab85bf55956c678acfebf (diff) | |
download | nixos-9865e974f51cfca8ce02d434f7f47fc238fc2d08.tar nixos-9865e974f51cfca8ce02d434f7f47fc238fc2d08.tar.gz nixos-9865e974f51cfca8ce02d434f7f47fc238fc2d08.tar.bz2 nixos-9865e974f51cfca8ce02d434f7f47fc238fc2d08.tar.xz nixos-9865e974f51cfca8ce02d434f7f47fc238fc2d08.zip |
modularize tools
Diffstat (limited to 'shell.nix')
-rw-r--r-- | shell.nix | 32 |
1 files changed, 6 insertions, 26 deletions
@@ -1,32 +1,13 @@ | |||
1 | { system, self, deploy-rs, nvfetcher, mach-nix, leapseconds, ... }: | 1 | inputs@{ system, self, deploy-rs, nvfetcher, nixpkgs, ... }: |
2 | let | 2 | let |
3 | pkgs = self.legacyPackages.${system}; | 3 | pkgs = self.legacyPackages.${system}; |
4 | utils = import ./utils { inherit (nixpkgs) lib; }; | ||
5 | inherit (utils) nixImport; | ||
4 | 6 | ||
5 | ca = mach-nix.lib.${system}.buildPythonPackage { | 7 | tools = nixImport rec { dir = ./tools; _import = _path: name: import "${toString dir}/${name}" inputs; }; |
6 | pname = "ca"; | ||
7 | src = ./tools/ca; | ||
8 | version = "0.0.0"; | ||
9 | ignoreDataOutdated = true; | ||
10 | |||
11 | requirements = '' | ||
12 | cryptography >=38.0.0 | ||
13 | fqdn | ||
14 | atomicwrites | ||
15 | leapseconddata | ||
16 | xkcdpass | ||
17 | ''; | ||
18 | |||
19 | _.cryptography.buildInputs = with pkgs; [ openssl ]; | ||
20 | |||
21 | postInstall = '' | ||
22 | wrapProgram $out/bin/ca \ | ||
23 | --set-default LEAPSECONDS_FILE ${leapseconds} \ | ||
24 | --prefix PATH : ${pkgs.lib.makeBinPath (with pkgs; [sops])} | ||
25 | ''; | ||
26 | }; | ||
27 | in pkgs.mkShell { | 8 | in pkgs.mkShell { |
28 | name = "nixos"; | 9 | name = "nixos"; |
29 | nativeBuildInputs = with pkgs; [ | 10 | nativeBuildInputs = builtins.attrValues tools ++ (with pkgs; [ |
30 | sops | 11 | sops |
31 | wireguard-tools | 12 | wireguard-tools |
32 | gup | 13 | gup |
@@ -35,6 +16,5 @@ in pkgs.mkShell { | |||
35 | knot-dns | 16 | knot-dns |
36 | yq | 17 | yq |
37 | nvfetcher.defaultPackage.${system} | 18 | nvfetcher.defaultPackage.${system} |
38 | ca | 19 | ]); |
39 | ]; | ||
40 | } | 20 | } |