feat(nixosmodules): add udisks2
This commit is contained in:
parent
d816825ac3
commit
0b393ab562
6 changed files with 9 additions and 3 deletions
|
@ -1,51 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
let
|
||||
moduleName = "boot-config";
|
||||
cfg = config."${moduleName}";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
"${moduleName}" = {
|
||||
enable = lib.mkEnableOption "Enable ${moduleName}.";
|
||||
bootloader = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
example = "systemd-boot";
|
||||
description = "What bootloader to use.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
boot = {
|
||||
loader =
|
||||
{
|
||||
timeout = 5;
|
||||
efi.canTouchEfiVariables = true;
|
||||
}
|
||||
// lib.mkIf (cfg.bootloader == "systemd-boot") {
|
||||
systemd-boot.enable = true;
|
||||
systemd-boot.configurationLimit = 5;
|
||||
};
|
||||
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||
initrd.availableKernelModules = [
|
||||
"ahci"
|
||||
"nvme"
|
||||
"sd_mod"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"xhci_pci"
|
||||
"rtsx_pci_sdmmc"
|
||||
];
|
||||
};
|
||||
services.dbus = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue