Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ficolo builder configuration #32

Merged
merged 2 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = {
sda = {
device = "/dev/sda";
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";
};
};
};
};
};
sdb = {
device = "/dev/sdb";
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"];
};
};
}