summaryrefslogtreecommitdiffstats
path: root/lass/1systems/prism/physical.nix
blob: 83f127c2258f9da9ba6d717beb798b2d073f4645 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{ config, lib, pkgs, ... }:
{
  imports = [
    ./config.nix
    {
      networking.interfaces.et0.ipv4.addresses = [
        {
          address = config.krebs.build.host.nets.internet.ip4.addr;
          prefixLength = 27;
        }
        {
          address = "46.4.114.243";
          prefixLength = 27;
        }
      ];
      networking.defaultGateway = "46.4.114.225";
      networking.nameservers = [
        "8.8.8.8"
      ];
      services.udev.extraRules = ''
        SUBSYSTEM=="net", ATTR{address}=="08:60:6e:e7:87:04", NAME="et0"
      '';
    }
    {
      imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];

      boot.loader.grub = {
        devices = [
          "/dev/sda"
          "/dev/sdb"
        ];
        splashImage = null;
      };

      boot.initrd.availableKernelModules = [
        "ata_piix"
        "vmw_pvscsi"
        "ahci" "sd_mod"
      ];

      boot.kernelModules = [ "kvm-intel" ];

      fileSystems."/" = {
        device = "/dev/pool/nix_root";
        fsType = "ext4";
      };

      fileSystems."/tmp" = {
        device = "tmpfs";
        fsType = "tmpfs";
        options = ["nosuid" "nodev" "noatime"];
      };

      fileSystems."/var/download" = {
        device = "/dev/pool/download";
        fsType = "ext4";
      };

      fileSystems."/srv/http" = {
        device = "/dev/pool/http";
        fsType = "ext4";
      };

      fileSystems."/home" = {
        device = "/dev/pool/home";
        fsType = "ext4";
      };

      fileSystems."/bku" = {
        device = "/dev/pool/bku";
        fsType = "ext4";
      };

      swapDevices = [
        { label = "swap1"; }
        { label = "swap2"; }
      ];

      sound.enable = false;
      nixpkgs.config.allowUnfree = true;
      time.timeZone = "Europe/Berlin";
    }
  ];

}