summaryrefslogtreecommitdiffstats
path: root/makefu/1systems/gum/hardware-config.nix
diff options
context:
space:
mode:
authorjeschli <jeschli@gmail.com>2018-12-04 19:27:27 +0100
committerjeschli <jeschli@gmail.com>2018-12-04 19:27:27 +0100
commit5030b74cc5c578bb82619a24592504a6008f1a10 (patch)
tree0551e3ddb94353b7438bec02174bf3379bc89b87 /makefu/1systems/gum/hardware-config.nix
parent78b289201987675844aa37abeb4279eb4051ebe0 (diff)
parent82988de84c177c247ebbe80940c4d50b9f073b4e (diff)
Merge branch 'master' of prism.r:stockholm
Diffstat (limited to 'makefu/1systems/gum/hardware-config.nix')
-rw-r--r--makefu/1systems/gum/hardware-config.nix77
1 files changed, 65 insertions, 12 deletions
diff --git a/makefu/1systems/gum/hardware-config.nix b/makefu/1systems/gum/hardware-config.nix
index a40709169..bfe29b46c 100644
--- a/makefu/1systems/gum/hardware-config.nix
+++ b/makefu/1systems/gum/hardware-config.nix
@@ -1,26 +1,24 @@
{ config, ... }:
let
- external-mac = "2a:c5:6e:d2:fc:7f";
- main-disk = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-0";
- external-gw = "185.194.140.1";
+ external-mac = "50:46:5d:9f:63:6b";
+ main-disk = "/dev/disk/by-id/ata-TOSHIBA_DT01ACA300_13H8863AS";
+ sec-disk = "/dev/disk/by-id/ata-TOSHIBA_DT01ACA300_23OJ2GJAS";
+ external-gw = "144.76.26.225";
# single partition, label "nixos"
# cd /var/src; curl https://github.com/nixos/nixpkgs/tarball/809cf38 -L | tar zx ; mv * nixpkgs && touch .populate
# static
- external-ip = config.krebs.build.host.nets.internet.ip4.addr;
- external-ip6 = config.krebs.build.host.nets.internet.ip6.addr;
+ external-ip = "144.76.26.247";
+ external-ip6 = "2a01:4f8:191:12f6::2";
external-gw6 = "fe80::1";
- external-netmask = 22;
+ external-netmask = 27;
external-netmask6 = 64;
internal-ip = config.krebs.build.host.nets.retiolum.ip4.addr;
ext-if = "et0"; # gets renamed on the fly
in {
imports = [
- <nixpkgs/nixos/modules/profiles/qemu-guest.nix>
- <stockholm/makefu/2configs/fs/single-partition-ext4.nix>
];
-
makefu.server.primary-itf = ext-if;
services.udev.extraRules = ''
SUBSYSTEM=="net", ATTR{address}=="${external-mac}", NAME="${ext-if}"
@@ -40,7 +38,62 @@ in {
defaultGateway = external-gw;
};
boot.kernelParams = [ ];
- boot.loader.grub.device = main-disk;
- boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sd_mod" "sr_mod" ];
- boot.kernelModules = [ "kvm-intel" ];
+ boot.loader.grub.enable = true;
+ boot.loader.grub.version = 2;
+ boot.loader.grub.devices = [ main-disk ];
+ boot.initrd.kernelModules = [ "dm-raid" ];
+ boot.initrd.availableKernelModules = [
+ "ata_piix" "vmw_pvscsi" "virtio_pci" "sd_mod" "ahci"
+ "xhci_pci" "ehci_pci" "ahci" "sd_mod"
+ ];
+ boot.kernelModules = [ "kvm-intel" ];
+ hardware.enableRedistributableFirmware = true;
+ fileSystems."/" = {
+ device = "/dev/mapper/nixos-root";
+ fsType = "ext4";
+ };
+ fileSystems."/var/lib" = {
+ device = "/dev/mapper/nixos-lib";
+ fsType = "ext4";
+ };
+ fileSystems."/var/download" = {
+ device = "/dev/mapper/nixos-download";
+ fsType = "ext4";
+ };
+ fileSystems."/var/lib/borgbackup" = {
+ device = "/dev/mapper/nixos-backup";
+ fsType = "ext4";
+ };
+ fileSystems."/boot" = {
+ device = "/dev/sda2";
+ fsType = "vfat";
+ };
+ # parted -s -a optimal "$disk" \
+ # mklabel gpt \
+ # mkpart no-fs 0 1024KiB \
+ # set 1 bios_grub on \
+ # mkpart ESP fat32 1025KiB 1024MiB set 2 boot on \
+ # mkpart primary 1025MiB 100%
+ # parted -s -a optimal "/dev/sdb" \
+ # mklabel gpt \
+ # mkpart primary 1M 100%
+
+ #mkfs.vfat /dev/sda2
+ #pvcreate /dev/sda3
+ #pvcreate /dev/sdb1
+ #vgcreate nixos /dev/sda3 /dev/sdb1
+ #lvcreate -L 120G -m 1 -n root nixos
+ #lvcreate -L 50G -m 1 -n lib nixos
+ #lvcreate -L 100G -n download nixos
+ #lvcreate -L 100G -n backup nixos
+ #mkfs.ext4 /dev/mapper/nixos-root
+ #mkfs.ext4 /dev/mapper/nixos-lib
+ #mkfs.ext4 /dev/mapper/nixos-download
+ #mkfs.ext4 /dev/mapper/nixos-borgbackup
+ #mount /dev/mapper/nixos-root /mnt
+ #mkdir /mnt/boot
+ #mount /dev/sda2 /mnt/boot
+ #mkdir -p /mnt/var/src
+ #touch /mnt/var/src/.populate
+
}