Skip to content

Commit 152ed1d

Browse files
committed
style: nixfmt treewide reformat
1 parent 8a1808c commit 152ed1d

18 files changed

Lines changed: 235 additions & 124 deletions

File tree

nix/hosts/centrium/configuration.nix

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
11
{ inputs, ... }:
22

33
{
4-
imports = with inputs.nixos-hardware.nixosModules; [
5-
common-cpu-intel
6-
common-pc-ssd
7-
] ++ [
8-
../features/required
9-
../features/shared-state-yocto
10-
../features/zram-swap.nix
11-
./partitioning.nix
12-
];
4+
imports =
5+
with inputs.nixos-hardware.nixosModules;
6+
[
7+
common-cpu-intel
8+
common-pc-ssd
9+
]
10+
++ [
11+
../features/required
12+
../features/shared-state-yocto
13+
../features/zram-swap.nix
14+
./partitioning.nix
15+
];
1316

1417
boot = {
1518
loader.systemd-boot.enable = true;
1619
loader.efi.canTouchEfiVariables = true;
1720

1821
initrd = {
19-
availableKernelModules = [ "nvme" "xhci_pci" "usbhid" ];
22+
availableKernelModules = [
23+
"nvme"
24+
"xhci_pci"
25+
"usbhid"
26+
];
2027
};
2128

2229
kernelModules = [ "kvm-intel" ];

nix/hosts/features/required/nix.nix

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
{ inputs, lib, config, ... }:
1+
{
2+
inputs,
3+
lib,
4+
config,
5+
...
6+
}:
27
{
38
nix = {
49
settings = {
@@ -18,9 +23,15 @@
1823
"numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE="
1924
];
2025

21-
trusted-users = [ "root" "@wheel" ];
26+
trusted-users = [
27+
"root"
28+
"@wheel"
29+
];
2230
auto-optimise-store = lib.mkDefault true;
23-
experimental-features = [ "nix-command" "flakes" ];
31+
experimental-features = [
32+
"nix-command"
33+
"flakes"
34+
];
2435
warn-dirty = false;
2536
};
2637

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,42 @@
11
{
22
boot.supportedFilesystems = [ "nfs" ];
3-
boot.kernelParams = [ "nfs.nfs4_disable_idmapping=0" "nfsd.nfs4_disable_idmapping=0" ];
3+
boot.kernelParams = [
4+
"nfs.nfs4_disable_idmapping=0"
5+
"nfsd.nfs4_disable_idmapping=0"
6+
];
47

58
users.groups.builder = { };
69

710
users.users.rodrigo.extraGroups = [ "builder" ];
811
users.users.otavio.extraGroups = [ "builder" ];
9-
users.users.luciano.extraGroups = ["builder"];
12+
users.users.luciano.extraGroups = [ "builder" ];
1013

11-
system.activationScripts.srv =
12-
''
13-
mkdir -p /srv/yocto/download-cache
14-
mkdir -p /srv/yocto/sstate-cache
15-
'';
14+
system.activationScripts.srv = ''
15+
mkdir -p /srv/yocto/download-cache
16+
mkdir -p /srv/yocto/sstate-cache
17+
'';
1618

1719
fileSystems."/srv/yocto/sstate-cache" = {
1820
device = "10.5.3.187:/srv/nfs/yocto/sstate-cache";
1921
fsType = "nfs";
20-
options = [ "auto" "rw" "defaults" "_netdev" "x-systemd.automount" ];
22+
options = [
23+
"auto"
24+
"rw"
25+
"defaults"
26+
"_netdev"
27+
"x-systemd.automount"
28+
];
2129
};
2230

2331
fileSystems."/srv/yocto/download-cache" = {
2432
device = "10.5.3.187:/srv/nfs/yocto/download-cache";
2533
fsType = "nfs";
26-
options = [ "auto" "rw" "defaults" "_netdev" "x-systemd.automount" ];
34+
options = [
35+
"auto"
36+
"rw"
37+
"defaults"
38+
"_netdev"
39+
"x-systemd.automount"
40+
];
2741
};
2842
}

nix/hosts/hyper/configuration.nix

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,63 @@
1-
{ inputs, pkgs, flake, ... }:
1+
{
2+
inputs,
3+
pkgs,
4+
flake,
5+
...
6+
}:
27

38
let
49
inherit (flake.packages.${pkgs.system}) bitbake_2_8_0 bitbake_2_10_0;
510
in
611
{
7-
imports = with inputs.nixos-hardware.nixosModules; [
8-
common-cpu-intel
9-
common-pc-ssd
10-
] ++ [
11-
../features/required
12-
../features/zram-swap.nix
13-
./partitioning.nix
14-
];
12+
imports =
13+
with inputs.nixos-hardware.nixosModules;
14+
[
15+
common-cpu-intel
16+
common-pc-ssd
17+
]
18+
++ [
19+
../features/required
20+
../features/zram-swap.nix
21+
./partitioning.nix
22+
];
1523

1624
boot = {
1725
loader.systemd-boot.enable = true;
1826
loader.efi.canTouchEfiVariables = true;
1927
loader.efi.efiSysMountPoint = "/boot";
2028

21-
initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" ];
29+
initrd.availableKernelModules = [
30+
"nvme"
31+
"xhci_pci"
32+
"usbhid"
33+
];
2234
initrd.kernelModules = [ ];
2335

2436
kernelModules = [ "kvm-intel" ];
2537

26-
kernelParams = [ "nfs.nfs4_disable_idmapping=0" "nfsd.nfs4_disable_idmapping=0" ];
38+
kernelParams = [
39+
"nfs.nfs4_disable_idmapping=0"
40+
"nfsd.nfs4_disable_idmapping=0"
41+
];
2742
};
2843

2944
users.groups.builder = { };
3045

3146
networking.firewall.allowedTCPPorts = [ 2049 ];
3247

33-
system.activationScripts.srv =
34-
''
35-
mkdir -p /srv/nfs/yocto/download-cache
36-
mkdir -p /srv/nfs/yocto/sstate-cache
48+
system.activationScripts.srv = ''
49+
mkdir -p /srv/nfs/yocto/download-cache
50+
mkdir -p /srv/nfs/yocto/sstate-cache
3751
38-
chown nobody:nogroup /srv/nfs/yocto/download-cache
39-
chown nobody:nogroup /srv/nfs/yocto/sstate-cache
52+
chown nobody:nogroup /srv/nfs/yocto/download-cache
53+
chown nobody:nogroup /srv/nfs/yocto/sstate-cache
4054
41-
chmod -R g+s /srv/nfs/yocto/*
55+
chmod -R g+s /srv/nfs/yocto/*
4256
43-
chown -R root:builder /srv/nfs/yocto/*
44-
chmod -R 775 /srv/nfs/yocto/*
45-
${pkgs.acl}/bin/setfacl -m d:u::rwX,d:g::rwX,d:o::rX /srv/nfs/yocto/*
46-
'';
57+
chown -R root:builder /srv/nfs/yocto/*
58+
chmod -R 775 /srv/nfs/yocto/*
59+
${pkgs.acl}/bin/setfacl -m d:u::rwX,d:g::rwX,d:o::rX /srv/nfs/yocto/*
60+
'';
4761

4862
services.nfs.server = {
4963
enable = true;

nix/hosts/monster/github-runner.nix

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
{ config, inputs, pkgs, ... }:
1+
{
2+
config,
3+
inputs,
4+
pkgs,
5+
...
6+
}:
27

38
let
49
inherit (config.roles.github-actions-runner) name count;
@@ -38,15 +43,18 @@ in
3843

3944
boot.runSize = "75%";
4045

41-
swapDevices = [{ device = "/var/lib/swapfile"; size = 16384; }];
46+
swapDevices = [
47+
{
48+
device = "/var/lib/swapfile";
49+
size = 16384;
50+
}
51+
];
4252

4353
systemd.services = builtins.listToAttrs (
44-
builtins.map
45-
(n: {
46-
name = "github-runner-${name}-${toString n}";
47-
value.environment.GIT_SSH_COMMAND = "ssh -i $HOME/.ssh/id_rsa";
48-
})
49-
(builtins.genList (x: x + 1) count)
54+
builtins.map (n: {
55+
name = "github-runner-${name}-${toString n}";
56+
value.environment.GIT_SSH_COMMAND = "ssh -i $HOME/.ssh/id_rsa";
57+
}) (builtins.genList (x: x + 1) count)
5058
);
5159

5260
sops = {

nix/hosts/pikachu/configuration.nix

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
11
{ inputs, ... }:
22

33
{
4-
imports = with inputs.nixos-hardware.nixosModules; [
5-
common-cpu-intel
6-
common-pc-ssd
7-
] ++ [
8-
../features/required
9-
../features/shared-state-yocto
10-
../features/zram-swap.nix
11-
./partitioning.nix
12-
];
4+
imports =
5+
with inputs.nixos-hardware.nixosModules;
6+
[
7+
common-cpu-intel
8+
common-pc-ssd
9+
]
10+
++ [
11+
../features/required
12+
../features/shared-state-yocto
13+
../features/zram-swap.nix
14+
./partitioning.nix
15+
];
1316

1417
boot = {
1518
loader.systemd-boot.enable = true;
1619
loader.efi.canTouchEfiVariables = true;
1720

18-
initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" ];
21+
initrd.availableKernelModules = [
22+
"nvme"
23+
"xhci_pci"
24+
"usbhid"
25+
];
1926
initrd.kernelModules = [ ];
2027

2128
kernelModules = [ "kvm-intel" ];

nix/installer/configuration.nix

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
{ config, pkgs, modulesPath, targetConfiguration, ... }:
1+
{
2+
config,
3+
pkgs,
4+
modulesPath,
5+
targetConfiguration,
6+
...
7+
}:
28

39
{
410
imports = [
@@ -16,8 +22,15 @@
1622

1723
# Disable ZFS support, it may not be compatible
1824
# with the configured kernel version
19-
boot.supportedFilesystems = pkgs.lib.mkForce
20-
[ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ];
25+
boot.supportedFilesystems = pkgs.lib.mkForce [
26+
"btrfs"
27+
"reiserfs"
28+
"vfat"
29+
"f2fs"
30+
"xfs"
31+
"ntfs"
32+
"cifs"
33+
];
2134

2235
disko.enableConfig = false;
2336
environment.systemPackages = with pkgs; [

nix/installer/iso.nix

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
1-
{ inputs, flake, hostName }:
1+
{
2+
inputs,
3+
flake,
4+
hostName,
5+
}:
26

37
let
48
inherit (inputs.nixpkgs) lib;
59

610
targetConfiguration = flake.nixosConfigurations.${hostName};
711
inherit (targetConfiguration.config.nixpkgs.hostPlatform) system;
812

9-
iso = (lib.nixosSystem {
10-
specialArgs = {
11-
inherit flake inputs targetConfiguration hostName;
12-
};
13-
modules = [ ./configuration.nix ];
14-
}).config.system.build.isoImage;
13+
iso =
14+
(lib.nixosSystem {
15+
specialArgs = {
16+
inherit
17+
flake
18+
inputs
19+
targetConfiguration
20+
hostName
21+
;
22+
};
23+
modules = [ ./configuration.nix ];
24+
}).config.system.build.isoImage;
1525
in
1626
lib.addMetaAttrs { platforms = [ system ]; } iso

0 commit comments

Comments
 (0)