From 526527f5dce9ff2d66618dda14f3fe0e50cdbb7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Schr=C3=B6ter?= Date: Thu, 17 Jul 2025 14:01:06 +0200 Subject: [PATCH] refactor(system): move boot options into their own file --- hardware/base.nix | 15 +-------------- system/boot.nix | 16 ++++++++++++++++ system/common.nix | 1 + 3 files changed, 18 insertions(+), 14 deletions(-) create mode 100644 system/boot.nix diff --git a/hardware/base.nix b/hardware/base.nix index 95d1c07..679f042 100644 --- a/hardware/base.nix +++ b/hardware/base.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +_: { imports = [ @@ -7,19 +7,6 @@ ./zsa.nix ]; - boot.supportedFilesystems = lib.mkDefault [ "btrfs" ]; - boot.kernelPackages = lib.mkOverride 800 pkgs.linuxPackages_latest; - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - boot.initrd.systemd.enable = true; - - boot.plymouth.enable = true; - - # prevents `systemd-vconsole-setup` failing during systemd initrd - console.earlySetup = true; - systemd.services.systemd-vconsole-setup.unitConfig.After = "local-fs.target"; - services.smartd.enable = true; services.smartd.notifications.x11.enable = true; } diff --git a/system/boot.nix b/system/boot.nix new file mode 100644 index 0000000..126ef4c --- /dev/null +++ b/system/boot.nix @@ -0,0 +1,16 @@ +{ lib, pkgs, ... }: + +{ + boot.supportedFilesystems = lib.mkDefault [ "btrfs" ]; + boot.kernelPackages = lib.mkOverride 800 pkgs.linuxPackages_latest; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + boot.initrd.systemd.enable = true; + + boot.plymouth.enable = true; + + # prevents `systemd-vconsole-setup` failing during systemd initrd + console.earlySetup = true; + systemd.services.systemd-vconsole-setup.unitConfig.After = "local-fs.target"; +} diff --git a/system/common.nix b/system/common.nix index 2d8bded..e6609c8 100644 --- a/system/common.nix +++ b/system/common.nix @@ -2,6 +2,7 @@ { imports = [ + ./boot.nix ./zram.nix ./i18n.nix ./nix.nix