-
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.
feat(nixosConfigurations): add turn-infra-holochain-org
- Loading branch information
Showing
4 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
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
5 changes: 5 additions & 0 deletions
5
modules/flake-parts/nixosConfigurations.turn-infra-holochain-org/README.md
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,5 @@ | ||
# Installation | ||
|
||
``` | ||
nix run github:numtide/nixos-anywhere -- --flake .\#nixosConfigurations.turn-infra-holochain-org [email protected] | ||
``` |
90 changes: 90 additions & 0 deletions
90
modules/flake-parts/nixosConfigurations.turn-infra-holochain-org/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,90 @@ | ||
{ | ||
config, | ||
lib, | ||
inputs, | ||
self, | ||
pkgs, | ||
... | ||
}: let | ||
ipv4 = "37.27.24.128"; | ||
ipv6Prefix = "2a01:4f9:c012:b61f"; | ||
ipv6PrefixLength = "64"; | ||
fqdn2domain = "infra.holochain.org"; | ||
in { | ||
imports = [ | ||
inputs.disko.nixosModules.disko | ||
inputs.srvos.nixosModules.server | ||
inputs.srvos.nixosModules.mixins-terminfo | ||
inputs.srvos.nixosModules.hardware-hetzner-cloud | ||
|
||
inputs.sops-nix.nixosModules.sops | ||
|
||
self.nixosModules.holo-users | ||
../../nixos/shared.nix | ||
../../nixos/shared-nix-settings.nix | ||
]; | ||
|
||
networking.hostName = "turn-infra-holochain-org"; # Define your hostname. | ||
|
||
hostName = ipv4; | ||
|
||
nix.settings.max-jobs = 8; | ||
|
||
nix.settings.substituters = [ | ||
"https://holochain-ci.cachix.org" | ||
]; | ||
|
||
nix.settings.trusted-public-keys = [ | ||
"holochain-ci.cachix.org-1:5IUSkZc0aoRS53rfkvH9Kid40NpyjwCMCzwRTXy+QN8=" | ||
]; | ||
|
||
boot.loader.grub = { | ||
efiSupport = false; | ||
device = "/dev/sda"; | ||
}; | ||
# boot.loader.systemd-boot.enable = true; | ||
# boot.loader.efi.canTouchEfiVariables = true; | ||
boot.kernelPackages = pkgs.linuxPackages_latest; | ||
|
||
systemd.network.networks."10-uplink".networkConfig.Address = "${ipv6Prefix}::1/${ipv6PrefixLength}"; | ||
|
||
disko.devices.disk.sda = { | ||
device = "/dev/sda"; | ||
type = "disk"; | ||
content = { | ||
type = "table"; | ||
format = "gpt"; | ||
partitions = [ | ||
{ | ||
name = "boot"; | ||
start = "0"; | ||
end = "1M"; | ||
part-type = "primary"; | ||
flags = ["bios_grub"]; | ||
} | ||
{ | ||
name = "root"; | ||
start = "1M"; | ||
end = "100%"; | ||
part-type = "primary"; | ||
bootable = true; | ||
content = { | ||
type = "btrfs"; | ||
extraArgs = ["-f"]; # Override existing partition | ||
subvolumes = { | ||
# Subvolume name is different from mountpoint | ||
"/rootfs" = { | ||
mountpoint = "/"; | ||
}; | ||
"/nix" = { | ||
mountOptions = ["noatime"]; | ||
}; | ||
}; | ||
}; | ||
} | ||
]; | ||
}; | ||
}; | ||
|
||
system.stateVersion = "23.05"; | ||
} |
13 changes: 13 additions & 0 deletions
13
modules/flake-parts/nixosConfigurations.turn-infra-holochain-org/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,13 @@ | ||
{ | ||
config, | ||
self, | ||
lib, | ||
inputs, | ||
... | ||
}: { | ||
flake.nixosConfigurations.turn-infra-holochain-org = inputs.nixpkgs.lib.nixosSystem { | ||
modules = [./configuration.nix]; | ||
system = "x86_64-linux"; | ||
specialArgs = self.specialArgs; | ||
}; | ||
} |