Commit graph

188 commits

Author SHA1 Message Date
github-actions[bot] e5771bb5ce flake.lock: Update
Flake lock file updates:

• Updated input 'fenix':
    'github:nix-community/fenix/ab24d0ad17a733624b99f5d6466e71b8c239a001' (2022-12-09)
  → 'github:nix-community/fenix/14516c0fb797c621d30dfb6a822b8f14ef960d95' (2022-12-17)
• Updated input 'fenix/rust-analyzer-src':
    'github:rust-lang/rust-analyzer/6e8a54d0f68702cf7981c8299357838eb0f4d5b2' (2022-12-07)
  → 'github:rust-lang/rust-analyzer/e0aa5afd7bd69813154e97a25cb6c6b4f05ea1be' (2022-12-16)
• Updated input 'naersk':
    'github:nix-community/naersk/6944160c19cb591eb85bbf9b2f2768a935623ed3' (2022-09-03)
  → 'github:nix-community/naersk/d998160d6a076cfe8f9741e56aeec7e267e3e114' (2022-12-15)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/99ec06122f481588abafd91f2710d80a5320efe6' (2022-12-08)
  → 'github:nixos/nixpkgs/5cb48ea3c19ce2e5746a44d6b91847396bd28c1f' (2022-12-14)
2022-12-18 00:02:09 +00: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
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 ef884a348a
Update deps (#104) 2022-12-09 08:17:35 -08:00
Ana Hobden f9532cb194
More portable EUID check (#102) 2022-12-09 08:17:26 -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 90bab4034c
Recommend sudo (#97) 2022-12-07 16:12:58 +00:00
Ana Hobden f0f1171026
Update the install URL (#95)
* Update the install URL

* Add a try it section to the readme

* Prune newline
2022-12-07 02:59:25 +01: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 444a9fd8f2
Nix flake checks now do ci-checks (#88)
* Nix flake checks now do ci-checks

* Make sure checks actually run
2022-12-05 10:27:12 -08:00
Ana Hobden 898d053c70
Add plan tests (#91) 2022-12-05 09:47:13 -08:00
Ana Hobden 4ce8d94ac7
Create ActionError (#79)
* wip

* Fixes

* Fix a comment
2022-12-05 08:55:30 -08:00
Ana Hobden 16e886f53b
Tidy the CONTRIBUTING.md doc (#87) 2022-12-02 21:20:48 +00:00
Ana Hobden 700496be3e
Bump deps (#86) 2022-12-02 08:20:42 -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 0e2f27713f
Make nix-install.sh script point at a binary (#77)
* Make nix-install.sh script point at a binary

* feedback suggestions
2022-12-02 07:30:32 -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 4134f7af02
Add buildkite job for harmonic (#78)
* Add buildkite job for harmonic

* Follow newline rules

* Specify nix
2022-12-02 06:57:55 -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 a87f1f997c
Fixup lack of default param (#55) 2022-11-16 21:11:38 +00:00
Ana Hobden d5757e68bd
Update flake/cargo deps (#56) 2022-11-16 21:11:14 +00:00
Ana Hobden db722fd2b9
Attempt a cache (#54)
* Attempt a cache -- for fun

* Correct path

* Don't cache lints

* Remove bonus args

* Delete bonus line

* Use newer image

* Use non pwd store relocation

* No steam deck job

* Change artifact behavior slightly

* Roundabout fetching of the binary

* Fixup path

* Fixup bad job id
2022-11-16 21:08:42 +00:00
Ana Hobden 0ba6ffe32c
Touchup nix-install.sh (#53)
* Remove rustup's help from the nix script

* Handle --no-confirm with no tty
2022-11-16 11:36:47 -08:00