1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-10 23:00:39 +02:00

feat: update agenix-rekey (prevents frequent store path change which caused unnecessary microvm restarts)

This commit is contained in:
oddlama 2024-03-15 17:21:55 +01:00
parent a737071162
commit d4a932923d
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
4 changed files with 108 additions and 105 deletions

6
flake.lock generated
View file

@ -53,11 +53,11 @@
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1708966623,
"narHash": "sha256-ClfhWvju5sJpt2l9FKCcHtyNnVtLBRjMNie066GLgyM=",
"lastModified": 1710507018,
"narHash": "sha256-uLiNsW8OGfj/qAUj0ckwXX+8tdNOhWvhQGdzaVtqjjY=",
"owner": "oddlama",
"repo": "agenix-rekey",
"rev": "ac73aac46bc4a9474496ce3e68ed05f0c2a340ce",
"rev": "5a4a617d5daf5634f058ecd0430ea20961a694b8",
"type": "github"
},
"original": {

View file

@ -2,5 +2,6 @@ f: {
lib,
config,
...
}: f {
}:
f {
}

View file

@ -2,5 +2,6 @@ f: {
lib,
config,
...
}: f {
}:
f {
}

View file

@ -8,105 +8,106 @@ f: {
mkOption
types
;
in f {
options.nodes = mkOption {
default = {};
description = ''
'';
type = types.attrsOf (types.submodule (nodeSubmod: {
options = {
name = mkOption {
description = "The name of this node";
default = nodeSubmod.config._module.args.name;
readOnly = true;
type = types.str;
in
f {
options.nodes = mkOption {
default = {};
description = ''
'';
type = types.attrsOf (types.submodule (nodeSubmod: {
options = {
name = mkOption {
description = "The name of this node";
default = nodeSubmod.config._module.args.name;
readOnly = true;
type = types.str;
};
type = mkOption {
description = "TODO";
default = "normal";
type = types.enum ["normal" "microvm" "nixos-container"];
};
parent = mkOption {
description = "TODO guests ids (topology.node.<name>.id) ensure exists";
default = [];
type = types.listOf types.str;
};
disks = mkOption {
default = {};
type = types.attrsOf (types.submodule (submod: {
options = {
name = mkOption {
description = "The name of this disk";
default = submod.config._module.args.name;
readOnly = true;
type = types.str;
};
};
}));
};
interfaces = mkOption {
description = "TODO";
default = {};
type = types.attrsOf (types.submodule (submod: {
options = {
name = mkOption {
description = "The name of this interface";
type = types.str;
readOnly = true;
default = submod.config._module.args.name;
};
mac = mkOption {
description = "The MAC address of this interface, if known.";
default = null;
type = types.nullOr types.str;
};
addresses = mkOption {
description = "The configured address(es), or a descriptive string (like DHCP).";
type = types.listOf types.str;
};
network = mkOption {
description = ''
The global name of the attached/spanned network.
If this is given, this interface can be shown in the network graph.
'';
default = null;
type = types.nullOr types.str;
};
};
}));
};
firewallRules = mkOption {
description = "TODO";
default = {};
type = types.attrsOf (types.submodule (submod: {
options = {
name = mkOption {
description = "The name of this firewall rule";
type = types.str;
readOnly = true;
default = submod.config._module.args.name;
};
contents = mkOption {
description = "A human readable summary of this rule's effects";
type = types.lines;
};
};
}));
};
};
}));
};
type = mkOption {
description = "TODO";
default = "normal";
type = types.enum ["normal" "microvm" "nixos-container"];
};
parent = mkOption {
description = "TODO guests ids (topology.node.<name>.id) ensure exists";
default = [];
type = types.listOf types.str;
};
disks = mkOption {
default = {};
type = types.attrsOf (types.submodule (submod: {
options = {
name = mkOption {
description = "The name of this disk";
default = submod.config._module.args.name;
readOnly = true;
type = types.str;
};
};
}));
};
interfaces = mkOption {
description = "TODO";
default = {};
type = types.attrsOf (types.submodule (submod: {
options = {
name = mkOption {
description = "The name of this interface";
type = types.str;
readOnly = true;
default = submod.config._module.args.name;
};
mac = mkOption {
description = "The MAC address of this interface, if known.";
default = null;
type = types.nullOr types.str;
};
addresses = mkOption {
description = "The configured address(es), or a descriptive string (like DHCP).";
type = types.listOf types.str;
};
network = mkOption {
description = ''
The global name of the attached/spanned network.
If this is given, this interface can be shown in the network graph.
'';
default = null;
type = types.nullOr types.str;
};
};
}));
};
firewallRules = mkOption {
description = "TODO";
default = {};
type = types.attrsOf (types.submodule (submod: {
options = {
name = mkOption {
description = "The name of this firewall rule";
type = types.str;
readOnly = true;
default = submod.config._module.args.name;
};
contents = mkOption {
description = "A human readable summary of this rule's effects";
type = types.lines;
};
};
}));
};
};
}));
};
config = {
# TODO: assertions = []
};
}
config = {
# TODO: assertions = []
};
}