Compare commits
56 commits
93bff2ab45
...
056899d344
Author | SHA1 | Date | |
---|---|---|---|
056899d344 | |||
276658b73c | |||
884e2dcf89 | |||
82e5246293 | |||
ae6354806e | |||
337df8cc99 | |||
6c34b71580 | |||
7a5f26cca5 | |||
29e5b92702 | |||
d795d1fc6b | |||
7232b41cf6 | |||
518f075e79 | |||
92d4323155 | |||
952b367f22 | |||
405bbee2bf | |||
9632aba595 | |||
a7f5a40a43 | |||
56e0f9230e | |||
e8a24dcbe7 | |||
12d91be692 | |||
b2354df152 | |||
02f6f2c5d9 | |||
4f29961c4c | |||
a2d3fc0667 | |||
fc60ae8fed | |||
42b554c87f | |||
85ec5290d0 | |||
9740163109 | |||
01a3efdd1d | |||
f6d8c5e76b | |||
07d7f551f9 | |||
51524ccd8a | |||
c26cea6183 | |||
2433d75e85 | |||
ea25b5d28e | |||
5c5bff3a65 | |||
45448b8102 | |||
80e84121dd | |||
13f31c1b8e | |||
fad53f2613 | |||
bffb3a75cc | |||
5975c82fd8 | |||
7aa4ccbc7e | |||
6d08d7b0f1 | |||
83a7ce70b5 | |||
487adbf911 | |||
12cfafeb3e | |||
0397a4e166 | |||
f8e48e7fa0 | |||
c40cbf74f3 | |||
2516836026 | |||
0f10937be8 | |||
de26e20ed4 | |||
30ea33079a | |||
4f54c31dc5 | |||
3c8caa0a17 |
|
@ -10,12 +10,11 @@
|
|||
./syncthing.nix
|
||||
./users.nix
|
||||
./writefreely.nix
|
||||
./renawiki.nix
|
||||
./email.nix
|
||||
./forgejo.nix
|
||||
];
|
||||
|
||||
services.nginx.virtualHosts."lelgenio.xyz" = {
|
||||
services.nginx.virtualHosts."lelgenio.com" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
root = pkgs.runCommand "www-dir" { } ''
|
||||
|
@ -51,7 +50,7 @@
|
|||
dates = "04:40";
|
||||
operation = "switch";
|
||||
flags = [ "--update-input" "nixpkgs" "--no-write-lock-file" "-L" ];
|
||||
flake = "git+https://git.lelgenio.xyz/lelgenio/nixos-config#phantom";
|
||||
flake = "git+https://git.lelgenio.com/lelgenio/nixos-config#phantom";
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05"; # Never change this
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, inputs, ... }: {
|
||||
{ pkgs, inputs, config, ... }: {
|
||||
# It's important to let Digital Ocean set the hostname so we get rDNS to work
|
||||
networking.hostName = "";
|
||||
|
||||
|
@ -8,32 +8,47 @@
|
|||
|
||||
mailserver = {
|
||||
enable = true;
|
||||
fqdn = "lelgenio.xyz";
|
||||
fqdn = "lelgenio.com";
|
||||
domains = [
|
||||
"lelgenio.xyz"
|
||||
"git.lelgenio.xyz"
|
||||
"lelgenio.com"
|
||||
"git.lelgenio.com"
|
||||
"social.lelgenio.com"
|
||||
];
|
||||
certificateScheme = "acme-nginx";
|
||||
# Create passwords with
|
||||
# nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
|
||||
loginAccounts = {
|
||||
"lelgenio@lelgenio.com" = {
|
||||
hashedPassword = "$2y$05$z5s7QCXcs5uTFsfyYpwNJeWzb3RmzgWxNgcPCr0zjSytkLFF/qZmS";
|
||||
aliases = [ "postmaster@lelgenio.com" ];
|
||||
};
|
||||
"lelgenio@lelgenio.xyz" = {
|
||||
hashedPassword = "$2y$05$z5s7QCXcs5uTFsfyYpwNJeWzb3RmzgWxNgcPCr0zjSytkLFF/qZmS";
|
||||
aliases = [ "postmaster@lelgenio.xyz" ];
|
||||
};
|
||||
"noreply@git.lelgenio.xyz" = {
|
||||
"noreply@git.lelgenio.com" = {
|
||||
hashedPassword = "$2b$05$TmR1R7ZwXfec7yrOfeBL7u3ZtyXf0up5dEO6uMWSvb/O7LPEm.j0.";
|
||||
};
|
||||
"noreply@social.lelgenio.com" = {
|
||||
hashedPassword = "$2b$05$DcA9xMdvHqqQMZw2.zybI.vfKsQAJtaQ/JB.t9AHu6psstWq97m2C";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Prefer ipv4 and use main ipv6 to avoid reverse DNS issues
|
||||
services.postfix.extraConfig = ''
|
||||
smtp_address_preference = ipv4
|
||||
'';
|
||||
|
||||
# Webmail
|
||||
services.roundcube = rec {
|
||||
services.roundcube = {
|
||||
enable = true;
|
||||
package = pkgs.roundcube.withPlugins (p: [ p.carddav ]);
|
||||
hostName = "mail.lelgenio.xyz";
|
||||
hostName = "mail.lelgenio.com";
|
||||
extraConfig = ''
|
||||
$config['smtp_host'] = "tls://${hostName}:587";
|
||||
$config['smtp_host'] = "tls://${config.mailserver.fqdn}:587";
|
||||
$config['smtp_user'] = "%u";
|
||||
$config['smtp_pass'] = "%p";
|
||||
$config['plugins'] = [ "carddav", "archive" ];
|
||||
|
|
|
@ -26,15 +26,15 @@ in
|
|||
DEFAULT_ACTIONS_URL = "github";
|
||||
};
|
||||
server = {
|
||||
DOMAIN = "git.lelgenio.xyz";
|
||||
DOMAIN = "git.lelgenio.com";
|
||||
HTTP_PORT = 3000;
|
||||
ROOT_URL = "https://${srv.DOMAIN}/";
|
||||
};
|
||||
mailer = {
|
||||
ENABLED = true;
|
||||
SMTP_ADDR = "mail.lelgenio.xyz";
|
||||
FROM = "noreply@git.lelgenio.xyz";
|
||||
USER = "noreply@git.lelgenio.xyz";
|
||||
SMTP_ADDR = "mail.lelgenio.com";
|
||||
FROM = "noreply@git.lelgenio.com";
|
||||
USER = "noreply@git.lelgenio.com";
|
||||
};
|
||||
};
|
||||
mailerPasswordFile = config.age.secrets.phantom-forgejo-mailer-password.path;
|
||||
|
|
|
@ -2,10 +2,22 @@
|
|||
services.mastodon = {
|
||||
enable = true;
|
||||
configureNginx = true;
|
||||
localDomain = "social.lelgenio.xyz";
|
||||
smtp.fromAddress = "lelgenio@disroot.org";
|
||||
localDomain = "social.lelgenio.com";
|
||||
smtp = {
|
||||
authenticate = true;
|
||||
host = "lelgenio.com";
|
||||
fromAddress = "noreply@social.lelgenio.com";
|
||||
user = "noreply@social.lelgenio.com";
|
||||
passwordFile = config.age.secrets.phantom-mastodon-mailer-password.path;
|
||||
};
|
||||
streamingProcesses = 2;
|
||||
extraConfig.SINGLE_USER_MODE = "true";
|
||||
mediaAutoRemove.olderThanDays = 10;
|
||||
};
|
||||
|
||||
age.secrets.phantom-mastodon-mailer-password = {
|
||||
file = ../../secrets/phantom-mastodon-mailer-password.age;
|
||||
mode = "400";
|
||||
owner = "mastodon";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
services.nextcloud = {
|
||||
enable = true;
|
||||
package = pkgs.nextcloud27;
|
||||
hostName = "cloud.lelgenio.xyz";
|
||||
hostName = "cloud.lelgenio.com";
|
||||
https = true;
|
||||
config = {
|
||||
adminpassFile = config.age.secrets.phantom-nextcloud.path;
|
||||
|
|
|
@ -1,10 +1,23 @@
|
|||
{ config, pkgs, inputs, ... }: {
|
||||
{ config, pkgs, lib, ... }: {
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedGzipSettings = true;
|
||||
};
|
||||
|
||||
# Redirect *lelgenio.xyz -> *lelgenio.com
|
||||
services.nginx.virtualHosts = lib.mapAttrs'
|
||||
(key: value: lib.nameValuePair "${key}lelgenio.xyz" value)
|
||||
(
|
||||
lib.genAttrs [ "" "social." "blog." "cloud." "mail." "git." "syncthing." ] (name: {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/".return = "301 $scheme://${name}lelgenio.com$request_uri";
|
||||
})
|
||||
);
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = "lelgenio@disroot.org";
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
{ config, pkgs, inputs, ... }: {
|
||||
services.mediawiki = {
|
||||
enable = true;
|
||||
name = "Rena Wiki";
|
||||
|
||||
webserver = "nginx";
|
||||
nginx.hostName = "renawiki.lelgenio.xyz";
|
||||
passwordFile = config.age.secrets.phantom-renawiki.path;
|
||||
|
||||
extensions.VisualEditor = null;
|
||||
};
|
||||
services.nginx.virtualHosts."renawiki.lelgenio.xyz" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
};
|
||||
|
||||
age.secrets.phantom-renawiki = {
|
||||
file = ../../secrets/phantom-renawiki.age;
|
||||
mode = "400";
|
||||
owner = "mediawiki";
|
||||
};
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
openDefaultPorts = true;
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."syncthing.lelgenio.xyz" = {
|
||||
services.nginx.virtualHosts."syncthing.lelgenio.com" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
acme.enable = true;
|
||||
nginx.enable = true;
|
||||
nginx.forceSSL = true;
|
||||
host = "blog.lelgenio.xyz";
|
||||
host = "blog.lelgenio.com";
|
||||
admin.name = "lelgenio";
|
||||
admin.initialPasswordFile = config.age.secrets.phantom-writefreely.path;
|
||||
settings.app = {
|
||||
|
|
13
secrets/phantom-mastodon-mailer-password.age
Normal file
13
secrets/phantom-mastodon-mailer-password.age
Normal file
|
@ -0,0 +1,13 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-rsa BwwxHg
|
||||
Mnc+/tJ0QqxHkg2nl9gEkz5Oj1RgxtOZnD5gRv66ISUOqZhNm1+F+xVEdKn843/q
|
||||
/WzH0f1cTF9NXP8vIaEo//bMmp50obJAd+JNovJxV+0gb9L55Nu7ayvK+eyk6j5n
|
||||
eb8TxUnwh5BPkEyc6akDh/O49GXzLlVoFD6Ik/0f3YCqUDNAYOl2bsssXtevCeK/
|
||||
WEPoCFGhZfNUrOo/0eAhiujZZ5zVb0CWNqXi8VTe2eWOE20VJULcN13TEyO3ZePx
|
||||
bAPBmDfS5GgGlV4INWxVLaIMDrzlm0tYozbBNNUbdLFFOhIOrgvay9RWxdk0u2hJ
|
||||
MPKoKsJ96EFxrbZJdS0W7a+aZk/Q3A3Civ2rtPx+5UANhmlY8e1lUHa26e1vA4K7
|
||||
ApoMtDyCbuZ9FbLurwl9zO64wWP68aKzuyKOIw+wpy41NQ/PcViSY8KNG9Pt7A2N
|
||||
CcOkByx+rwz+JdNHbOF8O4FFG4fNSWn7SvVtu5ymGgVi1bOd8PdJpjDR+6Is0SX7
|
||||
|
||||
--- DHNyITb7ZseEV58MOD/zHeH5vff0hhlbKg27rlYECGk
|
||||
ÆJ…¨Úãè·<hUs/¿ïš}ó´Zi`ˆ‘ 'ÂJŸ°z5ùÃgõãŸ%€ì‡`¤º%/˜‚±<01>ˆ„á-Î<x—íõÉ’|
|
|
@ -12,4 +12,5 @@ in
|
|||
"phantom-writefreely.age".publicKeys = [ main_ssh_public_key ];
|
||||
"phantom-renawiki.age".publicKeys = [ main_ssh_public_key ];
|
||||
"phantom-forgejo-mailer-password.age".publicKeys = [ main_ssh_public_key ];
|
||||
"phantom-mastodon-mailer-password.age".publicKeys = [ main_ssh_public_key ];
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
nix fmt
|
||||
|
||||
git diff
|
||||
git --no-pager diff
|
||||
|
||||
nixos-rebuild switch --flake .#phantom \
|
||||
--update-input nixpkgs \
|
||||
|
|
|
@ -17,6 +17,7 @@ in
|
|||
# enable sway window manager
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
package = pkgs.mySway;
|
||||
wrapperFeatures.gtk = true;
|
||||
};
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ hook global BufOpenFile .*/COMMIT_EDITMSG %{
|
|||
hook global RegisterModified '"' %{ nop %sh{ {
|
||||
printf %s "$kak_reg_dquote" | wl-copy -n
|
||||
printf %s "$kak_reg_dquote" | xclip -i -selection clipboard
|
||||
} > /dev/null 2>&1 < /dev/null & }}
|
||||
} > /dev/null 2>&1 < /dev/null & }} -group sync-clipboard
|
||||
|
||||
# Trim trailing whitespace
|
||||
hook global BufWritePre .* %{ try %{
|
||||
|
|
Loading…
Reference in a new issue