qarulin-outgoing: a reverse ~/QubesIncoming directoryΒΆ

These tools let you create a directory called QarulinOutgoing in your user directory, next to QubesIncoming. It does the contrary: if you put something in ~/QarulinOutgoing, it will be moved to another qube (with qvm-move or qvm-move-to-vm).

The files provided here consist in:

  • a systemD path unit (files/qarulin-outgoing.path)

  • a systemD service unit (files/qarulin-outgoing.service)

  • a wrapper around qvm-move and qvm-move-to-vm (files/qarulin-outgoing-move.py)

  • a script to create selection dialog for dom0 (files/qarulin-outgoing-select-user.py)

  • three salt states to setup dom0, install the scripts and units and to create the directory (create-dir.sls, install-files.sls and setup-dom0.sls)

The basic idea is the following:

  1. We create a systemD service unit:

    [Unit]
    Description=Run outgoing-move
    ConditionPathExists=/var/run/qubes-service/qarulin-outgoing
    
    [Service]
    Type=oneshot
    ExecStart="qvm-move /home/user/QarulinOutgoing/*"
    User=user
    

    Hint

    If you install this in dom0:

    1. remove the line starting by ConditionPathExists

    2. replace qvm-move by qvm-move-to-vm <QUBE>

  2. To trigger this service unit, we need to watch the /home/user/QarulinOutgoing folder:

    [Unit]
    Description=Watch /home/user/QarulinOutgoing folder
    ConditionPathExists=/var/run/qubes-service/qarulin-outgoing
    
    [Path]
    PathChanged=/home/user/QarulinOutgoing
    
    [Install]
    WantedBy=multi-user.target
    

    Hint

    if you install this in dom0, remove the line starting by ConditionPathExists

The optional step is to install qarulin-outgoing-move , and to use it instead of qvm-move in the systemD service unit.

Hint

If you use qarulin-outgoing-move in dom0, you need to install qarulin-outgoing-select-user too. -