From dcb02e0ea80821d60185569fb88ec66bea3f3f08 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sat, 10 Sep 2022 15:49:40 +0300 Subject: 2022-09-10 --- configurations/melian/default.nix | 88 +++++++++++++++++++-------------------- 1 file changed, 44 insertions(+), 44 deletions(-) (limited to 'configurations/melian/default.nix') 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; -- cgit v1.2.3