From 791109c3c171e02df19c634be903809d3ff247a1 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 30 Jun 2021 20:07:55 +0200 Subject: [PATCH 1/3] flake: bump inputs --- flake.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/flake.lock b/flake.lock index 29aabff..1fead41 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "futils": { "locked": { - "lastModified": 1620759905, - "narHash": "sha256-WiyWawrgmyN0EdmiHyG2V+fqReiVi8bM9cRdMaKQOFg=", + "lastModified": 1623875721, + "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", "owner": "numtide", "repo": "flake-utils", - "rev": "b543720b25df6ffdfcf9227afafc5b8c1fabfae8", + "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", "type": "github" }, "original": { @@ -23,11 +23,11 @@ ] }, "locked": { - "lastModified": 1622145920, - "narHash": "sha256-/tt6IApLuVcGP5auy4zjLzfm5+MBHYLS3Nauvv2U2EQ=", + "lastModified": 1625016439, + "narHash": "sha256-zHf7iCU9nYd6/7xwYx5gwDzXdXcJ9RUagdy0IgX39sQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "0e6c61a44092e98ba1d75b41f4f947843dc7814d", + "rev": "9ad0024d4d292c628d4c9a50c2347f23418d7000", "type": "github" }, "original": { @@ -39,11 +39,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1622194753, - "narHash": "sha256-76qtvFp/vFEz46lz5iZMJ0mnsWQYmuGYlb0fHgKqqMg=", + "lastModified": 1624922035, + "narHash": "sha256-OiIxJQuMRkICxaUwY3xMBbrPPu20de/n7tVYnWzLvS4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "540dccb2aeaffa9dc69bfdc41c55abd7ccc6baa3", + "rev": "3a8d7958a610cd3fec3a6f424480f91a1b259185", "type": "github" }, "original": { @@ -55,11 +55,11 @@ }, "nur": { "locked": { - "lastModified": 1622221304, - "narHash": "sha256-aU/BdVGUverHNY9BOmDaAo21G8k9ndhzzjX1RSY1im0=", + "lastModified": 1625064961, + "narHash": "sha256-ErII8vNW+04+eIGtViN8sSZs573I8PQiw6TWd1E0zoo=", "owner": "nix-community", "repo": "NUR", - "rev": "8d8c59d767d854a1bc6fd08952529e10438eaa8d", + "rev": "5f0603506c26d7c97c91e8c6ae27e07f3ab2f0e8", "type": "github" }, "original": { @@ -79,11 +79,11 @@ ] }, "locked": { - "lastModified": 1621411868, - "narHash": "sha256-R+7OQ2JYFCb3E7Jl7LhRifzMVCR6Gl8R98zYsNhZtJ8=", + "lastModified": 1624971177, + "narHash": "sha256-Amf/nBj1E77RmbSSmV+hg6YOpR+rddCbbVgo5C7BS0I=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "2e7fac06108b4fc81f5ff9ed9a02bc4f6ede7001", + "rev": "397f0713d007250a2c7a745e555fa16c5dc8cadb", "type": "github" }, "original": { From ff8e64d601ffd2886973e2cedfe476cb4287eaa5 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 22 Jun 2021 17:59:47 +0200 Subject: [PATCH 2/3] home: mail: add himalaya This mail client is very KISS. I like it. --- home/mail/accounts.nix | 4 ++++ home/mail/default.nix | 5 +++++ home/mail/himalaya.nix | 23 +++++++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 home/mail/himalaya.nix diff --git a/home/mail/accounts.nix b/home/mail/accounts.nix index 7f1ad02..2eecb6d 100644 --- a/home/mail/accounts.nix +++ b/home/mail/accounts.nix @@ -15,6 +15,10 @@ let inherit primary; + himalaya = { + enable = cfg.himalaya.enable; + }; + msmtp = { enable = cfg.msmtp.enable; }; diff --git a/home/mail/default.nix b/home/mail/default.nix index cc81d0c..3ec0c9a 100644 --- a/home/mail/default.nix +++ b/home/mail/default.nix @@ -7,12 +7,17 @@ in { imports = [ ./accounts.nix + ./himalaya.nix ./msmtp.nix ]; options.my.home.mail = with lib; { enable = my.mkDisableOption "email configuration"; + himalaya = { + enable = mkRelatedOption "himalaya configuration"; + }; + msmtp = { enable = mkRelatedOption "msmtp configuration"; }; diff --git a/home/mail/himalaya.nix b/home/mail/himalaya.nix new file mode 100644 index 0000000..c2d3b05 --- /dev/null +++ b/home/mail/himalaya.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.my.home.mail.himalaya; +in +{ + config.programs.himalaya = lib.mkIf cfg.enable { + enable = true; + + settings = { + notify-cmd = + let + notify-send = "${pkgs.libnotify}/bin/notify-send"; + in + pkgs.writeScript "mail-notifier" '' + SENDER="$1" + SUBJECT="$2" + ${notify-send} \ + -c himalaya \ + -- "$(printf 'Received email from %s\n\n%s' "$SENDER" "$SUBJECT")" + ''; + }; + }; +} From ea7b064546145eb67de8b8a6b4ecb1277f1879f2 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sun, 27 Jun 2021 00:54:55 +0200 Subject: [PATCH 3/3] home: direnv: update to new option name And enable the flakes option. I don't actually use this on my own projects, but it could be useful for other projects that I contribute to. --- home/direnv.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/home/direnv.nix b/home/direnv.nix index d81cf46..cf32628 100644 --- a/home/direnv.nix +++ b/home/direnv.nix @@ -9,7 +9,11 @@ in config.programs.direnv = lib.mkIf cfg.enable { enable = true; - # A better `use_nix` - enableNixDirenvIntegration = true; + nix-direnv = { + # A better `use_nix` + enable = true; + # And `use_flake` + enableFlakes = true; + }; }; }