nixos-config/config/users/miifox.nix

37 lines
1.6 KiB
Nix
Raw Normal View History

2022-03-25 13:29:24 +00:00
{ pkgs, miifox-net, ... }: {
2022-01-15 20:12:12 +00:00
users.users.miifox = {
createHome = true;
description = "Miifox";
group = "users";
home = "/home/miifox";
isNormalUser = true;
uid = 1001;
2022-04-13 10:29:06 +00:00
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDDIqSXWTE+zpq+DjgZbWI2i+9++SHCEorrfcNT7oDgeah1oGqg84X3f7hIov7FtNYExFj+kaYW7GOOOV9KwwB6W5adfORWvP6domwXdLutDOnkfAXCNAQBBXDRMrAHS9x089xdFJ0+FTVbB8a4QN9DG82uxGPSoMGwZfloYM0/SYahc5x3I2zpMi9PxJJzhrnmSXJx2gMYMkEoMZBxWdlXD/ge192ejMDQ/f4idW7humK9F6TG7j7u5pqUmN/WqZVg1f2mltjUFjRWn+gIDmEpgfqJ3LXQHu90vAWpXVYMsPqHc8A6+Y29YB9BuCflC4gSwKZqTHVp9oaMYJIBEw0xayK5TgsC0EliX7WQK7KacjGHhQPhP/igT+/wTC1I+gdyjOGloVVFOjWJLbpW+9C/Xp/Oy8zcH7YPj9vO8Sc5jZhuRxWgH7vUI9Nl+wjfcbKRx3ihS3HP7zenN9ATr0gO1Cj7yWKn0Mhr6an3hMDFbAA9ppiTr9JC4wvUIrurHiE= caroline the husky@Huskydev"
];
2022-01-15 20:12:12 +00:00
};
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"; };
}];
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";
2022-03-25 13:29:24 +00:00
locations."/" =
2022-04-13 10:29:06 +00:00
let
miifox-website = pkgs.callPackage (import ../../packages/miifox.nix miifox-net) { };
in
{
root = "${miifox-website}";
};
};
2022-01-15 20:12:12 +00:00
}