Skip to content

Commit

Permalink
attempt migrating to v12
Browse files Browse the repository at this point in the history
  • Loading branch information
ELD committed May 13, 2023
1 parent e9187ec commit 86c3077
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 57 deletions.
11 changes: 6 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -35,21 +35,22 @@ 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:
tags:
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:
Expand Down
13 changes: 6 additions & 7 deletions .circleci/test-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: 2.1
orbs:
nix: eld/nix@dev:<<pipeline.git.revision>>
orb-tools: circleci/orb-tools@11.6.1
orb-tools: circleci/orb-tools@12.0.2

executors:
linux:
Expand Down Expand Up @@ -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.*/
Expand All @@ -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:
Expand Down
62 changes: 31 additions & 31 deletions src/commands/install.yml
Original file line number Diff line number Diff line change
@@ -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"]
Expand All @@ -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: ""
Expand All @@ -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: ""

Expand All @@ -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 >>
Original file line number Diff line number Diff line change
Expand Up @@ -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
22 changes: 11 additions & 11 deletions src/commands/with-cachix.yml → src/commands/with_cachix.yml
Original file line number Diff line number Diff line change
@@ -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) >>
File renamed without changes.

0 comments on commit 86c3077

Please sign in to comment.