confctl 2.2.2 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. checksums.yaml +4 -4
  2. data/.git-hooks/pre_commit/nixfmt.rb +13 -0
  3. data/.github/workflows/rspec.yml +64 -0
  4. data/.github/workflows/rubocop.yml +27 -0
  5. data/.github/workflows/tests.yml +139 -0
  6. data/.gitignore +12 -7
  7. data/.overcommit.yml +2 -0
  8. data/.rspec +1 -0
  9. data/.rubocop.yml +8 -1
  10. data/AGENTS.md +42 -0
  11. data/CHANGELOG.md +57 -0
  12. data/Gemfile +3 -2
  13. data/Gemfile.lock +198 -0
  14. data/README.md +166 -58
  15. data/Rakefile +5 -0
  16. data/confctl.gemspec +20 -2
  17. data/docs/carrier.md +3 -3
  18. data/docs/flake-inputs.md +159 -0
  19. data/docs/swpins-to-flakes.md +325 -0
  20. data/example/cluster/module-list.nix +2 -1
  21. data/example/cluster/nixos-machine/config.nix +12 -2
  22. data/example/cluster/nixos-machine/hardware.nix +6 -1
  23. data/example/cluster/vpsadminos-container/config.nix +6 -1
  24. data/example/cluster/vpsadminos-container/module.nix +4 -1
  25. data/example/cluster/vpsadminos-machine/config.nix +6 -1
  26. data/example/cluster/vpsadminos-machine/hardware.nix +6 -1
  27. data/example/cluster/vpsadminos-machine/module.nix +5 -2
  28. data/example/cluster/vpsfreecz-vps/config.nix +6 -1
  29. data/example/cluster/vpsfreecz-vps/module.nix +4 -1
  30. data/example/configs/swpins.nix +8 -3
  31. data/example/environments/base.nix +6 -1
  32. data/example/swpins/core.json +35 -0
  33. data/example-flake/.gitignore +2 -0
  34. data/example-flake/README.md +38 -0
  35. data/example-flake/cluster/cluster.nix +5 -0
  36. data/example-flake/cluster/module-list.nix +4 -0
  37. data/example-flake/cluster/nested/nixos-machine/config.nix +25 -0
  38. data/example-flake/cluster/nested/nixos-machine/hardware.nix +9 -0
  39. data/example-flake/cluster/nested/nixos-machine/module.nix +8 -0
  40. data/example-flake/cluster/nixos-machine/config.nix +25 -0
  41. data/example-flake/cluster/nixos-machine/hardware.nix +9 -0
  42. data/example-flake/cluster/nixos-machine/module.nix +8 -0
  43. data/example-flake/cluster/vpsadminos-container/config.nix +28 -0
  44. data/example-flake/cluster/vpsadminos-container/module.nix +8 -0
  45. data/example-flake/cluster/vpsadminos-machine/config.nix +27 -0
  46. data/example-flake/cluster/vpsadminos-machine/hardware.nix +9 -0
  47. data/example-flake/cluster/vpsadminos-machine/module.nix +8 -0
  48. data/example-flake/cluster/vpsfreecz-vps/config.nix +31 -0
  49. data/example-flake/cluster/vpsfreecz-vps/module.nix +8 -0
  50. data/example-flake/configs/confctl.nix +10 -0
  51. data/example-flake/data/default.nix +5 -0
  52. data/example-flake/data/ssh-keys.nix +7 -0
  53. data/example-flake/environments/base.nix +18 -0
  54. data/example-flake/flake.lock +75 -0
  55. data/example-flake/flake.nix +36 -0
  56. data/example-flake/modules/module-list.nix +13 -0
  57. data/example-flake/shell.nix +11 -0
  58. data/flake.lock +159 -0
  59. data/flake.nix +189 -0
  60. data/gemset.nix +1022 -0
  61. data/lib/confctl/cli/app.rb +145 -0
  62. data/lib/confctl/cli/attr_filters.rb +1 -1
  63. data/lib/confctl/cli/cluster.rb +681 -108
  64. data/lib/confctl/cli/command.rb +24 -2
  65. data/lib/confctl/cli/configuration.rb +171 -106
  66. data/lib/confctl/cli/generation.rb +65 -1
  67. data/lib/confctl/cli/inputs/channels.rb +190 -0
  68. data/lib/confctl/cli/inputs/machines.rb +83 -0
  69. data/lib/confctl/cli/inputs/root.rb +101 -0
  70. data/lib/confctl/cli/inputs.rb +5 -0
  71. data/lib/confctl/cli/log_view.rb +21 -10
  72. data/lib/confctl/cli/migrate/swpins_to_flakes.rb +866 -0
  73. data/lib/confctl/cli/migrate.rb +5 -0
  74. data/lib/confctl/cli/output_formatter.rb +5 -7
  75. data/lib/confctl/cli/swpins/base.rb +9 -0
  76. data/lib/confctl/cli/swpins/channel.rb +2 -5
  77. data/lib/confctl/cli/swpins/cluster.rb +2 -5
  78. data/lib/confctl/cli/swpins/core.rb +2 -5
  79. data/lib/confctl/config_type.rb +7 -0
  80. data/lib/confctl/flake_lock.rb +78 -0
  81. data/lib/confctl/flake_lock_diff.rb +36 -0
  82. data/lib/confctl/generation/build.rb +131 -24
  83. data/lib/confctl/generation/build_list.rb +4 -3
  84. data/lib/confctl/generation/unified.rb +14 -1
  85. data/lib/confctl/git_repo_mirror.rb +2 -2
  86. data/lib/confctl/health_checks/run_command.rb +3 -2
  87. data/lib/confctl/health_checks/systemd/properties.rb +1 -1
  88. data/lib/confctl/health_checks/systemd/property_list.rb +2 -2
  89. data/lib/confctl/inputs/commit_message.rb +125 -0
  90. data/lib/confctl/inputs/git_commit.rb +17 -0
  91. data/lib/confctl/inputs/nix_output_guard.rb +37 -0
  92. data/lib/confctl/inputs/setter.rb +179 -0
  93. data/lib/confctl/inputs/updater.rb +76 -0
  94. data/lib/confctl/inputs.rb +5 -0
  95. data/lib/confctl/inputs_info.rb +50 -0
  96. data/lib/confctl/line_buffer.rb +1 -1
  97. data/lib/confctl/machine.rb +18 -3
  98. data/lib/confctl/machine_control.rb +8 -2
  99. data/lib/confctl/machine_list.rb +2 -2
  100. data/lib/confctl/machine_status.rb +63 -20
  101. data/lib/confctl/nix/args.rb +48 -0
  102. data/lib/confctl/nix.rb +30 -437
  103. data/lib/confctl/nix_build_flake.rb +95 -0
  104. data/lib/confctl/nix_copy.rb +14 -2
  105. data/lib/confctl/nix_flake.rb +449 -0
  106. data/lib/confctl/nix_format.rb +3 -3
  107. data/lib/confctl/nix_legacy.rb +467 -0
  108. data/lib/confctl/swpins/change_set.rb +29 -3
  109. data/lib/confctl/swpins/specs/base.rb +2 -2
  110. data/lib/confctl/ui.rb +19 -0
  111. data/lib/confctl/version.rb +1 -1
  112. data/man/index.html +11 -0
  113. data/man/man8/confctl-options.nix.8.html +113 -0
  114. data/man/man8/confctl.8 +152 -21
  115. data/man/man8/confctl.8.html +355 -0
  116. data/man/man8/confctl.8.md +148 -17
  117. data/man/style.css +301 -0
  118. data/nix/evaluator.nix +94 -69
  119. data/nix/flake/mk-confctl-devshell.nix +85 -0
  120. data/nix/flake/mk-confctl-outputs.nix +522 -0
  121. data/nix/flake/mk-config-devshell.nix +168 -0
  122. data/nix/lib/default.nix +118 -65
  123. data/nix/lib/machine/default.nix +65 -45
  124. data/nix/lib/machine/info.nix +16 -5
  125. data/nix/lib/swpins/eval.nix +42 -29
  126. data/nix/lib/swpins/options.nix +6 -2
  127. data/nix/machines.nix +23 -15
  128. data/nix/modules/cluster/default.nix +104 -41
  129. data/nix/modules/confctl/carrier/base.nix +11 -4
  130. data/nix/modules/confctl/carrier/carrier-env.rb +2 -2
  131. data/nix/modules/confctl/carrier/netboot/build-netboot-server.rb +50 -16
  132. data/nix/modules/confctl/carrier/netboot/nixos.nix +56 -24
  133. data/nix/modules/confctl/configuration-info.nix +17 -0
  134. data/nix/modules/confctl/generations.nix +2 -2
  135. data/nix/modules/confctl/host.nix +13 -0
  136. data/nix/modules/confctl/inputs-info.nix +21 -0
  137. data/nix/modules/confctl/kexec-netboot/default.nix +13 -6
  138. data/nix/modules/confctl/kexec-netboot/kexec-netboot.8.adoc +3 -0
  139. data/nix/modules/confctl/kexec-netboot/kexec-netboot.rb +25 -16
  140. data/nix/modules/confctl/nix.nix +31 -1
  141. data/nix/modules/confctl/swpins.nix +13 -6
  142. data/nix/modules/module-list.nix +4 -2
  143. data/nix/modules/system-list.nix +4 -1
  144. data/nix/package.nix +37 -0
  145. data/shell.nix +39 -8
  146. data/skills/confctl-configuration-update/SKILL.md +228 -0
  147. data/skills/confctl-configuration-update/agents/openai.yaml +4 -0
  148. data/skills/confctl-release/SKILL.md +102 -0
  149. data/skills/confctl-release/agents/openai.yaml +4 -0
  150. data/spec/confctl/cli/cluster_health_check_spec.rb +43 -0
  151. data/spec/confctl/cli/cluster_skip_current_deploy_spec.rb +157 -0
  152. data/spec/confctl/cli/cluster_status_flake_spec.rb +83 -0
  153. data/spec/confctl/cli/inputs_set_output_spec.rb +70 -0
  154. data/spec/confctl/configuration_spec.rb +45 -0
  155. data/spec/confctl/inputs_spec.rb +104 -0
  156. data/spec/confctl/machine_control_spec.rb +112 -0
  157. data/spec/confctl/machine_list_spec.rb +47 -0
  158. data/spec/confctl/nix_flake_spec.rb +41 -0
  159. data/spec/confctl/swpins_spec.rb +106 -0
  160. data/spec/generation/build_modes_spec.rb +132 -0
  161. data/spec/inputs/commit_message_spec.rb +205 -0
  162. data/spec/inputs/nix_cached_fallback_spec.rb +50 -0
  163. data/spec/inputs/nix_output_guard_spec.rb +45 -0
  164. data/spec/spec_helper.rb +12 -0
  165. data/spec/support/cli_helper.rb +57 -0
  166. data/test-runner.sh +7 -0
  167. data/tests/all-tests.nix +30 -0
  168. data/tests/make-test.nix +15 -0
  169. data/tests/runner/extensions/confctl_helpers.rb +238 -0
  170. data/tests/runner/extensions/hostfwd_ports.rb +41 -0
  171. data/tests/suite/auto_rollback.nix +344 -0
  172. data/tests/suite/carrier/deploy.nix +751 -0
  173. data/tests/suite/carrier/netboot.nix +849 -0
  174. data/tests/suite/deploy/base.nix +806 -0
  175. data/tests/suite/deploy/flakes.nix +1 -0
  176. data/tests/suite/deploy/swpins.nix +1 -0
  177. metadata +104 -4
  178. data/nix/modules/confctl/overlays.nix +0 -15
@@ -0,0 +1,355 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="generator" content="md2man 5.1.2 https://github.com/sunaku/md2man" />
6
+ <title>confctl(8) &mdash; Nix deployment management tool</title>
7
+ <link rel="stylesheet" href="../style.css"/>
8
+ <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
9
+ </head>
10
+ <body><div class="navbar"><div class="navbar-inner"><span class="brand"><a href="../index.html#man8">man8</a>/confctl.8</span></div></div><div class="container-fluid"><h1 id="confctl-8-2020-11-01-master"><span class="md2man-title">confctl</span> <span class="md2man-section">8</span> <span class="md2man-date">2020-11-01</span> <span class="md2man-source">master</span><a name="confctl-8-2020-11-01-master" href="#confctl-8-2020-11-01-master" class="md2man-permalink" title="permalink"></a></h1><h2 id="name">NAME<a name="name" href="#name" class="md2man-permalink" title="permalink"></a></h2><p><code>confctl</code> - Nix deployment management tool</p><h2 id="synopsis">SYNOPSIS<a name="synopsis" href="#synopsis" class="md2man-permalink" title="permalink"></a></h2><p><code>confctl</code> [<em>global options</em>] <em>command</em> [<em>command options</em>] [<em>arguments...</em>]</p><h2 id="description">DESCRIPTION<a name="description" href="#description" class="md2man-permalink" title="permalink"></a></h2><p><code>confctl</code> is a Nix deployment configuration management tool. It can be used to
11
+ build and deploy <em>NixOS</em> and <em>vpsAdminOS</em> machines.</p><h2 id="software-pins">SOFTWARE PINS<a name="software-pins" href="#software-pins" class="md2man-permalink" title="permalink"></a></h2><p>Each machine managed by <code>confctl</code> uses predefined software packages
12
+ like <code>nixpkgs</code>, <code>vpsadminos</code> and possibly other components. These packages
13
+ are pinned to particular versions, e.g. specific git commits.</p><p>Software pins are defined in the Nix configuration and then prefetched using
14
+ <code>confctl</code>. Selected software pins are added to environment variable <code>NIX_PATH</code>
15
+ for <code>nix-build</code> and can also be read by <code>Nix</code> while building machines.</p><p>Software pins can be defined using channels or on specific machines.
16
+ The advantage of using channels is that changing a pin in a channel changes
17
+ also all machines that use the channel. Channels are defined in file
18
+ <code>configs/swpins.nix</code> using option <code>confctl.swpins.channels</code> (legacy, non-flake
19
+ configurations).</p><p>In flake-based configurations (using <code>confctl.lib.mkConfctlOutputs</code>), channel names
20
+ are provided by the flake <code>channels</code> mapping and machines select them via
21
+ <code>cluster.&lt;name&gt;.inputs.channels</code>. Per-machine role-to-input overrides are configured
22
+ via <code>cluster.&lt;name&gt;.inputs.overrides</code>. <code>cluster.&lt;name&gt;.swpins.*</code> is not used in flake
23
+ mode; manage <code>flake.lock</code> using the <code>confctl inputs</code> command family.</p><p>Software pins declared in the Nix configuration have to be prefetched before
24
+ they can be used to build machines. See the <code>confctl swpins</code> command family
25
+ for more information.</p><h2 id="patterns">PATTERNS<a name="patterns" href="#patterns" class="md2man-permalink" title="permalink"></a></h2><p><code>confctl</code> commands accept patterns instead of names. These patterns work
26
+ similarly to shell patterns, see
27
+ <a href="http://ruby-doc.org/core/File.html#method-c-fnmatch-3F">http://ruby-doc.org/core/File.html#method-c-fnmatch-3F</a> for more
28
+ information.</p><h2 id="generation-offsets">GENERATION OFFSETS<a name="generation-offsets" href="#generation-offsets" class="md2man-permalink" title="permalink"></a></h2><p>Generations can be selected by <em>offset</em>. <code>0</code> is the current (last) generation.
29
+ <code>1</code> is the first (oldest) generation, <code>2</code> the second generation, etc. <code>-1</code> is
30
+ the generation before last and so on.</p><h2 id="global-options">GLOBAL OPTIONS<a name="global-options" href="#global-options" class="md2man-permalink" title="permalink"></a></h2><dl><dt><code>-c</code>, <code>--color</code> <code>always</code>|<code>never</code>|<code>auto</code></dt><dd>Set output color mode. Defaults to <code>auto</code>, which enables colors when
31
+ the standard output is connected to a terminal.</dd></dl><h2 id="commands">COMMANDS<a name="commands" href="#commands" class="md2man-permalink" title="permalink"></a></h2><dl><dt><code>confctl init</code> [<em>options</em>]</dt><dd>Create a new configuration in the current directory. The current directory
32
+ is set up to be used with <code>confctl</code>. Defaults to a flake-based configuration.</dd></dl><p> <code>--swpins</code>, <code>--legacy</code>
33
+ Create a legacy swpins-based (non-flake) configuration.</p><dl><dt><code>confctl add</code> <em>name</em></dt><dd>Add new machine to the configuration.</dd></dl><dl><dt><code>confctl rename</code> <em>old-name</em> <em>new-name</em></dt><dd>Rename machine from the configuration.</dd></dl><dl><dt><code>confctl rediscover</code></dt><dd>Auto-discover machines within the <code>cluster/</code> directory and generate a list
34
+ of their modules in <code>cluster/cluster.nix</code>.</dd></dl><dl><dt><code>confctl ls</code> [<em>options</em>] [<em>machine-pattern</em>]</dt><dd>List matching machines available for deployment.</dd></dl><p> <code>--show-trace</code>
35
+ Enable traces in Nix.</p><p> <code>--managed</code> <code>y</code>|<code>yes</code>|<code>n</code>|<code>no</code>|<code>a</code>|<code>all</code>
36
+ The configuration can contain machines which are not managed by confctl
37
+ and are there just for reference. This option determines what kind of
38
+ machines should be listed.</p><p> <code>-L</code>, <code>--list</code>
39
+ List possible attributes that can be used with options <code>--output</code>
40
+ or <code>--attr</code> and exit.</p><p> <code>-o</code>, <code>--output</code> <em>attributes</em>
41
+ Comma-separated list of attributes to output. Defaults to the value
42
+ of option <code>confctl.list.columns</code>.</p><p> <code>-H</code>, <code>--hide-header</code>
43
+ Do not print the line with column labels.</p><p> <code>-a</code>, <code>--attr</code> <em>attribute</em><code>=</code><em>value</em> | <em>attribute</em><code>!=</code><em>value</em>
44
+ Filter machines by selected attribute, which is either tested for
45
+ equality or inequality. Any attribute from configuration module
46
+ <code>cluster.&lt;name&gt;</code> can be tested.</p><p> <code>-t</code>, <code>--tag</code> <em>tag</em>|<code>^</code><em>tag</em>
47
+ Filter machines that have <em>tag</em> set. If the tag begins with <code>^</code>, then
48
+ filter machines that do not have <em>tag</em> set.</p><dl><dt><code>confctl build</code> [<em>options</em>] [<em>machine-pattern</em>]</dt><dd>Build matching machines. The result of a build is one generation for each
49
+ built machine. Subsequent builds either return an existing generation if there
50
+ had been no changes for a machine or a new generation is created. Built
51
+ generations can be managed using <code>confctl generation</code> command family.</dd></dl><p> <code>--show-trace</code>
52
+ Enable traces in Nix.</p><p> <code>-a</code>, <code>--attr</code> <em>attribute</em><code>=</code><em>value</em> | <em>attribute</em><code>!=</code><em>value</em>
53
+ Filter machines by selected attribute, which is either tested for
54
+ equality or inequality. Any attribute from configuration module
55
+ <code>cluster.&lt;name&gt;</code> can be tested.</p><p> <code>-t</code>, <code>--tag</code> <em>tag</em>|<code>^</code><em>tag</em>
56
+ Filter machines that have <em>tag</em> set. If the tag begins with <code>^</code>, then
57
+ filter machines that do not have <em>tag</em> set.</p><p> <code>-y</code>, <code>--yes</code>
58
+ Do not ask for confirmation on standard input, assume the answer is yes.</p><p> <code>-j</code>, <code>--max-jobs</code> <em>number</em>
59
+ Maximum number of build jobs, passed to <code>nix-build</code>. See man <a class="md2man-reference">nix-build(1)</a>.</p><p> <code>--cores</code> <em>number</em>
60
+ Number of CPU cores to use, passed to <code>nix-build</code>. See man <a class="md2man-reference">nix-build(1)</a>.</p><dl><dt><code>confctl deploy</code> [<em>options</em>] [<em>machine-pattern</em> [<code>boot</code>|<code>switch</code>|<code>test</code>|<code>dry-activate</code>]]</dt><dd>Deploy either a new or an existing build generation to matching machines.
61
+ Machines that already use the target generation are skipped before copy,
62
+ activation, reboot and health checks. For carried machines, the
63
+ carrier-managed profile is used as the deployed state.</dd></dl><dl><dd><em>switch-action</em> is the argument to <code>switch-to-configuration</code> called on
64
+ the target machine. The default action is <code>switch</code>.</dd></dl><p> <code>--show-trace</code>
65
+ Enable traces in Nix.</p><p> <code>-a</code>, <code>--attr</code> <em>attribute</em><code>=</code><em>value</em> | <em>attribute</em><code>!=</code><em>value</em>
66
+ Filter machines by selected attribute, which is either tested for
67
+ equality or inequality. Any attribute from configuration module
68
+ <code>cluster.&lt;name&gt;</code> can be tested.</p><p> <code>-t</code>, <code>--tag</code> <em>tag</em>|<code>^</code><em>tag</em>
69
+ Filter machines that have <em>tag</em> set. If the tag begins with <code>^</code>, then
70
+ filter machines that do not have <em>tag</em> set.</p><p> <code>-y</code>, <code>--yes</code>
71
+ Do not ask for confirmation on standard input, assume the answer is yes.</p><p> <code>-g</code>, <code>--generation</code> <em>generation</em>|<em>offset</em>|<code>current</code>
72
+ Do not build a new generation, but deploy an existing generation.</p><p> <code>--outdated</code>
73
+ Run <code>confctl status</code> and deploy only outdated machines. <code>confctl</code> will
74
+ first build machines described by <em>machine-pattern</em> and then check
75
+ their status.</p><p> <code>--outdated-swpins</code>
76
+ Run <code>confctl status -g none</code> and deploy only machines that have outdated
77
+ software pins.</p><p> <code>-i</code>, <code>--interactive</code>
78
+ Deploy machines one by one while asking for confirmation for activation.</p><p> <code>--dry-activate-first</code>
79
+ After the new system is copied to the target machine, try to switch the
80
+ configuration using <em>dry-activate</em> action to see what would happen before
81
+ the real switch.</p><p> <code>--one-by-one</code>
82
+ Instead of copying the systems to all machines in bulk before activations,
83
+ copy and deploy machines one by one.</p><p> <code>--max-concurrent-copy</code> <em>n</em>
84
+ Use at most <em>n</em> concurrent nix-copy-closure processes to deploy closures
85
+ to the target machines. Defaults to <code>5</code>.</p><p> <code>--copy-only</code>
86
+ Do not activate the copied closures.</p><p> <code>--enable-auto-rollback</code>
87
+ Enable auto-rollback on deploy even if it is not enabled in machine configuration.</p><p> <code>--disable-auto-rollback</code>
88
+ Disable auto-rollback on deploy if it is enabled in machine configuration.</p><p> <code>--reboot</code>
89
+ Applicable only when <em>switch-action</em> is <code>boot</code>. Reboot the machine after the
90
+ configuration is activated.</p><p> <code>--wait-online</code> [<em>seconds</em> | <code>wait</code> | <code>nowait</code>]
91
+ Determines whether to wait for the machines to come back online
92
+ if <code>--reboot</code> is used. <code>confctl</code> will wait for <code>600 seconds</code> by default.</p><p> <code>-j</code>, <code>--max-jobs</code> <em>number</em>
93
+ Maximum number of build jobs, passed to <code>nix-build</code>. See man <a class="md2man-reference">nix-build(1)</a>.</p><p> <code>--cores</code> <em>number</em>
94
+ Number of CPU cores to use, passed to <code>nix-build</code>. See man <a class="md2man-reference">nix-build(1)</a>.</p><p> <code>--no-health-checks</code>
95
+ Do not run configured health checks. Health checks are run by default
96
+ when <em>switch-action</em> is <code>switch</code>, <code>test</code> or <code>boot</code> with <code>--reboot</code>.</p><p> <code>--keep-going</code>
97
+ Do not abort when health checks fail.</p><dl><dt><code>confctl health-check</code> [<em>options</em>] [<em>machine-pattern</em>]</dt><dd>Run health checks on all or selected machines.</dd></dl><p> <code>-a</code>, <code>--attr</code> <em>attribute</em><code>=</code><em>value</em> | <em>attribute</em><code>!=</code><em>value</em>
98
+ Filter machines by selected attribute, which is either tested for
99
+ equality or inequality. Any attribute from configuration module
100
+ <code>cluster.&lt;name&gt;</code> can be tested.</p><p> <code>-t</code>, <code>--tag</code> <em>tag</em>|<code>^</code><em>tag</em>
101
+ Filter machines that have <em>tag</em> set. If the tag begins with <code>^</code>, then
102
+ filter machines that do not have <em>tag</em> set.</p><p> <code>-y</code>, <code>--yes</code>
103
+ Do not ask for confirmation on standard input, assume the answer is yes.</p><p> <code>-j</code>, <code>--max-jobs</code> <em>number</em>
104
+ Maximum number of check jobs, defaults to <code>5</code>.</p><dl><dt><code>confctl status</code> [<em>options</em>] [<em>machine-pattern</em>]</dt><dd>Probe managed machines and determine their status.</dd></dl><p> <code>-a</code>, <code>--attr</code> <em>attribute</em><code>=</code><em>value</em> | <em>attribute</em><code>!=</code><em>value</em>
105
+ Filter machines by selected attribute, which is either tested for
106
+ equality or inequality. Any attribute from configuration module
107
+ <code>cluster.&lt;name&gt;</code> can be tested.</p><p> <code>-t</code>, <code>--tag</code> <em>tag</em>|<code>^</code><em>tag</em>
108
+ Filter machines that have <em>tag</em> set. If the tag begins with <code>^</code>, then
109
+ filter machines that do not have <em>tag</em> set.</p><p> <code>-y</code>, <code>--yes</code>
110
+ Do not ask for confirmation on standard input, assume the answer is yes.</p><p> <code>-g</code>, <code>--generation</code> <em>generation</em>|<em>offset</em>|<code>current</code>|<code>none</code>
111
+ Check status against a selected generation instead of a new build. If set
112
+ to <code>none</code>, only the currently configured software pins are checked and not
113
+ the system version itself.</p><p> <code>-j</code>, <code>--max-jobs</code> <em>number</em>
114
+ Maximum number of build jobs, passed to <code>nix-build</code>. See man <a class="md2man-reference">nix-build(1)</a>.</p><p> <code>--cores</code> <em>number</em>
115
+ Number of CPU cores to use, passed to <code>nix-build</code>. See man <a class="md2man-reference">nix-build(1)</a>.</p><dl><dt><code>confctl changelog</code> [<em>options</em>] [<em>machine-pattern</em> [<em>sw-pattern</em>]]</dt><dd>Show differences in deployed and configured software pins. For git software
116
+ pins, it&#39;s a git log.</dd></dl><dl><dd>By default, <code>confctl</code> assumes that the configuration contains upgraded
117
+ software pins, i.e. that the configuration is equal to or ahead of the deployed
118
+ machines. <code>confctl changelog</code> then prints a lists of changes that are missing
119
+ from the deployed machines. Too see a changelog for downgrade, use option
120
+ <code>-d</code>, <code>--downgrade</code>.</dd></dl><dl><dd><code>confctl changelog</code> will not show changes to the deployment configuration
121
+ itself, it works only on software pins.</dd></dl><p> <code>-a</code>, <code>--attr</code> <em>attribute</em><code>=</code><em>value</em> | <em>attribute</em><code>!=</code><em>value</em>
122
+ Filter machines by selected attribute, which is either tested for
123
+ equality or inequality. Any attribute from configuration module
124
+ <code>cluster.&lt;name&gt;</code> can be tested.</p><p> <code>-t</code>, <code>--tag</code> <em>tag</em>|<code>^</code><em>tag</em>
125
+ Filter machines that have <em>tag</em> set. If the tag begins with <code>^</code>, then
126
+ filter machines that do not have <em>tag</em> set.</p><p> <code>-y</code>, <code>--yes</code>
127
+ Do not ask for confirmation on standard input, assume the answer is yes.</p><p> <code>-g</code>, <code>--generation</code> <em>generation</em>|<em>offset</em>|<code>current</code>
128
+ Show changelog against software pins from a selected generation instead
129
+ of the current configuration.</p><p> <code>-d</code>, <code>--downgrade</code>
130
+ Use when the configuration has older software pins than deployed machines,
131
+ e.g. when doing a downgrade. Show a list of changes that are deployed
132
+ on the machines and are missing in the configured software pins.</p><p> <code>-v</code>, <code>--verbose</code>
133
+ Show full-length changelog descriptions.</p><p> <code>-p</code>, <code>--patch</code>
134
+ Show patches.</p><p> <code>-j</code>, <code>--max-jobs</code> <em>number</em>
135
+ Maximum number of build jobs, passed to <code>nix-build</code>. See man <a class="md2man-reference">nix-build(1)</a>.</p><p> <code>--cores</code> <em>number</em>
136
+ Number of CPU cores to use, passed to <code>nix-build</code>. See man <a class="md2man-reference">nix-build(1)</a>.</p><dl><dt><code>confctl diff</code> [<em>options</em>] [<em>machine-pattern</em> [<em>sw-pattern</em>]]</dt><dd>Show differences in deployed and configured software pins. For git software
137
+ pins, it&#39;s a git diff.</dd></dl><dl><dd>By default, <code>confctl</code> assumes that the configuration contains upgraded
138
+ software pins, i.e. that the configuration is equal to or ahead of the deployed
139
+ machines. <code>confctl diff</code> then considers changes that are missing from the
140
+ deployed machines. Too see a diff for downgrade, use option
141
+ <code>-d</code>, <code>--downgrade</code>.</dd></dl><dl><dd><code>confctl diff</code> will not show changes to the deployment configuration
142
+ itself, it works only on software pins.</dd></dl><p> <code>-a</code>, <code>--attr</code> <em>attribute</em><code>=</code><em>value</em> | <em>attribute</em><code>!=</code><em>value</em>
143
+ Filter machines by selected attribute, which is either tested for
144
+ equality or inequality. Any attribute from configuration module
145
+ <code>cluster.&lt;name&gt;</code> can be tested.</p><p> <code>-t</code>, <code>--tag</code> <em>tag</em>|<code>^</code><em>tag</em>
146
+ Filter machines that have <em>tag</em> set. If the tag begins with <code>^</code>, then
147
+ filter machines that do not have <em>tag</em> set.</p><p> <code>-y</code>, <code>--yes</code>
148
+ Do not ask for confirmation on standard input, assume the answer is yes.</p><p> <code>-g</code>, <code>--generation</code> <em>generation</em>|<em>offset</em>|<code>current</code>
149
+ Show diff against software pins from a selected generation instead
150
+ of the current configuration.</p><p> <code>-d</code>, <code>--downgrade</code>
151
+ Use when the configuration has older software pins than deployed machines,
152
+ e.g. when doing a downgrade. Show a list of changes that are deployed
153
+ on the machines and are missing in the configured software pins.</p><p> <code>-j</code>, <code>--max-jobs</code> <em>number</em>
154
+ Maximum number of build jobs, passed to <code>nix-build</code>. See man <a class="md2man-reference">nix-build(1)</a>.</p><p> <code>--cores</code> <em>number</em>
155
+ Number of CPU cores to use, passed to <code>nix-build</code>. See man <a class="md2man-reference">nix-build(1)</a>.</p><dl><dt><code>confctl test-connection</code> [<em>options</em>] [<em>machine-pattern</em>]</dt><dd>Try to open a SSH connection to the selected machines. This command can be
156
+ used to confirm SSH host keys of the selected machines.</dd></dl><p> <code>--managed</code> <code>y</code>|<code>yes</code>|<code>n</code>|<code>no</code>|<code>a</code>|<code>all</code>
157
+ The configuration can contain machines which are not managed by confctl
158
+ and are there just for reference. This option determines what kind of
159
+ machines should be selected.</p><p> <code>-a</code>, <code>--attr</code> <em>attribute</em><code>=</code><em>value</em> | <em>attribute</em><code>!=</code><em>value</em>
160
+ Filter machines by selected attribute, which is either tested for
161
+ equality or inequality. Any attribute from configuration module
162
+ <code>cluster.&lt;name&gt;</code> can be tested.</p><p> <code>-t</code>, <code>--tag</code> <em>tag</em>|<code>^</code><em>tag</em>
163
+ Filter machines that have <em>tag</em> set. If the tag begins with <code>^</code>, then
164
+ filter machines that do not have <em>tag</em> set.</p><p> <code>-y</code>, <code>--yes</code>
165
+ Do not ask for confirmation on standard input, assume the answer is yes.</p><dl><dt><code>confctl ssh</code> [<em>options</em>] [<em>machine-pattern</em> [<em>command</em> [<em>arguments...</em>]]]</dt><dd>Run command over SSH on the selected machines. If <em>machine-pattern</em> matches
166
+ only one machine and no <em>command</em> is provided, an interactive shell is started.</dd></dl><p> <code>--managed</code> <code>y</code>|<code>yes</code>|<code>n</code>|<code>no</code>|<code>a</code>|<code>all</code>
167
+ The configuration can contain machines which are not managed by confctl
168
+ and are there just for reference. This option determines what kind of
169
+ machines should be selected.</p><p> <code>-a</code>, <code>--attr</code> <em>attribute</em><code>=</code><em>value</em> | <em>attribute</em><code>!=</code><em>value</em>
170
+ Filter machines by selected attribute, which is either tested for
171
+ equality or inequality. Any attribute from configuration module
172
+ <code>cluster.&lt;name&gt;</code> can be tested.</p><p> <code>-t</code>, <code>--tag</code> <em>tag</em>|<code>^</code><em>tag</em>
173
+ Filter machines that have <em>tag</em> set. If the tag begins with <code>^</code>, then
174
+ filter machines that do not have <em>tag</em> set.</p><p> <code>-y</code>, <code>--yes</code>
175
+ Do not ask for confirmation on standard input, assume the answer is yes.</p><p> <code>-p</code>, <code>--parallel</code>
176
+ Run the command on all machines in parallel. By default, the command is run
177
+ on machines sequentially.</p><p> <code>-g</code>, <code>--aggregate</code>
178
+ If the command has the same output and exit status on a group of one or more
179
+ machines, print it just once for the group. This option suppresses output
180
+ until the command has been run on all machines.</p><p> <code>-i</code>, <code>--input-string</code> <em>data</em>
181
+ Data passed to the executed command on standard input.</p><p> <code>-f</code>, <code>--input-file</code> <em>file</em>
182
+ Pass <em>file</em> as standard input to the executed command.</p><dl><dt><code>confctl cssh</code> [<em>options</em>] [<em>machine-pattern</em>]</dt><dd>Open ClusterSSH to selected or all machines.</dd></dl><p> <code>--managed</code> <code>y</code>|<code>yes</code>|<code>n</code>|<code>no</code>|<code>a</code>|<code>all</code>
183
+ The configuration can contain machines which are not managed by confctl
184
+ and are there just for reference. This option determines what kind of
185
+ machines should be selected.</p><p> <code>-a</code>, <code>--attr</code> <em>attribute</em><code>=</code><em>value</em> | <em>attribute</em><code>!=</code><em>value</em>
186
+ Filter machines by selected attribute, which is either tested for
187
+ equality or inequality. Any attribute from configuration module
188
+ <code>cluster.&lt;name&gt;</code> can be tested.</p><p> <code>-t</code>, <code>--tag</code> <em>tag</em>|<code>^</code><em>tag</em>
189
+ Filter machines that have <em>tag</em> set. If the tag begins with <code>^</code>, then
190
+ filter machines that do not have <em>tag</em> set.</p><p> <code>-y</code>, <code>--yes</code>
191
+ Do not ask for confirmation on standard input, assume the answer is yes.</p><dl><dt><code>confctl generation ls</code> [<em>machine-pattern</em> [<em>generation-pattern</em>]|<em>n</em><code>d</code>|<em>offset</em>|<code>old</code>]</dt><dd>List all or selected generations. By default only local build generations
192
+ are listed.</dd></dl><p> <code>-a</code>, <code>--attr</code> <em>attribute</em><code>=</code><em>value</em> | <em>attribute</em><code>!=</code><em>value</em>
193
+ Filter machines by selected attribute, which is either tested for
194
+ equality or inequality. Any attribute from configuration module
195
+ <code>cluster.&lt;name&gt;</code> can be tested.</p><p> <code>-t</code>, <code>--tag</code> <em>tag</em>|<code>^</code><em>tag</em>
196
+ Filter machines that have <em>tag</em> set. If the tag begins with <code>^</code>, then
197
+ filter machines that do not have <em>tag</em> set.</p><p> <code>-l</code>, <code>--local</code>
198
+ List build generations.</p><p> <code>-r</code>, <code>--remote</code>
199
+ List remote generations found on deployed machines.</p><dl><dt><code>confctl generation rm</code> [<em>machine-pattern</em> [<em>generation-pattern</em>|<em>n</em><code>d</code>|<em>offset</em>|<code>old</code>]]</dt><dd>Remove selected generations.</dd></dl><dl><dd><em>n</em><code>d</code> will remove generations older than <em>n</em> days.</dd></dl><dl><dd><em>offset</em> will remove generations at a specific offset, see <code>GENERATION OFFSETS</code>.</dd></dl><dl><dd><code>old</code> will remove all generations except the current one, i.e. the one that
200
+ was built by <code>confctl build</code> the last.</dd></dl><dl><dd>By default, only local build generations are considered.</dd></dl><p> <code>-a</code>, <code>--attr</code> <em>attribute</em><code>=</code><em>value</em> | <em>attribute</em><code>!=</code><em>value</em>
201
+ Filter machines by selected attribute, which is either tested for
202
+ equality or inequality. Any attribute from configuration module
203
+ <code>cluster.&lt;name&gt;</code> can be tested.</p><p> <code>-t</code>, <code>--tag</code> <em>tag</em>|<code>^</code><em>tag</em>
204
+ Filter machines that have <em>tag</em> set. If the tag begins with <code>^</code>, then
205
+ filter machines that do not have <em>tag</em> set.</p><p> <code>-y</code>, <code>--yes</code>
206
+ Do not ask for confirmation on standard input, assume the answer is yes.</p><p> <code>-l</code>, <code>--local</code>
207
+ Consider local build generations.</p><p> <code>-r</code>, <code>--remote</code>
208
+ Consider generations found on deployed machines.</p><p> <code>--[no-]gc</code>, <code>--[no-]collect-garbage</code>
209
+ Run <code>nix-collect-garbage</code> to delete unreachable store paths from deployed
210
+ machines where generations were removed. Enabled by default.</p><p> <code>--max-concurrent-gc</code> <em>n</em>
211
+ Run <code>nix-collect-garbage</code> at most on <em>n</em> machines at the same time.
212
+ Defaults to <code>5</code>.</p><dl><dt><code>confctl generation rotate</code> [<em>options</em>] [<em>machine-pattern</em>]</dt><dd>Delete old build generations of all or selected machines. Old generations are
213
+ deleted based on rules configured in <code>configs/confctl.nix</code>.</dd></dl><dl><dd>This command deletes old build generations from <code>confctl</code>, and given machine
214
+ configuration also runs <code>nix-collect-garbage</code>.</dd></dl><p> <code>-a</code>, <code>--attr</code> <em>attribute</em><code>=</code><em>value</em> | <em>attribute</em><code>!=</code><em>value</em>
215
+ Filter machines by selected attribute, which is either tested for
216
+ equality or inequality. Any attribute from configuration module
217
+ <code>cluster.&lt;name&gt;</code> can be tested.</p><p> <code>-t</code>, <code>--tag</code> <em>tag</em>|<code>^</code><em>tag</em>
218
+ Filter machines that have <em>tag</em> set. If the tag begins with <code>^</code>, then
219
+ filter machines that do not have <em>tag</em> set.</p><p> <code>-y</code>, <code>--yes</code>
220
+ Do not ask for confirmation on standard input, assume the answer is yes.</p><p> <code>-l</code>, <code>--local</code>
221
+ Consider local build generations.</p><p> <code>-r</code>, <code>--remote</code>
222
+ Consider generations found on deployed machines.</p><p> <code>--no-gc</code>, <code>--no-collect-garbage</code>
223
+ Do not run the garbage collector even if it is enabled in configuration.</p><p> <code>--max-concurrent-gc</code> <em>n</em>
224
+ Run <code>nix-collect-garbage</code> at most on <em>n</em> machines at the same time.
225
+ Defaults to <code>5</code>.</p><dl><dt><code>confctl collect-garbage</code> [<em>options</em>] [<em>machine-pattern</em>]</dt><dd>Run <code>nix-collect-garbage</code> on all or selected machines to delete unreachable
226
+ store paths.</dd></dl><p> <code>-a</code>, <code>--attr</code> <em>attribute</em><code>=</code><em>value</em> | <em>attribute</em><code>!=</code><em>value</em>
227
+ Filter machines by selected attribute, which is either tested for
228
+ equality or inequality. Any attribute from configuration module
229
+ <code>cluster.&lt;name&gt;</code> can be tested.</p><p> <code>-t</code>, <code>--tag</code> <em>tag</em>|<code>^</code><em>tag</em>
230
+ Filter machines that have <em>tag</em> set. If the tag begins with <code>^</code>, then
231
+ filter machines that do not have <em>tag</em> set.</p><p> <code>-y</code>, <code>--yes</code>
232
+ Do not ask for confirmation on standard input, assume the answer is yes.</p><p> <code>--max-concurrent-gc</code> <em>n</em>
233
+ Run <code>nix-collect-garbage</code> at most on <em>n</em> machines at the same time.
234
+ Defaults to <code>5</code>.</p><dl><dt><code>confctl gen-data vpsadmin all</code></dt><dd>Generate all required data files from vpsAdmin API.</dd></dl><dl><dt><code>confctl gen-data vpsadmin containers</code></dt><dd>Generate container data files from vpsAdmin API.</dd></dl><dl><dt><code>confctl gen-data vpsadmin network</code></dt><dd>Generate network data files from vpsAdmin API.</dd></dl><dl><dt><code>confctl inputs ls</code> [<em>input-pattern</em>]</dt><dd>List root-level flake inputs and their locked revisions. Available only in
235
+ flake configs.</dd></dl><dl><dt><code>confctl inputs update</code> [<em>input-name ...</em>]</dt><dd>Update flake inputs in <code>flake.lock</code>. Available only in flake configs.</dd></dl><p> <code>--[no-]commit</code>
236
+ Commit changes to git. Disabled by default.</p><p> <code>--[no-]changelog</code>
237
+ Include git log in the commit message when <code>--commit</code> is used. Enabled by
238
+ default.</p><p> <code>--[no-]editor</code>
239
+ Open <code>$EDITOR</code> with the commit message. Enabled by default.</p><p> <code>-d</code>, <code>--downgrade</code>
240
+ Use when the new version is older than the previously set version. Used for
241
+ generating the commit changelog direction.</p><p> <code>--all</code>
242
+ Update all root inputs.</p><dl><dt><code>confctl inputs set</code> <em>input-name</em> <em>rev</em></dt><dd>Set a flake input to a specific revision in <code>flake.lock</code> while keeping the
243
+ original upstream reference. Available only in flake configs.</dd></dl><p> <code>--[no-]commit</code>
244
+ Commit changes to git. Disabled by default.</p><p> <code>--[no-]changelog</code>
245
+ Include git log in the commit message when <code>--commit</code> is used. Enabled by
246
+ default.</p><p> <code>--[no]-editor</code>
247
+ Open <code>$EDITOR</code> with the commit message. Enabled by default.</p><p> <code>-d</code>, <code>--downgrade</code>
248
+ Use when the new version is older than the previously set version. Used for
249
+ generating the commit changelog direction.</p><dl><dt><code>confctl inputs channel ls</code> [<em>channel-pattern</em>]</dt><dd>List channels and their role-to-input mapping (including locked revisions).
250
+ Available only in flake configs.</dd></dl><dl><dt><code>confctl inputs channel update</code> <em>channels</em> [<em>role</em>]</dt><dd>Update inputs referenced by selected channels. If <em>role</em> is provided, update
251
+ only that role (e.g. <code>nixpkgs</code> or <code>vpsadminos</code>). Available only in flake configs.</dd></dl><p> <code>--[no-]commit</code>
252
+ Commit changes to git. Disabled by default.</p><p> <code>--[no-]changelog</code>
253
+ Include git log in the commit message when <code>--commit</code> is used. Enabled by
254
+ default.</p><p> <code>--[no-]editor</code>
255
+ Open <code>$EDITOR</code> with the commit message. Enabled by default.</p><p> <code>-d</code>, <code>--downgrade</code>
256
+ Use when the new version is older than the previously set version. Used for
257
+ generating the commit changelog direction.</p><dl><dt><code>confctl inputs channel set</code> <em>channels</em> <em>role</em> <em>rev</em></dt><dd>Set inputs referenced by selected channels for a specific role to <em>rev</em>.
258
+ Available only in flake configs.</dd></dl><p> <code>--[no-]commit</code>
259
+ Commit changes to git. Disabled by default.</p><p> <code>--[no-]changelog</code>
260
+ Include git log in the commit message when <code>--commit</code> is used. Enabled by
261
+ default.</p><p> <code>--[no-]editor</code>
262
+ Open <code>$EDITOR</code> with the commit message. Enabled by default.</p><p> <code>-d</code>, <code>--downgrade</code>
263
+ Use when the new version is older than the previously set version. Used for
264
+ generating the commit changelog direction.</p><p> <code>--[no-]allow-shared</code>
265
+ Allow setting inputs that are shared with other channels or roles. Disabled
266
+ by default; without it, shared inputs cause an error.</p><dl><dt><code>confctl inputs machine update</code> <em>machine</em> <em>role</em></dt><dd>Update the input used by a specific machine for a specific role. Available
267
+ only in flake configs.</dd></dl><p> <code>--[no-]commit</code>
268
+ Commit changes to git. Disabled by default.</p><p> <code>--[no-]changelog</code>
269
+ Include git log in the commit message when <code>--commit</code> is used. Enabled by
270
+ default.</p><p> <code>--[no-]editor</code>
271
+ Open <code>$EDITOR</code> with the commit message. Enabled by default.</p><p> <code>-d</code>, <code>--downgrade</code>
272
+ Use when the new version is older than the previously set version. Used for
273
+ generating the commit changelog direction.</p><dl><dt><code>confctl inputs machine set</code> <em>machine</em> <em>role</em> <em>rev</em></dt><dd>Set the input used by a specific machine for a specific role to <em>rev</em>.
274
+ Available only in flake configs.</dd></dl><p> <code>--[no-]commit</code>
275
+ Commit changes to git. Disabled by default.</p><p> <code>--[no-]changelog</code>
276
+ Include git log in the commit message when <code>--commit</code> is used. Enabled by
277
+ default.</p><p> <code>--[no-]editor</code>
278
+ Open <code>$EDITOR</code> with the commit message. Enabled by default.</p><p> <code>-d</code>, <code>--downgrade</code>
279
+ Use when the new version is older than the previously set version. Used for
280
+ generating the commit changelog direction.</p><dl><dt><code>confctl swpins cluster ls</code> [<em>name-pattern</em> [<em>sw-pattern</em>]]</dt><dd>List cluster machines with pinned software packages.</dd></dl><dl><dt><code>confctl swpins cluster set</code> <em>name-pattern</em> <em>sw-pattern</em> <em>version...</em></dt><dd>Set selected software packages to new <em>version</em>. The value of <em>version</em> depends
281
+ on the type of the software pin, for git it is a git reference, e.g. a revision.</dd></dl><p> <code>--[no-]commit</code>
282
+ Commit changed swpins files to git. Disabled by default.</p><p> <code>--[no-]changelog</code>
283
+ Include changelog in the commit message when <code>--commit</code> is used. Enabled by
284
+ default.</p><p> <code>--[no]-editor</code>
285
+ Open <code>$EDITOR</code> with the commit message. Enabled by default.</p><p> <code>-d</code>, <code>--downgrade</code>
286
+ Use when the new version is older than the previously set version. Used for
287
+ generating changelog for the commit message.</p><dl><dt><code>confctl swpins cluster update</code> [<em>name-pattern</em> [<em>sw-pattern</em>]]</dt><dd>Update selected or all software packages that have been configured to support
288
+ this command. The usual case for git is to pin to the current branch head.</dd></dl><p> <code>--[no-]commit</code>
289
+ Commit changed swpins files to git. Disabled by default.</p><p> <code>--[no-]changelog</code>
290
+ Include changelog in the commit message when <code>--commit</code> is used. Enabled by
291
+ default.</p><p> <code>--[no]-editor</code>
292
+ Open <code>$EDITOR</code> with the commit message. Enabled by default.</p><p> <code>-d</code>, <code>--downgrade</code>
293
+ Use when the new version is older than the previously set version. Used for
294
+ generating changelog for the commit message.</p><dl><dt><code>confctl swpins channel ls</code> [<em>channel-pattern</em> [<em>sw-pattern</em>]]</dt><dd>List existing channels with pinned software packages.</dd></dl><dl><dt><code>confctl swpins channel set</code> <em>channel-pattern</em> <em>sw-pattern</em> <em>version...</em></dt><dd>Set selected software packages in channels to new <em>version</em>. The value
295
+ of <em>version</em> depends on the type of the software pin, for git it is a git
296
+ reference, e.g. a revision.</dd></dl><p> <code>--[no-]commit</code>
297
+ Commit changed swpins files to git. Disabled by default.</p><p> <code>--[no-]changelog</code>
298
+ Include changelog in the commit message when <code>--commit</code> is used. Enabled by
299
+ default.</p><p> <code>--[no]-editor</code>
300
+ Open <code>$EDITOR</code> with the commit message. Enabled by default.</p><p> <code>-d</code>, <code>--downgrade</code>
301
+ Use when the new version is older than the previously set version. Used for
302
+ generating changelog for the commit message.</p><dl><dt><code>confctl swpins channel update</code> [<em>channel-pattern</em> [<em>sw-pattern</em>]]</dt><dd>Update selected or all software packages in channels that have been configured
303
+ to support this command. The usual case for git is to pin to the current
304
+ branch head.</dd></dl><p> <code>--[no-]commit</code>
305
+ Commit changed swpins files to git. Disabled by default.</p><p> <code>--[no-]changelog</code>
306
+ Include changelog in the commit message when <code>--commit</code> is used. Enabled by
307
+ default.</p><p> <code>--[no]-editor</code>
308
+ Open <code>$EDITOR</code> with the commit message. Enabled by default.</p><p> <code>-d</code>, <code>--downgrade</code>
309
+ Use when the new version is older than the previously set version. Used for
310
+ generating changelog for the commit message.</p><dl><dt><code>confctl swpins core ls</code> [<em>sw-pattern</em>]</dt><dd>List core software packages used internally by confctl.</dd></dl><dl><dt><code>confctl swpins core set</code> <em>sw-pattern</em> <em>version...</em></dt><dd>Set selected core software package to new <em>version</em>. The value
311
+ of <em>version</em> depends on the type of the software pin, for git it is a git
312
+ reference, e.g. a revision.</dd></dl><p> <code>--[no-]commit</code>
313
+ Commit changed swpins files to git. Disabled by default.</p><p> <code>--[no-]changelog</code>
314
+ Include changelog in the commit message when <code>--commit</code> is used. Enabled by
315
+ default.</p><p> <code>--[no]-editor</code>
316
+ Open <code>$EDITOR</code> with the commit message. Enabled by default.</p><p> <code>-d</code>, <code>--downgrade</code>
317
+ Use when the new version is older than the previously set version. Used for
318
+ generating changelog for the commit message.</p><dl><dt><code>confctl swpins core update</code> [<em>sw-pattern</em>]</dt><dd>Update selected or all core software packages that have been configured
319
+ to support this command. The usual case for git is to pin to the current
320
+ branch head.</dd></dl><p> <code>--[no-]commit</code>
321
+ Commit changed swpins files to git. Disabled by default.</p><p> <code>--[no-]changelog</code>
322
+ Include changelog in the commit message when <code>--commit</code> is used. Enabled by
323
+ default.</p><p> <code>--[no]-editor</code>
324
+ Open <code>$EDITOR</code> with the commit message. Enabled by default.</p><p> <code>-d</code>, <code>--downgrade</code>
325
+ Use when the new version is older than the previously set version. Used for
326
+ generating changelog for the commit message.</p><dl><dt><code>confctl swpins update</code></dt><dd>Update software pins that have been configured for updates, including pins
327
+ in all channels, all machine-specific pins and the core pins.</dd></dl><p> <code>--[no-]commit</code>
328
+ Commit changed swpins files to git. Disabled by default.</p><p> <code>--[no-]changelog</code>
329
+ Include changelog in the commit message when <code>--commit</code> is used. Enabled by
330
+ default.</p><p> <code>--[no]-editor</code>
331
+ Open <code>$EDITOR</code> with the commit message. Enabled by default.</p><p> <code>-d</code>, <code>--downgrade</code>
332
+ Use when the new version is older than the previously set version. Used for
333
+ generating changelog for the commit message.</p><dl><dt><code>confctl swpins reconfigure</code></dt><dd>Regenerate all confctl-managed software pin files according to the Nix
334
+ configuration.</dd></dl><h2 id="user-defined-commands">USER-DEFINED COMMANDS<a name="user-defined-commands" href="#user-defined-commands" class="md2man-permalink" title="permalink"></a></h2><p>User-defined Ruby scripts can be placed in directory <code>scripts</code>. Each script
335
+ should create a subclass of <code>ConfCtl::UserScript</code> and call class-method <code>register</code>.
336
+ Scripts can define their own <code>confctl</code> subcommands.</p><h3 id="example-user-script">Example user script<a name="example-user-script" href="#example-user-script" class="md2man-permalink" title="permalink"></a></h3><div class="highlight"><pre class="highlight plaintext"><code>class MyScript &lt; ConfCtl::UserScript
337
+ register
338
+
339
+ def setup_cli(app)
340
+ app.desc 'My CLI command'
341
+ app.command 'my-command' do |c|
342
+ c.action &amp;ConfCtl::Cli::Command.run(c, MyCommand, :run)
343
+ end
344
+ end
345
+ end
346
+
347
+ class MyCommand &lt; ConfCtl::Cli::Command
348
+ def run
349
+ puts 'Hello world'
350
+ end
351
+ end
352
+ </code></pre></div><h2 id="see-also">SEE ALSO<a name="see-also" href="#see-also" class="md2man-permalink" title="permalink"></a></h2><p><a class="md2man-reference" href="../man8/confctl-options.nix.8.html">confctl-options.nix(8)</a></p><h2 id="bugs">BUGS<a name="bugs" href="#bugs" class="md2man-permalink" title="permalink"></a></h2><p>Report bugs to <a href="https://github.com/vpsfreecz/confctl/issues">https://github.com/vpsfreecz/confctl/issues</a>.</p><h2 id="about">ABOUT<a name="about" href="#about" class="md2man-permalink" title="permalink"></a></h2><p><code>confctl</code> was originally developed for the purposes of
353
+ <a href="https://vpsfree.org">vpsFree.cz</a> and its cluster
354
+ <a href="https://github.com/vpsfreecz/vpsfree-cz-configuration">configuration</a>.</p></div></body>
355
+ </html>
@@ -22,11 +22,14 @@ for `nix-build` and can also be read by `Nix` while building machines.
22
22
  Software pins can be defined using channels or on specific machines.
23
23
  The advantage of using channels is that changing a pin in a channel changes
24
24
  also all machines that use the channel. Channels are defined in file
25
- `configs/swpins.nix` using option `confctl.swpins.channels`. Deployments
26
- declare software pins and channels in their respective `module.nix` files,
27
- option `cluster.<name>.swpins.channels` is a list of channels to use and option
28
- `cluster.<name>.swpins.pins` is an attrset of pins to extend or override pins
29
- from channels.
25
+ `configs/swpins.nix` using option `confctl.swpins.channels` (legacy, non-flake
26
+ configurations).
27
+
28
+ In flake-based configurations (using `confctl.lib.mkConfctlOutputs`), channel names
29
+ are provided by the flake `channels` mapping and machines select them via
30
+ `cluster.<name>.inputs.channels`. Per-machine role-to-input overrides are configured
31
+ via `cluster.<name>.inputs.overrides`. `cluster.<name>.swpins.*` is not used in flake
32
+ mode; manage `flake.lock` using the `confctl inputs` command family.
30
33
 
31
34
  Software pins declared in the Nix configuration have to be prefetched before
32
35
  they can be used to build machines. See the `confctl swpins` command family
@@ -49,9 +52,12 @@ the generation before last and so on.
49
52
  the standard output is connected to a terminal.
50
53
 
51
54
  ## COMMANDS
52
- `confctl init`
55
+ `confctl init` [*options*]
53
56
  Create a new configuration in the current directory. The current directory
54
- is set up to be used with `confctl`.
57
+ is set up to be used with `confctl`. Defaults to a flake-based configuration.
58
+
59
+ `--swpins`, `--legacy`
60
+ Create a legacy swpins-based (non-flake) configuration.
55
61
 
56
62
  `confctl add` *name*
57
63
  Add new machine to the configuration.
@@ -123,6 +129,9 @@ the generation before last and so on.
123
129
 
124
130
  `confctl deploy` [*options*] [*machine-pattern* [`boot`|`switch`|`test`|`dry-activate`]]
125
131
  Deploy either a new or an existing build generation to matching machines.
132
+ Machines that already use the target generation are skipped before copy,
133
+ activation, reboot and health checks. For carried machines, the
134
+ carrier-managed profile is used as the deployed state.
126
135
 
127
136
  *switch-action* is the argument to `switch-to-configuration` called on
128
137
  the target machine. The default action is `switch`.
@@ -525,6 +534,128 @@ the generation before last and so on.
525
534
  `confctl gen-data vpsadmin network`
526
535
  Generate network data files from vpsAdmin API.
527
536
 
