This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
import logging | |
import os | |
separator = '-------------------------------------------------------' | |
logging.basicConfig(format='%(levelname_brackets)s %(message)s', level=logging.INFO) | |
old_factory = logging.getLogRecordFactory() | |
def record_factory(*args, **kwargs): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, lib, ... }: | |
{ | |
containers.grafana = { | |
autoStart = true; | |
ephemeral = true; | |
bindMounts = { | |
"/data" = { | |
hostPath = "/data/random/grafana"; | |
isReadOnly = false; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARG VERSION | |
FROM ubuntu AS download | |
ARG DEBIAN_FRONTEND=noninteractive | |
ARG VERSION | |
WORKDIR /tmp | |
RUN apt update && apt install -y curl | |
RUN curl -o teleport.tar.gz https://get.gravitational.com/teleport-v$VERSION-linux-arm64-bin.tar.gz \ | |
&& tar xvzf teleport.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> { } }: | |
pkgs.stdenv.mkDerivation rec { | |
name = "dnsconfig"; | |
version = "0.1.0"; | |
phases = [ "buildPhase" "testPhase" ]; | |
src = ./config; | |
buildPhase = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, ... }: | |
let | |
teleport = (import ./build.nix) { inherit pkgs; }; | |
in | |
{ | |
virtualisation.oci-containers.containers.teleport = { | |
image = "teleport:11.1.4"; | |
imageFile = teleport; | |
volumes = [ "${config.age.secrets.teleport-config.path}:/etc/teleport.d/teleport.yaml" "/data/teleport/data:/var/lib/teleport" ]; | |
ports = [ "443:443" "3025:3025" "3024:3024" "3023:3023" ]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, lib, ... }: | |
{ | |
containers.certbot = { | |
autoStart = true; | |
ephemeral = true; | |
bindMounts = { | |
"/var/lib/acme" = { hostPath = "/data/acme"; isReadOnly = false; }; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import glob | |
import json | |
import textwrap | |
from jnpr.junos import Device | |
from jnpr.junos.utils.config import Config | |
from xml.etree import ElementTree | |
from datetime import datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::{fmt::Write, process::Command}; | |
pub fn main() { | |
let root = std::env::var("CARGO_MANIFEST_DIR").expect("missing CARGO_MANIFEST_DIR env var"); | |
let out = std::env::var("OUT_DIR").expect("missing OUT_DIR env var"); | |
build_flatbufs(&root, &out); | |
} | |
fn build_flatbufs(root: &str, out: &str) { |
OlderNewer