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

Add a way to disable the NixOS module #311

Open
axelkar opened this issue Jan 28, 2025 · 0 comments
Open

Add a way to disable the NixOS module #311

axelkar opened this issue Jan 28, 2025 · 0 comments

Comments

@axelkar
Copy link

axelkar commented Jan 28, 2025

Currently you have this where I'd have to rely on assertions:

config = mkIf (cfg.secrets != {}) (mkMerge [

I currently have to do this to disable agenix:

let
  cfg = config.repo.common.secrets;
  ragenix = import inputs.ragenix.nixosModules.default;
  agenix-rekey = import "${inputs.agenix-rekey}/modules/agenix-rekey.nix" pkgs;
in {
  imports = [
    # Hacky workaround since the modules don't have enable options
    ({ pkgs, ... }@args: ragenix args // {
       config = lib.mkIf cfg (ragenix args).config;
    })
    ({ pkgs, ... }@args: agenix-rekey args // {
       config = lib.mkIf cfg (agenix-rekey args).config;
    })
  ];

Now the reason I need to disable agenix is because I import its module in all hosts in my config repo but live boot images don't have anything I could put into hostPubkey (and it just adds bloat)

oddlama/agenix-rekey#72

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

1 participant