add flake support

This commit is contained in:
Naïm Favier 2020-12-15 16:01:40 +01:00
parent 7c06f610f1
commit ae89eafb81
No known key found for this signature in database
GPG key ID: 49B07322580B7EE2
5 changed files with 98 additions and 12 deletions

26
flake.nix Normal file
View file

@ -0,0 +1,26 @@
{
description = "A complete and Simple Nixos Mailserver";
inputs = {
utils.url = "github:numtide/flake-utils";
nixpkgs.url = "flake:nixpkgs/nixos-unstable";
};
outputs = { self, utils, nixpkgs }: {
nixosModules.mailserver = import ./.;
nixosModule = self.nixosModules.mailserver;
} // utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
(python3.withPackages (p: with p; [
sphinx
sphinx_rtd_theme
]))
jq
clamav
];
};
});
}