Skip to content

Commit

Permalink
Add Ficolo builder configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Marko Kaapu <[email protected]>
  • Loading branch information
mkaapu committed Dec 5, 2023
1 parent e159b5a commit d640817
Show file tree
Hide file tree
Showing 6 changed files with 152 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hosts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,9 @@
inherit specialArgs;
modules = [./monitoring/configuration.nix];
};
ficolobuild = lib.nixosSystem {
inherit specialArgs;
modules = [./ficolobuild/configuration.nix];
};
};
}
39 changes: 39 additions & 0 deletions hosts/ficolobuild/configuration.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# SPDX-FileCopyrightText: 2023 Technology Innovation Institute (TII)
#
# SPDX-License-Identifier: Apache-2.0
{
self,
config,
inputs,
lib,
modulesPath,
...
}: {
imports = lib.flatten [
(modulesPath + "/installer/scan/not-detected.nix")
inputs.disko.nixosModules.disko
(with self.nixosModules; [
common
service-openssh
user-cazfi
user-hrosten
user-jrautiola
user-mkaapu
])
./disk-config.nix
];

# Hardwre Configuration:

boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "megaraid_sas" "nvme" "usbhid" "sd_mod"];
boot.kernelModules = ["kvm-intel"];

nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

# Installation:

# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
}
91 changes: 91 additions & 0 deletions hosts/ficolobuild/disk-config.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# SPDX-FileCopyrightText: 2023 Technology Innovation Institute (TII)
#
# SPDX-License-Identifier: Apache-2.0
# BIOS compatible gpt partition
{
disko.devices = {
disk = {
sdb = {
device = "/dev/sdb";
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02";
};
ESP = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/sata";
};
};
};
};
};
sda = {
device = "/dev/sda";
type = "disk";
content = {
type = "gpt";
partitions = {
nix = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/nix";
};
};
};
};
};
root = {
device = "/dev/nvme0n1";
type = "disk";
content = {
type = "gpt";
partitions = {
nix = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
home = {
device = "/dev/nvme1n1";
type = "disk";
content = {
type = "gpt";
partitions = {
nix = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/home";
};
};
};
};
};
};
};
}
3 changes: 3 additions & 0 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ class TargetHost:
"monitoring-ficolo": TargetHost(
hostname="172.18.20.108", nixosconfig="monitoring"
),
"build3-ficolo": TargetHost(
hostname="172.18.20.104", nixosconfig="ficolobuild"
),
}
)

Expand Down
1 change: 1 addition & 0 deletions users/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
user-jrautiola = import ./jrautiola.nix;
user-hydra = import ./hydra.nix;
user-cazfi = import ./cazfi.nix;
user-mkaapu = import ./mkaapu.nix;
};
}
14 changes: 14 additions & 0 deletions users/mkaapu.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-FileCopyrightText: 2023 Technology Innovation Institute (TII)
#
# SPDX-License-Identifier: Apache-2.0
{
users.users = {
mkaapu = {
isNormalUser = true;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE6WDXGfrD+WfY2+eP+/c4NrEOeCGpEOE2TcTlwxWXho [email protected]"
];
extraGroups = ["wheel" "networkmanager"];
};
};
}

0 comments on commit d640817

Please sign in to comment.