Compare commits

..

No commits in common. "ea7b064546145eb67de8b8a6b4ecb1277f1879f2" and "6eb39422705f48864b15223ddd2c6020532f4d5a" have entirely different histories.

5 changed files with 17 additions and 53 deletions

View file

@ -2,11 +2,11 @@
"nodes": { "nodes": {
"futils": { "futils": {
"locked": { "locked": {
"lastModified": 1623875721, "lastModified": 1620759905,
"narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", "narHash": "sha256-WiyWawrgmyN0EdmiHyG2V+fqReiVi8bM9cRdMaKQOFg=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", "rev": "b543720b25df6ffdfcf9227afafc5b8c1fabfae8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -23,11 +23,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1625016439, "lastModified": 1622145920,
"narHash": "sha256-zHf7iCU9nYd6/7xwYx5gwDzXdXcJ9RUagdy0IgX39sQ=", "narHash": "sha256-/tt6IApLuVcGP5auy4zjLzfm5+MBHYLS3Nauvv2U2EQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "9ad0024d4d292c628d4c9a50c2347f23418d7000", "rev": "0e6c61a44092e98ba1d75b41f4f947843dc7814d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -39,11 +39,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1624922035, "lastModified": 1622194753,
"narHash": "sha256-OiIxJQuMRkICxaUwY3xMBbrPPu20de/n7tVYnWzLvS4=", "narHash": "sha256-76qtvFp/vFEz46lz5iZMJ0mnsWQYmuGYlb0fHgKqqMg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3a8d7958a610cd3fec3a6f424480f91a1b259185", "rev": "540dccb2aeaffa9dc69bfdc41c55abd7ccc6baa3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -55,11 +55,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1625064961, "lastModified": 1622221304,
"narHash": "sha256-ErII8vNW+04+eIGtViN8sSZs573I8PQiw6TWd1E0zoo=", "narHash": "sha256-aU/BdVGUverHNY9BOmDaAo21G8k9ndhzzjX1RSY1im0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "5f0603506c26d7c97c91e8c6ae27e07f3ab2f0e8", "rev": "8d8c59d767d854a1bc6fd08952529e10438eaa8d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -79,11 +79,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1624971177, "lastModified": 1621411868,
"narHash": "sha256-Amf/nBj1E77RmbSSmV+hg6YOpR+rddCbbVgo5C7BS0I=", "narHash": "sha256-R+7OQ2JYFCb3E7Jl7LhRifzMVCR6Gl8R98zYsNhZtJ8=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "397f0713d007250a2c7a745e555fa16c5dc8cadb", "rev": "2e7fac06108b4fc81f5ff9ed9a02bc4f6ede7001",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -9,11 +9,7 @@ in
config.programs.direnv = lib.mkIf cfg.enable { config.programs.direnv = lib.mkIf cfg.enable {
enable = true; enable = true;
nix-direnv = {
# A better `use_nix` # A better `use_nix`
enable = true; enableNixDirenvIntegration = true;
# And `use_flake`
enableFlakes = true;
};
}; };
} }

View file

@ -15,10 +15,6 @@ let
inherit primary; inherit primary;
himalaya = {
enable = cfg.himalaya.enable;
};
msmtp = { msmtp = {
enable = cfg.msmtp.enable; enable = cfg.msmtp.enable;
}; };

View file

@ -7,17 +7,12 @@ in
{ {
imports = [ imports = [
./accounts.nix ./accounts.nix
./himalaya.nix
./msmtp.nix ./msmtp.nix
]; ];
options.my.home.mail = with lib; { options.my.home.mail = with lib; {
enable = my.mkDisableOption "email configuration"; enable = my.mkDisableOption "email configuration";
himalaya = {
enable = mkRelatedOption "himalaya configuration";
};
msmtp = { msmtp = {
enable = mkRelatedOption "msmtp configuration"; enable = mkRelatedOption "msmtp configuration";
}; };

View file

@ -1,23 +0,0 @@
{ 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")"
'';
};
};
}