diff --git a/modules/system/boot.nix b/modules/system/boot.nix new file mode 100644 index 0000000..0fed267 --- /dev/null +++ b/modules/system/boot.nix @@ -0,0 +1,21 @@ +{ config, lib, ... }: +let + cfg = config.my.system.boot; +in +{ + options.my.system.boot = with lib; { + tmp = { + clean = mkEnableOption "clean `/tmp` on boot."; + + tmpfs = my.mkDisableOption "mount `/tmp` as a tmpfs on boot."; + }; + }; + + config = { + boot = { + cleanTmpDir = cfg.tmp.clean; + + tmpOnTmpfs = cfg.tmp.tmpfs; + }; + }; +} diff --git a/modules/system/default.nix b/modules/system/default.nix index 48a0770..a9b251b 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -3,6 +3,7 @@ { imports = [ + ./boot.nix ./documentation.nix ./language.nix ./media.nix