generated from TWS/new-system
Compare commits
2 commits
eaabc1b2ca
...
da23b55bfb
Author | SHA1 | Date | |
---|---|---|---|
D. Scott Boggs | da23b55bfb | ||
D. Scott Boggs | a909d27908 |
|
@ -8,17 +8,16 @@
|
||||||
./common
|
./common
|
||||||
./common/sites/gifford
|
./common/sites/gifford
|
||||||
./common/server
|
./common/server
|
||||||
|
./services.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
grub = {
|
grub = {
|
||||||
# Use the GRUB 2 boot loader.
|
# Use the GRUB 2 boot loader.
|
||||||
enable = true;
|
enable = true;
|
||||||
version = 2;
|
|
||||||
# efiSupport = true;
|
# efiSupport = true;
|
||||||
# efiInstallAsRemovable = false;
|
# efiInstallAsRemovable = false;
|
||||||
# Define on which hard drive you want to install Grub.
|
# Define on which hard drive you want to install Grub.
|
||||||
device = "/dev/disk/by-uuid/caab3f5b-b264-4070-8a98-fb267ed31280"; # or "nodev" for efi only
|
device = "/dev/sda"; # or "nodev" for efi only
|
||||||
};
|
};
|
||||||
# efi.efiSysMountPoint = "/boot/efi"; # (part of the generated default)
|
# efi.efiSysMountPoint = "/boot/efi"; # (part of the generated default)
|
||||||
};
|
};
|
||||||
|
@ -46,6 +45,8 @@
|
||||||
|
|
||||||
services.xserver.layout = "us";
|
services.xserver.layout = "us";
|
||||||
|
|
||||||
|
fileSystems."/srv".options = [ "nofail" ];
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
|
26
services.nix
Normal file
26
services.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{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";
|
||||||
|
}
|
Loading…
Reference in a new issue