diff --git a/.circleci/config.yml b/.circleci/config.yml index b9ba591..37cba04 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.1 setup: true orbs: - orb-tools: circleci/orb-tools@11.6.1 + orb-tools: circleci/orb-tools@12.0.2 executors: linux: @@ -35,12 +35,12 @@ workflows: tags: only: /.*/ - orb-tools/publish: - orb-name: eld/nix + orb_name: eld/nix requires: - orb-tools/lint - orb-tools/pack - orb-tools/review - vcs-type: << pipeline.project.type >> + vcs_type: << pipeline.project.type >> # Use a context to hold your publishing token. context: orb-publishing filters: @@ -48,8 +48,9 @@ workflows: only: /.*/ # Triggers the next workflow in the Orb Development Kit. - orb-tools/continue: - pipeline-number: << pipeline.number >> - vcs-type: << pipeline.project.type >> + orb_name: eld/nix + pipeline_number: << pipeline.number >> + vcs_type: << pipeline.project.type >> requires: [orb-tools/publish] filters: tags: diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 1fbc33d..4dc3a0b 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -1,7 +1,6 @@ version: 2.1 orbs: - nix: eld/nix@dev:<> - orb-tools: circleci/orb-tools@11.6.1 + orb-tools: circleci/orb-tools@12.0.2 executors: linux: @@ -49,15 +48,15 @@ workflows: only: /.*/ context: nix - orb-tools/publish: - orb-name: eld/nix + orb_name: eld/nix requires: - test-nix-install - orb-tools/lint - orb-tools/review - orb-tools/pack context: orb-publishing - vcs-type: << pipeline.project.type >> - pub-type: production + vcs_type: << pipeline.project.type >> + pub_type: production filters: tags: only: /^v.*/ @@ -75,8 +74,8 @@ jobs: steps: - checkout - nix/install - - nix/install-cachix - - nix/with-cachix: + - nix/install_cachix + - nix/with_cachix: cachix-user: eld nix-command: nix profile install nixpkgs#cowsay.out - run: diff --git a/src/commands/install.yml b/src/commands/install.yml index 392a22c..3bea087 100644 --- a/src/commands/install.yml +++ b/src/commands/install.yml @@ -1,21 +1,21 @@ description: > - This command installs Nix using the DeterminateSystems nix-installer + This command installs Nix using the DeterminateSystems nix_installer parameters: channels: - description: "Channel(s) to add (e.g. `nixpkgs=https://nixos.org/channels/nixpkgs-unstable`)" + description: "Channel(s) to add (e.g. `nixpkgs=https://nixos.org/channels/nixpkgs_unstable`)" type: string default: "" - extra-conf: + extra_conf: description: > Extra configuration lines for `/etc/nix/nix.conf` - By default, this appends `trusted-users = root $USER` to the extra config + By default, this appends `trusted_users = root $USER` to the extra config so the CI user can configure binary caches. type: string default: "" init: - description: "The init systems to configure, requires `planner: linux-multi` (allowing the choice between `none` or `systemd`)" + description: "The init systems to configure, requires `planner: linux_multi` (allowing the choice between `none` or `systemd`)" type: enum default: "" enum: ["", "none", "systemd"] @@ -24,47 +24,47 @@ parameters: type: enum default: "" enum: ["", "pretty", "json", "full", "compact"] - mac-case-sensitive: + mac_case_sensitive: description: "Use a case sensitive volume (`planner: macos` only)" type: boolean default: false - mac-encrypt: + mac_encrypt: description: "Force encryption on the volume (`planner: macos` only)" type: boolean default: false - mac-root-disk: + mac_root_disk: description: "The root disk of the target (`planner: macos` only)" type: string default: "" - mac-volume-label: + mac_volume_label: description: "The label for the created APFS volume (`planner: macos` only)" type: string default: "" - modify-profile: + modify_profile: description: "Modify the user profile to automatically load nix" type: boolean default: false - nix-build-group-id: + nix_build_group_id: description: "The nix build group GID" type: integer default: -1 - nix-build-group-name: + nix_build_group_name: description: "The Nix build group name" type: string default: "" - nix-build-user-base: + nix_build_user_base: description: "The Nix build user base UID (ascending)" type: integer default: -1 - nix-build-user-count: + nix_build_user_count: description: "Number of build users to create" type: integer default: -1 - nix-build-user-prefix: + nix_build_user_prefix: description: "The Nix build user prefix (user numbers will be postfixed)" type: string default: "" - nix-package-url: + nix_package_url: description: "The Nix package URL" type: string default: "" @@ -76,8 +76,8 @@ parameters: description: "Force a reinstall if an existing installation is detected (consider backing up `/nix/store`)" type: boolean default: false - start-daemon: - description: "If the daemon should be started, requires `planner: linux-multi`" + start_daemon: + description: "If the daemon should be started, requires `planner: linux_multi`" type: string default: "" @@ -88,20 +88,20 @@ steps: shell: node environment: CHANNELS: << parameters.channels >> - NIX_EXTRA_CONF: << parameters.extra-conf >> + NIX_EXTRA_CONF: << parameters.extra_conf >> INIT: << parameters.init >> LOGGER: << parameters.logger >> - MAC_CASE_SENSITIVE: << parameters.mac-case-sensitive >> - MAC_ENCRYPT: << parameters.mac-encrypt >> - MAC_ROOT_DISK: << parameters.mac-root-disk >> - MAC_VOLUME_LABEL: << parameters.mac-volume-label >> - MODIFY_PROFILE: << parameters.modify-profile >> - NIX_BUILD_GROUP_ID: << parameters.nix-build-group-id >> - NIX_BUILD_GROUP_NAME: << parameters.nix-build-group-name >> - NIX_BUILD_USER_BASE: << parameters.nix-build-user-base >> - NIX_BUILD_USER_COUNT: << parameters.nix-build-user-count >> - NIX_BUILD_USER_PREFIX: << parameters.nix-build-user-prefix >> - NIX_PACKAGE_URL: << parameters.nix-package-url >> + MAC_CASE_SENSITIVE: << parameters.mac_case_sensitive >> + MAC_ENCRYPT: << parameters.mac_encrypt >> + MAC_ROOT_DISK: << parameters.mac_root_disk >> + MAC_VOLUME_LABEL: << parameters.mac_volume_label >> + MODIFY_PROFILE: << parameters.modify_profile >> + NIX_BUILD_GROUP_ID: << parameters.nix_build_group_id >> + NIX_BUILD_GROUP_NAME: << parameters.nix_build_group_name >> + NIX_BUILD_USER_BASE: << parameters.nix_build_user_base >> + NIX_BUILD_USER_COUNT: << parameters.nix_build_user_count >> + NIX_BUILD_USER_PREFIX: << parameters.nix_build_user_prefix >> + NIX_PACKAGE_URL: << parameters.nix_package_url >> PLANNER: << parameters.planner >> REINSTALL: << parameters.reinstall >> - START_DAEMON: << parameters.start-daemon >> + START_DAEMON: << parameters.start_daemon >> diff --git a/src/commands/install-cachix.yml b/src/commands/install_cachix.yml similarity index 75% rename from src/commands/install-cachix.yml rename to src/commands/install_cachix.yml index 5dc3d49..b2c4340 100644 --- a/src/commands/install-cachix.yml +++ b/src/commands/install_cachix.yml @@ -5,17 +5,17 @@ description: > environment variable. parameters: - cachix-installable: + cachix_installable: description: > The installable path for Cachix Defaults to `github:nixos/nixpkgs-unstable#cachix` type: string - default: "github:nixos/nixpkgs/nixpkgs-unstable#cachix" + default: "github:nixos/nixpkgs/nixpkgs_unstable#cachix" steps: - run: name: Install Cachix environment: - CACHIX_INSTALLABLE: << parameters.cachix-installable >> + CACHIX_INSTALLABLE: << parameters.cachix_installable >> command: nix profile install $CACHIX_INSTALLABLE diff --git a/src/commands/with-cachix.yml b/src/commands/with_cachix.yml similarity index 52% rename from src/commands/with-cachix.yml rename to src/commands/with_cachix.yml index 131c320..60c6db4 100644 --- a/src/commands/with-cachix.yml +++ b/src/commands/with_cachix.yml @@ -1,29 +1,29 @@ description: > - This command wraps the specified parameters with Cachix's `watch-exec` command + This command wraps the specified parameters with Cachix's `watch_exec` command to watch changed paths and upload them to your Cachix cache. In order to write to the cache, you must have a context containing a `CACHIX_AUTH_TOKEN` environment variable. parameters: - cachix-user: + cachix_user: description: "The user/cache to use and authenticate against" type: string default: "" - cache-name: - description: "The cache to use before running the `watch-exec` subcommand" + cache_name: + description: "The cache to use before running the `watch_exec` subcommand" type: string default: "" - nix-command: - description: "The nix command to wrap with the `watch-exec` command" + nix_command: + description: "The nix command to wrap with the `watch_exec` command" type: string default: "" steps: - run: - name: Cachix `watch-exec -- << parameters.nix-command >>` + name: Cachix `watch_exec -- << parameters.nix_command >>` environment: - CACHIX_USER: << parameters.cachix-user >> - NIX_COMMAND: << parameters.nix-command >> - CACHE_NAME: << parameters.cache-name >> - command: << include(scripts/with-cachix.sh) >> + CACHIX_USER: << parameters.cachix_user >> + NIX_COMMAND: << parameters.nix_command >> + CACHE_NAME: << parameters.cache_name >> + command: << include(scripts/with_cachix.sh) >> diff --git a/src/scripts/with-cachix.sh b/src/scripts/with_cachix.sh similarity index 100% rename from src/scripts/with-cachix.sh rename to src/scripts/with_cachix.sh