forked from
lass.pds.lassul.us/superconfig
This repository has no description
903 B
29 lines
1{
2 pkgs,
3 self,
4 ...
5}:
6let
7 phonetpm = self.packages.${pkgs.system}.phonetpm;
8in
9{
10 # Phone-backed ssh-agent / age plugin (https://github.com/Lassulus/phonetpm).
11 # The daemon serves %t/phonetpm/{agent,control}.sock; age-plugin-phone finds
12 # the control socket on its own. configs/phonetpm-ssh.nix makes it the
13 # SSH_AUTH_SOCK.
14 environment.systemPackages = [ phonetpm ];
15
16 systemd.user.services.phonetpm = {
17 description = "phonetpm daemon (phone as ssh-agent / age backend)";
18 wantedBy = [ "default.target" ];
19 after = [ "network-online.target" ];
20 # Skipped until `phonetpm pair <endpoint id>` has written the config;
21 # `systemctl --user start phonetpm` afterwards.
22 unitConfig.ConditionPathExists = "%E/phonetpm/config.toml";
23 serviceConfig = {
24 ExecStart = "${phonetpm}/bin/phonetpm daemon";
25 Restart = "on-failure";
26 RestartSec = 5;
27 };
28 };
29}