-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into pulumi-tfgrid-nixos-deployments
- Loading branch information
Showing
11 changed files
with
461 additions
and
64 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,41 @@ | ||
{ stdenv | ||
, closureInfo | ||
, pixz | ||
|
||
, # The files and directories to be placed in the directory. | ||
{ | ||
stdenv, | ||
closureInfo, | ||
pixz, | ||
# The files and directories to be placed in the directory. | ||
# This is a list of attribute sets {source, target} where `source' | ||
# is the file system object (regular file or directory) to be | ||
# grafted in the file system at path `target'. | ||
contents | ||
|
||
, # In addition to `contents', the closure of the store paths listed | ||
contents, | ||
# In addition to `contents', the closure of the store paths listed | ||
# in `packages' are also placed in the Nix store of the tarball. This is | ||
# a list of attribute sets {object, symlink} where `object' if a | ||
# store path whose closure will be copied, and `symlink' is a | ||
# symlink to `object' that will be added to the tarball. | ||
storeContents ? [ ] | ||
|
||
storeContents ? [], | ||
# Extra commands to be executed before archiving files | ||
, extraCommands ? "" | ||
|
||
extraCommands ? "", | ||
# extra inputs | ||
, extraInputs ? [ ] | ||
}: | ||
|
||
let | ||
extraInputs ? [], | ||
}: let | ||
symlinks = map (x: x.symlink) storeContents; | ||
objects = map (x: x.object) storeContents; | ||
in | ||
stdenv.mkDerivation { | ||
name = "system-directory"; | ||
builder = ./make-system-directory.sh; | ||
nativeBuildInputs = extraInputs; | ||
|
||
stdenv.mkDerivation { | ||
name = "system-directory"; | ||
builder = ./make-system-directory.sh; | ||
nativeBuildInputs = extraInputs; | ||
|
||
inherit extraCommands; | ||
inherit extraCommands; | ||
|
||
# !!! should use XML. | ||
sources = map (x: x.source) contents; | ||
targets = map (x: x.target) contents; | ||
# !!! should use XML. | ||
sources = map (x: x.source) contents; | ||
targets = map (x: x.target) contents; | ||
|
||
# !!! should use XML. | ||
inherit symlinks objects; | ||
# !!! should use XML. | ||
inherit symlinks objects; | ||
|
||
closureInfo = closureInfo { | ||
rootPaths = objects; | ||
}; | ||
} | ||
closureInfo = closureInfo { | ||
rootPaths = objects; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
modules/flake-parts/nixosConfigurations.sbd-0.main.infra.holo.host/configuration.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
config, | ||
inputs, | ||
self, | ||
pkgs, | ||
... | ||
}: let | ||
# https://console.hetzner.cloud/projects/1982619/servers/47746862/overview | ||
hostName = "sbd-0"; | ||
domain = "main.infra.holo.host"; | ||
ipv4 = "65.108.241.120"; | ||
fqdn = "${config.networking.hostName}.${config.networking.domain}"; | ||
in { | ||
imports = [ | ||
inputs.disko.nixosModules.disko | ||
inputs.srvos.nixosModules.server | ||
inputs.srvos.nixosModules.mixins-terminfo | ||
inputs.srvos.nixosModules.hardware-hetzner-cloud | ||
self.nixosModules.hardware-hetzner-cloud-ccx | ||
|
||
inputs.sops-nix.nixosModules.sops | ||
|
||
self.nixosModules.holo-users | ||
../../nixos/shared.nix | ||
../../nixos/shared-nix-settings.nix | ||
self.nixosModules.ps1 | ||
|
||
self.nixosModules.sbd-server | ||
]; | ||
|
||
networking = {inherit hostName domain;}; | ||
|
||
hostName = ipv4; | ||
|
||
nix.settings.max-jobs = 8; | ||
|
||
nix.settings.substituters = [ | ||
"https://holochain-ci.cachix.org" | ||
]; | ||
|
||
nix.settings.trusted-public-keys = [ | ||
"holochain-ci.cachix.org-3:5IUSkZc0aoRS53rfkvH9Kid40NpyjwCMCzwRTXy+QN8=" | ||
]; | ||
|
||
system.stateVersion = "23.11"; | ||
|
||
services.sbd-server = { | ||
enable = true; | ||
url = fqdn; | ||
address = ipv4; | ||
tls-port = 443; | ||
trusted-ip-header = "cf-connecting-ip"; | ||
|
||
# unlike the tx5-signal-server the sbd-server doesn't know about the STUN servers. | ||
# going forward its' going to be part of the conductor client config | ||
# "stun:${config.services.holochain-turn-server.url}:80" | ||
}; | ||
} |
12 changes: 12 additions & 0 deletions
12
modules/flake-parts/nixosConfigurations.sbd-0.main.infra.holo.host/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
self, | ||
lib, | ||
inputs, | ||
... | ||
}: { | ||
flake.nixosConfigurations.sbd-0_main_infra_holo_host = inputs.nixpkgs.lib.nixosSystem { | ||
modules = [./configuration.nix]; | ||
system = "x86_64-linux"; | ||
specialArgs = self.specialArgs; | ||
}; | ||
} |
Oops, something went wrong.