Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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}";
};
};
};
}
2 changes: 2 additions & 0 deletions tests/sourceos-shell-module-contract.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ pkgs.runCommand "sourceos-shell-module-contract" {
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
''