nixos-config/config/hardware/france.nix

101 lines
2.2 KiB
Nix

{ config, lib, pkgs, ... }:
{
boot = {
initrd = {
availableKernelModules = [
"uhci_hcd"
"ehci_pci"
"ata_piix"
"ahci"
"floppy"
"sd_mod"
"sr_mod"
];
kernelModules = [ "dm-snapshot" ];
};
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
kernelPackages = pkgs.linuxPackages_latest;
loader.grub = {
enable = true;
version = 2;
device = "/dev/sda";
};
};
fileSystems = {
"/boot" = {
device = "/dev/disk/by-label/france-boot";
fsType = "ext4";
options = [ "noatime" "nodiratime" ];
};
"/" = {
device = "/dev/disk/by-label/france-root";
fsType = "ext4";
options = [ "noatime" "nodiratime" ];
};
"/var/lib/lxd/storage-pools/pool0" = {
device = "/dev/disk/by-label/pool0";
fsType = "btrfs";
label = "pool0";
options = [ "noatime" "nodiratime" "noexec" ];
};
"/var/lib/lxd/storage-pools/pool1" = {
device = "/dev/france-user/fudo-user";
fsType = "btrfs";
label = "pool1";
options = [ "noatime" "nodiratime" "noexec" ];
};
};
swapDevices = [{ device = "/dev/disk/by-label/france-swap"; }];
nix.maxJobs = lib.mkDefault 24;
hardware.bluetooth.enable = false;
networking = {
useDHCP = false;
macvlans = {
intif0 = {
interface = "enp4s0f1";
mode = "bridge";
};
extif0 = {
interface = "enp4s0f0";
mode = "bridge";
};
# extif1 = {
# interface = "enp4s0f0";
# mode = "bridge";
# };
};
interfaces = {
intif0 = {
# output of: echo france-intif0|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/'
macAddress = "02:44:d1:eb:c3:6b";
};
extif0 = {
# output of: echo france-extif0|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/'
macAddress = "02:5e:ff:e4:83:e4";
};
# extif1 = {
# # output of: echo france-extif1|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/'
# macAddress = "02:30:91:97:40:1f";
# };
};
};
}