537
+ `confctl inputs ls` [*input-pattern*]
538
+ List root-level flake inputs and their locked revisions. Available only in
539
+ flake configs.
540
+
541
+ `confctl inputs update` [*input-name ...*]
542
+ Update flake inputs in `flake.lock`. Available only in flake configs.
543
+
544
+ `--[no-]commit`
545
+ Commit changes to git. Disabled by default.
546
+
547
+ `--[no-]changelog`
548
+ Include git log in the commit message when `--commit` is used. Enabled by
549
+ default.
550
+
551
+ `--[no-]editor`
552
+ Open `$EDITOR` with the commit message. Enabled by default.
553
+
554
+ `-d`, `--downgrade`
555
+ Use when the new version is older than the previously set version. Used for
556
+ generating the commit changelog direction.
557
+
558
+ `--all`
559
+ Update all root inputs.
560
+
561
+ `confctl inputs set` *input-name* *rev*
562
+ Set a flake input to a specific revision in `flake.lock` while keeping the
563
+ original upstream reference. Available only in flake configs.
564
+
565
+ `--[no-]commit`
566
+ Commit changes to git. Disabled by default.
567
+
568
+ `--[no-]changelog`
569
+ Include git log in the commit message when `--commit` is used. Enabled by
570
+ default.
571
+
572
+ `--[no]-editor`
573
+ Open `$EDITOR` with the commit message. Enabled by default.
574
+
575
+ `-d`, `--downgrade`
576
+ Use when the new version is older than the previously set version. Used for
577
+ generating the commit changelog direction.
578
+
579
+ `confctl inputs channel ls` [*channel-pattern*]
580
+ List channels and their role-to-input mapping (including locked revisions).
581
+ Available only in flake configs.
582
+
583
+ `confctl inputs channel update` *channels* [*role*]
584
+ Update inputs referenced by selected channels. If *role* is provided, update
585
+ only that role (e.g. `nixpkgs` or `vpsadminos`). Available only in flake configs.
586
+
587
+ `--[no-]commit`
588
+ Commit changes to git. Disabled by default.
589
+
590
+ `--[no-]changelog`
591
+ Include git log in the commit message when `--commit` is used. Enabled by
592
+ default.
593
+
594
+ `--[no-]editor`
595
+ Open `$EDITOR` with the commit message. Enabled by default.
596
+
597
+ `-d`, `--downgrade`
598
+ Use when the new version is older than the previously set version. Used for
599
+ generating the commit changelog direction.
600
+
601
+ `confctl inputs channel set` *channels* *role* *rev*
602
+ Set inputs referenced by selected channels for a specific role to *rev*.
603
+ Available only in flake configs.
604
+
605
+ `--[no-]commit`
606
+ Commit changes to git. Disabled by default.
607
+
608
+ `--[no-]changelog`
609
+ Include git log in the commit message when `--commit` is used. Enabled by
610
+ default.
611
+
612
+ `--[no-]editor`
613
+ Open `$EDITOR` with the commit message. Enabled by default.
614
+
615
+ `-d`, `--downgrade`
616
+ Use when the new version is older than the previously set version. Used for
617
+ generating the commit changelog direction.
618
+
619
+ `--[no-]allow-shared`
620
+ Allow setting inputs that are shared with other channels or roles. Disabled
621
+ by default; without it, shared inputs cause an error.
622
+
623
+ `confctl inputs machine update` *machine* *role*
624
+ Update the input used by a specific machine for a specific role. Available
625
+ only in flake configs.
626
+
627
+ `--[no-]commit`
628
+ Commit changes to git. Disabled by default.
629
+
630
+ `--[no-]changelog`
631
+ Include git log in the commit message when `--commit` is used. Enabled by
632
+ default.
633
+
634
+ `--[no-]editor`
635
+ Open `$EDITOR` with the commit message. Enabled by default.
636
+
637
+ `-d`, `--downgrade`
638
+ Use when the new version is older than the previously set version. Used for
639
+ generating the commit changelog direction.
640
+
641
+ `confctl inputs machine set` *machine* *role* *rev*
642
+ Set the input used by a specific machine for a specific role to *rev*.
643
+ Available only in flake configs.
644
+
645
+ `--[no-]commit`
646
+ Commit changes to git. Disabled by default.
647
+
648
+ `--[no-]changelog`
649
+ Include git log in the commit message when `--commit` is used. Enabled by
650
+ default.
651
+
652
+ `--[no-]editor`
653
+ Open `$EDITOR` with the commit message. Enabled by default.
654
+
655
+ `-d`, `--downgrade`
656
+ Use when the new version is older than the previously set version. Used for
657
+ generating the commit changelog direction.
658
+
528
659
  `confctl swpins cluster ls` [*name-pattern* [*sw-pattern*]]
