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
#!/bin/bash -ex | |
ARCH=darwin | |
#ARCH=linux | |
VAULT_VERSION=1.5.3 | |
PACKER_VERSION=1.6.2 | |
CONSUL_VERSION=1.8.4 |
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
FROM centos:7 | |
MAINTAINER Fernando Jose Pando <nando@********.com> | |
RUN yum -y install openssl-devel python-devel java-1.8.0-openjdk which unzip wget epel-release kernel-headers kernel-devel && \ | |
yum -y groupinstall 'Development Tools' && \ | |
wget --no-verbose -O /etc/yum.repos.d/virtualbox.repo http://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo && \ | |
wget --no-verbose -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo && \ | |
rpm -v --import https://jenkins-ci.org/redhat/jenkins-ci.org.key && \ | |
yum -y install jenkins VirtualBox-5.1 && \ |
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
# Test ensures buildbot master comes up correctly and workers can connect | |
import ./make-test.nix ({ pkgs, ... } : { | |
name = "buildbot"; | |
nodes = { | |
bbmaster = { config, pkgs, ... }: { | |
services.buildbot-master = { | |
enable = true; | |
package = pkgs.buildbot-full; | |
# NOTE: use fake repo due to no internet in hydra ci |
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, ... }: | |
{ | |
imports = [ | |
./hardware-configuration.nix | |
./hosts.nix | |
]; | |
system = { | |
stateVersion = "17.03"; | |
copySystemConfiguration = true; | |
autoUpgrade = { |
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
# echo $PATH | |
/home/nando/bin:/run/wrappers/bin:/etc/per-user-pkgs/nando/bin:/home/nando/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin | |
# ls -la $(which electricsheep) | |
lrwxrwxrwx 1 root root 93 Dec 31 1969 /run/current-system/sw/bin/electricsheep -> /nix/store/c5hivhjb18h9vqinqmh1c6m6nhnr66gm-electricsheep-2.7b33-2017-02-04/bin/electricsheep |
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
{ stdenv, fetchFromGitHub, autoreconfHook, wxGTK30, libav, lua5_1, curl | |
, libpng, xorg, pkgconfig, flam3, libgtop, boost, tinyxml, freeglut, mesa, glee }: | |
stdenv.mkDerivation rec { | |
name = "${pname}-${version}"; | |
pname = "electricsheep"; | |
version = "2.7b33-2017-02-04"; | |
src = fetchFromGitHub { | |
owner = "scottdraves"; | |
repo = pname; |
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
# NixOS module for Buildbot continous integration server. | |
# Full file at https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/continuous-integration/buildbot/master.nix | |
{ config, lib, pkgs, ... }: | |
with lib; | |
let | |
cfg = config.services.buildbot-master; | |
escapeStr = s: escape ["'"] s; | |
masterCfg = if cfg.masterCfg == null then pkgs.writeText "master.cfg" '' | |
from buildbot.plugins import * |
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 python | |
import os | |
import random | |
import subprocess | |
from textwrap import dedent | |
image_dir = "/home/nando/Pictures/nasa" | |
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
docker build /path/to/Dockerfile -t nand0p/jenkins-centos | |
docker run -d --privileged=true \ | |
--net=host \ | |
--volume /dev/vboxdrv:/dev/vboxdrv \ | |
--volume /var/lib/jenkins:/var/lib/jenkins \ | |
--volume /var/run/docker.sock:/var/run/docker.sock \ | |
--name jenkins-centos nand0p/jenkins-centos |
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, lib, pkgs, ... }: | |
with lib; | |
let | |
cfg = config.services.nginx; | |
virtualHosts = mapAttrs (vhostName: vhostConfig: | |
let | |
serverName = if vhostConfig.serverName != null | |
then vhostConfig.serverName |
NewerOlder