summaryrefslogtreecommitdiff
path: root/shell.nix
blob: 0b8745645fe593cd92ad82b62d6ade769e8607c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ pkgs ? import <nixpkgs> {}, deploy-rs, nvfetcher }:
let
  nixWithFlakes = pkgs.symlinkJoin {
    name = "nix-with-flakes";
    paths = [ pkgs.nixFlakes ];
    buildInputs = [ pkgs.makeWrapper ];
    postBuild = ''
      wrapProgram $out/bin/nix --add-flags '--option experimental-features "nix-command flakes"'
    '';
  };

  tai64dec = pkgs.writeShellScriptBin "tai64dec" ''
    echo $((16#$(${pkgs.daemontools}/bin/tai64n <<<"" | ${pkgs.coreutils}/bin/tail -c +2 | ${pkgs.coreutils}/bin/head -c 16)))
  '';
in pkgs.mkShell {
  name = "nixos";
  nativeBuildInputs = with pkgs; [
    nixWithFlakes
    sops
    wireguard-tools
    gup
    nftables
    deploy-rs
    tai64dec
    knot-dns
    yq
    nvfetcher

    (pkgs.callPackage hosts/surtr/email/spm {})
  ];
}