529
660
  List cluster machines with pinned software packages.
530
661
 
@@ -532,19 +663,19 @@ the generation before last and so on.
532
663
  Set selected software packages to new *version*. The value of *version* depends
533
664
  on the type of the software pin, for git it is a git reference, e.g. a revision.
534
665
 
535
- `--[no-]commit`
536
- Commit changed swpins files to git. Disabled by default.
666
+ `--[no-]commit`
667
+ Commit changed swpins files to git. Disabled by default.
537
668
 
538
- `--[no-]changelog`
539
- Include changelog in the commit message when `--commit` is used. Enabled by
540
- default.
669
+ `--[no-]changelog`
670
+ Include changelog in the commit message when `--commit` is used. Enabled by
671
+ default.
541
672
 
542
- `--[no]-editor`
543
- Open `$EDITOR` with the commit message. Enabled by default.
673
+ `--[no]-editor`
674
+ Open `$EDITOR` with the commit message. Enabled by default.
544
675
 
545
- `-d`, `--downgrade`
546
- Use when the new version is older than the previously set version. Used for
547
- generating changelog for the commit message.
676
+ `-d`, `--downgrade`
677
+ Use when the new version is older than the previously set version. Used for
678
+ generating changelog for the commit message.
548
679
 
549
680
  `confctl swpins cluster update` [*name-pattern* [*sw-pattern*]]
550
681
  Update selected or all software packages that have been configured to support