fix up box config

This commit is contained in:
Anish L 2022-04-24 14:57:29 +10:00
parent f02500fcfb
commit b43727dc65
2 changed files with 27 additions and 17 deletions

View file

@ -6,10 +6,11 @@
{ {
imports = imports =
[ # Include the results of the hardware scan. [
# Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
# Use the GRUB 2 boot loader. # Use the GRUB 2 boot loader.
boot.loader.efi.canTouchEfiVariables = false; boot.loader.efi.canTouchEfiVariables = false;
boot.loader.efi.efiSysMountPoint = "/boot/efi"; boot.loader.efi.efiSysMountPoint = "/boot/efi";
@ -21,21 +22,21 @@
enableCryptodisk = true; enableCryptodisk = true;
efiInstallAsRemovable = true; efiInstallAsRemovable = true;
}; };
boot.initrd.secrets = { boot.initrd.secrets = {
"/keyfile0.bin" = /etc/secrets/initrd/keyfile0.bin; "/keyfile0.bin" = /etc/secrets/initrd/keyfile0.bin;
"/keyfile1.bin" = /etc/secrets/initrd/keyfile1.bin; "/keyfile1.bin" = /etc/secrets/initrd/keyfile1.bin;
}; };
boot.initrd.luks.devices = { boot.initrd.luks.devices = {
"root" = { "root" = {
#name = "root"; #name = "root";
device = "/dev/disk/by-uuid/f37f3222-47d7-42d8-b400-363320a31853"; # UUID for /dev/nvme01np2 device = "/dev/disk/by-uuid/f37f3222-47d7-42d8-b400-363320a31853"; # UUID for /dev/nvme01np2
preLVM = true; preLVM = true;
allowDiscards = true; allowDiscards = true;
keyFile = "/keyfile0.bin"; keyFile = "/keyfile0.bin";
}; };
}; };
# Data mount # Data mount
fileSystems."/data" = { fileSystems."/data" = {
@ -48,30 +49,29 @@
}; };
}; };
networking.interfaces.enp2s0 = { networking.interfaces.enp2s0 = {
ipv4.addresses = [{ ipv4.addresses = [{
address = "192.168.1.240"; address = "192.168.1.240";
prefixLength = 24; prefixLength = 24;
} ]; }];
ipv4.routes = [ { address = "192.168.1.0"; prefixLength = 24; via = "192.168.1.1"; }]; ipv4.routes = [{ address = "192.168.1.0"; prefixLength = 24; via = "192.168.1.1"; }];
useDHCP = false; useDHCP = false;
}; };
#networking.nameservers = [ "172.16.11.240" ]; #networking.nameservers = [ "172.16.11.240" ];
networking.nameservers = [ "192.168.1.1" ]; networking.nameservers = [ "192.168.1.1" ];
networking.defaultGateway = { networking.defaultGateway = {
address = "192.168.1.1"; address = "192.168.1.1";
interface = "enp2s0"; interface = "enp2s0";
}; };
networking.hostName = "box"; # Define your hostname. networking.hostName = "box"; # Define your hostname.
networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# The global useDHCP flag is deprecated, therefore explicitly set to false here. # The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config # Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour. # replicates the default behaviour.
networking.useDHCP = false; networking.useDHCP = false;
networking.interfaces.wlp3s0.useDHCP = true; networking.interfaces.wlp3s0.useDHCP = true;
networking.interfaces.enp2s0.useDHCP = false;
# Set your time zone. # Set your time zone.
time.timeZone = "Australia/Brisbane"; time.timeZone = "Australia/Brisbane";

10
hosts/box/default.nix Normal file
View file

@ -0,0 +1,10 @@
{ profiles, suites, ... }:
{
imports = [
./configuration.nix
] ++ suites.box;
home-manager.users.anish = { self, suites, ... }: {
imports = [ ] ++ suites.hmBase;
};
}