Refactor: global.nix
This commit is contained in:
parent
a56399bc7a
commit
2f0b5cf661
3 changed files with 28 additions and 9 deletions
13
config/globals.nix
Normal file
13
config/globals.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
domain = "porzh.me";
|
||||||
|
admin = {
|
||||||
|
email = "dun0z@porzh.me";
|
||||||
|
name = "DuN0z";
|
||||||
|
};
|
||||||
|
|
||||||
|
smtp = {
|
||||||
|
host = "smtp.protonmail.ch";
|
||||||
|
port = 587 ;
|
||||||
|
user = "contact@porzh.me";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,8 +1,11 @@
|
||||||
_: {
|
_:
|
||||||
|
let
|
||||||
|
globals = import ../../config/globals.nix;
|
||||||
|
in {
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = "DuN0z";
|
userName = globals.admin.name;
|
||||||
userEmail = "dun0z@porzh.me";
|
userEmail = globals.admin.email;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
# vim: set ts=2 sw=2 sts=2 et :
|
# vim: set ts=2 sw=2 sts=2 et :
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,19 @@
|
||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
globals = import ../../config/globals.nix;
|
||||||
|
in {
|
||||||
programs.msmtp = {
|
programs.msmtp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
accounts.default = {
|
accounts.default = {
|
||||||
host = "smtp.protonmail.ch";
|
host = globals.smtp.host;
|
||||||
port = 587;
|
port = globals.smtp.port;
|
||||||
auth = true;
|
auth = true;
|
||||||
tls = true;
|
tls = true;
|
||||||
tls_starttls = true;
|
tls_starttls = true;
|
||||||
user = "contact@porzh.me";
|
user = globals.smtp.user;
|
||||||
passwordeval = "cat /run/secrets/proton_pass";
|
passwordeval = "cat /run/secrets/proton_pass";
|
||||||
from = "contact@porzh.me";
|
from = globals.smtp.user;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue