-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
79 lines (68 loc) · 1.62 KB
/
default.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
{
config,
inputs,
outputs,
pkgs,
lib,
secrets,
...
}:
{
imports = [
inputs.home-manager.nixosModules.home-manager
./hardware.nix
../common/server.nix
../common/optional/nixbuild-host.nix
../common/optional/webhost.nix
];
boot.kernelPackages = pkgs.linuxPackages_latest;
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking = {
hostName = "bob"; # Define your hostname.
domain = secrets.hosts.bob.domain;
};
services.uptime-kuma = {
enable = true;
package = pkgs.uptime-kuma;
};
services.nginx = {
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts = {
"${secrets.hosts.bob.domain}" = {
forceSSL = true;
enableACME = true;
root = "/var/www/${secrets.hosts.bob.domain}";
};
"${secrets.hosts.bob.alt1Domain}" = {
forceSSL = true;
enableACME = true;
root = "/var/www/${secrets.hosts.bob.domain}";
};
"${secrets.hosts.bob.alt2Domain}" = {
forceSSL = true;
enableACME = true;
root = "/var/www/${secrets.hosts.bob.domain}";
};
"status.${secrets.hosts.bob.domain}" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:3001/";
proxyWebsockets = true;
};
};
};
};
home-manager = {
extraSpecialArgs = {
inherit inputs outputs;
};
users = {
w4cbe = import ../../home-manager/server;
};
};
system.stateVersion = "24.11";
}