From d4a932923dff3247389ee547a82eefcca0dda2a9 Mon Sep 17 00:00:00 2001 From: oddlama Date: Fri, 15 Mar 2024 17:21:55 +0100 Subject: [PATCH] feat: update agenix-rekey (prevents frequent store path change which caused unnecessary microvm restarts) --- flake.lock | 6 +- topology/options/devices.nix | 3 +- topology/options/networks.nix | 3 +- topology/options/nodes.nix | 201 +++++++++++++++++----------------- 4 files changed, 108 insertions(+), 105 deletions(-) diff --git a/flake.lock b/flake.lock index 7d9eb95..543ecac 100644 --- a/flake.lock +++ b/flake.lock @@ -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": { diff --git a/topology/options/devices.nix b/topology/options/devices.nix index f2e03a6..6def3d5 100644 --- a/topology/options/devices.nix +++ b/topology/options/devices.nix @@ -2,5 +2,6 @@ f: { lib, config, ... -}: f { +}: +f { } diff --git a/topology/options/networks.nix b/topology/options/networks.nix index f2e03a6..6def3d5 100644 --- a/topology/options/networks.nix +++ b/topology/options/networks.nix @@ -2,5 +2,6 @@ f: { lib, config, ... -}: f { +}: +f { } diff --git a/topology/options/nodes.nix b/topology/options/nodes.nix index 344a884..27fc70f 100644 --- a/topology/options/nodes.nix +++ b/topology/options/nodes.nix @@ -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..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..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 = [] + }; + }