add mailserver

This commit is contained in:
Vivian 2022-09-21 18:00:51 +02:00
parent b04c5d673d
commit cc3ea3e73c
6 changed files with 117 additions and 8 deletions

View file

@ -24,6 +24,22 @@
"type": "github"
}
},
"blobs": {
"flake": false,
"locked": {
"lastModified": 1604995301,
"narHash": "sha256-wcLzgLec6SGJA8fx1OEN1yV/Py5b+U5iyYpksUY/yLw=",
"owner": "simple-nixos-mailserver",
"repo": "blobs",
"rev": "2cccdf1ca48316f2cfd1c9a0017e8de5a7156265",
"type": "gitlab"
},
"original": {
"owner": "simple-nixos-mailserver",
"repo": "blobs",
"type": "gitlab"
}
},
"colmena": {
"inputs": {
"flake-compat": "flake-compat",
@ -68,7 +84,7 @@
"inputs": {
"flake-compat": "flake-compat_2",
"nixpkgs": "nixpkgs_3",
"utils": "utils_4"
"utils": "utils_5"
},
"locked": {
"lastModified": 1648475189,
@ -464,12 +480,35 @@
"type": "indirect"
}
},
"mailserver": {
"inputs": {
"blobs": "blobs",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-22_05": "nixpkgs-22_05",
"utils": "utils_3"
},
"locked": {
"lastModified": 1658267644,
"narHash": "sha256-NJRe1rnlF112eZwxNASlRL8/ghwD8g+lpHIYRkWQxC8=",
"owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver",
"rev": "004c229ca44c069d93c92abf67ff1619fb508c6a",
"type": "gitlab"
},
"original": {
"owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver",
"type": "gitlab"
}
},
"minecraft-servers": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"utils": "utils_3"
"utils": "utils_4"
},
"locked": {
"lastModified": 1663552861,
@ -581,6 +620,21 @@
"type": "github"
}
},
"nixpkgs-22_05": {
"locked": {
"lastModified": 1654936503,
"narHash": "sha256-soKzdhI4jTHv/rSbh89RdlcJmrPgH8oMb/PLqiqIYVQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dab6df51387c3878cdea09f43589a15729cae9f4",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-22.05",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1663746095,
@ -730,6 +784,7 @@
"home-manager": "home-manager",
"hyprland": "hyprland",
"hyprpaper": "hyprpaper",
"mailserver": "mailserver",
"minecraft-servers": "minecraft-servers",
"nixpkgs": "nixpkgs_2",
"riff": "riff",
@ -844,6 +899,21 @@
}
},
"utils_3": {
"locked": {
"lastModified": 1605370193,
"narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5021eac20303a61fafe17224c087f5519baed54d",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"utils_4": {
"inputs": {
"flake-utils": "flake-utils_2"
},
@ -861,7 +931,7 @@
"type": "github"
}
},
"utils_4": {
"utils_5": {
"locked": {
"lastModified": 1648297722,
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",

View file

@ -31,6 +31,9 @@
riff.inputs.nixpkgs.follows = "nixpkgs";
webcord.url = "github:fufexan/webcord-flake";
mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
mailserver.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =

View file

@ -86,9 +86,11 @@
ip = "10.42.42.17";
mac = "0A:06:5E:E7:9A:0C";
}
# {
# ip = "10.42.42.18";
# }
{
hostname = "mailserver";
ip = "10.42.42.18";
mac = "AA:F2:3D:5E:B3:40";
}
{
hostname = "victoriametrics";
ip = "10.42.42.19";

View file

@ -0,0 +1,30 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports = [ ];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "22.11"; # Did you read the comment?
# Additional packages
environment.systemPackages = with pkgs; [ ];
networking.firewall.allowedTCPPorts = [ ];
mailserver = {
enable = false;
fqdn = "mail.0x76.dev";
domains = [ "0x76.dev" ];
certificateScheme = 3;
};
}

View file

@ -49,7 +49,7 @@ in
modules = with pkgs.nginxModules; [ brotli ];
};
# Reverse Proxies
# 0x76.dev
virtualHosts."ha.0x76.dev" = proxy "http://home-assistant.olympus:8123/";
virtualHosts."zookeeper-dev.0x76.dev" = proxy "http://eevee.olympus:8085/";
virtualHosts."md.0x76.dev" = proxy "http://hedgedoc.olympus:3000/";
@ -57,6 +57,9 @@ in
virtualHosts."o.0x76.dev" = proxy "http://minio.olympus:9000";
virtualHosts."grafana.0x76.dev" = proxy "http://victoriametrics.olympus:2342";
virtualHosts."outline.0x76.dev" = proxy "http://outline.olympus:3000";
# virtualHosts."mail.0x76.dev" = proxy "http://mailserver.olympus:80";
# Redshifts
virtualHosts."andreea.redshifts.xyz" = proxy "http://zmeura.olympus:8008";
# Meow

View file

@ -1,4 +1,4 @@
{ nixpkgs, home-manager, hyprland, ... }:
{ nixpkgs, home-manager, hyprland, mailserver, ... }:
let
inherit (nixpkgs) lib;
inherit (builtins) filter mapAttrs attrValues concatLists;
@ -16,6 +16,7 @@ let
];
};
resolve_imports = { hostname, realm, profile ? hostname, type ? "lxc", ... }: [
mailserver.nixosModules.mailserver
./nixos/common
"${./.}/nixos/hosts/${realm}/${profile}/configuration.nix"
] ++ import_cases.${type};