-
Notifications
You must be signed in to change notification settings - Fork 1
/
kala.nix
119 lines (101 loc) · 2.57 KB
/
kala.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
{
nixpkgs,
system,
hostName,
}: {
root = {
imports = [
# Without this we don't find /dev/sda1 on boot :)
"${nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
];
boot.tmp.cleanOnBoot = true;
zramSwap.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi"];
boot.initrd.kernelModules = ["nvme"];
fileSystems."/" = {
device = "/dev/sda1";
fsType = "ext4";
};
};
module = {
pkgs,
config,
lib,
...
}: {
imports = [
../sites
];
system.stateVersion = "23.11";
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"outline"
];
vyxos = {
secrets = {
additionalAuthorizedKeys = [
"kivikakk-celica"
"kivikakk-estrellita"
];
encrypted = {
"furpoll-cookie" = {
owner = config.services.furpoll.user;
};
"smtpd-auth-table" = {};
};
};
nginx = {
enable = true;
vhosts = {
"kala.hrzn.ee" = {
locations."/".return = "502";
};
};
};
fxsync.enable = true;
};
users.users = {
kinu = {
isNormalUser = true;
home = "/home/kinu";
description = "Kinu";
group = "nginx";
createHome = true;
homeMode = "710";
openssh.authorizedKeys.keys = [
(builtins.readFile ../sources/kinu-kala-id_ed25519.pub)
];
extraGroups = ["users"];
};
};
networking.firewall.allowedTCPPorts = [22];
environment.systemPackages = [
# For sendmail or something?
config.services.opensmtpd.package
pkgs.doas-sudo-shim
];
security.sudo.enable = false;
services = {
tailscale.enable = true;
postgresql.package = pkgs.postgresql_14;
furpoll = {
enable = true;
calendar = "*-*-* 7,10,13,18,21,23:07:00";
from = "furpoll <furpoll@kivikakk.ee>";
to = "Ashe <ashe@kivikakk.ee>";
cookieFile = config.vyxos.secrets.decrypted."furpoll-cookie".path;
};
opensmtpd = {
enable = true;
serverConfiguration = ''
queue compression
table fastmail file:${config.vyxos.secrets.decrypted."smtpd-auth-table".path}
listen on lo
action "fastmail" relay host "smtps://kala@smtp.fastmail.com:565" auth <fastmail>
match for any from local action "fastmail"
'';
};
};
};
}