Commit Graph

485 Commits

Author SHA1 Message Date
bors[bot]
52511289c5
Merge #105
105: fix links and drop non-existing contributor guideline r=Mic92 a=Mic92



Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2023-05-14 12:24:07 +00:00
Jörg Thalheim
c10febb6b6 fix links and drop non-existing contributor guideline 2023-05-14 14:17:09 +02:00
bors[bot]
944c5b4b50
Merge #104
104: prettier: wrap long lines r=Mic92 a=Mic92



Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2023-05-14 12:13:59 +00:00
Jörg Thalheim
bb724e37b0 prettier: wrap long lines 2023-05-14 14:12:42 +02:00
bors[bot]
c5b23e5237
Merge #103
103: enable prettier and reformat markdown r=Mic92 a=Mic92



Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2023-05-14 12:09:57 +00:00
Jörg Thalheim
f5646c99a0 enable prettier and reformat markdown 2023-05-14 14:08:40 +02:00
bors[bot]
49865dc728
Merge #102
102: Refactor documentation using Jill's text r=Mic92 a=Mic92



Co-authored-by: JillThornhill <121565493+JillThornhill@users.noreply.github.com>
Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2023-05-14 12:04:56 +00:00
Jörg Thalheim
2ae380700c use lowercase file names for documentation 2023-05-14 14:02:13 +02:00
Jörg Thalheim
3d7a2ed854 References: add mdsh statement back 2023-05-14 13:59:16 +02:00
JillThornhill
e49ea88fbe Rework documentation 2023-05-14 13:57:58 +02:00
bors[bot]
c196258445
Merge #100
100: print the various steps r=zimbatm a=zimbatm



Co-authored-by: zimbatm <zimbatm@zimbatm.com>
2023-05-10 15:59:33 +00:00
bors[bot]
cfd9d36567
Merge #98
98: src/nixos-anywhere.sh: add shebang r=zimbatm a=zimbatm



Co-authored-by: zimbatm <zimbatm@zimbatm.com>
2023-05-10 15:43:39 +00:00
zimbatm
8e4a684ff5 src/nixos-anywhere.sh: add shebang
It's not strictly needed because Nix wraps it with
writeShellApplication, but it makes it easier for the script to be
standalone and use the right syntax highlighter in shells.

Invoke it with bash in the README because of the Nix build sandbox
missing /usr/bin/env
2023-05-10 17:08:17 +02:00
zimbatm
099790802d print the various steps
Let the user know what is happening by printing the high-level steps
in the console.
2023-05-10 11:31:14 +02:00
bors[bot]
44e8a437f2
Merge #97
97: README: format with mdsh r=zimbatm a=zimbatm



Co-authored-by: zimbatm <zimbatm@zimbatm.com>
2023-05-10 08:42:07 +00:00
zimbatm
4c354b29f1 README: format with mdsh
Use mdsh to keep the option parsing outputs in the README in sync with
the script.
2023-05-10 10:29:15 +02:00
bors[bot]
3dd1bb7994
Merge #96
96: README.md: add build-on-remote r=phaer a=zowoq



Co-authored-by: zowoq <59103226+zowoq@users.noreply.github.com>
2023-05-10 07:37:34 +00:00
zowoq
d9457e6c8d README.md: add build-on-remote 2023-05-10 13:52:01 +10:00
bors[bot]
d26abc5d6d
Merge #95
95: Reduce memory consumption r=Mic92 a=Mic92



Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2023-05-07 20:45:00 +00:00
Jörg Thalheim
848a9cd4fc switch to non-interactive installer
Massive size decrease: 820 MB -> 321 MB
2023-05-07 22:40:16 +02:00
Jörg Thalheim
23ec5bc947 README: fix markup 2023-05-07 22:40:16 +02:00
Jörg Thalheim
3028a09680 reduce memory consumption 2023-05-07 22:40:16 +02:00
bors[bot]
419184cff6
Merge #94
94: bash is no longer required r=Mic92 a=Mic92



Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2023-05-07 19:55:26 +00:00
Jörg Thalheim
f76de710e7 tests/from-nixos: fix powering machine after nixos upgrade 2023-05-07 21:54:55 +02:00
Jörg Thalheim
1ba300c246 tests: fix disco config 2023-05-07 20:20:57 +02:00
Jörg Thalheim
cdf2124738 update flakes 2023-05-07 20:20:49 +02:00
Jörg Thalheim
9c6964bdbc bash is no longer required
since nixos-images upgraded: https://github.com/nix-community/nixos-images/pull/98
2023-05-07 15:58:30 +02:00
bors[bot]
840b9804fe
Merge #89
89: feat: detect bash & setsid presence and fail if they are not on the target r=phaer a=RaitoBezarius



Co-authored-by: Raito Bezarius <masterancpp@gmail.com>
2023-05-03 16:12:43 +00:00
Raito Bezarius
33ab44a23d feat: detect bash & setsid presence and fail if they are not on the target
In #88, I stumbled on this trying to install an OpenWRT target.
This is a band-aid for helpful errors and avoiding "half broken" states.

