Jörg Thalheim
8d16137f62
Merge pull request #134 from numtide/readme-update
...
README: SrvOS is not its own distribution yet
2023-06-07 08:23:55 +02:00
Jörg Thalheim
a75b9c5163
add missing gawk
2023-06-07 08:18:24 +02:00
Jörg Thalheim
d4fbe4c173
print error message to stderr if ssh-keyscan fails
2023-06-07 07:36:34 +02:00
Jörg Thalheim
c5fc538880
extract correct hostname from ssh settings
2023-06-07 07:36:34 +02:00
bors[bot]
8aa9b49229
Merge #132
...
132: make usage formatting more consistent r=Mic92 a=Mic92
Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2023-06-07 05:16:23 +00:00
Jörg Thalheim
69443d6929
make usage formatting more consistent
2023-06-07 07:15:31 +02:00
bors[bot]
c532c9314e
Merge #129
...
129: Create ~/.ssh folder and add .direnv to gitignore r=Mic92 a=Melkor333
Co-authored-by: Samuel Hierholzer (Adfinis AG) <samuel.hierholzer@adfinis.com>
2023-06-07 04:52:47 +00:00
Jörg Thalheim
f3d4bec0df
fix ssh-keyscan for non-standard ssh ports
2023-06-07 00:44:35 +02:00
Samuel Hierholzer (Adfinis AG)
a102f30bc8
fix: create ~/.ssh folder as required by ssh-copy-id
2023-06-06 08:15:18 +02:00
Paul Haerle
33b11cf0ee
fix: .disko -> .diskoScript
...
...to avoid a deprecation warning from disko
2023-06-01 20:37:28 +02:00
Pogobanane
bdfbbd572a
fix rsync changing permissions
2023-05-15 16:28:54 +02:00
zimbatm
8428ae7c52
add -i to allow passing private key files
...
Mirror the `-i` option from SSH, so you can run `nixos-anywhere ~/.ssh/other_key`.
This commit also fixes an issue where the generated key-pair would stay
around when using the SSH_PRIVATE_KEY env var.
2023-05-14 16:08:29 +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
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
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
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
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
lassulus
af10a53ab3
build-on-remote: fix check for store_paths
2023-04-27 12:30:11 +02:00
lassulus
dc27d00293
add --build-on-remote flag
2023-04-25 15:49:24 +02:00
Jörg Thalheim
5be3e00d57
wait for machine to be shutdown after deploy
2023-03-04 17:13:54 +01:00
bors[bot]
ff743f3183
Merge #72
...
72: Terraform module fixes r=Mic92 a=Mic92
Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2023-02-24 11:47:28 +00:00
Jörg Thalheim
dfd9b256b1
quote flake attr to allow dots in nixos hostname
2023-02-24 08:28:30 +01:00
Jörg Thalheim
bedcb063cc
fixup ssh key name for rsync
2023-02-22 16:42:55 +01:00
lassulus
9e00da86f5
add newline to ssh key provided via env
2023-02-14 07:34:24 +01:00
bors[bot]
5b6fd8fd5a
Merge #68
...
68: Rsync permissions r=Mic92 a=Mic92
Co-authored-by: Pogobanane <aenderboy@gmx.de>
2023-02-09 09:40:02 +00:00
Pogobanane
1d9ba4c702
nixos-remote-pxe: fix mkdir -p not setting permissions if folder already exists
2023-02-09 10:34:50 +01:00
Pogobanane
c1ebc5f57a
nixos-remote: use installed ssh key also for rsync
2023-02-09 10:32:44 +01:00
Jörg Thalheim
53951b7424
prefer system's openssh
...
fixes https://github.com/numtide/nixos-anywhere/issues/62
2023-02-07 09:21:54 +01:00
Jörg Thalheim
c3326a417f
rename nixos-remote to nixos-anywhere
2023-02-01 19:52:43 +01:00
Jörg Thalheim
a67d3ac253
consistently print to stderr
2023-01-24 16:42:09 +01:00
lassulus
5943ffaf46
nixos-remote.sh: generate temporary ssh-key
...
we use this so the code has less branches for different ssh-key usecases
2023-01-24 16:42:09 +01:00
Jörg Thalheim
563b8191c2
add --from option
2023-01-24 13:36:39 +01:00
bors[bot]
b9b920844e
Merge #46
...
46: handle error case better when facts return no results back r=Mic92 a=Mic92
Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2023-01-22 21:14:25 +00:00
Jörg Thalheim
2b7470b581
use snake_case for variable names
2023-01-22 13:29:50 +01:00
Jörg Thalheim
2f7c1a0654
apply nix fmt
2023-01-22 13:13:20 +01:00
Jörg Thalheim
92e0ef6bf2
handle error case better when facts return no results back
2023-01-22 09:57:54 +01:00
bors[bot]
22d454d003
Merge #39
...
39: detect nixos installer r=Mic92 a=Mic92
Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2023-01-19 15:00:05 +00:00
bors[bot]
1ce1e0ebcc
Merge #44
...
44: allow to pass nix options r=Mic92 a=Mic92
Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2023-01-19 14:53:18 +00:00
Jörg Thalheim
809413aad5
allow to pass nix options
2023-01-18 15:03:59 +01:00
bors[bot]
32510a7cdd
Merge #43
...
43: CI r=Mic92 a=Mic92
Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2023-01-18 11:19:39 +00:00
Jörg Thalheim
b28ec1bf61
add missing dependencies
2023-01-18 12:19:14 +01:00
bors[bot]
524a0c952b
Merge #38
...
38: also check cpu architecture r=Mic92 a=Mic92
Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2023-01-17 22:06:48 +00:00
bors[bot]
73ecd2e4e9
Merge #40
...
40: disable pseudo tty allocation in ssh r=Mic92 a=Mic92
Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2023-01-17 22:06:03 +00:00
Jörg Thalheim
d2f7012d1d
expose nixos-remote tools in devshell
2023-01-17 16:32:46 +01:00
Jörg Thalheim
d467467e1a
disable pseudo tty allocation in ssh
...
This will get rid of pseudo tty warnings.
2023-01-17 16:32:06 +01:00
Jörg Thalheim
d1f75c6642
detect nixos installer
...
This requires nixos unstable
2023-01-17 16:30:03 +01:00
Jörg Thalheim
eebada15ea
also check cpu architecture
2023-01-17 16:23:58 +01:00
phaer
b83a2ab4a6
fix maybesudo quotation
...
this specific form did not work for me on machines without sudo:
```
+ '' rm -rf /root/kexec
-bash: line 2: : command not found
```
2023-01-15 23:57:32 +01:00
bors[bot]
75c85709fe
Merge #36
...
36: run nix copy --substitute-on-destination by default r=Mic92 a=phaer
Co-authored-by: phaer <hello@phaer.org>
2023-01-15 19:44:10 +00:00
phaer
89f64e4f21
default to nix copy --substitute-on-destination
2023-01-15 19:27:31 +01:00
phaer
f44e1b2070
extra-files: use rsync -p, -FF
...
After removing -a in #15 , remote extra files are implictly chowned
according to the remote umask. So we (re-)add --perms to apply local
file permissions remotely as this should mostly be expected behavior.
The second -F disables uploading the .rsync-filter file itself if it exists.
2023-01-15 13:03:23 +01:00
Jörg Thalheim
2179012ece
perform reboot in the background
...
This allows the user to monitor reboot happens from a script and run
further actions after it comes back.
2023-01-12 11:53:30 +01:00
bors[bot]
61a3eaa8db
Merge #30
...
30: fix command check when gathering facts r=Mic92 a=Mic92
Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2023-01-12 08:28:59 +00:00
Jörg Thalheim
351a6ba1f0
fix command check when gathering facts
2023-01-12 09:24:28 +01:00
Ilan Joselevich
e2d1a946b1
treewide: add formatting via treefmt
2023-01-12 04:40:53 +02:00
Ilan Joselevich
4d04a9dc93
nixos-remote.sh: add -L/--print-build-logs flag
2023-01-12 01:04:31 +02:00
Ilan Joselevich
4850438135
nixos-remote.sh: don't create symlink in dir
2023-01-12 01:04:31 +02:00
Ilan Joselevich
f18629c159
nix: refactor and start using flake-parts
2023-01-11 00:55:53 +02:00
Ilan Joselevich
52e7ab3910
Use writeShellApplication for packaging
2023-01-10 23:05:47 +02:00