-
-
Save cmacrae/cea6e173c8a1be6d3abff8e66ba0861d to your computer and use it in GitHub Desktop.
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
# compute/configuration.nix | |
{ config, pkgs, lib, id, master, hostId, domain, efiBlockId, ... }: | |
let | |
hostIp = "10.0.10.${id}"; | |
hostName = "compute${id}"; | |
in { | |
# Deployment | |
nixpkgs.localSystem.system = "x86_64-linux"; | |
deployment.hasFastConnection = true; | |
system.stateVersion = "19.09"; | |
# Boot | |
boot.cleanTmpDir = true; | |
boot.loader.grub.efiSupport = true; | |
boot.loader.efi.canTouchEfiVariables = true; | |
boot.loader.grub.zfsSupport = true; | |
boot.loader.grub.copyKernels = true; | |
boot.loader.grub.device = "nodev"; | |
boot.loader.efi.efiSysMountPoint = "/boot"; | |
boot.initrd.checkJournalingFS = false; | |
boot.kernelPackages = pkgs.linuxPackages_latest; | |
boot.supportedFilesystems = [ "zfs" ]; | |
# Network | |
networking = { | |
hostName = hostName; | |
hostId = hostId; | |
domain = domain; | |
dhcpcd.enable = false; | |
defaultGateway = "10.0.0.1"; | |
firewall.enable = false; | |
nameservers = [ "10.0.0.2" ]; | |
interfaces.enp0s25.ipv4.addresses = [{ | |
address = hostIp; | |
prefixLength = 16; | |
}]; | |
}; | |
# System packages | |
environment.systemPackages = with pkgs; [ kubectl nfs-utils ]; | |
# Imports | |
imports = [ | |
# Hardware | |
(import ./hardware-configuration.nix { | |
inherit config; | |
inherit pkgs; | |
inherit lib; | |
inherit efiBlockId; | |
}) | |
# Common | |
../lib/common.nix | |
# NFS mounts | |
(import ../lib/nfs-mounts.nix { | |
inherit config; | |
inherit pkgs; | |
server = "the-ark.${domain}"; | |
}) | |
# Kubernetes | |
(import ../lib/kubernetes.nix { | |
inherit config; | |
inherit pkgs; | |
inherit lib; | |
inherit master; | |
inherit domain; | |
inherit hostName; | |
}) | |
<nixpkgs/nixos/modules/installer/scan/not-detected.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
let | |
domain = "cmacr.ae"; | |
master = false; | |
in with import <nixpkgs> {}; { | |
network.description = "Pantheon: Home Network"; | |
network.enableRollback = true; | |
# DHCP/DNS | |
net1 = import ./net1/configuration.nix { | |
inherit config; | |
inherit pkgs; | |
inherit lib; | |
inherit domain; | |
}; | |
# Compute | |
compute1 = import ./compute/configuration.nix { | |
inherit config; | |
inherit pkgs; | |
inherit lib; | |
inherit domain; | |
id = "1"; | |
hostId = "ef32e32d"; | |
efiBlockId = "9B1E-7DE0"; | |
master = true; | |
}; | |
compute2 = import ./compute/configuration.nix { | |
inherit config; | |
inherit pkgs; | |
inherit lib; | |
inherit domain; | |
inherit master; | |
id = "2"; | |
hostId = "7df67865"; | |
efiBlockId = "0DDD-4E07"; | |
}; | |
compute3 = import ./compute/configuration.nix { | |
inherit config; | |
inherit pkgs; | |
inherit lib; | |
inherit domain; | |
inherit master; | |
id = "3"; | |
hostId = "11dc35bc"; | |
efiBlockId = "A181-EEC7"; | |
}; | |
} |
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
let | |
domain = "cmacr.ae"; | |
master = false; | |
in with import <nixpkgs> {}; { | |
defaults._module.args.domain = domain; | |
network.description = "Pantheon: Home Network"; | |
network.enableRollback = true; | |
# DHCP/DNS | |
net1 = ./net1/configuration.nix; | |
# Compute | |
compute1 = { | |
imports = [ ./compute/configuration.nix ]; | |
local = { | |
id = "1"; | |
hostId = "ef32e32d"; | |
efiBlockId = "9B1E-7DE0"; | |
master = true; | |
}; | |
}; | |
compute2 = { | |
imports = [ ./compute/configuration.nix ]; | |
local = { | |
id = "2"; | |
hostId = "7df67865"; | |
efiBlockId = "0DDD-4E07"; | |
}; | |
}; | |
compute3 = { | |
imports = [ ./compute/configuration.nix ]; | |
local = { | |
id = "3"; | |
hostId = "11dc35bc"; | |
efiBlockId = "A181-EEC7"; | |
}; | |
}; | |
} |
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
building '/nix/store/bycjdq1x21p56pn69ylgpvhywh8ljjn1-admin-authorized_keys.drv'... | |
building '/nix/store/xb3irz83c1nacgcdri8wlyd1i49463wj-append-initrd-secrets.drv'... | |
building '/nix/store/ygz7gvaxxbhg2i499wq1x9i7833h6lvi-mounts.sh.drv'... | |
building '/nix/store/pnwvyqgiaxgvjadmi7abnv0gf2z9zygs-setup-keys.sh.drv'... | |
building '/nix/store/922zfxw14yfrmnk1wis1z04716y5w7lw-users-groups.json.drv'... | |
building '/nix/store/r30kx0mkgkhplbqyps4r88pw4clczlzn-users-groups.json.drv'... | |
building '/nix/store/gvz5nzmdhdarfz36ys4kxywsx3b2shls-builder.pl.drv'... | |
building '/nix/store/8hwidyvhlmlkr2fpyha1gj1cbr6bcv39-client.conf.drv'... | |
/nix/store/506nnycf7nk22x7n07mjjjl2g8nifpda-bash-4.4-p23/bin/bash: /nix/store/506nnycf7nk22x7n07mjjjl2g8nifpda-bash-4.4-p23/bin/bash: cannot execute binary file | |
/nix/store/506nnycf7nk22x7n07mjjjl2g8nifpda-bash-4.4-p23/bin/bash: /nix/store/506nnycf7nk22x7n07mjjjl2g8nifpda-bash-4.4-p23/bin/bash: cannot execute binary file | |
/nix/store/506nnycf7nk22x7n07mjjjl2g8nifpda-bash-4.4-p23/bin/bash: /nix/store/506nnycf7nk22x7n07mjjjl2g8nifpda-bash-4.4-p23/bin/bash: cannot execute binary file | |
/nix/store/506nnycf7nk22x7n07mjjjl2g8nifpda-bash-4.4-p23/bin/bash: /nix/store/506nnycf7nk22x7n07mjjjl2g8nifpda-bash-4.4-p23/bin/bash: cannot execute binary file | |
/nix/store/506nnycf7nk22x7n07mjjjl2g8nifpda-bash-4.4-p23/bin/bash: /nix/store/506nnycf7nk22x7n07mjjjl2g8nifpda-bash-4.4-p23/bin/bash: cannot execute binary file | |
/nix/store/506nnycf7nk22x7n07mjjjl2g8nifpda-bash-4.4-p23/bin/bash: /nix/store/506nnycf7nk22x7n07mjjjl2g8nifpda-bash-4.4-p23/bin/bash: cannot execute binary file | |
/nix/store/506nnycf7nk22x7n07mjjjl2g8nifpda-bash-4.4-p23/bin/bash: /nix/store/506nnycf7nk22x7n07mjjjl2g8nifpda-bash-4.4-p23/bin/bash: cannot execute binary file | |
/nix/store/506nnycf7nk22x7n07mjjjl2g8nifpda-bash-4.4-p23/bin/bash: /nix/store/506nnycf7nk22x7n07mjjjl2g8nifpda-bash-4.4-p23/bin/bash: cannot execute binary file | |
builder for '/nix/store/bycjdq1x21p56pn69ylgpvhywh8ljjn1-admin-authorized_keys.drv' failed with exit code 126 | |
builder for '/nix/store/xb3irz83c1nacgcdri8wlyd1i49463wj-append-initrd-secrets.drv' failed with exit code 126 | |
builder for '/nix/store/gvz5nzmdhdarfz36ys4kxywsx3b2shls-builder.pl.drv' failed with exit code 126 | |
builder for '/nix/store/8hwidyvhlmlkr2fpyha1gj1cbr6bcv39-client.conf.drv' failed with exit code 126 | |
builder for '/nix/store/ygz7gvaxxbhg2i499wq1x9i7833h6lvi-mounts.sh.drv' failed with exit code 126 | |
builder for '/nix/store/pnwvyqgiaxgvjadmi7abnv0gf2z9zygs-setup-keys.sh.drv' failed with exit code 126 | |
builder for '/nix/store/922zfxw14yfrmnk1wis1z04716y5w7lw-users-groups.json.drv' failed with exit code 126 | |
builder for '/nix/store/r30kx0mkgkhplbqyps4r88pw4clczlzn-users-groups.json.drv' failed with exit code 126 | |
cannot build derivation '/nix/store/ljs3x5z3x2nj5f357i5by1i596k268fp-nixos-system-compute1-19.09pre193974.1be338cd48f.drv': 1 dependencies couldn't be built | |
cannot build derivation '/nix/store/0gy7f6ls3j57h89hrx5c5yc8gbgd6jrr-nixos-system-compute2-19.09pre193974.1be338cd48f.drv': 1 dependencies couldn't be built | |
cannot build derivation '/nix/store/1hyak4mskgiaxkx50kkjrq7yxjjn2w52-nixos-system-compute3-19.09pre193974.1be338cd48f.drv': 1 dependencies couldn't be built | |
cannot build derivation '/nix/store/yl9sbc593zn4ls0ad50ybb99d2izbxah-nixops-machines.drv': 1 dependencies couldn't be built | |
error: build of '/nix/store/yl9sbc593zn4ls0ad50ybb99d2izbxah-nixops-machines.drv' failed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment