This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

flake: add first networking module iteration

+73
+73
flake.nix
··· 71 71 clan = clan-core.lib.buildClan { 72 72 self = self; 73 73 specialArgs.self = self; 74 + exportsModule = 75 + { lib, ... }: 76 + { 77 + options.networking = { 78 + priority = lib.mkOption { 79 + type = lib.types.int; 80 + default = 1000; 81 + description = '' 82 + priority with which this network should be tried. 83 + higher priority means it gets used earlier in the chain 84 + ''; 85 + }; 86 + technology = lib.mkOption { 87 + # addding more technologies requires code in the clan-cli to handle that technology 88 + # at least for userspace networking 89 + # maybe we can do a fallback mode for vpns where we don't need userspace networking? 90 + type = lib.types.enum [ 91 + "direct" 92 + "tor" 93 + ]; 94 + description = '' 95 + the technology this network uses to connect to the target 96 + This is used for userspace networking with socks proxies. 97 + ''; 98 + }; 99 + # should we call this machines? hosts? 100 + peers = lib.mkOption { 101 + # <name> 102 + type = lib.types.attrsOf ( 103 + lib.types.submodule ( 104 + { name, ... }: 105 + { 106 + options = { 107 + name = lib.mkOption { 108 + type = lib.types.str; 109 + default = name; 110 + }; 111 + host = lib.mkOption { 112 + type = lib.types.attrTag { 113 + plain = lib.mkOption { 114 + type = lib.types.str; 115 + description = '' 116 + a plain value, which can be read directly from the config 117 + ''; 118 + }; 119 + var = lib.mkOption { 120 + type = lib.types.submodule { 121 + options = { 122 + machine = lib.mkOption { 123 + type = lib.types.str; 124 + example = "jon"; 125 + }; 126 + generator = lib.mkOption { 127 + type = lib.types.str; 128 + example = "tor-ssh"; 129 + }; 130 + file = lib.mkOption { 131 + type = lib.types.str; 132 + example = "hostname"; 133 + }; 134 + }; 135 + }; 136 + }; 137 + }; 138 + }; 139 + }; 140 + } 141 + ) 142 + ); 143 + }; 144 + }; 145 + }; 74 146 inventory = { 75 147 meta.name = "superconfig"; 76 148 machines = { ··· 148 220 flake.nixosConfigurations = clan.nixosConfigurations; 149 221 flake.clanInternals = clan.clanInternals; 150 222 flake.darwinConfigurations = clan.darwinConfigurations; 223 + flake.clan = clan; 151 224 perSystem = 152 225 { 153 226 lib,