-
Notifications
You must be signed in to change notification settings - Fork 119
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
[BUG] Agenix not creating secrets #247
Comments
Same issue here, I can't seem to get the directories to pop up and home manager activation fails outright |
The Sample flake with agenix imported in home-managerThis flake exposes a test VM that can be run as {
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
agenix.url = "github:ryantm/agenix";
};
outputs =
inputs@{ self, nixpkgs, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
inherit (pkgs) lib;
in
{
checks.${system}.test = pkgs.testers.runNixOSTest {
name = "foo";
nodes.machine1 =
{ config, pkgs, ... }:
{
services.getty.autologinUser = "alice";
imports = [ inputs.home-manager.nixosModules.home-manager ];
users.users.alice = {
isNormalUser = true;
password = "hunter2";
};
home-manager.users.alice =
{ config, ... }: # config is home-manager's config, not the OS one
{
imports = [ inputs.agenix.homeManagerModules.default ];
home.stateVersion = "24.05";
home.file.".ssh/id_ed25519".source = ./id_ed25519; # Don't do this to a real key, it's world-readable in store. For test VM it's OK.
home.file.".ssh/id_ed25519.pub".source = ./id_ed25519.pub;
programs.ssh = {
enable = true;
includes = [
(lib.removePrefix ".ssh/" config.age.secrets.ssh-config.path) # This makes the include relative
];
};
age.secrets.ssh-config.file = ./ssh-config.age;
age.secrets.ssh-config.path = ".ssh/includes/ssh-config-agenix";
};
};
testScript = "start_all()";
};
};
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I added agenix as a home-manager module to my flake-based NixOS configuration.
sudo nixos-rebuild switch
builds with no errors. Yet there are no secrets in/run/users/1000/
. Not even theagenix
folder exists, justagenix.d
. I use a similar config like a friend of mine, and everything works for him.The text was updated successfully, but these errors were encountered: