Skip to content

Commit

Permalink
Merge branch 'master' into master-riscv64-linux
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4A6F authored Sep 20, 2023
2 parents 7fb5635 + e3f4183 commit f7f83fe
Show file tree
Hide file tree
Showing 8 changed files with 319 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Nix flake check
on: push
on: pull_request

jobs:
check:
Expand Down
163 changes: 144 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ edition = "2018"

[dependencies]
clap = { version = "3.0.0-beta.2", features = [ "wrap_help" ] }
dirs = "5.0.1"
flexi_logger = "0.16"
fork = "0.1"
futures-util = "0.3.6"
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ There is also an `activate` binary though this should be ignored, it is only use

### Multi-profile

This type of design (as opposed to more traditional tools like NixOps or morph) allows for lesser-privileged deployments, and the ability to update different things independently of eachother. You can deploy any type of profile to any user, not just a NixOS profile to `root`.
This type of design (as opposed to more traditional tools like NixOps or morph) allows for lesser-privileged deployments, and the ability to update different things independently of each other. You can deploy any type of profile to any user, not just a NixOS profile to `root`.

### Magic Rollback

Expand Down Expand Up @@ -125,8 +125,11 @@ This is the core of how `deploy-rs` was designed, any number of these can run on
path = deploy-rs.lib.x86_64-linux.activate.custom pkgs.hello "./bin/hello";
# An optional path to where your profile should be installed to, this is useful if you want to use a common profile name across multiple users, but would have conflicts in your node's profile list.
# This will default to `"/nix/var/nix/profiles/$PROFILE_NAME` if `user` is root (see: generic options), and `/nix/var/nix/profiles/per-user/$USER/$PROFILE_NAME` if it is not.
profilePath = "/nix/var/nix/profiles/per-user/someuser/someprofile";
# This will default to `"/nix/var/nix/profiles/system` if `user` is `root` and profile name is `system`,
# `/nix/var/nix/profiles/per-user/root/$PROFILE_NAME` if profile name is different.
# For non-root profiles will default to /nix/var/nix/profiles/per-user/$USER/$PROFILE_NAME if `/nix/var/nix/profiles/per-user/$USER` already exists,
# and `${XDG_STATE_HOME:-$HOME/.local/state}/nix/profiles/$PROFILE_NAME` otherwise.
profilePath = "/home/someuser/.local/state/nix/profiles/someprofile";
# ...generic options... (see lower section)
}
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@

deployChecks = deploy: builtins.mapAttrs (_: check: check deploy) {
deploy-schema = deploy: final.runCommand "jsonschema-deploy-system" { } ''
${final.python3.pkgs.jsonschema}/bin/jsonschema -i ${final.writeText "deploy.json" (builtins.toJSON deploy)} ${./interface.json} && touch $out
${final.check-jsonschema}/bin/check-jsonschema --schemafile ${./interface.json} ${final.writeText "deploy.json" (builtins.toJSON deploy)} && touch $out
'';

deploy-activate = deploy:
Expand Down
Loading

0 comments on commit f7f83fe

Please sign in to comment.