migrate to nixos modules

This commit is contained in:
zuckerberg
2021-04-11 21:43:27 -04:00
parent 7b70b48de4
commit a9c6b46ff5
25 changed files with 544 additions and 459 deletions

View File

@@ -1,12 +1,28 @@
{ config, pkgs, ... }:
{ lib, config, pkgs, ... }:
{
# Use GRUB 2 for BIOS
boot.loader.grub = {
enable = true;
version = 2;
useOSProber = true;
configurationLimit = 20;
theme = pkgs.nixos-grub2-theme;
with lib;
let
cfg = config.bios;
in {
options.bios = {
enable = mkEnableOption "enable bios boot";
device = mkOption {
type = types.str;
};
};
config = mkIf cfg.enable {
# Use GRUB 2 for BIOS
boot.loader = {
timeout = 2;
grub = {
enable = true;
device = cfg.device;
version = 2;
useOSProber = true;
configurationLimit = 20;
theme = pkgs.nixos-grub2-theme;
};
};
};
}