From 7bfbd5981025282007f09225e22e895523d7a7bf Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 25 Dec 2025 04:05:54 +0900 Subject: cmd/sharefs: implement shared filesystem This is for passing files between applications, similar to android /sdcard. Signed-off-by: Ophestra --- cmd/sharefs/test/configuration.nix | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 cmd/sharefs/test/configuration.nix (limited to 'cmd/sharefs/test/configuration.nix') diff --git a/cmd/sharefs/test/configuration.nix b/cmd/sharefs/test/configuration.nix new file mode 100644 index 00000000..d9c011bc --- /dev/null +++ b/cmd/sharefs/test/configuration.nix @@ -0,0 +1,39 @@ +{ pkgs, ... }: +{ + users.users = { + alice = { + isNormalUser = true; + description = "Alice Foobar"; + password = "foobar"; + uid = 1000; + }; + }; + + home-manager.users.alice.home.stateVersion = "24.11"; + + # Automatically login on tty1 as a normal user: + services.getty.autologinUser = "alice"; + + # For benchmarking sharefs: + environment.systemPackages = [ pkgs.fsmark ]; + + virtualisation = { + diskSize = 6 * 1024; + + qemu.options = [ + # Increase test performance: + "-smp 8" + ]; + }; + + environment.hakurei = rec { + enable = true; + stateDir = "/var/lib/hakurei"; + sharefs.source = "${stateDir}/sdcard"; + users.alice = 0; + + extraHomeConfig = { + home.stateVersion = "23.05"; + }; + }; +} -- cgit v1.3.1