Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression on systemd service #33

Open
gvolpe opened this issue Sep 27, 2022 · 2 comments
Open

Regression on systemd service #33

gvolpe opened this issue Sep 27, 2022 · 2 comments

Comments

@gvolpe
Copy link
Contributor

gvolpe commented Sep 27, 2022

I just noticed #31 introduced a regression when running homeage as a service, symlinks are no longer created on startup. Haven't had time to investigate yet, I simply reverted to the previous commit for now.

I only have a Github token as a secret and the symlink is not being created when activating new HM builds.

let secrets = { pkgs, config, ... }: {
  homeage = {
    identityPaths = [ "~/.ssh/id_ed25519" ];
    pkg = pkgs.rage;

    file."github-token" = {
      source = ./github.age;
      path = "github-notifications-token";
      symlinks = [ "${config.xdg.configHome}/secrets/github" ];
    };
  };
};
in [ secrets ]
@jordanisaacs
Copy link
Owner

jordanisaacs commented Sep 27, 2022

The way the systemd service works now is it cleans up secrets when the service stops. Could you give the output of systemctl status --user github-token-secret.service. Symlinks still work fine for me on the most recent branch, so my guess is something is causing your service to stop.

@gvolpe
Copy link
Contributor Author

gvolpe commented Sep 28, 2022

@jordanisaacs I deleted the secrets folder where the symlink is created, then updated homeage to the latest commit and rebuilt my configuration. The symlink is not created again, and restarting the github-token-secret.service didn't help.

Is that expected with the new changes?

$ systemctl --user status github-token-secret.service
● github-token-secret.service - Decrypt github-token secret
     Loaded: loaded (/home/gvolpe/.config/systemd/user/github-token-secret.service; enabled; preset: enabled)
     Active: active (exited) since Wed 2022-09-28 10:11:43 CEST; 10s ago
    Process: 1023958 ExecStart=/nix/store/5vspsflvaq2i6avpnbwbqf67ygk96p1i-github-token-decrypt (code=exited, status=0/SUCC>
   Main PID: 1023958 (code=exited, status=0/SUCCESS)
        CPU: 14ms

Sep 28 10:11:43 tongfang-amd systemd[1766]: Starting Decrypt github-token secret...
Sep 28 10:11:43 tongfang-amd 5vspsflvaq2i6avpnbwbqf67ygk96p1i-github-token-decrypt[1023958]: Decrypting secret /nix/store/b>
Sep 28 10:11:43 tongfang-amd systemd[1766]: Finished Decrypt github-token secret.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants