Skip to content

Instantly share code, notes, and snippets.

View fpletz's full-sized avatar
🦺
building

Franz Pletz fpletz

🦺
building
  • Munich, Germany
  • 20:12 (UTC +02:00)
View GitHub Profile
security.pki.certificateFiles = [
(pkgs.fetchurl {
url = "https://www.cacert.org/certs/class3.crt";
sha256 = "0kzq3gvili5mpjkz7p3mf46d14175id4b4ll188mph0wvajxmfpm";
})
];
@fpletz
fpletz / configuration.nix
Created July 3, 2016 17:36
rspamd + postfix + dovecot
{
services = {
rspamd.enable = true;
rmilter =
{ enable = true;
rspamd.enable = true;
postfix.enable = true;
};
@fpletz
fpletz / azure-images.nix
Last active February 19, 2022 17:34
Parametrized Azure Images
{ system ? "x86_64-linux" }:
let
buildAzureImage = params: (import <nixpkgs/nixos> {
inherit system;
configuration = import ./test.nix params;
}).config.system.build.azureImage;
in
{
require = [ ./hardware-x250.nix ];
boot = {
initrd.luks.devices = [
{ name = "boot";
device = "/dev/sda2";
allowDiscards = true;
}
{ name = "tank";
@fpletz
fpletz / configuration.nix
Created February 2, 2017 19:16
NixIPFS mirror setup
{
networking.firewall = {
allowedTCPPorts = [ 80 4001 ];
};
services.ipfs = {
enable = true;
emptyRepo = true;
gatewayAddress = "/ip6/::1/tcp/8080";
apiAddress = "/ip6/::1/tcp/5001";
};
{
hardware.pulseaudio = {
enable = true;
systemWide = true;
package = pkgs.pulseaudioFull;
zeroconf.discovery.enable = false;
zeroconf.publish.enable = true;
tcp.enable = true;
tcp.anonymousClients.allowAll = true;
};
services.tinc.networks.foo = {
name = lib.replaceChars ["." "-"] ["_" "_"] config.networking.hostName;
ed25519PrivateKeyFile = secrets.ed25519PrivateKeyFile;
interfaceType = "tap";
debugLevel = 2;
extraConfig = ''
Mode = switch
AutoConnect = yes
PingInterval = 15
'';
{
test = { pkgs, lib, ... }: with lib; {
virtualisation.memorySize = 512;
virtualisation.graphics = false;
networking.firewall.enable = false;
services.rmilter.enable = false;
};
}
boot.kernelPackages = pkgs.linuxPackages_custom rec {
version = "4.11.4";
src = pkgs.fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "144a8ianp6sy057pbhnssg6xs4f3dc5cwwkz8d4q9jzpd87fdm43";
};
configfile = ./customKernel.config;
};
@fpletz
fpletz / gist:cb1bfaf976921a28436821e6e5182fd0
Last active September 17, 2017 12:51
cache.nixos.community mirror
# Mirrors only the NixOS Binary Cache from cache.nixos.community
let
cacheHostname = "cache.nixos.ffmuc.net";
cacheFolder = "/srv/nixos-cache";
in {
systemd.services."rsync-nixos-cache" = {