Compare commits
3 commits
6eb3942270
...
ea7b064546
Author | SHA1 | Date | |
---|---|---|---|
Bruno BELANYI | ea7b064546 | ||
Bruno BELANYI | ff8e64d601 | ||
Bruno BELANYI | 791109c3c1 |
30
flake.lock
30
flake.lock
|
@ -2,11 +2,11 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"futils": {
|
"futils": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1620759905,
|
"lastModified": 1623875721,
|
||||||
"narHash": "sha256-WiyWawrgmyN0EdmiHyG2V+fqReiVi8bM9cRdMaKQOFg=",
|
"narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "b543720b25df6ffdfcf9227afafc5b8c1fabfae8",
|
"rev": "f7e004a55b120c02ecb6219596820fcd32ca8772",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -23,11 +23,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1622145920,
|
"lastModified": 1625016439,
|
||||||
"narHash": "sha256-/tt6IApLuVcGP5auy4zjLzfm5+MBHYLS3Nauvv2U2EQ=",
|
"narHash": "sha256-zHf7iCU9nYd6/7xwYx5gwDzXdXcJ9RUagdy0IgX39sQ=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "0e6c61a44092e98ba1d75b41f4f947843dc7814d",
|
"rev": "9ad0024d4d292c628d4c9a50c2347f23418d7000",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -39,11 +39,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1622194753,
|
"lastModified": 1624922035,
|
||||||
"narHash": "sha256-76qtvFp/vFEz46lz5iZMJ0mnsWQYmuGYlb0fHgKqqMg=",
|
"narHash": "sha256-OiIxJQuMRkICxaUwY3xMBbrPPu20de/n7tVYnWzLvS4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "540dccb2aeaffa9dc69bfdc41c55abd7ccc6baa3",
|
"rev": "3a8d7958a610cd3fec3a6f424480f91a1b259185",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -55,11 +55,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1622221304,
|
"lastModified": 1625064961,
|
||||||
"narHash": "sha256-aU/BdVGUverHNY9BOmDaAo21G8k9ndhzzjX1RSY1im0=",
|
"narHash": "sha256-ErII8vNW+04+eIGtViN8sSZs573I8PQiw6TWd1E0zoo=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "8d8c59d767d854a1bc6fd08952529e10438eaa8d",
|
"rev": "5f0603506c26d7c97c91e8c6ae27e07f3ab2f0e8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -79,11 +79,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1621411868,
|
"lastModified": 1624971177,
|
||||||
"narHash": "sha256-R+7OQ2JYFCb3E7Jl7LhRifzMVCR6Gl8R98zYsNhZtJ8=",
|
"narHash": "sha256-Amf/nBj1E77RmbSSmV+hg6YOpR+rddCbbVgo5C7BS0I=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "pre-commit-hooks.nix",
|
"repo": "pre-commit-hooks.nix",
|
||||||
"rev": "2e7fac06108b4fc81f5ff9ed9a02bc4f6ede7001",
|
"rev": "397f0713d007250a2c7a745e555fa16c5dc8cadb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -9,7 +9,11 @@ in
|
||||||
|
|
||||||
config.programs.direnv = lib.mkIf cfg.enable {
|
config.programs.direnv = lib.mkIf cfg.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
# A better `use_nix`
|
nix-direnv = {
|
||||||
enableNixDirenvIntegration = true;
|
# A better `use_nix`
|
||||||
|
enable = true;
|
||||||
|
# And `use_flake`
|
||||||
|
enableFlakes = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,10 @@ let
|
||||||
|
|
||||||
inherit primary;
|
inherit primary;
|
||||||
|
|
||||||
|
himalaya = {
|
||||||
|
enable = cfg.himalaya.enable;
|
||||||
|
};
|
||||||
|
|
||||||
msmtp = {
|
msmtp = {
|
||||||
enable = cfg.msmtp.enable;
|
enable = cfg.msmtp.enable;
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,12 +7,17 @@ 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";
|
||||||
};
|
};
|
||||||
|
|
23
home/mail/himalaya.nix
Normal file
23
home/mail/himalaya.nix
Normal file
|
@ -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")"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue