generated from TWS/new-system
Fix import strategy
This commit is contained in:
parent
da23b55bfb
commit
7b51bbd393
|
@ -8,7 +8,7 @@
|
|||
./common
|
||||
./common/sites/gifford
|
||||
./common/server
|
||||
./services.nix
|
||||
./services
|
||||
];
|
||||
boot.loader = {
|
||||
grub = {
|
||||
|
|
26
services.nix
26
services.nix
|
@ -1,26 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
environment.etc."srv/docker-compose.yml" = builtins.readFile ./docker-compose.yml;
|
||||
|
||||
systemd.services.load-balancer = let dataset = "gc1_srv";
|
||||
in {
|
||||
wantedBy = ["multi-user.target"];
|
||||
requires = ["public-network.service"
|
||||
"zfs-import-${dataset}.service"];
|
||||
after = ["public-network.service"
|
||||
"zfs-import-${dataset}.service"];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.docker}/bin/docker compose up";
|
||||
WorkingDirectory = "/etc/srv/load-balancer";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
# '//' in nix means "merge attribute sets". We're importing a function at the
|
||||
# path, then calling it with the attr set as an argument, and merging the
|
||||
# results with the config above
|
||||
// import ./common/services/load-balancer { dataset = "gc1_srv"; pkgs = pkgs; }
|
||||
// import ./common/services/conduit.nix {
|
||||
dataset = "gc1_srv";
|
||||
pkgs = pkgs;
|
||||
domain = "chat.techwork.zone";
|
||||
}
|
5
services/conduit.nix
Normal file
5
services/conduit.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{pkgs, ...}: import ../common/services/conduit.nix {
|
||||
dataset = "gc1_srv";
|
||||
pkgs = pkgs;
|
||||
domain = "chat.techwork.zone";
|
||||
}
|
6
services/default.nix
Normal file
6
services/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./load-balancer.nix
|
||||
./conduit.nix
|
||||
];
|
||||
}
|
1
services/load-balancer.nix
Normal file
1
services/load-balancer.nix
Normal file
|
@ -0,0 +1 @@
|
|||
{pkgs, ...}: import ../common/services/load-balancer { dataset = "gc1_srv"; pkgs = pkgs; }
|
Loading…
Reference in a new issue