From 63454ab24ca05409a95b798051a1db6498311938 Mon Sep 17 00:00:00 2001 From: MK Date: Tue, 14 Feb 2023 19:04:19 +0100 Subject: [PATCH] Update 'configuration.nix' --- configuration.nix | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/configuration.nix b/configuration.nix index e8986b6..fe08ceb 100644 --- a/configuration.nix +++ b/configuration.nix @@ -156,8 +156,34 @@ git #source of this code: https://github.com/NixOS/nixpkgs/blob/nixos-22.11/nixos/modules/system/boot/tmp.nix -boot.tmpOnTmpfs = true; -boot.cleanTmpDir = true; +#boot.tmpOnTmpfs = true; +#boot.cleanTmpDir = true; +options = { + + boot.cleanTmpDir = mkOption { + type = types.bool; + default = true; + description = lib.mdDoc '' + Whether to delete all files in {file}`/tmp` during boot. + ''; + }; + + boot.tmpOnTmpfs = mkOption { + type = types.bool; + default = true; + description = lib.mdDoc '' + Whether to mount a tmpfs on {file}`/tmp` during boot. + ''; + }; + + boot.tmpOnTmpfsSize = mkOption { + type = types.oneOf [ types.str types.types.ints.positive ]; + default = "50%"; + description = lib.mdDoc '' + Size of tmpfs in percentage. + Percentage is defined by systemd. + ''; + }; } \ No newline at end of file