Browse Source

initial system setup

master
revol-xut 6 months ago
commit
73414a6049
Signed by: revol-xut
GPG Key ID: 4F56FF7759627D07
  1. 1
      .gitignore
  2. 21
      README.md
  3. 148
      flake.lock
  4. 38
      flake.nix
  5. 132
      keys/revol-xut.asc
  6. 3
      keys/test.age
  7. BIN
      mailbert.qcow2
  8. 53
      mailbert/configuration.nix
  9. 28
      mailbert/hardware-configuration.nix
  10. 43
      modules/base.nix
  11. 132
      modules/keys/revol-xut
  12. 19
      modules/mail.nix
  13. 29
      modules/vm.nix

1
.gitignore vendored

@ -0,0 +1 @@
result

21
README.md

@ -0,0 +1,21 @@
The next generation Mailbert
-----------------------------
The Nix Mail setup to rule them all.
## Useful Links
- <https://nixos-mailserver.readthedocs.io/_/downloads/en/latest/pdf/>
- <https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/>
## TODO-List
- [] people should add their puplic keys
- [] replace keys/test.age
- [] setup system and init sops
## Testing Locally
``
nix build
``

148
flake.lock

@ -0,0 +1,148 @@
{
"nodes": {
"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"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1645010845,
"narHash": "sha256-hO9X4PvxkSLMQnGGB7tOrKPwufhLMiNQMNXNwzLqneo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2128d0aa28edef51fd8fef38b132ffc0155595df",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-21.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-21_05": {
"locked": {
"lastModified": 1625692408,
"narHash": "sha256-e9L3TLLDVIJpMnHtiNHJE62oOh6emRtSZ244bgYJUZs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c06613c25df3fe1dd26243847a3c105cf6770627",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-21.05",
"type": "indirect"
}
},
"nixpkgs-21_11": {
"locked": {
"lastModified": 1638371214,
"narHash": "sha256-0kE6KhgH7n0vyuX4aUoGsGIQOqjIx2fJavpCWtn73rc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a640d8394f34714578f3e6335fc767d0755d78f9",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-21.11",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1626852498,
"narHash": "sha256-lOXUJvi0FJUXHTVSiC5qsMRtEUgqM4mGZpMESLuGhmo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "16105403bdd843540cbef9c63fc0f16c1c6eaa70",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"simple-nixos-mailserver": "simple-nixos-mailserver",
"sops-nix": "sops-nix"
}
},
"simple-nixos-mailserver": {
"inputs": {
"blobs": "blobs",
"nixpkgs": "nixpkgs_2",
"nixpkgs-21_05": "nixpkgs-21_05",
"nixpkgs-21_11": "nixpkgs-21_11",
"utils": "utils"
},
"locked": {
"lastModified": 1638911354,
"narHash": "sha256-hNhzLOp+dApEY15vwLAQZu+sjEQbJcOXCaSfAT6lpsQ=",
"owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver",
"rev": "6e3a7b2ea6f0d68b82027b988aa25d3423787303",
"type": "gitlab"
},
"original": {
"owner": "simple-nixos-mailserver",
"ref": "nixos-21.11",
"repo": "nixos-mailserver",
"type": "gitlab"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1644599065,
"narHash": "sha256-oFLRb9p954wiUGn8iU5wOCY/7yBrT4Xvg7Ew07MvSKs=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "fc22eff3205e9742c1b0fd229c267bf237f0c43e",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "sops-nix",
"type": "github"
}
},
"utils": {
"locked": {
"lastModified": 1605370193,
"narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5021eac20303a61fafe17224c087f5519baed54d",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

38
flake.nix

@ -0,0 +1,38 @@
{
inputs = {
nixpkgs.url = github:NixOS/nixpkgs/nixos-21.11;
sops-nix.url = github:Mic92/sops-nix;
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-21.11";
};
outputs = { self, nixpkgs, sops-nix, simple-nixos-mailserver, ... }@inputs: {
#packages."x86_64-linux" = nixpkgs.lib.filterAttrs (_: nixpkgs.lib.isDerivation) (
# import nixpkgs {
# system = "x86_64-linux";
# #overlays = [self.overlay];
#});
defaultPackage."x86_64-linux" = (nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
simple-nixos-mailserver.nixosModule
./mailbert/configuration.nix
(_: { _module.args.buildVM = true; })
"${nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix"
./modules/vm.nix
];
}).config.system.build.vm;
nixosConfigurations.mailbert = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
simple-nixos-mailserver.nixosModule
./mailbert/configuration.nix
];
};
};
}

132
keys/revol-xut.asc

@ -0,0 +1,132 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGFTcLABEAC3RcK0UojOFDThOXglm0rxfnMqo2KdZeXu+oiHI8nmiwJaZPuI
BCEXi8xclFaJxVMfNa3O5qw4SW71gMLOW/SN3Ws/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mn3BSlvPIRXnUNNIOJLd8Z6SYagKKnLK7
JtV9uM8trLbdaOlfZDmXXNDX5iuMwCIhrikN/I7zGomSS9N7ln1oKEd53yNutUyy
nLFjfzFJ2Z8NOH1kw87DMIFJG7suwYzW7BdhRJv09GNypgciddFlzaacnQ1T/FLX
JpREQEFRQfiuuEkByeyt6gq5ATotsWq+eukLSc5JGiy5rG86Cdbzz4ZQ+awMopog
8ph4BVQHC4fZEK6C2BwT4ZdfVHF6RWnZVpIsgCU2ujwe4L1HrRn5yhGIYWPxYD1X
/w7JTC4TVnZIszi7kTQgMiuUyCtEN2GNrS+4+DPN5gN9OituHdEA1JdLurZ6MZhl
7bnoAmLt2qAaFSquwyjhiu9pjJx1DV5sVA87QpIRwrmn2AuD6/4EZuDKT3IiumzT
i0hHGWjEsadckih45T4++tbafTIlGMM+Qf7ZGxN6ry/SQFV3C8aId1lv7rsEfiYe
FsSAY6gXxA+yKF8nnIf19nqitKDWUUnSDGG8HSdw0GUY2Up6sK7OGpZa0eFY2G5A
F4kf7w593iUl9LStmGD/yCpYS0CZ3Zu+tHwfaXFnLXc+r1EnAJh2MW5MrEn0kSWO
lVBehNjHALQ9k/lWjR0NHcQ=
=YlVy
-----END PGP PUBLIC KEY BLOCK-----

