Useful for database backend migrations and/or backup and restore operations.
Requires Python 3.6+ and AIOHTTP 3.7.4+
Run it on your mailman server. You may need to edit the API credentials if you changed the defaults.
# This gist pertains to entering test VMs within nixpkgs/nixos/tests | |
# They must be run with driverInteractive in order to keep them around | |
# Use this in your test VM node configuration to enable ssh and root login | |
{ | |
services.openssh = { | |
enable = true; | |
settings.PermitRootLogin = "yes"; | |
}; | |
# Password will be "testingpain" | |
users.users.root.hashedPassword = "$6$LXJZIXCXOFNlhzc5$NYtb4ThIXAf4tcmIZB9D0b8r4Dj52JH0WU1ZwdVXdp0lQRZBU7I7dw.6ojLZY/bpxKTqYokIvqTZA.JGKXuVY/"; |
# This can be built with nixos-rebuild --flake .#myhost build | |
{ | |
description = "the simplest flake for nixos-rebuild"; | |
inputs = { | |
nixpkgs = { | |
# Using the nixos-unstable branch specifically, which is the | |
# closest you can get to following the equivalent channel with flakes. | |
url = "github:NixOS/nixpkgs/nixos-unstable"; | |
}; |
let | |
commonConfig = ./common/acme/client; | |
dnsServerIP = nodes: nodes.dnsserver.config.networking.primaryIPAddress; | |
dnsScript = {pkgs, nodes}: let | |
dnsAddress = dnsServerIP nodes; | |
in pkgs.writeShellScript "dns-hook.sh" '' | |
set -euo pipefail | |
echo '[INFO]' "[$2]" 'dns-hook.sh' $* |
Useful for database backend migrations and/or backup and restore operations.
Requires Python 3.6+ and AIOHTTP 3.7.4+
Run it on your mailman server. You may need to edit the API credentials if you changed the defaults.
export NIX_PATH=nixpkgs=$(pwd)/nixpkgs # Using current nixos-unstable | |
nixos-generate -f kexec -c kexec_configuration.nix 2>&1 | tee generate.log |
# Taken from https://github.com/NixOS/nixpkgs/pull/63613 | |
# Also incoroporates patches from https://github.com/NixOS/nixpkgs/pull/63613#issuecomment-531471460 | |
# TODO delete this when PR is merged, and switch usages of legoCerts to certs | |
{ config, lib, pkgs, ... }: | |
with lib; | |
let | |
cfg = config.security.acme; | |
directory = "/var/lib/acme"; |
<FilesMatch \.php$> | |
SetHandler "proxy:unix:/run/phpfpm-nextcloud/nextcloud.sock|fcgi://localhost/" | |
</FilesMatch> |
{ pkgs, ... }: | |
{ | |
services.glusterfs = { | |
enable = true; | |
}; | |
services.nfs.server.enable = true; | |
nixpkgs.overlays = [ | |
(self: super: { |
{pkgs ? import /root/nixpkgs { | |
inherit system; | |
}, system ? builtins.currentSystem}: | |
let | |
nodePackages = import ./default.nix { | |
inherit pkgs system; | |
}; | |
in | |
nodePackages // { |
Version: 1 | |
Name: m1cr0pack_5 | |
Mods: | |
- Id: 1544705976 | |
Name: ModCheck | |
- Id: Core | |
Name: Core | |
- Id: 962732083 | |
Name: RuntimeGC | |
- Id: 1507748539 |