Merge branch 'main' of ssh://git.0x76.dev:42/v/infrastructure

This commit is contained in:
Vivian 2023-06-17 19:12:16 +02:00
commit 4a87c868a7
13 changed files with 133 additions and 141 deletions

View file

@ -66,10 +66,6 @@
ip = "192.168.0.111";
mac = "7a:5f:9b:62:49:91";
};
"minio" = {
ip = "192.168.0.112";
mac = "ae:c6:94:bb:c5:d9";
};
"cshub2" = {
ip = "192.168.0.113";
mac = "26:8c:f6:f4:21:76";

View file

@ -36,9 +36,14 @@ in {
system.stateVersion = "23.05"; # Did you read the comment?
# Additional packages
environment.systemPackages = with pkgs; [ gcc go jq rustup trivy nuclei-latest ];
networking.firewall.allowedTCPPorts = [ ];
environment.systemPackages = with pkgs; [
gcc
go
jq
rustup
trivy
nuclei-latest
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
@ -46,6 +51,20 @@ in {
virtualisation.docker.enable = true;
services.mosquitto = {
enable = true;
listeners = [{
acl = [ "pattern readwrite #" ];
omitPasswordAuth = true;
settings.allow_anonymous = true;
}];
};
networking.firewall = {
enable = true;
allowedTCPPorts = [ 1883 ];
};
users.extraUsers.laura.extraGroups = [ "wheel" "docker" ];
users.extraUsers.victor.extraGroups = [ "docker" ];
}

View file

@ -65,7 +65,7 @@ in {
smtp = {
createLocally = false;
fromAddress = "mastodon@xirion.net";
host = "mail.xirion.net";
host = "mail.0x76.dev";
user = "mastodon@xirion.net";
authenticate = true;
port = 587;

View file

@ -2,7 +2,7 @@ _: {
networking.firewall.allowedTCPPorts = [ 5055 ];
# TODO: Write NixOS package https://github.com/NixOS/nixpkgs/issues/135885
virtualisation.oci-containers.containers.overseerr = {
image = "ghcr.io/sct/overseerr:1.32.5";
image = "ghcr.io/sct/overseerr:1.33.0";
environment = { TZ = "Europe/Amsterdam"; };
ports = [ "5055:5055" ];
volumes = [ "/var/lib/overseerr/config:/app/config" ];

View file

@ -1,13 +1,13 @@
{ pkgs, lib, ... }: {
{ pkgs, lib, pkgs_stable,... }: {
system.stateVersion = "21.05";
networking.interfaces.eth0.useDHCP = true;
environment.systemPackages = [ pkgs.mongodb-4_2 ];
environment.systemPackages = [ pkgs_stable.mongodb-4_2 ];
services.unifi = {
enable = true;
unifiPackage = pkgs.unifi;
mongodbPackage = pkgs.mongodb-4_2;
mongodbPackage = pkgs_stable.mongodb-4_2;
openFirewall = true;
};

View file

@ -79,6 +79,10 @@ in {
hashedPasswordFile = "${vs.mailserver}/snapraid@0x76.dev";
sendOnly = true;
};
"mastodon@xirion.net" = {
hashedPasswordFile = "${vs.mailserver}/mastodon@xirion.net";
sendOnly = true;
};
};
indexDir = "/var/lib/dovecot/indices";
@ -99,11 +103,12 @@ in {
services.roundcube = {
enable = true;
package =
pkgs.roundcube.withPlugins (plugins: [ plugins.persistent_login ]);
package = pkgs.roundcube.withPlugins
(plugins: [ plugins.persistent_login pkgs.v.roundcube-swipe ]);
plugins = [
"archive"
"managesieve"
"swipe"
# "enigma"
# "markasjunk"
"persistent_login"
@ -117,6 +122,19 @@ in {
$config['smtp_host'] = "tls://${config.mailserver.fqdn}";
$config['smtp_user'] = "%u";
$config['smtp_pass'] = "%p";
$config['swipe_actions'] = [
'messagelist' => [
'left' => 'archive',
'right' => 'archive',
'down' => 'none'
],
'contactlist' => [
'left' => 'none',
'right' => 'none',
'down' => 'none'
]
];
'';
};

View file

@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ pkgs, lib, ... }:
{ pkgs, pkgs_stable, lib, ... }:
{
imports = [ ];
@ -22,7 +22,7 @@
services.unifi = {
enable = true;
unifiPackage = pkgs.unifi;
mongodbPackage = pkgs.mongodb-4_2;
mongodbPackage = pkgs_stable.mongodb-4_2;
openFirewall = true;
};
}

View file

@ -14,6 +14,8 @@ _final: prev: {
dnd-5e-latex-template = prev.callPackage ./dnd-5e-latex-template { };
roundcube-swipe = prev.callPackage ./roundcube-swipe { };
gitea-agatheme = prev.callPackage ./gitea-agatheme { };
# nix-shell -p "(vscode-with-extensions.override {vscodeExtensions = with vscode-extensions; [ jnoortheen.nix-ide ]; })" -I nixpkgs=.

View file

@ -1,14 +1,14 @@
[
{
"version": "1.32.4.7164",
"version": "1.32.4.7195",
"platform": "aarch64-linux",
"url": "https://downloads.plex.tv/plex-media-server-new/1.32.4.7164-1dc22f47b/debian/plexmediaserver_1.32.4.7164-1dc22f47b_arm64.deb",
"hash": "1k61rrdjlwhf14q8qdj976a53wf9f9ask0fwynldyqbvjfjgy0ws"
"url": "https://downloads.plex.tv/plex-media-server-new/1.32.4.7195-7c8f9d3b6/debian/plexmediaserver_1.32.4.7195-7c8f9d3b6_arm64.deb",
"hash": "0fqmwijyp3nkii47s9w0a23r291cbifxgip2flp49wxlr7hbrgj1"
},
{
"version": "1.32.4.7164",
"version": "1.32.4.7195",
"platform": "x86_64-linux",
"url": "https://downloads.plex.tv/plex-media-server-new/1.32.4.7164-1dc22f47b/debian/plexmediaserver_1.32.4.7164-1dc22f47b_amd64.deb",
"hash": "0sa537yx7gjbabmisb26yrrlg7ql124qhwlc20r5m1hbq8i1i23w"
"url": "https://downloads.plex.tv/plex-media-server-new/1.32.4.7195-7c8f9d3b6/debian/plexmediaserver_1.32.4.7195-7c8f9d3b6_amd64.deb",
"hash": "18c0wxfqrhisbrsp51hb3r95bxgi47p3ykaj146k3x2n627j2ycn"
}
]

View file

@ -0,0 +1,19 @@
{ runCommand, fetchFromGitHub }:
let
roundcubePlugin = { pname, version, src }:
runCommand "roundcube-plugin-swipe-${version}" { } ''
mkdir -p $out/plugins/
cp -r ${src} $out/plugins/swipe
'';
in roundcubePlugin rec {
pname = "roundcube-swipe";
version = "0.5";
src = fetchFromGitHub {
owner = "johndoh";
repo = pname;
rev = "de96f82183bc593d879c335e6614fa983d51abfc";
sha256 = "sha256-vrMSvGwUzufSFDsUvUSL9JLR/+GtWdebVqgKiXMOOq4=";
};
}