Commit d22e86ebfa48

Vincent Demeester <vincent@sbr.pm>
2018-12-14 17:53:07
modules: add default mail (require a conf)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent c618f02
Changed files (2)
modules/profiles/mail.nix
@@ -0,0 +1,21 @@
+{ config, lib, pkgs, ...}:
+
+with lib;
+let
+  cfg = config.profiles.mail;
+in
+{
+  options = {
+    profiles.mail = {
+      enable = mkOption {
+        default = true;
+        description = "Enable mail profile";
+        type = types.bool;
+      };
+    };
+  };
+  config = mkIf cfg.enable {
+    environment.etc."msmtprc".source = ../../assets/msmtprc;
+    environment.systemPackages = with pkgs; [ msmtp ];
+  };
+}
modules/module-list.nix
@@ -14,6 +14,7 @@
     ./profiles/git.nix
     ./profiles/i18n.nix
     ./profiles/laptop.nix
+    ./profiles/mail.nix
     ./profiles/nix-config.nix
     ./profiles/nix-auto-update.nix
     ./profiles/printing.nix