In an upcoming PR, I will suggest a solution which will produce static
binaries for what is needed and use them on the host.
2023-05-03 18:07:48 +02:00
bors[bot]
17cc299abb
Merge #87
87: build-on-remote: fix check for store_paths r=Mic92 a=Lassulus



Co-authored-by: lassulus <git@lassul.us>
2023-04-27 10:47:36 +00:00
lassulus
af10a53ab3 build-on-remote: fix check for store_paths 2023-04-27 12:30:11 +02:00
bors[bot]
28be7391b4
Merge #86
86: add --build-on-remote flag r=Mic92 a=Lassulus



Co-authored-by: lassulus <git@lassul.us>
2023-04-27 09:46:54 +00:00
lassulus
dc27d00293 add --build-on-remote flag 2023-04-25 15:49:24 +02:00
bors[bot]
7563cf5863
Merge #81
81: terraform/nixos-rebuild: do not ignore deploy errors by default r=jfroche a=jfroche



Co-authored-by: Jean-François Roche <jfroche@pyxel.be>
2023-04-05 20:48:42 +00:00
bors[bot]
78a91e94a3
Merge #83
83: Add link to blogpost r=phaer a=phaer



Co-authored-by: Paul Haerle <hello@phaer.org>
2023-04-05 14:11:49 +00:00
Paul Haerle
f503e9024b
Add link to blogpost
@tfc has written a nice walk-through on his blog at: https://galowicz.de/2023/04/05/single-command-server-bootstrap/ . This links to it in README.md
2023-04-05 14:26:39 +02:00
Jean-François Roche
a82a84da8a terraform/nixos-rebuild: do not ignore deploy errors by default
Add option to ignore systemd errors during deployment.

Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2023-04-04 17:10:28 +02:00
bors[bot]
be2221a9bd
Merge #80
80: fix(rebuild): use sudo if rebuild with another user than root r=jfroche a=jfroche



Co-authored-by: Jean-François Roche <jfroche@pyxel.be>
2023-04-04 14:29:56 +00:00
Jean-François Roche
4371932193 fix(rebuild): use sudo if rebuild with another user than root
In order to switch the NixOS configuration, we must have root access.
If we are connecting to the target host with a non-root user, we use the "sudo" command.

We could instead use `nixos-rebuild --use-remote-sudo --target-host` but it
would evaluate the nixos system again.
2023-03-31 21:33:05 +02:00
bors[bot]
ac1eaaf67b
Merge #79
79: fix small security race r=Mic92 a=zimbatm



Co-authored-by: zimbatm <zimbatm@zimbatm.com>
2023-03-29 18:05:43 +00:00
zimbatm
eafa9cfce5
nixos-rebuild: fix double trap
Only one callback can be installed per signal in Bash. Because the
previous `trap` removes the whole temporary workdir, the one around the
SSH key is redundant.
2023-03-29 16:17:29 +02:00
zimbatm
1120774e38
nixos-rebuild: fix SSH key security race
Make sure the ssh_key file is always 0700
2023-03-29 16:17:28 +02:00
bors[bot]
ee5c39fcb1
Merge #78
78: terraform: allow nixos-rebuild to use specified private key for deployment r=Lassulus a=jfroche



Co-authored-by: Jean-François Roche <jfroche@affinitic.be>
Co-authored-by: Samuel Rounce <srounce@users.noreply.github.com>
2023-03-29 10:13:49 +00:00
Samuel Rounce
5adb698f51
fix(terraform/nixos-rebuild): typo in variables.sh 2023-03-29 09:09:21 +01:00
Jean-François Roche
16143cd8c0 terraform: allow nixos-rebuild to use specified private key for deployment
`nixos-rebuild/deploy.sh` script enable ssh authentication with a given private key
through the `SSH_KEY` environment variable.

Add additional variable for the private key used for the deployment.
To encourage the use of ssh-agent and discourage the storage of deployment keys in the terraform state
we do not set the install ssh key as the default for the deployment key.

Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2023-03-28 00:28:48 +02:00
bors[bot]
ad954defb3
Merge #77
77: wait for machine to be shutdown after deploy r=Lassulus a=Mic92



Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2023-03-05 10:44:49 +00:00
Jörg Thalheim
5be3e00d57 wait for machine to be shutdown after deploy 2023-03-04 17:13:54 +01:00
bors[bot]
b7e335a5f8
Merge #76
76: nixos-rebuild: allow to change deploy user r=Lassulus a=Mic92



Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2023-03-04 13:33:08 +00:00
Jörg Thalheim
48fe2fa8cc nixos-rebuild: allow to change deploy user 2023-03-04 13:53:20 +01:00
bors[bot]
6d0e9235bd
Merge #75
75: nixos-rebuild: allow to change deploy user r=Lassulus a=Mic92



Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2023-03-03 14:31:47 +00:00