fix!: make all nixosConfigurations
build
Specifically `homix` - remove manual `home-manager` module definition Import `(r)agenix` and `agenix-rekey` by default for all `NixOS` configurations Move `machines.nix` flake module import to `configuration.nix` from `flake.nix`
This commit is contained in:
parent
b48f29dab4
commit
af91b1e76d
7 changed files with 13 additions and 26 deletions
|
@ -1,11 +1,8 @@
|
|||
{ inputs, outputs, lib, pkgs, config, options, ... }:
|
||||
let
|
||||
# NOTE: synced with <https://github.com/oddlama/agenix-rekey/blob/c071067f7d972552f5170cf8665643ed0ec19a6d/modules/agenix-rekey.nix#L38>
|
||||
dummyPubkey = "age1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs3290gq";
|
||||
in {
|
||||
# TODO: cleaner deep check
|
||||
config = lib.mkIf (lib.all lib.id [(builtins.hasAttr "age" options) (builtins.hasAttr "rekey" options.age)]) {
|
||||
age.rekey = lib.mkIf (config.age.rekey.hostPubkey != dummyPubkey) {
|
||||
{
|
||||
config = {
|
||||
# NOTE: `(r)agenix` and `agenix-rekey` modules are imported by `../../../nix/configurations.nix`
|
||||
age.rekey = {
|
||||
masterIdentities = lib.mkDefault [ "${inputs.self}/secrets/privkey.age" ];
|
||||
storageMode = lib.mkDefault "local";
|
||||
localStorageDir = lib.mkDefault "${inputs.self}/secrets/rekeyed/${config.networking.hostName}";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue