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