This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
nil/modules/system/boot.nix

21 lines
466 B
Nix
Raw Normal View History

2021-12-15 05:04:57 +00:00
{ config, lib, pkgs, ... }:
2022-08-14 02:42:16 +00:00
let this = config.my.system.boot;
2021-12-15 05:04:57 +00:00
in with lib; {
2022-08-14 02:42:04 +00:00
options.my.system.boot.enable = mkOption {
2022-03-24 04:00:26 +00:00
default = true;
type = with types; bool;
description = "Is there a physical power button?";
2021-12-15 05:04:57 +00:00
};
2022-08-14 02:42:16 +00:00
config = mkIf this.enable {
2021-12-15 05:04:57 +00:00
boot = {
# Enable bootloader & clear /tmp on boot.
cleanTmpDir = true;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
};
}