run nixpkgs-fmt

This commit is contained in:
Jörg Thalheim 2022-08-14 16:49:30 +02:00
commit 3c90c4e16b
22 changed files with 137 additions and 109 deletions

View file

@ -17,6 +17,7 @@
../roles/hetzner-network.nix
../roles/nginx.nix
../roles/raid.nix
../roles/aarch64-builder.nix
../services/hound
../services/matterbridge.nix

View file

@ -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";
};

View file

@ -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"

View file

@ -53,7 +53,8 @@ let
opts.keys
];
};
in {
in
{
users = {
mutableUsers = false;
users = lib.mapAttrs descToUser users;

View file

@ -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;

View file

@ -2,7 +2,8 @@
with lib;
let
cfg = config.networking.nix-community;
in {
in
{
options = {
networking.nix-community.ipv6.address = mkOption {
type = types.str;

View file

@ -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";
}];

View file

@ -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 = {

View file

@ -12,7 +12,8 @@ in
useDefaultShell = true;
isNormalUser = true;
extraGroups = [
"wheel" "trusted"
"wheel"
"trusted"
];
uid = userLib.mkUid "adis";
};

View file

@ -11,7 +11,8 @@ in
useDefaultShell = true;
isNormalUser = true;
extraGroups = [
"wheel" "trusted"
"wheel"
"trusted"
];
uid = userLib.mkUid "flok";
};

View file

@ -11,7 +11,8 @@ in
useDefaultShell = true;
isNormalUser = true;
extraGroups = [
"wheel" "trusted"
"wheel"
"trusted"
];
uid = userLib.mkUid "lewo";
};

View file

@ -11,7 +11,8 @@ in
useDefaultShell = true;
isNormalUser = true;
extraGroups = [
"wheel" "trusted"
"wheel"
"trusted"
];
uid = userLib.mkUid "micc";
};

View file

@ -12,7 +12,8 @@ in
useDefaultShell = true;
isNormalUser = true;
extraGroups = [
"wheel" "trusted"
"wheel"
"trusted"
];
uid = userLib.mkUid "rytm";
};

View file

@ -13,7 +13,8 @@ in
useDefaultShell = true;
isNormalUser = true;
extraGroups = [
"wheel" "trusted"
"wheel"
"trusted"
];
uid = userLib.mkUid "zimb";
};