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;
};
}