2022-01-15 20:12:12 +00:00
|
|
|
{ ... }: {
|
|
|
|
users.users.miifox = {
|
|
|
|
createHome = true;
|
|
|
|
description = "Miifox";
|
|
|
|
group = "users";
|
|
|
|
home = "/home/miifox";
|
|
|
|
isNormalUser = true;
|
|
|
|
uid = 1001;
|
|
|
|
};
|
|
|
|
home-manager.users.miifox = import ../home-manager/miifox.nix;
|
|
|
|
systemd.slices."user-1001".sliceConfig = {
|
|
|
|
CPUQuota = "100%";
|
|
|
|
MemoryHigh = "1G";
|
|
|
|
MemoryMax = "1.1G";
|
|
|
|
};
|
2022-01-15 20:42:50 +00:00
|
|
|
services.postgresql.ensureDatabases = [ "miifox" ];
|
|
|
|
services.postgresql.ensureUsers = [{
|
2022-01-15 20:41:55 +00:00
|
|
|
name = "miifox";
|
|
|
|
ensurePermissions = { "DATABASE miifox" = "ALL PRIVILEGES"; };
|
|
|
|
}];
|
2022-03-06 19:21:37 +00:00
|
|
|
services.nginx.virtualHosts."miifox.net" = {
|
|
|
|
acmeRoot = "/home/miifox/miifox.net";
|
|
|
|
sslCertificate = "/var/lib/acme/miifox.net/cert.pem";
|
|
|
|
sslCertificateKey = "/var/lib/acme/miifox.net/key.pem";
|
|
|
|
locations."/" = {
|
|
|
|
root = "/home/miifox/miifox.net";
|
|
|
|
};
|
|
|
|
};
|
2022-01-15 20:12:12 +00:00
|
|
|
}
|