Skip to content

Instantly share code, notes, and snippets.

{ pkgs
, ...
}:
{
imports = [
/home/myrl/Development/nix-duplicity-backup/duplicity-backup.nix
/home/myrl/Development/nix-duplicity-backup/duplicity-system.nix
];
cat <<EOF
y="1"
${X+x="$X"}
EOF
y="1"
x=1
read -r -d '' CONFIGURATION <<EOF
{
imports =
[ <restore/configuration.nix>
/etc/nixos/duplicity-backup-config.nix
];
NixOSEncryptedLiveCD.rootdevice = "$ROOT_DEV";
NixOSEncryptedLiveCD.bootdevice = "$BOOT_DEV";
{
services.duplicity-system.extraExcludes = [
/desktop
/desktop-new
/etc/nixos/nixpkgs
/etc/nixos/nixpkgs-3.0
/hdd
/home
/root
/zfs
AWS_FILE=$(eval echo "~$SUDO_USER/.aws/credentials")
if eval [ -e "$AWS_FILE" ]; then
if [ -z "${AWS_PROFILE+UNSET}" ]; then
printf 'AWS credentials file(%s) exists. Use [ --no-aws | --aws profile ].' "~$SUDO_USER/.aws/credentials"
exit 2
fi
if [ ! -z "$AWS_PROFILE" ]; then
{ read AWS_ACCESS_KEY_ID;
read AWS_SECRET_ACCESS_KEY;
[default]
aws_access_key_id = default
aws_secret_access_key = meow
[miyu]
aws_access_key_id = miyu
aws_secret_access_key = meow
[myrl]
aws_access_key_id = myrl
nix run nixpkgs.vim -c ex <(cat ~/dummy_credentials) 2>&1 1>/dev/null << EOF
> set noro
> /\[miyu\]
> mark a
> /^aws_access_key_id
> s/aws_access_key_id *= *//
> .w! /dev/stderr
> 'a
> /^aws_secret_access_key
> s/aws_secret_access_key *= *//
services.duplicity-system.extraExcludes = [
/etc/nixos/nixpkgs
/home
/root
/var
];
(import ./default.nix).overrideAttrs (_: {
shellHook = ''
eval "$configurePhase"
'';
})
[myrl@myrl:/tmp/tmp.bqeMefzSaP]$ ./fastly-cache-debug.sh pwih6g12kymmk9nccajz7a934cp6n63h.narinfo
* Connected to cache.nixos.org (151.101.2.217) port 443 (#0)
* subjectAltName: host "cache.nixos.org" matched cert's "cache.nixos.org"
> Host: cache.nixos.org
< fastly-debug-path: (D cache-sin18042-SIN 1564756059) (F cache-sin18050-SIN 1564756059) (D cache-iad2128-IAD 1564756059) (F cache-iad2144-IAD 1564673781)
< fastly-debug-ttl: (M cache-sin18042-SIN - - 0) (H cache-iad2128-IAD - - 82278)
< fastly-debug-digest: 9913c34e0035bb7ab1e57dd79bbcad1721136789d3a7eed609fbdd82fbaa4145
< x-served-by: cache-iad2128-IAD, cache-sin18042-SIN
< x-cache: HIT, MISS
< x-cache-hits: 1, 0