2022-06-12 15:39:15 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
nix-packages,
|
|
|
|
system,
|
|
|
|
...
|
|
|
|
}: {
|
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-06-12 15:39:15 +00:00
|
|
|
services.postgresql.ensureDatabases = ["miifox"];
|
|
|
|
services.postgresql.ensureUsers = [
|
|
|
|
{
|
|
|
|
name = "miifox";
|
|
|
|
ensurePermissions = {"DATABASE miifox" = "ALL PRIVILEGES";};
|
|
|
|
}
|
|
|
|
];
|
2022-08-26 15:28:14 +00:00
|
|
|
services.caddy.virtualHosts."miifox.net" = {
|
|
|
|
useACMEHost = "miifox.net";
|
2022-12-30 13:03:57 +00:00
|
|
|
logFormat = pkgs.lib.mkForce "";
|
2022-08-26 15:28:14 +00:00
|
|
|
extraConfig = ''
|
|
|
|
import baseConfig
|
|
|
|
|
|
|
|
root * ${nix-packages.packages.${system}.miifox-net}
|
|
|
|
file_server
|
|
|
|
'';
|
2022-03-06 19:21:37 +00:00
|
|
|
};
|
2022-01-15 20:12:12 +00:00
|
|
|
}
|