Skip to content
Closed
1 change: 1 addition & 0 deletions docs/sourceos-shell-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This repository, `source-os`, carries the Linux realization surfaces required to
- Nix/NixOS modules
- profile wiring
- machine-level integration hooks
- derive-service runtime integration such as `docd`

## What does not belong here

Expand Down
19 changes: 19 additions & 0 deletions docs/sourceos-shell-launcher-bridge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# sourceos-shell launcher bridge note

During the early shell rollout, launcher integration is tracked as temporary bridge work.

## Routing rule

Queries are routed by scope:

- `apps` -> launcher or desktop-entry provider
- `files` -> Linux-native file search only
- `web` -> browser or web agent

## Required invariant

For `files` queries, Albert must not perform a second file-search pass in parallel with the Linux-native provider.

## Lifecycle

This bridge exists only until the shell's own command/search surface fully absorbs the routing behavior.
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
else pkgs.runCommand "stable-x86_64-smoke-skip" {} ''
mkdir -p $out
'';

sourceos-shell-module-contract = import ./tests/sourceos-shell-module-contract.nix { inherit pkgs; };
});

sourceos = {
Expand Down
13 changes: 13 additions & 0 deletions linux/systemd/sourceos-docd.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=SourceOS docd derive service
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
ExecStart=/opt/sourceos-shell/bin/sourceos-docd
Restart=on-failure
RestartSec=2s

[Install]
WantedBy=multi-user.target
9 changes: 9 additions & 0 deletions modules/nixos/sourceos-shell/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,14 @@ in
ExecStart = "${pkgs.coreutils}/bin/echo sourceos-pdf-secure placeholder port=${toString cfg.pdfSecurePort}";
};
};

systemd.services.sourceos-docd = {
description = "SourceOS shell docd scaffold";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.coreutils}/bin/echo sourceos-docd placeholder port=${toString cfg.docdPort}";
};
};
};
}
1 change: 1 addition & 0 deletions profiles/linux-dev/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{
imports = [
../../modules/build/default.nix
../../profiles/linux-dev/sourceos-shell.nix
];

sourceos.build = {
Expand Down
17 changes: 17 additions & 0 deletions tests/sourceos-shell-module-contract.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.runCommand "sourceos-shell-module-contract" {
nativeBuildInputs = [ pkgs.gnugrep ];
} ''
test -f ${../modules/nixos/sourceos-shell/default.nix}
test -f ${../profiles/linux-dev/sourceos-shell.nix}
test -f ${../linux/desktop/sourceos-shell.desktop}
test -f ${../linux/systemd/sourceos-shell.service}
test -f ${../linux/systemd/sourceos-router.service}
test -f ${../linux/systemd/sourceos-pdf-secure.service}
test -f ${../linux/systemd/sourceos-docd.service}
grep -q '../../modules/nixos/sourceos-shell/default.nix' ${../profiles/linux-dev/sourceos-shell.nix}
grep -q 'sourceos.shell' ${../modules/nixos/sourceos-shell/default.nix}
grep -q 'sourceos-docd' ${../modules/nixos/sourceos-shell/default.nix}
mkdir -p $out
echo validated > $out/result.txt
''