convoluted solution looking for a problem
unified modules structure
This commit is contained in:
parent
bf3946e06f
commit
1b7989336e
14 changed files with 61 additions and 44 deletions
|
@ -1,9 +1,14 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
config = {
|
||||
}: let
|
||||
isEnabled = config.my.hardware.enableCommonDesktopSettings;
|
||||
in {
|
||||
options.my.hardware.enableCommonDesktopSettings = lib.mkEnableOption "common hw settings for desktops";
|
||||
|
||||
config = lib.mkIf isEnabled {
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_zen;
|
||||
kernelParams = ["quiet" "udev.log_level=3"];
|
||||
|
|
|
@ -1,13 +1,20 @@
|
|||
hostName: {
|
||||
modulesCfg: {
|
||||
modulesPath,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
hostName = modulesCfg.hostName;
|
||||
in {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
(builtins.toString ./. + "/${hostName}.nix")
|
||||
./common-desktop.nix
|
||||
];
|
||||
|
||||
options.my.modulesCfg.hostName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
|
||||
config = {
|
||||
networking.hostName = hostName;
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./common-desktop.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
my.hardware.enableCommonDesktopSettings = true;
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
|
||||
initrd.kernelModules = [];
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./common-desktop.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
my.hardware.enableCommonDesktopSettings = true;
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"]; # "usb_storage"
|
||||
initrd.kernelModules = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue