Skip to content

Commit

Permalink
nix: add server config
Browse files Browse the repository at this point in the history
  • Loading branch information
FredeEB committed Mar 9, 2024
1 parent 2937929 commit 690f1c9
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
specialArgs = { inherit inputs; };
modules = [
./systems/base.nix
./systems/server.nix
];
};
};
Expand Down
30 changes: 30 additions & 0 deletions systems/server.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{ config, lib, modulesPath, ... }:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];

boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "virtio_scsi" "usbhid" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];

fileSystems."/" =
{ device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};

fileSystems."/boot" =
{ device = "/dev/disk/by-label/BOOT";
fsType = "vfat";
};

swapDevices =
[ { device = "/dev/disk/by-label/swap"; }
];

networking.hostName = "server";
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

0 comments on commit 690f1c9

Please sign in to comment.