Commit Graph

328 Commits

Author SHA1 Message Date
notgne2
ccf5160c1f
Merge branch 'master' into notgne2/fix-settings-merge 2020-12-27 10:51:15 -07:00
notgne2
d01eab0e97
Fix the order in which settings are merged 2020-12-22 11:36:48 -07:00
notgne2
91e934fd9e
Merge pull request #30 from serokell/notgne2/fix-substitution
Fix fast_connection flag to enable substitute-on-destination correctly
2020-12-20 11:19:02 -07:00
notgne2
3adc593f19
Fix fast_connection flag to enable substitute-on-destination correctly 2020-12-19 21:25:12 -07:00
Andreas Fuchs
7d4020f130 Simplify the types involved a little
The cursed match is still cursed, but at least we're not sending
useless data across channels anymore.
2020-12-15 13:00:01 -07:00
Andreas Fuchs
4ed33219a9 Build "activate" binary on all platforms
Now that activate uses a cross-platform fs notification library, we
can build it on Darwin again (and build its deps separately, speeding
up recompiles there).
2020-12-15 13:00:01 -07:00
Andreas Fuchs
c3b36bbb3b Use notify crate to learn about deletion of the activation sentinel
We should now be able to deploy to non-Linux systems, and build all
the required binaries too.
2020-12-15 13:00:01 -07:00
Andreas Fuchs
3bcb3879bd Update tokio & pull in notify, instead of inotify
The notify crate is cross-platform, and the newer tokio has some bug
fixes. Let's use those.
2020-12-15 13:00:01 -07:00
notgne2
ba7f57086c
Add reuse header to logo 2020-12-15 12:24:17 -07:00
notgne2
e633fc9d65
Add logo, remove early-development notice 2020-12-15 12:23:39 -07:00
Andreas Fuchs
c9eb270a8b
Debump the smol_str version to 0.1.16 to build on rust 1.45.2 (#28)
* Debump the smol_str version to 0.1.16 to build on rust 1.45.2

Rust 1.45.2 is what ships in the 20.09 release, and smol_str 0.1.17 is
incompatible with it.

* Clarify version bounds on the smol_str dependency
2020-12-15 12:08:31 -07:00
Steven Roose
dc466f2688 README: Fix example 2020-12-07 17:17:14 -07:00
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