3
keys/test.age

@ -0,0 +1,3 @@
# created: 2021-10-15T12:49:19+02:00
# public key: age1925katzy5gws3f9hnvnlwspu6trxf488arwt6ayw3urg2mgumqhszxnmqh
AGE-SECRET-KEY-185C2AV5M0U2FAUL3LYQXDU7N5ZE226GRFRUY2976GNKGEXLQC3DQ539JDN

BIN
mailbert.qcow2

Binary file not shown.

53
mailbert/configuration.nix

@ -0,0 +1,53 @@
# 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 =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
# Enabled modules
../modules/base.nix
../modules/mail.nix
];
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
networking.hostName = "mailbert"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Set your time zone.
time.timeZone = "Europe/Berlin";
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.networkmanager.enable = true;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# 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. It‘s 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 = "20.11"; # Did you read the comment?
}

28
mailbert/hardware-configuration.nix

@ -0,0 +1,28 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/6d8f4b96-4ccb-4a94-a9b1-bab4a28fc940";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/58C2-5A6A";
fsType = "vfat";
};
swapDevices = [ ];
}

43
modules/base.nix

@ -0,0 +1,43 @@
{ pkgs, config, ... }:
{
_module.args.buildVM = false;
# use Nix 2.4 for flakes support
nix = {
package = pkgs.nix_2_4;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "uk";
};
users.users.root = {
openssh.authorizedKeys.keyFiles = [
./keys/revol-xut
];
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
atop
fish
git
htop
tmux
vim_configurable
wget
];
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.openssh.passwordAuthentication = false;
programs.mosh.enable = true;
}

132
modules/keys/revol-xut

@ -0,0 +1,132 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGFTcLABEAC3RcK0UojOFDThOXglm0rxfnMqo2KdZeXu+oiHI8nmiwJaZPuI
BCEXi8xclFaJxVMfNa3O5qw4SW71gMLOW/SN3Ws/RyKQnbOjFliPTM5D+HKL341V
PDvXaKrnKg1j4AnubnbYi2PljW0mrsheIhZdbL62rFZJP+5NZML60ykc8GAdsEXV
8BELxMtyqLrmu10ToEZ/HSHeVirBBPPBey6FGZmydsYoUUmRl9z6trIfA9unRnQL
4pGLl1UUMu0esk6C9MX1DwxZW8b5jWkw+R8QekOK4WJ5yYSSZ47uoJN4Uz9w+4cW
9EKIj33E9Tn5iXrd9OSAUyxr9zOBjIWg+PPAzwLg9gXxxaEGvZNAA6IkKeduLZpo
+2qcXA+TsZkNo77hzvs5aKMz/jWtheLeCrxbwCv421GLOrl4Srjeicb/+oeaxKG6
BR3Qw3RqR5ZMRtFZGhznudF9Of6uNrGAAtH0cxhKNTlR4YGu+4AnobrlStG4QCA7
22Dg7xuo4MlRy4l1Vvg+3wSRoaL8I+7ClvIaYIFxAZvF5QRW7BCzV32KOo6H9xe6
ahHy8RkmFXQ1z3+gCcJsxVjZXP/3NzNk59sJzDyP8gag5vUAlKnnCALRs6BmHttP
4y7UJiLZXEHx38i3RG9cWLwiEkl6kw9tQR1wHmlNjMGGUeNeM8Vrjl5DuQARAQAB
tCRyZX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WO
lVBehNjHALQ9k/lWjR0NHcQ=
=YlVy
-----END PGP PUBLIC KEY BLOCK-----

19
modules/mail.nix

@ -0,0 +1,19 @@
{ config, pkgs, ... }:
let release = "nixos-21.05";
in {
mailserver = {
enable = true;
fqdn = "mail.example.com";
domains = [ "example.com" "example2.com" ];
loginAccounts = {
"user1@example.com" = {
# nix run nixpkgs.apacheHttpd -c htpasswd -nbB "" "super secret password" | cut -d: -f2 > /hashed/password/file/location
hashedPasswordFile = "/hashed/password/file/location";
aliases = [
];
};
};
};
}

29
modules/vm.nix

@ -0,0 +1,29 @@
{ config, lib, pkgs, buildVM, ... }:
{
assertions = [
{ assertion = buildVM; message = "this module may only be used when building a VM!"; }
];
users.users.root.hashedPassword = "";
users.mutableUsers = false;
networking.useDHCP = lib.mkForce false;
networking.interfaces = lib.mkForce {
eth0.useDHCP = true;
};
networking.defaultGateway = lib.mkForce null;
#sops.defaultSopsFile = lib.mkForce ../secrets.test.yaml;
#sops.age.sshKeyPaths = lib.mkForce [];
#sops.gnupg.sshKeyPaths = lib.mkForce [];
#sops.age.keyFile = lib.mkForce "${../keys/test.age}";
#sops.age.generateKey = lib.mkForce false;
# Set VM disk size (in MB)
virtualisation.diskSize = 2048;
# Set VM ram amount (in MB)
virtualisation.memorySize = 1024;
}
Loading…
Cancel
Save