Sigrid Haflínudóttiradd docs to run 9pex on NixOS54ff6c36 years agoHistory
NameLast commit messageLast commit date
..
ninepex.nixadd docs to run 9pex on NixOS6 years ago
README.mdadd docs to run 9pex on NixOS6 years ago
README.md

Read-only 9pex in NixOS

sudo mkdir -p /etc/nixos/pkgs
sudo cp ninepex.nix /etc/nixos/pkgs/

And change /etc/nixos/configuration.nix:

{ config, pkgs, ... }:

let
  ninepex = pkgs.callPackage ./pkgs/ninepex.nix {};
in
{

.................

  services.xinetd = {
    enable = true;
    services = [
      {
        name = "9pfs";
        port = 564;
        user = "none";
        server = "${ninepex}/bin/9pex";
        serverArgs = "/home/9";
        flags = "KEEPALIVE REUSE";
        extraConfig = ''
          instances = UNLIMITED
        '';
      }
    ];
  };

.................

  users.users.none = {
    isNormalUser = false;
    isSystemUser = false;                                                                                              
    createHome = true;
    home = "/home/9";
    shell = "${pkgs.shadow}/bin/nologin";
  };

Files go to /home/9. With rsync it can be done as so:

rsync -iCaR \
        --exclude='.git*' \
        --exclude='*.out' \
        --exclude='*.[0125678vqki]' \
        --exclude='[0125678vqki].*' \
        --delete-excluded --delete \
        --chown none:nogroup \
	dir1 dir2 dir3 \
        root@host:/home/9/

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t