summaryrefslogtreecommitdiff
path: root/system-profiles/tmpfs-root.nix
blob: 3b4eb9a701d850f3b3d79bdc7d4f12941b510b36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{ options, lib, ... }: {
  config = foldr recursiveUpdate {} ([
    {
      security.sudo.extraConfig = ''
        Defaults lecture = never
      '';
    }
  ]
  ++ (lib.optional (options ? disko) {
    disko.devices.nodev = {
      "/" = {
        fsType = "tmpfs";
        mountOptions = [
          "mode=0755"
        ];
      };
    };
  })
  ++ (lib.optional (!(options ? disko)) {
    fileSystems."/" = {
      fsType = "tmpfs";
      options = [ "mode=0755" ];
    };
  }));
}