Commit graph

57 commits

Author SHA1 Message Date
Jimmy Reichley
699f6b4495
Allow providing 'sshConfigHost' param 2023-09-29 01:06:40 -04:00
Matthew Croughan
7902ae845e
Merge pull request #45 from mrVanDalo/feature/README
update README.md
2023-06-30 18:15:37 +02:00
Ingolf Wagner
ab194e3511
update README.md 2023-06-30 10:35:53 +02:00
matthewcroughan
b4d17b8e2a default hermetic to true 2022-12-15 15:08:40 +00:00
MatthewCroughan
118c71c511
Merge pull request #35 from MatthewCroughan/mc/fix-flock-impurity
Make flock usage hermetic
2022-10-28 01:46:48 +01:00
matthewcroughan
8dca4f6f58 Make flock usage hermetic 2022-10-28 01:43:24 +01:00
MatthewCroughan
1048460832
Merge pull request #30 from MatthewCroughan/mc/flock-explicit
Use explicit cross-platform flock rather than impurely referencing it
2022-10-26 22:58:28 +01:00
matthewcroughan
572db25f42 Use explicit cross-platform flock rather than impurely referencing it 2022-10-26 22:56:41 +01:00
MatthewCroughan
bc620b8f80
Merge pull request #28 from Fresheyeball/patch-1
Update LICENSE.md
2022-10-11 15:54:52 +02:00
Isaac Shapira
6dd8faea22
Update LICENSE.md 2022-10-10 15:49:49 -06:00
MatthewCroughan
efa6324180
Merge pull request #26 from MagicRB/master
Add options to specify Nix options
2022-09-26 16:27:52 +01:00
Magic_RB
b2c30fe2c2
Add options to specify Nix options
Signed-off-by: Magic_RB <magic_rb@redalder.org>
2022-09-24 15:59:53 +02:00
MatthewCroughan
24c3869eed
Merge pull request #25 from MatthewCroughan/mc/flocking
Add locking via flock(1)
2022-09-12 18:58:39 +01:00
MatthewCroughan
65584f4d1c
Create LICENSE.md 2022-08-22 15:58:31 +01:00
matthewcroughan
aa9b423354 Add locking via flock(1)
This adds basic advisory locking such that two Nixinate deployments do
not run the activation script at the same time, both for local and
remote. The default timeout is 60 seconds, and is currently
unconfigurable.
2022-08-19 05:45:57 +01:00
matthewcroughan
1a19e15736 Use doubled quotes instead of single quotes for SSH commands
This makes writing commands a little easier without escaping everything
2022-08-19 04:51:42 +01:00
MatthewCroughan
0f53b4f183
Merge pull request #22 from MagicRB/master
Add option to substitute on the target machine if local build
2022-06-10 15:40:30 +01:00
Magic_RB
b5683029f9 Add option to substitute on the target machine if local build
Signed-off-by: Magic_RB <magic_rb@redalder.org>

Co-authored-by: matthewcroughan <matt@croughan.sh>
2022-06-10 15:38:13 +01:00
matthewcroughan
6dfbffee74 Update README.md 2022-06-08 13:38:14 +01:00
matthewcroughan
dfbd0c6628 No longer refer to drvPath in hermetic remote rebuilds 2022-06-02 01:27:49 +01:00
MatthewCroughan
4d49f60a09
Merge pull request #21 from MatthewCroughan/mc/hermetic-remote-fix
Fix hermetic remote builds and tests
2022-06-02 01:00:06 +01:00
matthewcroughan
034013af9d Fix hermetic remote builds and tests
In the previous attempt to add this feature, I had forgotten to add the
new tests to tests/default.nix, which meant I believed the feature
worked when it did not. Additionally, real world testing shows that if
the path does not exist on the remote already, that nix build --store
will not work and will throw the following error: 'path '/nix/store/foo'
is required, but there is no substituter that can build it' To fix this,
I've decided to use nix copy --derivation and then nix-store --realise
on the remote. A lot of refactoring is needed to make this codebase
presentable anyway, so this hack is fine for now, though it is
admittedly an unclean implementation.
2022-06-02 00:55:57 +01:00
matthewcroughan
ea61a38231 Update README.md 2022-06-02 00:18:44 +01:00
MatthewCroughan
949e4f41b8
Merge pull request #20 from MatthewCroughan/mc/hermetic-remote
Add support for hermetic remote builds
2022-05-30 19:53:20 +01:00
matthewcroughan
4a356409ca Add support for hermetic remote builds
A hermetic remote rebuild is when Nixinate sends a specific Nix binary
to the remote first, then uses it when activating a system closure,
rather than using the Nix that is already on the remote. This is
defaulted to false for the time being, as the bandwidth usage can be
high. This allows users to avoid the need to bootstrap the remote first
by enabling flakes on the remote Nix binary.
2022-05-29 19:02:50 +01:00
MatthewCroughan
2a660be779
Merge pull request #19 from MatthewCroughan/mc/update-nixpkgs
Update nixpkgs
2022-05-24 05:11:56 +01:00
matthewcroughan
77cdda9589 tests/vmTest: remove empty argument set in baseConfig
Upstream Nixpkgs changed the behavior of the makeTest function so now this is no longer required
2022-05-24 05:06:57 +01:00
matthewcroughan
65323269da flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/76e3df7c0687d5b9ff31431fd4ee4d4cd07a4b2f' (2022-02-03)
  → 'github:nixos/nixpkgs/dfd82985c273aac6eced03625f454b334daae2e8' (2022-05-20)
