1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Nix+home-managerでagenixを利用する

Posted at

home-managerでもagenixを利用したく、色々と詰んだのでその時のメモ

agenixにはhome-manager向けモジュールが用意されており、これを呼び出せばhome-managerでもagenixが利用できるようになった

    {
      homeConfigurations = {
        "user@host" = inputs.home-manager.lib.homeManagerConfiguration {
          modules = [
            inputs.agenix.homeManagerModules.age
          ];
        };
      };
    };

これでage使えるようになる

  age.secrets = {
    aws_config = {
      file = "${inputs.mysecrets}/aws/config.age";
      path = "/home/fabiiw05/.aws/config";
      mode = "644";
    };
    aws_credentials = {
      file = "${inputs.mysecrets}/aws/credentials.age";
      path = "/home/fabiiw05/.aws/credentials";
      mode = "644";
    };
  };

ただ、home-manager switchしてもpathで指定したところにリンクが生成されない
調べたところagenix.service をリスタートする必要があった

systemctl --user restart agenix.service 
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?