Separate boot and interface configurations

This commit is contained in:
2024-06-14 20:08:59 -07:00
parent d7092da122
commit 43318032c2
4 changed files with 47 additions and 32 deletions

27
boot.nix Normal file
View File

@@ -0,0 +1,27 @@
{ ... }:
{
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
initrd = {
systemd.enable = true;
availableKernelModules = [
"nvme"
"xhci_pci"
"usbhid"
"usb_storage"
"sd_mod"
];
};
kernelModules = ["kvm-amd"];
kernelParams = [
"amd_pstate=active"
"quiet"
"loglevel=3"
"udev.log-priority=3"
];
plymouth.enable = true;
};
}

View File

@@ -2,6 +2,8 @@
{
imports = [
./hardware.nix
./boot.nix
./interface.nix
./networking.nix
./users.nix
./coding.nix
@@ -10,24 +12,15 @@
time.timeZone = "America/Los_Angeles";
i18n.defaultLocale = "en_US.UTF-8";
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
lshw
firefox
];
services.xserver = {
enable = true;
desktopManager = {
cinnamon.enable = true;
xterm.enable = false;
nixpkgs = {
hostPlatform = "x86_64-linux";
config.allowUnfree = true;
};
};
services.displayManager.defaultSession = "cinnamon";
system.stateVersion = "24.05";
}

View File

@@ -1,21 +1,5 @@
{ pkgs, ... }:
{
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"usbhid"
"usb_storage"
"sd_mod"
];
kernelModules = ["kvm-amd"];
kernelParams = ["amd_pstate=active"];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/648c6539-892c-40d7-8b07-23fe760df02a";
@@ -28,8 +12,6 @@
};
};
nixpkgs.hostPlatform = "x86_64-linux";
hardware = {
enableRedistributableFirmware = true;
cpu.amd.updateMicrocode = true;

13
interface.nix Normal file
View File

@@ -0,0 +1,13 @@
{ ... }:
{
services = {
xserver = {
enable = true;
desktopManager = {
cinnamon.enable = true;
xterm.enable = false;
};
};
displayManager.defaultSession = "cinnamon";
};
}