From 722004beea7ac07f9a5d2eddc001037df9046911 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 22 Sep 2026 21:10:27 +0200 Subject: ... --- system-profiles/tmpfs-root.nix | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) (limited to 'system-profiles/tmpfs-root.nix') diff --git a/system-profiles/tmpfs-root.nix b/system-profiles/tmpfs-root.nix index 23939c2e..7840dadf 100644 --- a/system-profiles/tmpfs-root.nix +++ b/system-profiles/tmpfs-root.nix @@ -1,14 +1,25 @@ -{ ... }: { - config = { - # system.etc.overlay.enable = true; - - fileSystems."/" = { - fsType = "tmpfs"; - options = [ "mode=0755" ]; - }; - - security.sudo.extraConfig = '' - Defaults lecture = never - ''; - }; +{ options, lib, ... }: { + config = lib.mkMerge + [ (lib.mkIf (options ? disko) { + disko.devices.nodev = { + "/" = { + fsType = "tmpfs"; + mountOptions = [ + "mode=0755" + ]; + }; + }; + }) + (lib.mkIf (!(options ? disko)) { + fileSystems."/" = { + fsType = "tmpfs"; + options = [ "mode=0755" ]; + }; + }) + { + security.sudo.extraConfig = '' + Defaults lecture = never + ''; + } + ]; } -- cgit v1.2.3