@cryptotaxi247 / infra-1 / commits / 90310955

Factor out fileSystem / grub config from build-machines-common.nix

Eelco Dolstra committed Mar 8, 2016 at 14:09 UTC 90310955f07eae979fdbafb3eac742e76d7f587a
3 files changed +30 -23
delft/build-machines-common.nix
+4 -13
@@ -1,18 +1,9 @@
1 -{ config, pkgs, ... }:
1 +{ config, lib, pkgs, ... }:
2
3 -with pkgs.lib;
4 -{
5 - require = [ ./common.nix ];
6 -
7 - boot.loader.grub.device = "/dev/sda";
8 - boot.loader.grub.copyKernels = true;
3 +with lib;
4
10 - fileSystems =
11 - [ { mountPoint = "/";
12 - label = "nixos";
13 - options = "noatime";
14 - }
15 - ];
5 +{
6 + imports = [ ./common.nix ];
7
8 nix.gc.automatic = true;
9 nix.gc.dates = "03,09,15,21:15";
delft/build-machines-dell-1950.nix
+10 -2
@@ -3,9 +3,17 @@
3 { config, pkgs, ... }:
4
5 {
6 - require = [ ./build-machines-common.nix ];
6 + imports = [ ./build-machines-common.nix ];
7
8 - nixpkgs.system = "x86_64-linux";
8 + boot.loader.grub.device = "/dev/sda";
9 + boot.loader.grub.copyKernels = true;
10 +
11 + fileSystems =
12 + [ { mountPoint = "/";
13 + label = "nixos";
14 + options = "noatime";
15 + }
16 + ];
17
18 boot.initrd.kernelModules = [ "mptsas" "ext4" ];
19 boot.kernelModules = [ "acpi-cpufreq" "kvm-intel" ];
delft/build-machines-dell-r815.nix
+16 -8
@@ -1,17 +1,25 @@
1 { config, pkgs, ... }:
2
3 {
4 - boot.loader.grub.version = 2;
5 - require = [ ./build-machines-common.nix ./megacli.nix ];
6 - nixpkgs.system = "x86_64-linux";
4 + imports = [ ./build-machines-common.nix ./megacli.nix ];
5 +
6 + boot.loader.grub.device = "/dev/sda";
7 + boot.loader.grub.copyKernels = true;
8 +
9 + fileSystems."/" =
10 + { label = "nixos";
11 + options = "noatime";
12 + };
13 +
14 + fileSystems."/tmp" =
15 + { device = "none";
16 + fsType = "tmpfs";
17 + options = "size=50%";
18 + neededForBoot = true;
19 + };
20
21 boot.initrd.kernelModules = [ "megaraid_sas" "ext4" ];
22 boot.kernelModules = [ "acpi-cpufreq" "kvm-amd" ];
23
24 nix.maxJobs = 48;
12 -
13 - fileSystems =
14 - [ { device = "none"; fsType = "tmpfs"; mountPoint = "/tmp"; options = "size=50%"; neededForBoot = true; }
15 - ];
16 -
25 }