Commit Graph

316 Commits

Author SHA1 Message Date
Andreas Fuchs
05d21e0b66 Add SPDX-FileCopyrightText to the three files that I changed substantially 2020-12-02 10:24:23 -07:00
Andreas Fuchs
7436f4265b Reinstate NoProfileUser
Seems to have been removed by mistake in the previous cleanup
2020-12-02 10:24:23 -07:00
Alexander Bantyev
65a2f1b18d Clean up utils/mod.rs
Now that we don't copy `activate` from the same directory as `current_exe`,
we can skip the check that the `current_exe` is reachable and in nix store.
2020-12-02 10:24:23 -07:00
Alexander Bantyev
2d0ad40c64 activate flake check: confirm that activate-rs exists in the profile 2020-12-02 10:24:23 -07:00
Alexander Bantyev
10194ad529 Fail early if there is no activation script in profile path 2020-12-02 10:24:23 -07:00
Andreas Fuchs
c1e0f5a9c9 Use DeployData's store path to build the activate-rs path
This gets rid of yet more code, so - win!
2020-12-02 10:24:23 -07:00
Andreas Fuchs
4af6b8114e Don't copy the activate script (it's part of the closure anyway) 2020-12-02 10:24:23 -07:00
Andreas Fuchs
29ab0624e3 Use the profile closure's activate script to activate the profile
This gets rid of the "current_exe" vestige that has stuck around from
when this program was meant to be standalone; instead, we use
the (already known) path to the activate-rs wrapper, which
automatically uses the correct binary for the deploy target platform.
2020-12-02 10:24:23 -07:00
Andreas Fuchs
6ccc0b7ae9 Write an "activate-rs" script into the profile path
This should point to the correct path if the target platform differs
fro the deploying platform.
2020-12-02 10:24:23 -07:00
notgne2
fa4c0a86cd
Use crude Nix parsing for parsing the flake path 2020-11-29 11:51:52 -07:00
notgne2
a19af74789
Use the last . for node/profile name separation, ignore any trailing .. This should solve at least part of #10 2020-11-27 19:05:55 -07:00
notgne2
26bad3a2a6
Quote node and profile names given to nix build (relates to #10) 2020-11-27 18:52:46 -07:00
notgne2
7fa67466c7
Remove old --no-link flags to the Nix build 2020-11-27 15:01:50 -07:00
notgne2
3da8c6d048
Fix ProfileNotFound error message 2020-11-24 22:13:36 -07:00
Andreas Fuchs
42cbe751a8
Fix running & building under macOS (Big Sur) (#9)
* Add xcbuild as native build input 2 ways & pass --verbose to cargo build

* Make "deploy" build on macOS

* Bump the nixpkgs version to one that ships Rust 1.47, which can
  produce binaries under macOS 11 (Big Sur).

* Use darwin-specific options that let Naersk build the "deploy"
  binary under macOS. (With a work-around for
  https://github.com/nmattia/naersk/issues/127, which prevents this
  from being much more straight-forward).

Unfortunately, the "activate" binary can't be built under macOS due to
the inotify dependency; that means the best we can do is to run the
deploy under macOS, not deploy *to* macOS.
2020-11-24 22:11:15 -07:00
notgne2
ed97d54648
Remove references to setActivate from README 2020-11-22 22:02:12 -07:00
notgne2
435ecf9d00
Print deployment if interactive mode is disabled 2020-11-22 21:59:50 -07:00
notgne2
551dd1c304
Remove ref/cows from DeployDefs, add interactive flag (resolves #4) 2020-11-22 21:56:43 -07:00
notgne2
819eca679e
Refactor running to deprecate deploy_all_profiles/push_all_profiles 2020-11-22 21:15:58 -07:00
notgne2
45e99a75f9
Partially add deployment confirmation utilities (for #4) 2020-11-22 20:03:04 -07:00
notgne2
cb50d98884
Use /tmp as temp directory, not /tmp/deploy-rs (resolves #8 by deprecation) 2020-11-22 18:32:04 -07:00
notgne2
08c6bd8b73
Update activate.nixos to take a configuration, not a derivation 2020-11-22 18:12:29 -07:00
notgne2
1795c8aab4
Build nothing if checks attribute is missing in non-flakes mode (fixes #7) 2020-11-21 22:49:55 -07:00
Christian Höppner
222b75ceba fixup! Check auto-rollback flag before deactivating 2020-11-21 22:42:03 -07:00
Christian Höppner
a317b0bcac Check auto-rollback flag before deactivating 2020-11-21 22:42:03 -07:00
Alexander Bantyev
ef53906075 Scope activation commands, deprecate setActivate 2020-11-16 12:54:05 -07:00
Alexander Bantyev
54b6b551a1 Add activation presets for NixOS and noop activation 2020-11-16 12:54:05 -07:00
Christian Höppner
1c84cace61
fixup! [OPS-1085] Add CI 2020-11-16 11:49:00 +00:00
notgne2
47df4ff928
Add reuse headers to shell.nix and .buildkite/pipeline.yml 2020-11-14 20:07:45 -07:00
notgne2
a5d4390606
Format flake.nix 2020-11-14 20:06:56 -07:00
notgne2
9a9d9b5c3e
Remove deprecated checkSchema 2020-11-14 20:05:50 -07:00
notgne2
c15470560e
Update README to document Magic Rollback better, and demonstrate extra Nix arguments 2020-11-14 16:45:07 -07:00
notgne2
beedc12ead
Make magicRollback be enabled by default 2020-11-14 16:44:17 -07:00
notgne2
78c020b50b
Remove "TODO" from README 2020-11-14 16:26:24 -07:00
Christian Höppner
f32a6f17f6 [OPS-1085] Add CI 2020-11-14 14:12:29 -07:00
notgne2
cd751f1e95
Pass extra build args to build command 2020-11-14 21:11:00 +00:00
notgne2
47978fcfc9
Re-order link to examples in overall usage section in README 2020-11-10 23:16:17 -07:00
notgne2
0919b1bf6b
Re-order overall usage description in README 2020-11-10 23:15:09 -07:00
notgne2
df36dbdc2d
Add missing newline to interface.json 2020-11-10 16:37:10 -07:00
notgne2
5160cbd0da
Improve language in README regarding overriding the hostname
Co-authored-by: Christian Höppner <mkaito@users.noreply.github.com>
2020-11-10 16:29:32 -07:00
notgne2
05b8e9ecf3
Fix setActivate documentation in README.md 2020-11-10 16:27:45 -07:00
notgne2
18341e8a13
Add missing newline to .gitignore 2020-11-10 16:24:04 -07:00
notgne2
d9d6310435
Remove bootstrap 2020-11-07 13:02:05 -07:00
notgne2
faa02fe6b5
Add note about profilesOrder functionality 2020-11-07 12:01:40 -07:00
notgne2
6ff3994dbb
Greatly expand documentation 2020-11-07 11:56:22 -07:00
notgne2
3cfc12a2ca
Unmute some more outputs, document the remaining mutes 2020-11-07 00:13:31 -07:00
notgne2
53f4e75244
Mildly improve logging 2020-11-02 15:07:24 -07:00
notgne2
3afb61665d
Abbreviate match expression with unwrap_or() 2020-10-30 19:30:40 -07:00
notgne2
8e82b2a7c9
Show name of profiles missing activation 2020-10-30 19:11:16 -07:00
notgne2
88b40b129c
Fix example command in system example 2020-10-30 18:35:26 -07:00