From 43318032c22f10c158ca3c30ce6281af34b41f8f Mon Sep 17 00:00:00 2001 From: Nettika Date: Fri, 14 Jun 2024 20:08:59 -0700 Subject: [PATCH] Separate boot and interface configurations --- boot.nix | 27 +++++++++++++++++++++++++++ configuration.nix | 19 ++++++------------- hardware.nix | 20 +------------------- interface.nix | 13 +++++++++++++ 4 files changed, 47 insertions(+), 32 deletions(-) create mode 100644 boot.nix create mode 100644 interface.nix diff --git a/boot.nix b/boot.nix new file mode 100644 index 0000000..05e5c14 --- /dev/null +++ b/boot.nix @@ -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; + }; +} diff --git a/configuration.nix b/configuration.nix index d7d6769..bc7ff6e 100644 --- a/configuration.nix +++ b/configuration.nix @@ -2,6 +2,8 @@ { imports = [ ./hardware.nix + ./boot.nix + ./interface.nix ./networking.nix ./users.nix ./coding.nix @@ -9,25 +11,16 @@ ]; 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"; } diff --git a/hardware.nix b/hardware.nix index f824da6..354db6a 100644 --- a/hardware.nix +++ b/hardware.nix @@ -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; diff --git a/interface.nix b/interface.nix new file mode 100644 index 0000000..8515bfc --- /dev/null +++ b/interface.nix @@ -0,0 +1,13 @@ +{ ... }: +{ + services = { + xserver = { + enable = true; + desktopManager = { + cinnamon.enable = true; + xterm.enable = false; + }; + }; + displayManager.defaultSession = "cinnamon"; + }; +}