summaryrefslogtreecommitdiff
path: root/configurations
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2022-09-10 15:49:40 +0300
committerAzat Bahawi <azat@bahawi.net>2022-09-10 15:49:40 +0300
commitdcb02e0ea80821d60185569fb88ec66bea3f3f08 (patch)
treea2ab8943f94ce8f1ae1359051c7e42551c80806e /configurations
parent3399a58442ad0a93fc3b6f68d1b878ab078a0e06 (diff)
2022-09-10
Diffstat (limited to 'configurations')
-rw-r--r--configurations/melian/default.nix88
1 files changed, 44 insertions, 44 deletions
diff --git a/configurations/melian/default.nix b/configurations/melian/default.nix
index fb9b6e6..229b56a 100644
--- a/configurations/melian/default.nix
+++ b/configurations/melian/default.nix
@@ -47,7 +47,6 @@ with lib; {
beets.enable = true;
bluetooth.enable = true;
- chromium.enable = true;
libvirtd.enable = true;
mpd.enable = true;
qutebrowser.enable = true;
@@ -70,47 +69,47 @@ with lib; {
maildirBasePath = "${config.my.home}/mail";
accounts = let
- base = {
- mbsync = {
- enable = true;
- create = "both";
- expunge = "both";
- patterns = ["*"];
- };
- msmtp.enable = true;
- mu.enable = true;
- };
+ mkAccount = attrs:
+ mkMerge [
+ {
+ mbsync = {
+ enable = true;
+ create = "both";
+ expunge = "both";
+ patterns = ["*"];
+ };
+ msmtp.enable = true;
+ mu.enable = true;
+ }
+ attrs
+ ];
pass = path: "${pkgs.pass}/bin/pass show ${path}";
in {
- shire =
- base
- // {
- address = my.email;
- gpg = {
- inherit (my.pgp) key;
- signByDefault = true;
- encryptByDefault = false;
- };
-
- primary = true;
-
- imap.host = "shire.me";
- smtp.host = "shire.me";
- userName = "azahi@shire.me";
- passwordCommand = pass "email/shire.me/azahi";
+ shire = mkAccount {
+ address = my.email;
+ gpg = {
+ inherit (my.pgp) key;
+ signByDefault = true;
+ encryptByDefault = false;
};
- yahoo =
- base
- // {
- address = "a.gondor@yahoo.com";
+ primary = true;
- imap.host = "imap.yahoo.com";
- smtp.host = "smtp.yahoo.com";
- userName = "a.gondor@yahoo.com";
- passwordCommand = pass "email/yahoo.com/a.gondor";
- };
+ imap.host = "shire.me";
+ smtp.host = "shire.me";
+ userName = "azahi@shire.me";
+ passwordCommand = pass "email/shire.me/azahi";
+ };
+
+ yahoo = mkAccount {
+ address = "a.gondor@yahoo.com";
+
+ imap.host = "imap.yahoo.com";
+ smtp.host = "smtp.yahoo.com";
+ userName = "a.gondor@yahoo.com";
+ passwordCommand = pass "email/yahoo.com/a.gondor";
+ };
};
};
@@ -240,14 +239,15 @@ with lib; {
};
services = {
- tlp = {
- enable = false; # TODO Test this again.
- settings = {
- START_CHARGE_THRESH_BAT0 = 75;
- STOP_CHARGE_THRESH_BAT0 = 80;
- RESTORE_THRESHOLDS_ON_BAT = 1;
- };
- };
+ # No need for this anymore but it kept just in case.
+ # tlp = {
+ # enable = true;
+ # settings = {
+ # START_CHARGE_THRESH_BAT0 = 75;
+ # STOP_CHARGE_THRESH_BAT0 = 80;
+ # RESTORE_THRESHOLDS_ON_BAT = 1;
+ # };
+ # };
throttled.enable = mkForce false;