Commit graph

223 commits

Author SHA1 Message Date
Ana Hobden 82ec255060
Action extra conf can be lacking newline (#175)
* Try extra-conf with a heredoc

* Test case

* Other test case

* heredoc in yaml goes burr

* use special bash syntax for newline

* Correctly close quotes

* Remove testing symbols

* Use file method

* unwhoops jobs
2023-01-11 11:42:35 -08:00
Ana Hobden 20aa4cdf0b
bump v0.0.2-unreleased (#176) 2023-01-11 16:53:06 +00:00
Ana Hobden 344f2e184c
Fixup badges in README.md (#172) 2023-01-10 15:44:55 +00:00
Ana Hobden bbeed6a729
Release v0.0.1 (#168)
* Release v0.0.1

* Bump fixtures

* Fixup upload_s3.sh

Co-authored-by: Cole Helbling <cole.helbling@determinate.systems>
2023-01-09 13:53:55 -08:00
Cole Helbling 1849d9005a
upload_s3: move arguments to the top (#170) 2023-01-09 21:19:40 +00:00
Cole Helbling 12bf502bcb
upload_s3: provide git ish as argument (#169)
* upload_s3: provide git ish as argument

$GITHUB_SHA isn't the actual PR's HEAD's SHA, but a merge commit or
something.

* upload_s3: use an empty object if the file doesn't exist on s3

It's not pretty, but it works, and the md5sum of a file should never be
"null".

* release-branches: upload to `branch_${name}` instead
2023-01-09 20:38:53 +00:00
Ana Hobden f09bbae5a0
Update README.md to reflect recent changes (#165)
* Update README.md to reflect recent changes

* Update with incoming changes
2023-01-09 18:59:53 +00:00
Ana Hobden 6f50f8ad65
Rename daemon-user-count and make an alias (#159)
* Update actions too

* Fix nix_user_count to nix_build_user_count
2023-01-09 18:31:37 +00:00
Cole Helbling eebb77900f
upload_s3: sync already-existing dir to its destination (#167)
Rather than uploading the same files to S3 twice, upload once and then
sync the directory to its other destination.
2023-01-09 18:02:14 +00:00
Ana Hobden 31af68b23c
When an artifact already exists for an MD5, skip it without failure (#166) 2023-01-09 17:55:16 +00:00
Ana Hobden 6fbe857c0f
Update locks (#164) 2023-01-09 09:30:11 -08:00
Ana Hobden 232789ed1c
Fixup fdesetup isactive outputting when it should not (#163) 2023-01-09 09:24:24 -08:00
Cole Helbling e9e29aacb1
release: init action to release first party PRs (#162)
* release: init action to release first party PRs

* release: check if revision has already been uploaded

We don't want to waste bandwidth on files that already exist.

* release: consolidate s3 uploading into single script; check if artifact already uploaded

* release: only upload release for PR if it has the "upload to s3" label
2023-01-09 17:02:50 +00:00
Linus Heckemann f2606d3127
Linus/ds 576 nix store should be in path directly (#148)
* CreateOrAppendFile: setuid safety

* Apply a sensible default mode if the file didn't already exist

* remove some incorrect docs

* Implement CreateOrInsertFile and use it instead of Append for shell rcs

Ubuntu's bashrc has the following lines in it:

  # If not running interactively, don't do anything
  [ -z "$PS1" ] && return

This means that anything appended to the file will only take effect in
interactive sessions. However, we want noninteractive shells to have
Nix on PATH too, e.g. for remote builds. Therefore, we need to add our
snippet to the beginning of the file, not the end.

* Adjust test fixtures to match new behaviour

* interaction: indicate default for confirm correctly

* CreateOrInsertFile: use randomised temporary filename

* Fix temp file creation

* Apply permissions to temp file, not final file

The final file may not exist, and the temporary file is the one whose
permissions will actually be preserved.

* Use the right ActionError for renaming

* Test the SSH behaviour properly

* cargo fmt

* [DS-574] Write to zshenv instead of zshrc

* CreateOrInsertFile -> CreateOrInsertIntoFile

Also move appending behaviour in here.

* Update Linux fixtures

* update darwin-multi fixture

* fix fixture

* fmt
2023-01-09 08:30:28 -08:00
Cole Helbling d410728461
release: create releases for specified branches (#152)
* release: create releases for specified branches

* release: split action into one for branches, one for tags

* release: change the NIX_INSTALLER_BINARY_ROOT upon release

This way, we can be sure we use the right binaries to match the script.
2023-01-09 08:28:39 -08:00
Ana Hobden 844faa0d20
installplan should not copy self binary (#161)
* Make binary copy self, not library

* lints
2023-01-09 08:26:08 -08:00
Ana Hobden b60c4c84d0
Be more friendly to light terminals (#149)
* Be more friendly to light terminals

* Remove all white()

* Fix botched merge

* fmt

Co-authored-by: Linus Heckemann <git@sphalerite.org>
2023-01-05 08:55:25 -08:00
Ana Hobden cefc927ff5
Fix use of UID where username should be on Github actions (#157)
* Fix use of UID where username should be on Github actions

* Add check to ensure that nix profile add works

* It's nix profile install, ana
2023-01-05 07:56:09 -08:00
Ana Hobden ab00af7924
Show revert instead of step while reverting (#158) 2023-01-05 13:44:18 +01:00
Ana Hobden a2daff2980
Document release flow (#155)
* Add release flow

* Touchups
2023-01-04 19:06:28 +00:00
Cole Helbling 33390d0c8a
release: init action to create release with buildkite artifacts (#150)
* buildkite: also build x86_64-darwin

* release: init action to create release with buildkite artifacts
2023-01-04 10:10:11 -08:00
Ana Hobden 14cb35b3e4
Un-whoops success message (#153) 2023-01-04 10:09:16 -08:00
Ana Hobden e27d01f221
Correctly expected error in default planner if nix installed (#151)
* Correctly expected error in default planner if nix installed

* fixup
2023-01-04 09:32:45 -08:00
Ana Hobden 55906e15bb
Note how to test action in CONTRIBUTING.md (#141) 2023-01-04 09:32:29 -08:00
Ana Hobden d510fa812f
Resolve a system unit ordering bug after update (#144) 2023-01-03 10:31:17 -08:00
Ana Hobden deee222ad2
Fix ubuntu 16.04 support (#140)
* Fix ubuntu 16.04 support

* Format

* Correct env settings

* Rearrange plan a bit
2022-12-23 13:24:06 -08:00
Ana Hobden 3706bd387a
BUGFIX: Call nix-store --load-db & add sandboxed Qemu tests (#138)
* Add metadata do Cargo.toml

* Add docs link

* wip

* Get it mostly working

* Handle empty channels, local files, offline mode

* Get them working

* Expand CONTRIBUTING.md

* Expand more

* Correct some formatting/mistypes

* More notes about steps

* Correct speeling

* Improve ubuntu naming

* Add note about specific branch/checkout testing

* Review corrections

* Change match to if
2022-12-23 11:07:14 -08:00
Luc Perkins 44b9e623cc
Remove newline before access-tokens (#136) 2022-12-23 10:43:55 -08:00
Cole Helbling 08e6af0388
buildkite: run on x86_64 and aarch64 linux (#131) 2022-12-23 10:41:22 -08:00
Ana Hobden ec1eaea42e
Add some more branding to action (#129) 2022-12-23 09:49:23 -08:00
Ana Hobden 860bc4d040
Added metadata (#134)
* Add metadata do Cargo.toml

* Add docs link
2022-12-21 19:58:18 +00:00
Ana Hobden b7033d0a6c
Correct the error message if the user doesn't have a tty (#133) 2022-12-21 11:37:55 -08:00
Ana Hobden 986998f75a
Update deps (#130) 2022-12-19 22:52:09 +00:00
Ana Hobden 0927e2fd8b
Rename harmonic to nix-installer (#125) (#127)
* Rename harmonic to nix-installer

* Fix build

* handle nix-install.sh rename

* Forgot some things

* Fix a mistype

* Fix env var

* Fix merge change that popped up
2022-12-19 20:27:25 +00:00
Ana Hobden d299dbf0f2
Rename harmonic to nix-installer (#125)
* Rename harmonic to nix-installer

* Fix build

* handle nix-install.sh rename

* Forgot some things

* Fix a mistype

* Fix env var

* Fix merge change that popped up
2022-12-19 18:26:58 +00:00
Ana Hobden 1e6d7d75c9
Do SELinux checks (#123)
* Do SELinux checks

* Add improved error message with issue link

* Improve SELinux error message

* Correct lint
2022-12-19 07:30:45 -08:00
Ana Hobden c4274c93fb
Add action & Tune Tracing (#119)
* Add action

* Checkout so we have actions.yml

* yaml poking

* Handle GITHUB_TOKEN

* Don't ask github to do templating, use directives for logging

* Missing changes

* Fix build error

* Fix yaml even more

* Add shell command

* Add a wait on the socket again

* Print some debugging

* Use more correct env vars

* Correct install url logic

* Use different style for inputs

* Fix yaml errror

* Tweak around local-root

* provision nix-install.sh as well

* Use nix-install.sh path directory in NIX_INSTALL_URL

* Tweak variables to hopefully work

* Call it BINARY_ROOT instead

* Add exec output

* Set no-confirm

* no echo

* Add token to workflow

* Set no-confirm properly

* Add no-confirm back for uninstall

* Correct some env and vars

* CreateDirectory respects existing symlink

* Add a few more checks to the CI

* pass valid yaml...

* Slightly more aggressive cleanup of /nix

* Ensure steam-deck cleans /home/nix

* Add steam-deck check for persistence

* Canonicalize steam-deck persistence

* Ensure absolute path

* Inverted logic sad

* python3 on mac

* Add readme info and fix a extra-conf mistype

* Add unsaved changes

* More fine grained trace logging

* Restore spans we lost in refactor

* BuiltinPlanner can accept settings

* Reflect feedback

* Push actually working code hopefully this time

* Speeling
2022-12-16 18:55:28 +00:00
Ana Hobden cc3521a798
Perform various flake touchups -- add an overlay (#122)
* Perform various flake touchups -- add an overlay

* Include [pkgs in ForAllSystems

* Forgot a line removal
2022-12-16 10:32:30 -08:00
Ana Hobden 8745a85192
Minimize deps with cargo machete (#120)
* Minimize deps with cargo machete

* Remove default features

* Serde json gets std

* Add a few features to keep

* Reflect change sin dev-deps

* Remove bad optional

* Also remove cfg from nix build
2022-12-14 13:13:09 -08:00
Ana Hobden fce4470051
minimize size (#121) 2022-12-13 18:02:57 +00:00
Ana Hobden e2e841ab8e
Improve messaging on install failures and reverts (#118) 2022-12-13 09:11:46 -08:00
Ana Hobden fab886cf4d
Refine README.md a bit (#117)
* Refine README.md a bit

* Add firefox invocation

* Reflect feedback
2022-12-12 20:56:37 +00:00
Ana Hobden 51a2d0bbae
Fix --no-default-features build (#114)
* Fix --no-default-features build

* Correct yaml for gha

* gha yaml sure is a thing

* Fix yaml yet again

* Fix nix develop invocation

* Fix --all-features pass
2022-12-12 12:21:10 -08:00
Ana Hobden dad8180985
Allow expected errors (#116)
* Move binary out of /nix if it is there during uninstall

* Add tracing

* Sorta working...

* Have expected() return an err

* Better handle expected errors during install

* Hello trailing whitespace
2022-12-12 12:20:50 -08:00
Ana Hobden 78ebeacb50
Include install-nix.sh in artifacts (#115)
* Include install-nix.sh in artifacts

* Don't use src
2022-12-12 10:59:45 -08:00
Ana Hobden 29a345f99f
Curl on ci (#110)
* Perform sudo in harmonic

* Remove sudo in scripts

* A bit more tweaking...

* Yay unix

* Use curl sh on ci

* Preserve environments we require

* Fix the yamls

* Better explain a run step

* Preserve GITHUB_PATH too

* Correct trace

* Include install-nix.sh in artifacts

* Remove unused vars

* Use /nix/harmonic for uninstall

* Only pass --preserve-env if required

* Wait for python server to start

* Use a sudo uninstall

* Pass verbosity correctly

* Pass no-confirm by env

* Pass no-confirm by env redux

* Hahaha very funny yaml

* handle env in no-confirm

* Preserve env on ci

* Mac stuff
2022-12-12 09:27:43 -08:00
Ana Hobden fede228894
Better uninstall version error (#113)
* More useful error message on version incompat

* Even more useful
2022-12-12 08:21:46 -08:00
Ana Hobden 1a90f50962
Don't output a <dscl_cmd> DS Error: -14136 (eDSRecordNotFound) (#107) 2022-12-12 08:18:39 -08:00
Ana Hobden d3b425a258
We didn't need openssl anyways (#111)
* We didn't need openssl anyways

* Fmt

* We don't need pkg-config either

* Add trivial rust-toolchain.toml

* fmt
2022-12-12 08:18:29 -08:00
Ana Hobden 148625c85f
Sudo in harmonic (#109)
* Perform sudo in harmonic

* Remove sudo in scripts

* A bit more tweaking...

* Yay unix

* Preserve environments we require

* Preserve GITHUB_PATH too

* Correct trace

* Remove unused vars

* Only pass --preserve-env if required
2022-12-09 13:00:37 -08:00