add a config for grav

This commit is contained in:
Andreas Zweili 2022-01-12 22:15:53 +01:00
parent 603d254777
commit f892262093
2 changed files with 55 additions and 0 deletions

View File

@ -111,6 +111,13 @@
[
./modules/docker
];
grav = mkComputer
./systems/grav
./home-manager/headless.nix
[
./modules/docker
];
};
};
}

48
systems/grav/default.nix Normal file
View File

@ -0,0 +1,48 @@
{ ... }:
let
hostname = "grav";
ip = "10.7.89.102";
in
{
boot.initrd.availableKernelModules = [
"ata_piix"
"uhci_hcd"
"virtio_pci"
"virtio_scsi"
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "dm-snapshot" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/BOOT";
fsType = "vfat";
};
networking = {
hostName = hostname;
hosts = {
"127.0.0.1" = [ "${hostname}.2li.local" ];
ip = [ "${hostname}.2li.local" ];
};
defaultGateway = "10.7.89.1";
nameservers = [ ip ];
interfaces.ens18.ipv4.addresses = [
{
address = ip;
prefixLength = 24;
}
];
};
swapDevices = [
{ device = "/dev/disk/by-label/swap"; }
];
}