Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GovanifY
navi
Commits
697b221f
Verified
Commit
697b221f
authored
Jul 07, 2021
by
GovanifY
Browse files
components/server/mail: init
parent
83462f10
Changes
4
Hide whitespace changes
Inline
Side-by-side
TODO.md
View file @
697b221f
TODO list sorted by priority:
*
workflow: set up patchouli to have regular and automated backups
*
updates: make autoUpgrade pull the git repo and verify navi's sig
*
security: security hardening through sandboxing
*
security: tor profiles and fix iana
components/server/default.nix
View file @
697b221f
...
...
@@ -4,5 +4,6 @@
./monitor.nix
./chat.nix
./projects.nix
./mail.nix
];
}
components/server/mail.nix
0 → 100644
View file @
697b221f
{
config
,
lib
,
pkgs
,
...
}:
with
lib
;
let
cfg
=
config
.
navi
.
components
.
mail-server
;
cert
=
config
.
security
.
acme
.
certs
.
"
${
cfg
.
root_domain
}
"
.
directory
;
in
{
imports
=
[
<
nixos-mailserver
>
];
options
.
navi
.
components
.
mail-server
=
{
enable
=
mkEnableOption
"Enable navi's mail server"
;
accounts
=
mkOption
{
type
=
mailserver
.
loginAccounts
.
type
;
description
=
''
List of accounts and per-accounts rules for the mail server.
''
;
};
domains
=
mkOption
{
type
=
types
.
listOf
types
.
str
;
default
=
[
];
description
=
''
The domains this mailserver should serve.
''
;
};
root_domain
=
mkOption
{
type
=
types
.
str
;
default
=
""
;
description
=
''
The root domain this server will identify itself as when
sending and receiving mails.
''
;
};
};
config
=
mkIf
cfg
.
enable
{
mailserver
=
{
enable
=
true
;
fqdn
=
cfg
.
root_domain
;
domains
=
cfg
.
domains
;
certificateScheme
=
1
;
certificateFile
=
"
${
cert
}
/fullchain.pem"
;
keyFile
=
"
${
cert
}
/key.pem"
;
dkimSelector
=
config
.
navi
.
device
;
dkimKeyBits
=
2048
;
loginAccounts
=
cfg
.
accounts
;
};
navi
.
components
.
web-server
=
{
enable
=
true
;
# this server is a stub that we still need to setup for acme, so we just
# make it stay up whenever and return a nice error code :)
domains
.
"
${
cfg
.
root_domain
}
"
.
return
=
"418"
;
};
};
}
secrets/emet-selch/infrastructure/emet-selch/amaurot.nix
View file @
697b221f
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment