Commit graph

290 commits

Author SHA1 Message Date
Cole Helbling 9c8284cd06
Add newline to end of plan json output (#283)
* Add newline to end of `plan` json output

This causes some shells (like sh) to continue their prompt right after
the closing brace, which is kinda meh.

* Add newline to end of `receipt.json`

`cat /nix/receipt.json` has the same issue as the previous commit, in
that it will bleed into the prompt for some shells that don't insert an
implicit newline.

* Add newline to end of fixture json documents
2023-02-28 08:38:42 -08:00
Cole Helbling d49e12cd7d
Update default nix_package_url to Nix 2.13.3 (#279) 2023-02-28 08:38:14 -08:00
Cole Helbling f941e13140
Use 0o644 for files, not 0o664 (#278)
(.nix-channels was the last remaining user of the 0o664 typo)
2023-02-28 08:36:09 -08:00
Graham Christensen d20c0b9746
Describe Diagnostics (#276)
Co-authored-by: Cole Helbling <cole.helbling@determinate.systems>
2023-02-27 15:49:40 +00:00
Ana Hobden f9f927840d
Release v0.4.0 (#273) 2023-02-24 22:29:52 +00:00
Ana Hobden 3fc5857db2
Repair is_ci handling, sudo was erasing the variables (#274) 2023-02-24 22:09:26 +00:00
Ana Hobden db329ea65f
Prelease tidy and add is_ci to Diagnostics (#271)
* Some pre-release tidy and add is_ci to diagnostics

* Bump locks

* Fixup cargo-audit raised issues

* Remove a spare 'I' which we were saving for later

* rename a field

* failure_variant, not error_variant
2023-02-24 13:07:11 -08:00
Ana Hobden 59abd1bef0
Use extra-nix-path to resolve nix-shell -p not working (#270) 2023-02-24 12:28:16 -08:00
Ana Hobden 19dd7a13d4
Add diagnostics reporting (#264)
* Add diagnostics reporting

* Some tidying

* Remove injected failure

* Update URL

* Fixups

* Fix tests

* Use triples instead of architecture
2023-02-24 10:11:12 -08:00
Cole Helbling b04b1eec70
Improve permissions checking when dealing with existing files (#267)
* create_file: check if path is file, improve permissions checking

* create_or_insert_into_file: check if path is file, improve permissions checking

* fixup: 100xxx -> xxx modes

* fixup: suggest legal mode for chmod
2023-02-23 19:32:09 +00:00
Ana Hobden 689cf84bbf
Enable deleting users and groups on Mac (#253)
* Enable deleting users and groups on Mac

* Scaffold user change

* Add a warning if it doesn't work in situations we expect it to not work

* Scaffold out doing group member ship -- maybe we need an AddGroup action

* AddUserToGroup action

* Update plans

* Improve messaging

* Nit in error message

* Repair some review nits
2023-02-22 07:46:52 -08:00
Ana Hobden 7e951a5b6a
Set the correct permissions on the zshenv (#257)
* Set the correct permissions on the zshenv

* Update error to suggest chmod instead of delete

* Missed a formatting option

* 644, not 755

* Get a bit more specific

* Mac specific permissions
2023-02-21 07:28:14 -08:00
Ana Hobden a89e05b850
Don't parallize user creation (#260) 2023-02-18 16:56:25 -08:00
Ana Hobden 5e7cb50c50
Don't specify chmod on synthetic.conf (#259) 2023-02-17 14:10:00 -08:00
Ana Hobden f20b2a4b63
Improve error message guidance (#258)
* Improve error message guidance

* Fix octal
2023-02-17 20:41:01 +00:00
Ana Hobden c150d603ea
Remove some bad merge code (#252) 2023-02-15 13:20:58 -08:00
Ana Hobden 1b3d441051
Clarify stability (#244)
* Clarify stability a bit

* Further stability clarification in CONTRIBUTING.md

* Improve some wording
2023-02-13 14:07:35 -08:00
Ana Hobden e3d06c24e7
Offer users better error if fstab entries exist (#241)
* Offer users better error if fstab entries exist

* Split up errors

* Remove a naughty bracket

* last nits
2023-02-10 22:44:39 +00:00
Ana Hobden fc13c1d250
Make systemd unit start detect already running unit (#240)
* Make systemd unit start detect already running unit

* Prod CI

* Fixup messaging

* Reflect comments
2023-02-10 20:43:46 +00:00
Ana Hobden ab4c528595
Rename some of the planners (#243)
* Rename some of the planners

* Fixup Mac

* Also move actions

* Also update CI
2023-02-10 20:35:00 +00:00
Ana Hobden e35278a121
It's the Determinate Nix Installer (#242)
* We like the phrasing the Determinate Nix Installer for now

* Cajoled

* Fixups
2023-02-10 19:48:44 +00:00
Ana Hobden 20b054b50c
Better support existing files with CreateFile and CreateorInsertIntoFile (#239)
* Better support existing files with CreateFile and CreateorInsertIntoFile

* Skip instead of complete if found

* Fixup some permissions

* Fixup nix version used

* Use unix module instead of linux one

* Use unix module instead of linux one in other spot

* Also cover CreateDirectory

* Add some more tests

* Fixup messaging

* Corect some logic inversions
2023-02-10 10:56:22 -08:00
Ana Hobden ce28eedf2a
Better support users/groups existing before install (#238)
* Better support users/groups existing before install

* Skip instead of complete if found

* Prod CI

* Add debuging messages

* Mark completed instead of skipped
2023-02-09 10:34:34 -08:00
Ana Hobden 28db9f2953
Attempt to minimize steam deck display manager restart risk (#237)
* Attempt to minimize steam deck display manager restart risk

* Fiddle a bit more

* Prod CI

* Be much more specific with services we restart
2023-02-08 11:58:48 -08:00
Ana Hobden 4884588339
Bump Nix to 2.13.2 (#236)
* Bump Nix to 2.13.2

* Use nix 2.13.2 in flake

* Prod CI
2023-02-08 11:41:36 -08:00
Ana Hobden 2c91bea9eb
Add 32 bit support (#229)
* Add 32 bit support

* Add buildkite job for i686

* Use x86 for system on i686

* Adapt nix-installer.sh script to support i686
2023-02-06 07:50:23 -08:00
Ana Hobden d69f335703
init-less install (#188)
* wip

* Add dockerfile

* Add readme bits

* Fix logic inversion

* Relax init detection error

* Tidying heuristics

* Fix doc tests

* Mac supports start-daemon false

* Get VM tests working

* Add instructions

* Some target_os flagging

* More target flagging

* Fix lints

* Fixup more mac-only stuff

* cfg flag examples too

* Fix planner wording

* More os specific lint fixing

* More refinement on mac and the README

* Add new CI jobs to test no-daemon

* Use nix-installer-pr to point at branch

* Tests with no-init

* init/no-daemon are linux only

* nix tests support a per-distro all attribute

* Add working podman test

* Expand docker tests

* Add contributing notes

* format

* Support both podman and docker

* Update contributing

* Add Windows WSL test script for Ubuntu

* format nix tests

* More ignores to check-spelling

* Add systemd based wsl test

* We don't have root-only darwin

* Reflect review nits

* Reenable tests

* Restore mac plan

* Flag off os specific tests

* Better cfg flagging

* Remove dead comments

* Rework readme to look better with new sections

* Correct codeblock language

* Remove some warnings
2023-02-01 12:35:52 -08:00
Ana Hobden 4d2e2c3911
Use 30k range not 3k range for UIDs on Linux and 30k for a GID on all (#222) 2023-02-01 10:41:10 -08:00
Ana Hobden 8042ac5131
Add plist use to the CreateFstabEntry action (#221) 2023-02-01 10:40:56 -08:00
Ana Hobden fd149eef47
Verify the apfs volume doesn't already exist before trying to create it (#217)
* Verify the apfs volume doesn't already exist before trying to create it

* Use plist instead of raw parsing

* Remove an unwrap
2023-02-01 10:40:42 -08:00
Ana Hobden 23c453f371
Use a UUID instead of volume name for fstab on Mac (#215)
* Use a UUID instead of volume name for fstab on Mac

* reflect review

* Don't quote the UUID in fstab
2023-01-31 08:49:22 -08:00
Ana Hobden 9dbbc9b7be
Correct --no-modify-profile (#206)
* Correct --no-modify-profile

* Correct env
2023-01-20 20:08:34 +00:00
Ana Hobden e81456673b
Improve Mac explain output (#205) 2023-01-20 19:53:55 +00:00
Ana Hobden fb168f4457
Pass SHELL through self-escalation (#195) 2023-01-18 10:14:06 -08:00
Graham Christensen b3b168e32c
Add (nix:$name) as a prefix to the bash prompt (#191)
* Add `(nix)` as a prefix to the bash prompt

Make it clearer when you're in the terminal vs. not.

* bash prompt prefix: put the project's name in the terminal

* Blame our installer for the nix.conf

* fixup: adding the version to the nix.conf

* force a space after the prefix
2023-01-18 07:11:05 -08:00
Ana Hobden 10c6cfac7e
Trim irrelevant mac warning (#186) 2023-01-13 21:03:48 +00:00
Ana Hobden f1df7ed432
Allow users to answer e at prompts (#183)
* Allow users to answer e at prompts

* Rename to currently_explaining

* Speeling

* Show options fully in prompt

* Better coloring
2023-01-12 19:29:13 +00:00
Ana Hobden 80c0f344c7
BUGFIX: CreateOrInsertIntoFile was not reverting (#180)
* BUGFIX: CreateOrInsertIntoFile was not reverting

* ci prod

* Fixup file naming

* Fix tempdir naming

* fixup

* In a module

* truncate
2023-01-11 22:09:12 +00:00
Ana Hobden 11e4d64c76
BUGFIX: CreateDirectory now properly prunes when it should (#181)
* BUGFIX: CreateDirectory now properly prunes when it should

* in a module
2023-01-11 21:56:29 +00:00
Ana Hobden 7ce0ae5391
Add some tests to CreateFile (#182)
* Add some tests to CreateFile

* in a module
2023-01-11 21:52:55 +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
Ana Hobden 232789ed1c
Fixup fdesetup isactive outputting when it should not (#163) 2023-01-09 09:24:24 -08: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
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 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 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
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 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 e2e841ab8e
Improve messaging on install failures and reverts (#118) 2022-12-13 09:11:46 -08: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 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 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
Ana Hobden 72792372ee
Tidy UX, make --logger param (#108)
* Tidy UX, make --logger param

* Include cargo change
2022-12-09 11:15:54 -08:00
Graham Christensen cda9fcfc03
nix -> Nix (#106)
* nix -> Nix

* Update create_user.rs

* Update create_users_and_groups.rs
2022-12-09 10:42:27 -08:00
Ana Hobden c2a4f3cbc9
Update nix (#103)
* Update nix

* Update ci
2022-12-09 08:17:45 -08:00
Ana Hobden cfded4bb8a
Uninstalling from /nix/harmonic works (#100)
* Move binary out of /nix if it is there during uninstall

* Add tracing

* Stick some random bytes on the end of the tmp exe
2022-12-09 07:36:44 -08:00
Ana Hobden ac5660b3e0
Fix the nix-directory.service possibly erroring and preventing nix from working (#101) 2022-12-09 07:36:35 -08:00
Ana Hobden fe83b35199
Fixup Mac curl $URL | sudo sh -s (#99)
* Fixup Mac curl sh

* We not longer require sudo for the script
2022-12-08 08:04:49 -08:00
Ana Hobden 0e4fcd3c3b
Gobble a specific stderr which was erroring when it shouldn't (#98) 2022-12-07 11:29:23 -08:00
Ana Hobden f58280a11a
fish support (#76)
* Make plans versioned

* Delint

* speeeeeeeeling

* remove file that was dead

* Flesh out docs and improve public API

* Speeling

* Fixups

* Fix doctests

* Do a better job with actionstate

* Add some more docs

* Fix doctest

* Make CLI stuff optional

* Touchup

* Speeling

* Add fish support

* Add shell tests

* Add login shell tests

* Improve provisioning behavior of shell profiles

* Make created shell profiles executable

* Bump nix

* Try interactive shell

* Fixup merge

* Bad yaml, bad

* Tweak ci

* Set GITHUB_PATH

* Do github runner automatically

* Use GITHUB_PATH more

* use login shells again

* Ouytput github path in ci

* Okay so GITHUB_PATH is a UNIX socket?

* Okay yup they are UNIX sockets

* Have the macs dump their github path

* YAML stuff

* Pass github path in invocation

* Bump plans

* Okay it is not a socket

* Remove debugging

* Review fixes

* Pass correct shell arg to mac

* Echo github path

* Echo the path, then...

* Join GITHUB_PATH writes
2022-12-07 08:22:24 -08:00
Ana Hobden 5bad0ec1f5
Harmonic stores itself during install (#94)
* Harmonic stores itself during install

* Use provisioned harmonic to do uninstall in CI

* Steam deck is a special case

* Fix mac hanging
2022-12-06 07:13:13 -08:00
Ana Hobden ec0071d28f
Fix missing indicator for successful install (#93)
* Add successful install message

* No extra newline

* Use new wording
2022-12-05 20:21:11 +00:00
Ana Hobden 32dcfe73e7
Planner explain output fix (#92) 2022-12-05 12:10:28 -08:00
Ana Hobden 4ce8d94ac7
Create ActionError (#79)
* wip

* Fixes

* Fix a comment
2022-12-05 08:55:30 -08:00
Ana Hobden ae37842a0d
Add Steam Deck Support (#34)
* Init Steam Deck support

* Improve systemd units

* Handle stopping nix-daemon.service before stopping mount

* Better handle being in a sysext

* Add some install directions

* Add a KDE autostart script

* Tidy up uninstall

* Use stop/disable instead of disable --now

* Fixup a double-disable

* Repair some defaults

* Tidy up services

* Make ci test steam deck planner

* Delete bonus line

* Use newer image

* Get steam-deck working hopefully

* Create steamos-readonly mock

* Make stub of steamos-readonly

* Use sudo for chmod

* Attempt CI fix

* Don't add deck group

* A more clever method

* We have a new method and the CI can be cleaned a bit

* Brazenly disable sandbox on the deck ci

* Extra-conf takes vec

* Dump lsblk mount

* An even more clever method

* More debugging symbols

* More debugging symbols

* Even more debugging

* probe for issues

* Get specific with permissions and ownership (for ci)

* We are now way overboard on debugging symbols

* Specify permissions on created home stub

* Allow specifying persistence

* Cleanup debugging bits

* Fixup persistence path

* Work out some better linking in units

* units don't need executable

* Tidy

* Delint

* Remove a note from readme

* Github actions seems to have build the wrong checkout?

* Doctest repair

* Don't create directory twice

* Restore missing doc comments

Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2022-12-02 07:31:15 -08:00
Ana Hobden 017bcaf1f6
Add skipped option to ActionState (#74)
* Make plans versioned

* Delint

* speeeeeeeeling

* remove file that was dead

* Flesh out docs and improve public API

* Speeling

* Fixups

* Fix doctests

* Do a better job with actionstate

* Add some more docs

* Fix doctest

* Make CLI stuff optional

* Touchup

* Speeling

* add skipped to ActionState
2022-12-02 06:58:25 -08:00
Ana Hobden c39bf0a510
Flesh out docs and tidy up public API substantially (#67)
* Make plans versioned

* Delint

* speeeeeeeeling

* remove file that was dead

* Flesh out docs and improve public API

* Speeling

* Fixups

* Fix doctests

* Do a better job with actionstate

* Add some more docs

* Fix doctest

* Make CLI stuff optional

* Touchup

* Speeling
2022-11-28 22:57:35 +00:00
Ana Hobden f1d12149de
improve the output of some errors and plans (#66)
* improve the output of some errors and plans

* speeling
2022-11-25 11:50:21 -08:00
Ana Hobden 7cc71f1ccd
Make plans versioned (#62)
* Make plans versioned

* Delint

* speeeeeeeeling

* remove file that was dead
2022-11-25 11:46:38 -08:00
Ana Hobden ad44b85c97
Use process groups with tokio (also crate bump) (#63)
* Use process groups with tokio (also flake/crate bump)

* Use pgid0

* Maybe this checkout has a non-broken curl on mac

* Don't update flake at all
2022-11-25 08:02:00 -08:00
Ana Hobden 38ac180052
Tidy tracing (#57)
* Tidy tracing

* Forgot a few changes

* Remove more boilerplate

* Repair Plan::describe_revert

* More valid default settings

* fmt

* Use correct execute/revert calls

* Split up Linux Daemon disable and stop

* Detect state and act on it

* Fixup pathes

* Add a missing step to the mac bits

* Unload instead of disable

* Prune out again

* Squelch some stdout

* Clean lint

* Better log for no-delete-directory case

* Even more verbose messages on CreateDirectory

* Less broken code

* Use try_execute where it should be used

* Final tweaks

* Add some docs
2022-11-23 09:18:38 -08:00
Ana Hobden 7255c7e5a1
Split up Linux Daemon disable and stop (#60)
* Split up Linux Daemon disable and stop

* Detect state and act on it

* Fixup pathes

* Handle linked
2022-11-21 12:54:32 -08:00
Ana Hobden b06ad289fc
More valid default settings (#59) 2022-11-21 10:50:12 -08:00
Ana Hobden d5757e68bd
Update flake/cargo deps (#56) 2022-11-16 21:11:14 +00:00
Ana Hobden 6f64bb0092
Detect if nix is installed (#51)
* Add Nix installed detection

* Call nix-env --version instead
2022-11-15 08:22:51 -08:00
Ana Hobden 2dcda0a801
Merge pull request #46 from DeterminateSystems/hoverbear/ds-431-ctrlc-should-be-handled-and-terminate-us
Handle signals and user stdin more gracefully
2022-11-14 13:37:52 -08:00
Ana Hobden 021dfaf92b Remove unused 2022-11-14 09:47:00 -08:00
Ana Hobden 15f44b34b3 Note about why this method is valid 2022-11-14 08:33:10 -08:00
Ana Hobden ffaee2669d Merge branch 'main' into hoverbear/ds-441-detect-nixos 2022-11-10 11:04:43 -08:00
Ana Hobden b61e16faed Merge branch 'main' into hoverbear/ds-431-ctrlc-should-be-handled-and-terminate-us 2022-11-10 11:04:29 -08:00
Ana Hobden 91f286a37f Planner error if on NixOS 2022-11-10 10:46:48 -08:00
Ana Hobden c94fad6c3c Use a github token in extra-conf 2022-11-10 10:23:00 -08:00
Ana Hobden 6123d778fe Merge branch 'main' into hoverbear/ds-431-ctrlc-should-be-handled-and-terminate-us 2022-11-10 09:43:38 -08:00
Ana Hobden 673464ede7
Merge pull request #31 from DeterminateSystems/nix-mac-encrypted-volume
Nix Mac encrypted volume support
2022-11-10 09:08:07 -08:00
Ana Hobden 835b8f82a0 Speeling 2022-11-10 09:04:41 -08:00
Ana Hobden 8c77b6eb38 Merge branch 'main' into hoverbear/ds-431-ctrlc-should-be-handled-and-terminate-us 2022-11-10 08:55:44 -08:00
Ana Hobden fb70f9d21b Merge branch 'main' into hoverbear/ds-436-tidy-up-plan-install-ux 2022-11-10 08:49:32 -08:00
Ana Hobden b81ec5f11f Include warning messages on noops for mac 2022-11-10 08:46:31 -08:00
Ana Hobden 1e518cab9f Merge branch 'main' into nix-mac-encrypted-volume 2022-11-10 08:40:55 -08:00
Ana Hobden a77cfc6d0c Include bare harmonic install command 2022-11-10 08:36:07 -08:00
Ana Hobden 5c1be32a08 Merge branch 'main' into hoverbear/ds-436-tidy-up-plan-install-ux 2022-11-10 08:32:20 -08:00
Ana Hobden 0c6102d96f Merge branch 'main' into hoverbear/ds-435-check-if-running-as-root 2022-11-10 08:25:35 -08:00
Katharina Fey 24a38ff454 cargo fmt 2022-11-10 16:08:47 +01:00
Katharina Fey e98827d5ae Restructure common actions into common and base
Base actions are those that don't depend on another action to execute.
They mostly map to "very simple" OS operations like creating a
directory or user.  Base actions MUST be multi-platform compatible.
Common actions may then use any set of base actions or other common
actions.  Base actions MUST NOT depend on other base actions.
2022-11-10 15:54:12 +01:00
Ana Hobden 6ff452420b Merge branch 'main' into hoverbear/ds-411-install-should-detect-existing 2022-11-09 15:23:45 -08:00
Ana Hobden 942c652fc2 Handle signals and user stdin more gracefully 2022-11-09 15:19:32 -08:00
Ana Hobden 8b3205e944
Merge pull request #42 from DeterminateSystems/hoverbear/ds-427-add-ci-jobs-to-do-install-uninstall
Add new CI jobs that test install/uninstall
2022-11-09 13:37:59 -08:00
Ana Hobden 9fa8d0e948 Remove dead code 2022-11-09 10:13:49 -08:00
Ana Hobden c22f92aee4 Tidy up plan / install UX 2022-11-09 10:09:20 -08:00
Ana Hobden 9c0dd087c3 Check if running as root during install and uninstall 2022-11-09 09:56:28 -08:00
Ana Hobden a7ab480eea Get repeated install working in CI 2022-11-09 09:25:29 -08:00
Ana Hobden 83dde40db9 Use const in error messages 2022-11-09 08:45:13 -08:00
Ana Hobden 71e63da4e4 undo change 2022-11-08 14:11:45 -08:00
Ana Hobden 4ea3cd221d Actually try to build working code 2022-11-08 13:53:56 -08:00
Ana Hobden 6ef10ff50e Use systemctl disable not enable, don't auto revert in no-confirm 2022-11-08 13:43:06 -08:00
Ana Hobden 47ae6398f8 Use sudo and don't try to prompt on no-confirm 2022-11-08 12:21:02 -08:00
Ana Hobden 658c3ddde7 fmt 2022-11-08 10:31:11 -08:00
Ana Hobden 00ffe96aae Refine plan subcommand UX 2022-11-08 10:20:48 -08:00
Ana Hobden 72d3fcd942 Detect if plan already done 2022-11-08 10:18:05 -08:00
Ana Hobden e57311a807 Install can detect existing /nix/receipt.json 2022-11-08 09:58:53 -08:00
Ana Hobden 80b7c2c1fa Workaround user deletion issues
Signed-off-by: Ana Hobden <operator@hoverbear.org>
2022-11-04 12:24:38 -07:00
Ana Hobden c230ea65f6 Revert accidental name_with_qoutes that broke unencrypted 2022-11-02 09:47:40 -07:00
Ana Hobden 7b8c62e4d5 When user sets encrypted, detect it, else heuristic 2022-11-02 09:32:06 -07:00
Ana Hobden 67efbedae9 Make it so --encrypt false works 2022-11-02 09:29:37 -07:00
Ana Hobden 5cf3ce93b9 Rename volume-encrypt to encrypt 2022-11-02 09:16:21 -07:00
Ana Hobden e079f3ade0 Use the right magic sauce in the mount command 2022-11-02 09:10:44 -07:00
Ana Hobden 997364ad41 Get key provisioning working better 2022-11-01 15:31:31 -07:00
Ana Hobden 7c4f3206f9 Scaffold 2022-11-01 11:33:54 -07:00
Ana Hobden 914e2e2c13 Various bumps 2022-11-01 09:32:14 -07:00
Ana Hobden 67a67111e6 Improve documentation structure 2022-10-28 14:15:33 -07:00
Ana Hobden eb1d8215f3 Improve planner and plan output 2022-10-28 12:44:07 -07:00
Ana Hobden 615b8b502c Fixup a mistaken move of actions and make configure_nix_daemon_service cross platform 2022-10-28 10:54:33 -07:00
Ana Hobden a61045f5a8 Move actions into OS-specific 2022-10-28 09:29:15 -07:00
Ana Hobden d71827515a Resolve Linux issue with repeated installs not working
Signed-off-by: Ana Hobden <operator@hoverbear.org>
2022-10-27 08:42:03 -07:00
Ana Hobden 92f6a4e2b7 Cleanup BoxableError location
Signed-off-by: Ana Hobden <operator@hoverbear.org>
2022-10-27 08:38:21 -07:00
Ana Hobden ed039bf1dd Cargo updates
Signed-off-by: Ana Hobden <operator@hoverbear.org>
2022-10-27 06:42:00 -07:00
Ana Hobden f49c155117 Ensure Planners and Actions can be created externally
Signed-off-by: Ana Hobden <operator@hoverbear.org>
2022-10-26 15:13:42 -07:00
Ana Hobden cc1cbe109a Box up errors, dyn Actionables
Signed-off-by: Ana Hobden <operator@hoverbear.org>
2022-10-26 14:14:53 -07:00
Ana Hobden 706af47714 Tidy up some planner api
Signed-off-by: Ana Hobden <operator@hoverbear.org>
2022-10-26 09:27:50 -07:00
Ana Hobden 16acc1fe6c Rework planners to support custom args 2022-10-25 11:57:09 -07:00
Ana Hobden b920b384d3 No long sleep, busy poll instead 2022-10-25 09:06:04 -07:00
Ana Hobden 8924bf5cb7 Hobbling along 2022-10-24 16:16:18 -07:00
Ana Hobden 86a518f2fe Even more mac progress, can plan and start runs 2022-10-20 11:36:44 -07:00
Ana Hobden c75a4ed511 Hammer out a bunch of Mac support 2022-10-19 15:12:50 -07:00
Ana Hobden fcc200b9d0 More fleshing out 2022-10-19 13:32:15 -07:00
Ana Hobden da0219deb0 Find xpath crate, scaffold more 2022-10-18 11:03:19 -07:00
Ana Hobden a29baa2b33 wip mac work 2022-10-17 16:00:16 -07:00
Ana Hobden 64e7423a0a Explore planner pattern using steam deck example 2022-10-17 12:19:07 -07:00
Ana Hobden 144af153f6 Support different planners 2022-10-14 15:14:03 -07:00