Skip to content

Commit c8eb461

Browse files
committed
Set server hardware configuration
1 parent 272fc2f commit c8eb461

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

server/default.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{ pkgs }:
22
{
3+
imports = [
4+
./hardware-configuration.nix
5+
];
6+
37
boot = {
48
loader = {
59
systemd-boot.enable = true;

server/hardware-configuration.nix

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Do not modify this file! It was generated by ‘nixos-generate-config’
2+
# and may be overwritten by future invocations. Please make changes
3+
# to /etc/nixos/configuration.nix instead.
4+
{ config, lib, pkgs, modulesPath, ... }:
5+
6+
{
7+
imports =
8+
[ (modulesPath + "/profiles/qemu-guest.nix")
9+
];
10+
11+
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
12+
boot.initrd.kernelModules = [ ];
13+
boot.kernelModules = [ ];
14+
boot.extraModulePackages = [ ];
15+
16+
fileSystems."/" =
17+
{ device = "/dev/disk/by-uuid/d7eacf9b-7ad6-48e8-9056-5d870886dc77";
18+
fsType = "ext4";
19+
};
20+
21+
fileSystems."/boot" =
22+
{ device = "/dev/disk/by-uuid/3D78-E0DF";
23+
fsType = "vfat";
24+
options = [ "fmask=0077" "dmask=0077" ];
25+
};
26+
27+
swapDevices =
28+
[ { device = "/dev/disk/by-uuid/89c77766-ae13-4829-b934-6faab8b6ce8e"; }
29+
];
30+
31+
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
32+
# (the default) this is the recommended approach. When using systemd-networkd it's
33+
# still possible to use this option, but it's recommended to use it in conjunction
34+
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
35+
networking.useDHCP = lib.mkDefault true;
36+
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
37+
38+
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
39+
}

0 commit comments

Comments
 (0)