2022-05-24 05:04:49 +01:00
MatthewCroughan
88b928100b
Merge pull request #18 from MatthewCroughan/mc/fix-tests
tests/vmTest: fix and deduplicate code
2022-05-24 04:53:42 +01:00
matthewcroughan
2f6e57d39f hercules-ci: mark x86_64-linux as a CI system 2022-05-24 03:23:19 +01:00
matthewcroughan
3e9dddd88b tests/vmTest: fix and de-duplicate code
Ironically, I did not properly test that I had made the local and remote
tests distinct. So the exampleFlake was hardcoded to 'local' only.  This
meant that building local and remote tests would return the same
results. This commit fixes that. Additionally, I've made
tests/vmTests/common.nix to deduplicate some of the code between nodes.
2022-05-24 03:06:29 +01:00
MatthewCroughan
783dcfbb9e
Merge pull request #16 from MatthewCroughan/mc/tests
Add vmTest for Nixinate
2022-04-25 00:52:18 +01:00
matthewcroughan
719e06be2b make vmTestLocal and vmTestRemote
This creates and uses a function named mkNixinateTest which takes a
buildOn argument. This expects to be either "local" or "remote". This
means we can make a test for both use cases of Nixinate. One where we
build on the remote machine, and one where we build locally and push to
the remote machine. These tests are then added to the top level of the
tests folder and are imported by the flake.nix
2022-04-21 02:11:21 +01:00
matthewcroughan
971bfe5d1f Add vmTest for Nixinate
This initializes ./test/default.nix which is referred to by the
flake.nix under the `checks` attribute. This default.nix should point to
all future tests, where they can be looked up and ran like:

nix build .#checks.x86_64-linux.vmTest

The test included is a simple NixOS VM Test. It uses Nixinate to deploy
a machine with `services.nginx.enable = true` set, and tests whether
nginx.service is started and reachable after deployment.
2022-04-19 05:43:22 +01:00
matthewcroughan
fcae9a11d0 Provide pkgs in forAllSystems
This is stolen from DavHau's dream2nix flake which reworks forAllSystems to provide two arguments, the pkgs and the system.
2022-03-31 17:40:00 +01:00
matthewcroughan
f042b0170e Add .gitignore 2022-03-31 17:36:45 +01:00
MatthewCroughan
f9025fd06b
Merge pull request #15 from MatthewCroughan/mc/fix-dry-run
Fix dry-runs
2022-03-24 18:48:39 +00:00
matthewcroughan
0d210c1d17 Fix dry-runs
Co-authored-by: Mason Mackaman <masondeanm@aol.com>
2022-03-24 18:46:04 +00:00
MatthewCroughan
e961e078cd
Merge pull request #14 from MatthewCroughan/mc/cleanup
Cleanup Examples
2022-03-23 23:55:24 +00:00
matthewcroughan
56878e1a42 Fix examples 2022-03-23 23:53:43 +00:00
matthewcroughan
abc1895492 Remove examples from flake.nix inputs
Subflakes are not really a stable part of the flakes api, so they shouldn't be included in the flake.nix.
2022-03-23 23:18:23 +00:00
matthewcroughan
886c6a2b3b fix README 2022-03-06 17:18:07 +00:00
MatthewCroughan
f13b5a7dcc
Merge pull request #11 from MatthewCroughan/mc/use-nix-copy
Use nix copy instead of rsync
2022-03-03 19:41:14 +00:00
matthewcroughan
83eb225f9a Use nix copy instead of rsync 2022-02-28 01:15:36 +00:00
MatthewCroughan
6244aa6deb
Merge pull request #7 from pinktrink/master
Add dry runs.
2022-02-17 02:38:08 +00:00
Chloe Kever
2a107a1b7b Add dry runs.
Co-authored-by: Mason Mackaman <masondeanm@aol.com>
2022-02-16 14:56:33 -08:00
Chloe Kever
48f1c6d1df root as the default user. 2022-02-15 18:39:10 -08:00
Chloe Kever
d9e1a0153f Define the script within nix, not bash. 2022-02-15 18:37:50 -08:00
Chloe Kever
6766412769 Remove trailing whitespace. 2022-02-15 18:19:48 -08:00
MatthewCroughan
9299d595e8
Merge pull request #6 from MatthewCroughan/mc/use-nixos-rebuild
Use nixos-rebuild instead of switch-to-configuration script
2022-02-07 01:19:42 +00:00