run nixpkgs-fmt
This commit is contained in:
parent
75415763e1
commit
3c90c4e16b
22 changed files with 137 additions and 109 deletions
build03
build04
roles
services/hydra
users
|
@ -17,6 +17,7 @@
|
|||
../roles/hetzner-network.nix
|
||||
../roles/nginx.nix
|
||||
../roles/raid.nix
|
||||
../roles/aarch64-builder.nix
|
||||
|
||||
../services/hound
|
||||
../services/matterbridge.nix
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
[
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" ];
|
||||
|
@ -14,17 +15,20 @@
|
|||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "zroot/root/nixos";
|
||||
{
|
||||
device = "zroot/root/nixos";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "zroot/root/home";
|
||||
{
|
||||
device = "zroot/root/home";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/E6D6-572B";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/E6D6-572B";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
nix.distributedBuilds = true;
|
||||
nix.buildMachines = [
|
||||
{
|
||||
hostName = "aarch64.nixos.community";
|
||||
hostName = "build04.nixos-community.org";
|
||||
maxJobs = 4;
|
||||
sshKey = config.sops.secrets.id_buildfarm.path;
|
||||
sshUser = "ssh-ng://nix";
|
||||
sshUser = "nix";
|
||||
system = "aarch64-linux";
|
||||
supportedFeatures = [
|
||||
"big-parallel"
|
||||
|
|
|
@ -53,7 +53,8 @@ let
|
|||
opts.keys
|
||||
];
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
users = lib.mapAttrs descToUser users;
|
||||
|
|
|
@ -5,7 +5,8 @@ let
|
|||
sopsFile = ./secrets.yaml;
|
||||
};
|
||||
secrets = config.sops.secrets;
|
||||
in {
|
||||
in
|
||||
{
|
||||
sops.secrets."binary-caches.json" = herculesSecret;
|
||||
sops.secrets."cluster-join-token.key" = herculesSecret;
|
||||
sops.secrets."hercules-secrets" = herculesSecret;
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
with lib;
|
||||
let
|
||||
cfg = config.networking.nix-community;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
networking.nix-community.ipv6.address = mkOption {
|
||||
type = types.str;
|
||||
|
|
|
@ -52,21 +52,27 @@ in
|
|||
}
|
||||
}
|
||||
'')
|
||||
) ++ (let
|
||||
) ++ (
|
||||
let
|
||||
collectHosts = shares: fs:
|
||||
if builtins.elem fs.fsType [ "nfs" "nfs3" "nfs4" ] then
|
||||
shares // (let
|
||||
shares // (
|
||||
let
|
||||
# also match ipv6 addresses
|
||||
group = builtins.match "\\[?([^\]]+)]?:([^:]+)$" fs.device;
|
||||
host = builtins.head group;
|
||||
path = builtins.elemAt group 1;
|
||||
in {
|
||||
in
|
||||
{
|
||||
${host} = (shares.${host} or [ ]) ++ [ path ];
|
||||
})
|
||||
}
|
||||
)
|
||||
else
|
||||
shares;
|
||||
nfsHosts = lib.foldl collectHosts { } (builtins.attrValues config.fileSystems);
|
||||
in lib.mapAttrsToList (host: args:
|
||||
in
|
||||
lib.mapAttrsToList
|
||||
(host: args:
|
||||
(pkgs.writeScript "zpool-health" ''
|
||||
#!${pkgs.gawk}/bin/awk -f
|
||||
BEGIN {
|
||||
|
@ -85,7 +91,8 @@ in
|
|||
}
|
||||
}
|
||||
'') + " ${host} ${builtins.concatStringsSep " " args}"
|
||||
) nfsHosts
|
||||
)
|
||||
nfsHosts
|
||||
);
|
||||
data_format = "influx";
|
||||
}];
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
{ hydra }:
|
||||
{ lib, pkgs, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
{ hydra }: { lib
|
||||
, pkgs
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config;
|
||||
|
||||
hydraPort = 3000;
|
||||
|
@ -53,7 +54,8 @@ in
|
|||
unfreeRedistributable
|
||||
issl
|
||||
];
|
||||
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||
allowUnfreePredicate = pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"cudnn_cudatoolkit"
|
||||
"cudatoolkit"
|
||||
];
|
||||
|
@ -71,19 +73,24 @@ in
|
|||
port = hydraPort;
|
||||
useSubstitutes = true;
|
||||
adminPasswordFile = config.sops.secrets.hydra-admin-password.path;
|
||||
buildMachinesFiles = [
|
||||
(pkgs.writeText "builders" ''
|
||||
localhost x86_64-linux,builtin - 8 1 nixos-test,big-parallel,kvm -
|
||||
ssh://nix@build04.nix-community.org aarch64-linux ${config.sops.secrets.id_buildfarm.path} 4 1 nixos-test,big-parallel,kvm -
|
||||
'')
|
||||
];
|
||||
|
||||
usersFile = config.sops.secrets.hydra-users.path;
|
||||
extraConfig = ''
|
||||
max_output_size = ${builtins.toString (8 * 1024 * 1024 * 1024)}
|
||||
'';
|
||||
};
|
||||
|
||||
nix = {
|
||||
distributedBuilds = true;
|
||||
buildMachines = [
|
||||
{
|
||||
hostName = "localhost";
|
||||
systems = [ "x86_64-linux" "builtin" ];
|
||||
maxJobs = 8;
|
||||
supportedFeatures = [ "nixos-test" "big-parallel" "kvm" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
|
@ -12,7 +12,8 @@ in
|
|||
useDefaultShell = true;
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel" "trusted"
|
||||
"wheel"
|
||||
"trusted"
|
||||
];
|
||||
uid = userLib.mkUid "adis";
|
||||
};
|
||||
|
|
|
@ -11,7 +11,8 @@ in
|
|||
useDefaultShell = true;
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel" "trusted"
|
||||
"wheel"
|
||||
"trusted"
|
||||
];
|
||||
uid = userLib.mkUid "flok";
|
||||
};
|
||||
|
|
|
@ -11,7 +11,8 @@ in
|
|||
useDefaultShell = true;
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel" "trusted"
|
||||
"wheel"
|
||||
"trusted"
|
||||
];
|
||||
uid = userLib.mkUid "lewo";
|
||||
};
|
||||
|
|
|
@ -11,7 +11,8 @@ in
|
|||
useDefaultShell = true;
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel" "trusted"
|
||||
"wheel"
|
||||
"trusted"
|
||||
];
|
||||
uid = userLib.mkUid "micc";
|
||||
};
|
||||
|
|
|
@ -12,7 +12,8 @@ in
|
|||
useDefaultShell = true;
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel" "trusted"
|
||||
"wheel"
|
||||
"trusted"
|
||||
];
|
||||
uid = userLib.mkUid "rytm";
|
||||
};
|
||||
|
|
|
@ -13,7 +13,8 @@ in
|
|||
useDefaultShell = true;
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel" "trusted"
|
||||
"wheel"
|
||||
"trusted"
|
||||
];
|
||||
uid = userLib.mkUid "zimb";
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue