Init
This commit is contained in:
31
hosts/cyper-desktop/configuration.nix
Normal file
31
hosts/cyper-desktop/configuration.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
|
||||
networking = {
|
||||
useNetworkd = true;
|
||||
useDHCP = false;
|
||||
firewall.enable = true;
|
||||
};
|
||||
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
networks."10-ethernet" = {
|
||||
matchConfig.Name = "eno1";
|
||||
networkConfig = {
|
||||
Address = "192.168.2.40/24";
|
||||
Gateway = "192.168.2.1";
|
||||
DNS = "192.168.2.2";
|
||||
DHCP = "no";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
configurationLimit = 10;
|
||||
editor = false;
|
||||
};
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
}
|
||||
67
hosts/cyper-desktop/hardware-configuration.nix
Normal file
67
hosts/cyper-desktop/hardware-configuration.nix
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"nvme"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
kernelModules = [ ];
|
||||
};
|
||||
kernelModules = [
|
||||
"kvm-intel"
|
||||
"v4l2loopback"
|
||||
];
|
||||
extraModulePackages = [ config.boot.kernelPackages.v4l2loopback.out ];
|
||||
extraModprobeConfig = ''
|
||||
options v4l2loopback exclusive_caps=1 card_label="Virtual Camera"
|
||||
'';
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/NIXROOT";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-label/NIXBOOT";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
];
|
||||
};
|
||||
|
||||
"/storage" = {
|
||||
device = "/dev/disk/by-label/STORAGE";
|
||||
fsType = "ext4";
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
hardware = {
|
||||
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user