summaryrefslogtreecommitdiff
path: root/system-profiles/nfsroot.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-11-02 00:15:19 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-11-02 00:15:19 +0100
commit86ccf1964b5e30ead1b5f0d8ad376f9aa655d684 (patch)
treee15c0c338518c34c1e7066a1bded2ade641564f2 /system-profiles/nfsroot.nix
parent42984e77041cfc95d333319bef0b2d8f441f56d3 (diff)
downloadnixos-86ccf1964b5e30ead1b5f0d8ad376f9aa655d684.tar
nixos-86ccf1964b5e30ead1b5f0d8ad376f9aa655d684.tar.gz
nixos-86ccf1964b5e30ead1b5f0d8ad376f9aa655d684.tar.bz2
nixos-86ccf1964b5e30ead1b5f0d8ad376f9aa655d684.tar.xz
nixos-86ccf1964b5e30ead1b5f0d8ad376f9aa655d684.zip
tmpfs-root system-profile
Diffstat (limited to 'system-profiles/nfsroot.nix')
-rw-r--r--system-profiles/nfsroot.nix11
1 files changed, 5 insertions, 6 deletions
diff --git a/system-profiles/nfsroot.nix b/system-profiles/nfsroot.nix
index 92cf98de..ab028de3 100644
--- a/system-profiles/nfsroot.nix
+++ b/system-profiles/nfsroot.nix
@@ -1,10 +1,14 @@
1{ config, pkgs, lib, flakeInputs, ... }: 1{ config, pkgs, lib, flake, flakeInputs, ... }:
2 2
3with lib; 3with lib;
4 4
5let 5let
6 cfg = config.nfsroot; 6 cfg = config.nfsroot;
7in { 7in {
8 imports = with flake.nixosModules.systemProfiles; [
9 tmpfs-root
10 ];
11
8 options = { 12 options = {
9 nfsroot = { 13 nfsroot = {
10 storeDevice = mkOption { 14 storeDevice = mkOption {
@@ -34,11 +38,6 @@ in {
34 then [] 38 then []
35 else [ pkgs.grub2 pkgs.syslinux ]); 39 else [ pkgs.grub2 pkgs.syslinux ]);
36 40
37 fileSystems."/" = mkImageMediaOverride
38 { fsType = "tmpfs";
39 options = [ "mode=0755" ];
40 };
41
42 # In stage 1, mount a tmpfs on top of /nix/store (the squashfs 41 # In stage 1, mount a tmpfs on top of /nix/store (the squashfs
43 # image) to make this a live CD. 42 # image) to make this a live CD.
44 fileSystems."/nix/.ro-store" = mkImageMediaOverride 43 fileSystems."/nix/.ro-store" = mkImageMediaOverride