confctl 2.0.0 → 2.2.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 (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -1
  3. data/Gemfile +6 -0
  4. data/README.md +2 -1
  5. data/docs/carrier.md +12 -0
  6. data/lib/confctl/cli/app.rb +19 -0
  7. data/lib/confctl/cli/cluster.rb +183 -47
  8. data/lib/confctl/cli/generation.rb +44 -15
  9. data/lib/confctl/cli/swpins/channel.rb +6 -4
  10. data/lib/confctl/cli/swpins/cluster.rb +6 -4
  11. data/lib/confctl/cli/swpins/core.rb +6 -4
  12. data/lib/confctl/generation/build.rb +42 -1
  13. data/lib/confctl/generation/build_list.rb +10 -0
  14. data/lib/confctl/generation/host.rb +9 -5
  15. data/lib/confctl/generation/host_list.rb +20 -5
  16. data/lib/confctl/generation/unified.rb +5 -0
  17. data/lib/confctl/generation/unified_list.rb +10 -0
  18. data/lib/confctl/machine.rb +4 -0
  19. data/lib/confctl/machine_control.rb +3 -2
  20. data/lib/confctl/machine_list.rb +4 -0
  21. data/lib/confctl/machine_status.rb +1 -1
  22. data/lib/confctl/nix.rb +63 -18
  23. data/lib/confctl/nix_copy.rb +5 -5
  24. data/lib/confctl/null_logger.rb +7 -0
  25. data/lib/confctl/swpins/change_set.rb +11 -4
  26. data/lib/confctl/swpins/specs/git.rb +23 -16
  27. data/lib/confctl/swpins/specs/git_rev.rb +1 -1
  28. data/lib/confctl/system_command.rb +3 -2
  29. data/lib/confctl/version.rb +1 -1
  30. data/libexec/auto-rollback.rb +106 -0
  31. data/man/man8/confctl.8 +109 -72
  32. data/man/man8/confctl.8.md +91 -54
  33. data/nix/evaluator.nix +26 -1
  34. data/nix/modules/cluster/default.nix +20 -0
  35. data/nix/modules/confctl/carrier/base.nix +8 -6
  36. data/nix/modules/confctl/carrier/netboot/build-netboot-server.rb +209 -50
  37. data/nix/modules/confctl/carrier/netboot/nixos.nix +5 -3
  38. data/nix/modules/confctl/kexec-netboot/default.nix +38 -0
  39. data/nix/modules/confctl/kexec-netboot/kexec-netboot.8.adoc +62 -0
  40. data/nix/modules/confctl/kexec-netboot/kexec-netboot.rb +455 -0
  41. data/nix/modules/confctl/overlays.nix +15 -0
  42. data/nix/modules/module-list.nix +1 -0
  43. data/nix/modules/system-list.nix +3 -1
  44. data/shell.nix +9 -2
  45. metadata +8 -6
@@ -0,0 +1,106 @@
1
+ #!@ruby@/bin/ruby
2
+ # Switch to a new system configuration and wait for confctl to confirm
3
+ # connectivity. If confctl is unable to reach the deployed machine, this
4
+ # script will roll back to the previous configuration.
5
+
6
+ require 'optparse'
7
+
8
+ class AutoRollback
9
+ def self.run
10
+ ar = new
11
+ ar.run
12
+ end
13
+
14
+ def run
15
+ puts 'Deploying with auto-rollback'
16
+
17
+ options = parse_options
18
+
19
+ current_system = File.readlink('/run/current-system')
20
+ puts " current system = #{current_system}"
21
+ puts " new system = #{options[:toplevel]}"
22
+ puts " action = #{options[:action]}"
23
+ puts " check file = #{options[:check_file]}"
24
+ puts " timeout = #{options[:timeout]} seconds"
25
+ puts
26
+
27
+ puts 'Switching to new configuration'
28
+ File.write(options[:check_file], 'switching')
29
+
30
+ pid = Process.spawn(
31
+ File.join(options[:toplevel], 'bin/switch-to-configuration'),
32
+ options[:action]
33
+ )
34
+
35
+ Process.wait(pid)
36
+
37
+ File.write(options[:check_file], 'switched')
38
+
39
+ puts 'Switch complete, waiting for confirmation'
40
+ t = Time.now
41
+
42
+ loop do
43
+ sleep(0.5)
44
+
45
+ if File.read(options[:check_file]).strip == 'confirmed'
46
+ puts 'Configuration confirmed'
47
+ File.unlink(options[:check_file])
48
+ exit
49
+ end
50
+
51
+ break if t + options[:timeout] < Time.now
52
+ end
53
+
54
+ puts 'Timeout occurred, rolling back'
55
+
56
+ pid = Process.spawn(
57
+ File.join(current_system, 'bin/switch-to-configuration'),
58
+ options[:action]
59
+ )
60
+
61
+ Process.wait(pid)
62
+
63
+ puts 'Rollback complete'
64
+ exit(false)
65
+ end
66
+
67
+ protected
68
+
69
+ def parse_options
70
+ options = {
71
+ timeout: 60,
72
+ toplevel: nil,
73
+ action: nil,
74
+ check_file: nil
75
+ }
76
+
77
+ opt_parser = OptionParser.new do |parser|
78
+ parser.banner = "Usage: #{$0} [options] <toplevel> <action> <check file>"
79
+
80
+ parser.on('-t', '--timeout TIMEOUT', Integer, 'Timeout in seconds') do |v|
81
+ options[:timeout] = v
82
+ end
83
+
84
+ parser.on('-h', '--help', 'Print help message and exit') do
85
+ puts parser
86
+ exit
87
+ end
88
+ end
89
+
90
+ opt_parser.parse!
91
+
92
+ if ARGV.length != 3
93
+ warn 'Invalid arguments'
94
+ warn opt_parser
95
+ exit(false)
96
+ end
97
+
98
+ options[:toplevel] = ARGV[0]
99
+ options[:action] = ARGV[1]
100
+ options[:check_file] = ARGV[2]
101
+
102
+ options
103
+ end
104
+ end
105
+
106
+ AutoRollback.run
data/man/man8/confctl.8 CHANGED
@@ -37,6 +37,11 @@ for more information.
37
37
  similarly to shell patterns, see
38
38
  \[la]http://ruby-doc.org/core/File.html#method-c-fnmatch-3F\[ra] for more
39
39
  information.
40
+ .SH GENERATION OFFSETS
41
+ .PP
42
+ Generations can be selected by \fIoffset\fP\&. \fB\fC0\fR is the current (last) generation.
43
+ \fB\fC1\fR is the first (oldest) generation, \fB\fC2\fR the second generation, etc. \fB\fC\-1\fR is
44
+ the generation before last and so on.
40
45
  .SH GLOBAL OPTIONS
41
46
  .TP
42
47
  \fB\fC\-c\fR, \fB\fC\-\-color\fR \fB\fCalways\fR|\fB\fCnever\fR|\fB\fCauto\fR
@@ -139,7 +144,7 @@ the target machine. The default action is \fB\fCswitch\fR\&.
139
144
  \fB\fC\-y\fR, \fB\fC\-\-yes\fR
140
145
  Do not ask for confirmation on standard input, assume the answer is yes.
141
146
  .PP
142
- \fB\fC\-g\fR, \fB\fC\-\-generation\fR \fIgeneration\fP|\fB\fCcurrent\fR
147
+ \fB\fC\-g\fR, \fB\fC\-\-generation\fR \fIgeneration\fP|\fIoffset\fP|\fB\fCcurrent\fR
143
148
  Do not build a new generation, but deploy an existing generation.
144
149
  .PP
145
150
  \fB\fC\-\-outdated\fR
@@ -169,6 +174,12 @@ the target machine. The default action is \fB\fCswitch\fR\&.
169
174
  .PP
170
175
  \fB\fC\-\-copy\-only\fR
171
176
  Do not activate the copied closures.
177
+ .PP
178
+ \fB\fC\-\-enable\-auto\-rollback\fR
179
+ Enable auto\-rollback on deploy even if it is not enabled in machine configuration.
180
+ .PP
181
+ \fB\fC\-\-disable\-auto\-rollback\fR
182
+ Disable auto\-rollback on deploy if it is enabled in machine configuration.
172
183
  .PP
173
184
  \fB\fC\-\-reboot\fR
174
185
  Applicable only when \fIswitch\-action\fP is \fB\fCboot\fR\&. Reboot the machine after the
@@ -226,7 +237,7 @@ Probe managed machines and determine their status.
226
237
  \fB\fC\-y\fR, \fB\fC\-\-yes\fR
227
238
  Do not ask for confirmation on standard input, assume the answer is yes.
228
239
  .PP
229
- \fB\fC\-g\fR, \fB\fC\-\-generation\fR \fIgeneration\fP|\fB\fCcurrent\fR|\fB\fCnone\fR
240
+ \fB\fC\-g\fR, \fB\fC\-\-generation\fR \fIgeneration\fP|\fIoffset\fP|\fB\fCcurrent\fR|\fB\fCnone\fR
230
241
  Check status against a selected generation instead of a new build. If set
231
242
  to \fB\fCnone\fR, only the currently configured software pins are checked and not
232
243
  the system version itself.
@@ -264,7 +275,7 @@ itself, it works only on software pins.
264
275
  \fB\fC\-y\fR, \fB\fC\-\-yes\fR
265
276
  Do not ask for confirmation on standard input, assume the answer is yes.
266
277
  .PP
267
- \fB\fC\-g\fR, \fB\fC\-\-generation\fR \fIgeneration\fP|\fB\fCcurrent\fR
278
+ \fB\fC\-g\fR, \fB\fC\-\-generation\fR \fIgeneration\fP|\fIoffset\fP|\fB\fCcurrent\fR
268
279
  Show changelog against software pins from a selected generation instead
269
280
  of the current configuration.
270
281
  .PP
@@ -312,7 +323,7 @@ itself, it works only on software pins.
312
323
  \fB\fC\-y\fR, \fB\fC\-\-yes\fR
313
324
  Do not ask for confirmation on standard input, assume the answer is yes.
314
325
  .PP
315
- \fB\fC\-g\fR, \fB\fC\-\-generation\fR \fIgeneration\fP|\fB\fCcurrent\fR
326
+ \fB\fC\-g\fR, \fB\fC\-\-generation\fR \fIgeneration\fP|\fIoffset\fP|\fB\fCcurrent\fR
316
327
  Show diff against software pins from a selected generation instead
317
328
  of the current configuration.
318
329
  .PP
@@ -406,7 +417,7 @@ Open ClusterSSH to selected or all machines.
406
417
  \fB\fC\-y\fR, \fB\fC\-\-yes\fR
407
418
  Do not ask for confirmation on standard input, assume the answer is yes.
408
419
  .TP
409
- \fB\fCconfctl generation ls\fR [\fImachine\-pattern\fP [\fIgeneration\-pattern\fP]|\fIn\fP\fB\fCd\fR|\fB\fCold\fR]
420
+ \fB\fCconfctl generation ls\fR [\fImachine\-pattern\fP [\fIgeneration\-pattern\fP]|\fIn\fP\fB\fCd\fR|\fIoffset\fP|\fB\fCold\fR]
410
421
  List all or selected generations. By default only local build generations
411
422
  are listed.
412
423
  .PP
@@ -425,11 +436,13 @@ are listed.
425
436
  \fB\fC\-r\fR, \fB\fC\-\-remote\fR
426
437
  List remote generations found on deployed machines.
427
438
  .TP
428
- \fB\fCconfctl generation rm\fR [\fImachine\-pattern\fP [\fIgeneration\-pattern\fP|\fIn\fP\fB\fCd\fR|\fB\fCold\fR]]
439
+ \fB\fCconfctl generation rm\fR [\fImachine\-pattern\fP [\fIgeneration\-pattern\fP|\fIn\fP\fB\fCd\fR|\fIoffset\fP|\fB\fCold\fR]]
429
440
  Remove selected generations.
430
441
  .IP
431
442
  \fIn\fP\fB\fCd\fR will remove generations older than \fIn\fP days.
432
443
  .IP
444
+ \fIoffset\fP will remove generations at a specific offset, see \fB\fCGENERATION OFFSETS\fR\&.
445
+ .IP
433
446
  \fB\fCold\fR will remove all generations except the current one, i.e. the one that
434
447
  was built by \fB\fCconfctl build\fR the last.
435
448
  .IP
@@ -485,6 +498,9 @@ configuration also runs \fB\fCnix\-collect\-garbage\fR\&.
485
498
  .PP
486
499
  \fB\fC\-r\fR, \fB\fC\-\-remote\fR
487
500
  Consider generations found on deployed machines.
501
+ .PP
502
+ \fB\fC\-\-no\-gc\fR, \fB\fC\-\-no\-collect\-garbage\fR
503
+ Do not run the garbage collector even if it is enabled in configuration.
488
504
  .PP
489
505
  \fB\fC\-\-max\-concurrent\-gc\fR \fIn\fP
490
506
  Run \fB\fCnix\-collect\-garbage\fR at most on \fIn\fP machines at the same time.
@@ -533,6 +549,9 @@ on the type of the software pin, for git it is a git reference, e.g. a revision.
533
549
  Include changelog in the commit message when \fB\fC\-\-commit\fR is used. Enabled by
534
550
  default.
535
551
  .TP
552
+ \fB\fC\-\-[no]\-editor\fR
553
+ Open \fB\fC$EDITOR\fR with the commit message. Enabled by default.
554
+ .TP
536
555
  \fB\fC\-d\fR, \fB\fC\-\-downgrade\fR
537
556
  Use when the new version is older than the previously set version. Used for
538
557
  generating changelog for the commit message.
@@ -540,17 +559,20 @@ on the type of the software pin, for git it is a git reference, e.g. a revision.
540
559
  \fB\fCconfctl swpins cluster update\fR [\fIname\-pattern\fP [\fIsw\-pattern\fP]]
541
560
  Update selected or all software packages that have been configured to support
542
561
  this command. The usual case for git is to pin to the current branch head.
543
- .TP
544
- \fB\fC\-\-[no\-]commit\fR
545
- Commit changed swpins files to git. Disabled by default.
546
- .TP
547
- \fB\fC\-\-[no\-]changelog\fR
548
- Include changelog in the commit message when \fB\fC\-\-commit\fR is used. Enabled by
549
- default.
550
- .TP
551
- \fB\fC\-d\fR, \fB\fC\-\-downgrade\fR
552
- Use when the new version is older than the previously set version. Used for
553
- generating changelog for the commit message.
562
+ .PP
563
+ \fB\fC\-\-[no\-]commit\fR
564
+ Commit changed swpins files to git. Disabled by default.
565
+ .PP
566
+ \fB\fC\-\-[no\-]changelog\fR
567
+ Include changelog in the commit message when \fB\fC\-\-commit\fR is used. Enabled by
568
+ default.
569
+ .PP
570
+ \fB\fC\-\-[no]\-editor\fR
571
+ Open \fB\fC$EDITOR\fR with the commit message. Enabled by default.
572
+ .PP
573
+ \fB\fC\-d\fR, \fB\fC\-\-downgrade\fR
574
+ Use when the new version is older than the previously set version. Used for
575
+ generating changelog for the commit message.
554
576
  .TP
555
577
  \fB\fCconfctl swpins channel ls\fR [\fIchannel\-pattern\fP [\fIsw\-pattern\fP]]
556
578
  List existing channels with pinned software packages.
@@ -559,33 +581,39 @@ List existing channels with pinned software packages.
559
581
  Set selected software packages in channels to new \fIversion\fP\&. The value
560
582
  of \fIversion\fP depends on the type of the software pin, for git it is a git
561
583
  reference, e.g. a revision.
562
- .TP
563
- \fB\fC\-\-[no\-]commit\fR
564
- Commit changed swpins files to git. Disabled by default.
565
- .TP
566
- \fB\fC\-\-[no\-]changelog\fR
567
- Include changelog in the commit message when \fB\fC\-\-commit\fR is used. Enabled by
568
- default.
569
- .TP
570
- \fB\fC\-d\fR, \fB\fC\-\-downgrade\fR
571
- Use when the new version is older than the previously set version. Used for
572
- generating changelog for the commit message.
584
+ .PP
585
+ \fB\fC\-\-[no\-]commit\fR
586
+ Commit changed swpins files to git. Disabled by default.
587
+ .PP
588
+ \fB\fC\-\-[no\-]changelog\fR
589
+ Include changelog in the commit message when \fB\fC\-\-commit\fR is used. Enabled by
590
+ default.
591
+ .PP
592
+ \fB\fC\-\-[no]\-editor\fR
593
+ Open \fB\fC$EDITOR\fR with the commit message. Enabled by default.
594
+ .PP
595
+ \fB\fC\-d\fR, \fB\fC\-\-downgrade\fR
596
+ Use when the new version is older than the previously set version. Used for
597
+ generating changelog for the commit message.
573
598
  .TP
574
599
  \fB\fCconfctl swpins channel update\fR [\fIchannel\-pattern\fP [\fIsw\-pattern\fP]]
575
600
  Update selected or all software packages in channels that have been configured
576
601
  to support this command. The usual case for git is to pin to the current
577
602
  branch head.
578
- .TP
579
- \fB\fC\-\-[no\-]commit\fR
580
- Commit changed swpins files to git. Disabled by default.
581
- .TP
582
- \fB\fC\-\-[no\-]changelog\fR
583
- Include changelog in the commit message when \fB\fC\-\-commit\fR is used. Enabled by
584
- default.
585
- .TP
586
- \fB\fC\-d\fR, \fB\fC\-\-downgrade\fR
587
- Use when the new version is older than the previously set version. Used for
588
- generating changelog for the commit message.
603
+ .PP
604
+ \fB\fC\-\-[no\-]commit\fR
605
+ Commit changed swpins files to git. Disabled by default.
606
+ .PP
607
+ \fB\fC\-\-[no\-]changelog\fR
608
+ Include changelog in the commit message when \fB\fC\-\-commit\fR is used. Enabled by
609
+ default.
610
+ .PP
611
+ \fB\fC\-\-[no]\-editor\fR
612
+ Open \fB\fC$EDITOR\fR with the commit message. Enabled by default.
613
+ .PP
614
+ \fB\fC\-d\fR, \fB\fC\-\-downgrade\fR
615
+ Use when the new version is older than the previously set version. Used for
616
+ generating changelog for the commit message.
589
617
  .TP
590
618
  \fB\fCconfctl swpins core ls\fR [\fIsw\-pattern\fP]
591
619
  List core software packages used internally by confctl.
@@ -594,48 +622,57 @@ List core software packages used internally by confctl.
594
622
  Set selected core software package to new \fIversion\fP\&. The value
595
623
  of \fIversion\fP depends on the type of the software pin, for git it is a git
596
624
  reference, e.g. a revision.
597
- .TP
598
- \fB\fC\-\-[no\-]commit\fR
599
- Commit changed swpins files to git. Disabled by default.
600
- .TP
601
- \fB\fC\-\-[no\-]changelog\fR
602
- Include changelog in the commit message when \fB\fC\-\-commit\fR is used. Enabled by
603
- default.
604
- .TP
605
- \fB\fC\-d\fR, \fB\fC\-\-downgrade\fR
606
- Use when the new version is older than the previously set version. Used for
607
- generating changelog for the commit message.
625
+ .PP
626
+ \fB\fC\-\-[no\-]commit\fR
627
+ Commit changed swpins files to git. Disabled by default.
628
+ .PP
629
+ \fB\fC\-\-[no\-]changelog\fR
630
+ Include changelog in the commit message when \fB\fC\-\-commit\fR is used. Enabled by
631
+ default.
632
+ .PP
633
+ \fB\fC\-\-[no]\-editor\fR
634
+ Open \fB\fC$EDITOR\fR with the commit message. Enabled by default.
635
+ .PP
636
+ \fB\fC\-d\fR, \fB\fC\-\-downgrade\fR
637
+ Use when the new version is older than the previously set version. Used for
638
+ generating changelog for the commit message.
608
639
  .TP
609
640
  \fB\fCconfctl swpins core update\fR [\fIsw\-pattern\fP]
610
641
  Update selected or all core software packages that have been configured
611
642
  to support this command. The usual case for git is to pin to the current
612
643
  branch head.
613
- .TP
614
- \fB\fC\-\-[no\-]commit\fR
615
- Commit changed swpins files to git. Disabled by default.
616
- .TP
617
- \fB\fC\-\-[no\-]changelog\fR
618
- Include changelog in the commit message when \fB\fC\-\-commit\fR is used. Enabled by
619
- default.
620
- .TP
621
- \fB\fC\-d\fR, \fB\fC\-\-downgrade\fR
622
- Use when the new version is older than the previously set version. Used for
623
- generating changelog for the commit message.
644
+ .PP
645
+ \fB\fC\-\-[no\-]commit\fR
646
+ Commit changed swpins files to git. Disabled by default.
647
+ .PP
648
+ \fB\fC\-\-[no\-]changelog\fR
649
+ Include changelog in the commit message when \fB\fC\-\-commit\fR is used. Enabled by
650
+ default.
651
+ .PP
652
+ \fB\fC\-\-[no]\-editor\fR
653
+ Open \fB\fC$EDITOR\fR with the commit message. Enabled by default.
654
+ .PP
655
+ \fB\fC\-d\fR, \fB\fC\-\-downgrade\fR
656
+ Use when the new version is older than the previously set version. Used for
657
+ generating changelog for the commit message.
624
658
  .TP
625
659
  \fB\fCconfctl swpins update\fR
626
660
  Update software pins that have been configured for updates, including pins
627
661
  in all channels, all machine\-specific pins and the core pins.
628
- .TP
629
- \fB\fC\-\-[no\-]commit\fR
630
- Commit changed swpins files to git. Disabled by default.
631
- .TP
632
- \fB\fC\-\-[no\-]changelog\fR
633
- Include changelog in the commit message when \fB\fC\-\-commit\fR is used. Enabled by
634
- default.
635
- .TP
636
- \fB\fC\-d\fR, \fB\fC\-\-downgrade\fR
637
- Use when the new version is older than the previously set version. Used for
638
- generating changelog for the commit message.
662
+ .PP
663
+ \fB\fC\-\-[no\-]commit\fR
664
+ Commit changed swpins files to git. Disabled by default.
665
+ .PP
666
+ \fB\fC\-\-[no\-]changelog\fR
667
+ Include changelog in the commit message when \fB\fC\-\-commit\fR is used. Enabled by
668
+ default.
669
+ .PP
670
+ \fB\fC\-\-[no]\-editor\fR
671
+ Open \fB\fC$EDITOR\fR with the commit message. Enabled by default.
672
+ .PP
673
+ \fB\fC\-d\fR, \fB\fC\-\-downgrade\fR
674
+ Use when the new version is older than the previously set version. Used for
675
+ generating changelog for the commit message.
639
676
  .TP
640
677
  \fB\fCconfctl swpins reconfigure\fR
641
678
  Regenerate all confctl\-managed software pin files according to the Nix
@@ -38,6 +38,11 @@ similarly to shell patterns, see
38
38
  <http://ruby-doc.org/core/File.html#method-c-fnmatch-3F> for more
39
39
  information.
40
40
 
41
+ ## GENERATION OFFSETS
42
+ Generations can be selected by *offset*. `0` is the current (last) generation.
43
+ `1` is the first (oldest) generation, `2` the second generation, etc. `-1` is
44
+ the generation before last and so on.
45
+
41
46
  ## GLOBAL OPTIONS
42
47
  `-c`, `--color` `always`|`never`|`auto`
43
48
  Set output color mode. Defaults to `auto`, which enables colors when
@@ -137,7 +142,7 @@ information.
137
142
  `-y`, `--yes`
138
143
  Do not ask for confirmation on standard input, assume the answer is yes.
139
144
 
140
- `-g`, `--generation` *generation*|`current`
145
+ `-g`, `--generation` *generation*|*offset*|`current`
141
146
  Do not build a new generation, but deploy an existing generation.
142
147
 
143
148
  `--outdated`
@@ -168,6 +173,12 @@ information.
168
173
  `--copy-only`
169
174
  Do not activate the copied closures.
170
175
 
176
+ `--enable-auto-rollback`
177
+ Enable auto-rollback on deploy even if it is not enabled in machine configuration.
178
+
179
+ `--disable-auto-rollback`
180
+ Disable auto-rollback on deploy if it is enabled in machine configuration.
181
+
171
182
  `--reboot`
172
183
  Applicable only when *switch-action* is `boot`. Reboot the machine after the
173
184
  configuration is activated.
@@ -222,7 +233,7 @@ information.
222
233
  `-y`, `--yes`
223
234
  Do not ask for confirmation on standard input, assume the answer is yes.
224
235
 
225
- `-g`, `--generation` *generation*|`current`|`none`
236
+ `-g`, `--generation` *generation*|*offset*|`current`|`none`
226
237
  Check status against a selected generation instead of a new build. If set
227
238
  to `none`, only the currently configured software pins are checked and not
228
239
  the system version itself.
@@ -258,7 +269,7 @@ information.
258
269
  `-y`, `--yes`
259
270
  Do not ask for confirmation on standard input, assume the answer is yes.
260
271
 
261
- `-g`, `--generation` *generation*|`current`
272
+ `-g`, `--generation` *generation*|*offset*|`current`
262
273
  Show changelog against software pins from a selected generation instead
263
274
  of the current configuration.
264
275
 
@@ -304,7 +315,7 @@ information.
304
315
  `-y`, `--yes`
305
316
  Do not ask for confirmation on standard input, assume the answer is yes.
306
317
 
307
- `-g`, `--generation` *generation*|`current`
318
+ `-g`, `--generation` *generation*|*offset*|`current`
308
319
  Show diff against software pins from a selected generation instead
309
320
  of the current configuration.
310
321
 
@@ -396,7 +407,7 @@ information.
396
407
  `-y`, `--yes`
397
408
  Do not ask for confirmation on standard input, assume the answer is yes.
398
409
 
399
- `confctl generation ls` [*machine-pattern* [*generation-pattern*]|*n*`d`|`old`]
410
+ `confctl generation ls` [*machine-pattern* [*generation-pattern*]|*n*`d`|*offset*|`old`]
400
411
  List all or selected generations. By default only local build generations
401
412
  are listed.
402
413
 
@@ -415,11 +426,13 @@ information.
415
426
  `-r`, `--remote`
416
427
  List remote generations found on deployed machines.
417
428
 
418
- `confctl generation rm` [*machine-pattern* [*generation-pattern*|*n*`d`|`old`]]
429
+ `confctl generation rm` [*machine-pattern* [*generation-pattern*|*n*`d`|*offset*|`old`]]
419
430
  Remove selected generations.
420
431
 
421
432
  *n*`d` will remove generations older than *n* days.
422
433
 
434
+ *offset* will remove generations at a specific offset, see `GENERATION OFFSETS`.
435
+
423
436
  `old` will remove all generations except the current one, i.e. the one that
424
437
  was built by `confctl build` the last.
425
438
 
@@ -476,6 +489,9 @@ information.
476
489
  `-r`, `--remote`
477
490
  Consider generations found on deployed machines.
478
491
 
492
+ `--no-gc`, `--no-collect-garbage`
493
+ Do not run the garbage collector even if it is enabled in configuration.
494
+
479
495
  `--max-concurrent-gc` *n*
480
496
  Run `nix-collect-garbage` at most on *n* machines at the same time.
481
497
  Defaults to `5`.
@@ -523,6 +539,9 @@ information.
523
539
  Include changelog in the commit message when `--commit` is used. Enabled by
524
540
  default.
525
541
 
542
+ `--[no]-editor`
543
+ Open `$EDITOR` with the commit message. Enabled by default.
544
+
526
545
  `-d`, `--downgrade`
527
546
  Use when the new version is older than the previously set version. Used for
528
547
  generating changelog for the commit message.
@@ -531,16 +550,19 @@ information.
531
550
  Update selected or all software packages that have been configured to support
532
551
  this command. The usual case for git is to pin to the current branch head.
533
552
 
534
- `--[no-]commit`
535
- Commit changed swpins files to git. Disabled by default.
553
+ `--[no-]commit`
554
+ Commit changed swpins files to git. Disabled by default.
536
555
 
537
- `--[no-]changelog`
538
- Include changelog in the commit message when `--commit` is used. Enabled by
539
- default.
556
+ `--[no-]changelog`
557
+ Include changelog in the commit message when `--commit` is used. Enabled by
558
+ default.
540
559
 
541
- `-d`, `--downgrade`
542
- Use when the new version is older than the previously set version. Used for
543
- generating changelog for the commit message.
560
+ `--[no]-editor`
561
+ Open `$EDITOR` with the commit message. Enabled by default.
562
+
563
+ `-d`, `--downgrade`
564
+ Use when the new version is older than the previously set version. Used for
565
+ generating changelog for the commit message.
544
566
 
545
567
  `confctl swpins channel ls` [*channel-pattern* [*sw-pattern*]]
546
568
  List existing channels with pinned software packages.
@@ -550,32 +572,38 @@ information.
550
572
  of *version* depends on the type of the software pin, for git it is a git
551
573
  reference, e.g. a revision.
552
574
 
553
- `--[no-]commit`
554
- Commit changed swpins files to git. Disabled by default.
575
+ `--[no-]commit`
576
+ Commit changed swpins files to git. Disabled by default.
555
577
 
556
- `--[no-]changelog`
557
- Include changelog in the commit message when `--commit` is used. Enabled by
558
- default.
578
+ `--[no-]changelog`
579
+ Include changelog in the commit message when `--commit` is used. Enabled by
580
+ default.
559
581
 
560
- `-d`, `--downgrade`
561
- Use when the new version is older than the previously set version. Used for
562
- generating changelog for the commit message.
582
+ `--[no]-editor`
583
+ Open `$EDITOR` with the commit message. Enabled by default.
584
+
585
+ `-d`, `--downgrade`
586
+ Use when the new version is older than the previously set version. Used for
587
+ generating changelog for the commit message.
563
588
 
564
589
  `confctl swpins channel update` [*channel-pattern* [*sw-pattern*]]
565
590
  Update selected or all software packages in channels that have been configured
566
591
  to support this command. The usual case for git is to pin to the current
567
592
  branch head.
568
593
 
569
- `--[no-]commit`
570
- Commit changed swpins files to git. Disabled by default.
594
+ `--[no-]commit`
595
+ Commit changed swpins files to git. Disabled by default.
571
596
 
572
- `--[no-]changelog`
573
- Include changelog in the commit message when `--commit` is used. Enabled by
574
- default.
597
+ `--[no-]changelog`
598
+ Include changelog in the commit message when `--commit` is used. Enabled by
599
+ default.
575
600
 
576
- `-d`, `--downgrade`
577
- Use when the new version is older than the previously set version. Used for
578
- generating changelog for the commit message.
601
+ `--[no]-editor`
602
+ Open `$EDITOR` with the commit message. Enabled by default.
603
+
604
+ `-d`, `--downgrade`
605
+ Use when the new version is older than the previously set version. Used for
606
+ generating changelog for the commit message.
579
607
 
580
608
  `confctl swpins core ls` [*sw-pattern*]
581
609
  List core software packages used internally by confctl.
@@ -585,47 +613,56 @@ information.
585
613
  of *version* depends on the type of the software pin, for git it is a git
586
614
  reference, e.g. a revision.
587
615
 
588
- `--[no-]commit`
589
- Commit changed swpins files to git. Disabled by default.
616
+ `--[no-]commit`
617
+ Commit changed swpins files to git. Disabled by default.
590
618
 
591
- `--[no-]changelog`
592
- Include changelog in the commit message when `--commit` is used. Enabled by
593
- default.
619
+ `--[no-]changelog`
620
+ Include changelog in the commit message when `--commit` is used. Enabled by
621
+ default.
594
622
 
595
- `-d`, `--downgrade`
596
- Use when the new version is older than the previously set version. Used for
597
- generating changelog for the commit message.
623
+ `--[no]-editor`
624
+ Open `$EDITOR` with the commit message. Enabled by default.
625
+
626
+ `-d`, `--downgrade`
627
+ Use when the new version is older than the previously set version. Used for
628
+ generating changelog for the commit message.
598
629
 
599
630
  `confctl swpins core update` [*sw-pattern*]
600
631
  Update selected or all core software packages that have been configured
601
632
  to support this command. The usual case for git is to pin to the current
602
633
  branch head.
603
634
 
604
- `--[no-]commit`
605
- Commit changed swpins files to git. Disabled by default.
635
+ `--[no-]commit`
636
+ Commit changed swpins files to git. Disabled by default.
606
637
 
607
- `--[no-]changelog`
608
- Include changelog in the commit message when `--commit` is used. Enabled by
609
- default.
638
+ `--[no-]changelog`
639
+ Include changelog in the commit message when `--commit` is used. Enabled by
640
+ default.
610
641
 
611
- `-d`, `--downgrade`
612
- Use when the new version is older than the previously set version. Used for
613
- generating changelog for the commit message.
642
+ `--[no]-editor`
643
+ Open `$EDITOR` with the commit message. Enabled by default.
644
+
645
+ `-d`, `--downgrade`
646
+ Use when the new version is older than the previously set version. Used for
647
+ generating changelog for the commit message.
614
648
 
615
649
  `confctl swpins update`
616
650
  Update software pins that have been configured for updates, including pins
617
651
  in all channels, all machine-specific pins and the core pins.
618
652
 
619
- `--[no-]commit`
620
- Commit changed swpins files to git. Disabled by default.
653
+ `--[no-]commit`
654
+ Commit changed swpins files to git. Disabled by default.
621
655
 
622
- `--[no-]changelog`
623
- Include changelog in the commit message when `--commit` is used. Enabled by
624
- default.
656
+ `--[no-]changelog`
657
+ Include changelog in the commit message when `--commit` is used. Enabled by
658
+ default.
625
659
 
626
- `-d`, `--downgrade`
627
- Use when the new version is older than the previously set version. Used for
628
- generating changelog for the commit message.
660
+ `--[no]-editor`
661
+ Open `$EDITOR` with the commit message. Enabled by default.
662
+
663
+ `-d`, `--downgrade`
664
+ Use when the new version is older than the previously set version. Used for
665
+ generating changelog for the commit message.
629
666
 
630
667
  `confctl swpins reconfigure`
631
668
  Regenerate all confctl-managed software pin files according to the Nix