Skip to content

Commit

Permalink
Add PRBUILDER
Browse files Browse the repository at this point in the history
Signed-off-by: karim mdmirajul <karim.mdmirajul@unikie.com>
  • Loading branch information
karim20230 committed Dec 15, 2023
1 parent 73053cf commit 44029cb
Show file tree
Hide file tree
Showing 6 changed files with 107 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 @@ -35,5 +35,9 @@
inherit specialArgs;
modules = [./ficolobuild/configuration.nix];
};
prbuilder = lib.nixosSystem {
inherit specialArgs;
modules = [./prbuilder/configuration.nix];
};
};
}
39 changes: 39 additions & 0 deletions hosts/prbuilder/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,
inputs,
lib,
pkgs,
...
}: {
imports = lib.flatten [
(with inputs; [
nix-serve-ng.nixosModules.default
disko.nixosModules.disko
])
(with self.nixosModules; [
common
qemu-common
service-openssh
user-jrautiola
user-cazfi
user-karim
])
./disk-config.nix
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
# List packages installed in system profile
environment.systemPackages = with pkgs; [
git
docker
];
# docker daemon running
virtualisation.docker.enable=true;

networking = {
hostName = "prbuilder";
nameservers = ["1.1.1.1" "8.8.8.8"];
};
}
48 changes: 48 additions & 0 deletions hosts/prbuilder/disk-config.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# SPDX-FileCopyrightText: 2023 Technology Innovation Institute (TII)
#
# SPDX-License-Identifier: Apache-2.0
# BIOS compatible gpt partition
{
disko.devices = {
disk = {
vda = {
device = "/dev/vda";
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02";
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
vdb = {
device = "/dev/vdb";
type = "disk";
content = {
type = "gpt";
partitions = {
nix = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/nix";
};
};
};
};
};
};
};
}
1 change: 1 addition & 0 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class TargetHost:
"build3-ficolo": TargetHost(
hostname="172.18.20.104", nixosconfig="ficolobuild"
),
"prbuilder": TargetHost(hostname="172.18.20.106", nixosconfig="prbuilder"),
}
)

Expand Down
1 change: 1 addition & 0 deletions users/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
user-hydra = import ./hydra.nix;
user-cazfi = import ./cazfi.nix;
user-mkaapu = import ./mkaapu.nix;
user-karim = import ./karim.nix;
};
}
14 changes: 14 additions & 0 deletions users/karim.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 = {
karim = {
isNormalUser = true;
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDe5L8iOqhNPsYz5eh9Bz/URYguG60JjMGmKG0wwLIb6Gf2M8Txzk24ESGbMR/F5RYsV1yWYOocL47ngDWQIbO6MGJ7ftUr7slWoUA/FSVwh/jsG681mRqIuJXjKM/YQhBkI9k6+eVxRfLDTs5XZfbwdm7T4aP8ZI2609VY0guXfa/F7DSE1BxN7IJMn0CWLQJanBpoYUxqyQXCUXgljMokdPjTrqAxlBluMsVTP+ZKDnjnpHcVE/hCKk5BxaU6K97OdeIOOEWXAd6uEHssomjtU7+7dhiZzjhzRPKDiSJDF9qtIw50kTHz6ZTdH8SAZmu0hsS6q8OmmDTAnt24dFJV karim@nixos"
];
extraGroups = ["wheel" "networkmanager"];
};
};
}

0 comments on commit 44029cb

Please sign in to comment.