aboutsummaryrefslogtreecommitdiff
path: root/flake.nix (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-11-11More unique names for the checks generated by deploy-rsPhilipp Herzog1-2/+2
Closes #162
2022-10-09Add new activation strategy `boot` as equivalent to `nixos-rebuild boot`Maximilian Bosch1-11/+20
This can be useful when e.g. deploying a kernel update to a target host. You usually plan a reboot (or kexec) after that to activate the new kernel. However you don't want to wait for services to be restarted first since these will be "restarted" anyways on the reboot. In cases like GitLab or the Atlassian stack this actually makes a difference. This patch changes the following things: * If `--boot` is provided, `nix-env -p profile-to-activate --set` is called for each deployed profile to make sure that it is activated automatically after a reboot. * However, the actual activation (e.g. `switch-to-configuration switch`) is skipped. Instead: * For NixOS, `switch-to-configuration boot` is called to set the new profile as default in the bootloader. * For everything else, nothing else is done. The profile is already the new default (and thus picked up on the next boot).
2022-08-04Fetch system from `stdenv.hostPlatform`Robert Helgesson1-1/+1
The top-level `system` attribute has been deprecated for quite a while. See https://github.com/NixOS/nixpkgs/commit/4246d6ce21d2d8d33e2d30f42b3d9d446c5dc143
2022-08-04Replace runCommandNoCC by runCommandRobert Helgesson1-2/+2
The `runCommand` function has been using `stdenvNoCC` for quite a while and `runCommandNoCC` is correspondingly deprecated. See https://github.com/NixOS/nixpkgs/commit/9feb144c8cc4f4b71a9c23b2f7fd6b2ea55649e5
2022-05-14Update flake to support nix 2.8Xavier Vello1-3/+5
nix 2.7 renamed defaultApp and defaultPackage. Both the old and new names are supported in 2.7, but 2.8 has removed support for the old names, breaking the nix run invocation. Old names are kept in this PR to keep compatibility with nix 2.6, but could be removed if support of this version is not needed anymore.
2021-09-28Fix darwin buildAlexander Bantyev1-4/+4
Frameworks are libraries used at runtime, so should be in buildInputs and not nativeBuildInputs. Closes https://github.com/serokell/deploy-rs/issues/132
2021-09-27add aarch64-darwin to built systemsPeter Woodman1-1/+1
2021-09-15flake: replace naersk with buildRustPackageBernardo Meurer1-8/+8
2021-08-04Add .envrc and fix devShell to work with more toolsnotgne21-1/+11
2021-06-25fix: add meta.descriptionDavid Arnold1-1/+1
2021-06-25Add rustfmt and rust-analyzer to devShellAlexander Bantyev1-1/+1
2021-06-22flake.nix: refactor as overlayAlexander Bantyev1-40/+54
2021-05-20flake.nix: clean up dry-activation logicAlexander Bantyev1-7/+3
2021-05-18Fix rollback to old profilesAlexander Bantyev1-1/+1
In 5d5da48 (https://github.com/serokell/deploy-rs/pull/81), $DRY_ACTIVATE is used in a bash script with -u. When DRY_ACTIVATE is not set (which it is not for older profiles), the script fails. Fix this by setting a fallback.
2021-05-10Add helper activation function for home-managernotgne21-0/+2
2021-04-16Apply notgne2 suggestions.Oleg Pykhalov1-10/+6
2021-04-07flake: Add optional dryActivate argument to activate.customOleg Pykhalov1-33/+47
2021-04-07Add dry activate argument.Oleg Pykhalov1-1/+5
2021-02-08Work around NixOS/nixpkgs#73404 by `cd`-ing into `/tmp` during NixOS activationnotgne21-0/+3
2021-01-26Add Nix-flake check for checking build and Rust testsnotgne21-0/+4
2021-01-22Run `set -euo pipefail` in generated activation scriptsnotgne21-0/+2
2021-01-08Check if systemd-boot is enabled before attempting to delete default entry linenotgne21-1/+3
2021-01-06Use boot path from configuration and ignore failures when updating loader confnotgne21-1/+1
2021-01-05Automatically filter out `default` line from loader.conf after NixOS activationnotgne21-1/+6
2020-12-15Build "activate" binary on all platformsAndreas Fuchs1-2/+0
Now that activate uses a cross-platform fs notification library, we can build it on Darwin again (and build its deps separately, speeding up recompiles there).
2020-12-02Add SPDX-FileCopyrightText to the three files that I changed substantiallyAndreas Fuchs1-0/+1
2020-12-02activate flake check: confirm that activate-rs exists in the profileAlexander Bantyev1-1/+3
2020-12-02Write an "activate-rs" script into the profile pathAndreas Fuchs1-0/+9
This should point to the correct path if the target platform differs fro the deploying platform.
2020-11-24Fix running & building under macOS (Big Sur) (#9)Andreas Fuchs1-4/+14
* Add xcbuild as native build input 2 ways & pass --verbose to cargo build * Make "deploy" build on macOS * Bump the nixpkgs version to one that ships Rust 1.47, which can produce binaries under macOS 11 (Big Sur). * Use darwin-specific options that let Naersk build the "deploy" binary under macOS. (With a work-around for https://github.com/nmattia/naersk/issues/127, which prevents this from being much more straight-forward). Unfortunately, the "activate" binary can't be built under macOS due to the inotify dependency; that means the best we can do is to run the deploy under macOS, not deploy *to* macOS.
2020-11-22Update `activate.nixos` to take a configuration, not a derivationnotgne21-1/+1
2020-11-16Scope activation commands, deprecate setActivateAlexander Bantyev1-17/+24
2020-11-16Add activation presets for NixOS and noop activationAlexander Bantyev1-0/+4
2020-11-16fixup! [OPS-1085] Add CIChristian Höppner1-11/+3
2020-11-14Format flake.nixnotgne21-10/+11
2020-11-14Remove deprecated `checkSchema`notgne21-5/+1
2020-11-14[OPS-1085] Add CIChristian Höppner1-0/+12
2020-11-07Greatly expand documentationnotgne21-1/+1
2020-10-30Show name of profiles missing activationnotgne21-2/+8
2020-10-29Add deprecation warning to checkSchemanotgne21-2/+1
2020-10-26Improve checks usage, add check for activation script existingnotgne21-3/+21
2020-10-11Move activate script location, use buildEnv for setActivatenotgne21-2/+2
2020-10-08Minor flake and documentation fixesnotgne21-20/+30
2020-10-05Add interface with json schema, fix flake-less issues, put setActivate and ↵notgne21-1/+24
jsonSchema check in flake lib
2020-09-29Add license information, reformat Nix files, clean upnotgne21-2/+5
2020-09-28use separate binary for activation, more cleanupnotgne21-1/+1