my nix configs for my servers and desktop
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 = [ "xhci_pci" "virtio_pci" "virtio_scsi" "usbhid" ];
12 boot.initrd.kernelModules = [ ];
13 boot.kernelModules = [ ];
14 boot.extraModulePackages = [ ];
15
16 # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
17 # (the default) this is the recommended approach. When using systemd-networkd it's
18 # still possible to use this option, but it's recommended to use it in conjunction
19 # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
20 networking.useDHCP = lib.mkDefault true;
21 # networking.interfaces.enp0s6.useDHCP = lib.mkDefault true;
22
23 nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
24
25 disko.devices = {
26 disk = {
27 main = {
28 type = "disk";
29 device = "/dev/sda";
30 content = {
31 type = "gpt";
32 partitions = {
33 boot = {
34 size = "512M";
35 type = "EF00";
36 content = {
37 type = "filesystem";
38 format = "vfat";
39 mountpoint = "/boot";
40 };
41 };
42 root = {
43 size = "100%";
44 content = {
45 type = "filesystem";
46 format = "ext4";
47 mountpoint = "/";
48 };
49 };
50 };
51 };
52 };
53 };
54 };
55}