mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-10-06 12:48:07 +03:00
expose nixos-remote tools in devshell
This commit is contained in:
parent
b5230b8640
commit
d2f7012d1d
14
README.md
14
README.md
@ -81,3 +81,17 @@ nixos-remote \
|
||||
--flake 'your-flake#your-system' \
|
||||
root@yourip
|
||||
```
|
||||
|
||||
## Developer guide
|
||||
|
||||
To run `nixos-remote` from the repo:
|
||||
|
||||
```console
|
||||
nix run . -- --help
|
||||
```
|
||||
|
||||
To format the code
|
||||
|
||||
```console
|
||||
nix fmt
|
||||
```
|
||||
|
@ -6,9 +6,7 @@
|
||||
, coreutils
|
||||
, curl
|
||||
}:
|
||||
writeShellApplication {
|
||||
name = "nixos-remote";
|
||||
text = builtins.readFile ./nixos-remote.sh;
|
||||
let
|
||||
runtimeInputs = [
|
||||
openssh
|
||||
gitMinimal # for git flakes
|
||||
@ -17,4 +15,12 @@ writeShellApplication {
|
||||
coreutils
|
||||
curl # when uploading tarballs
|
||||
];
|
||||
in
|
||||
(writeShellApplication {
|
||||
name = "nixos-remote";
|
||||
text = builtins.readFile ./nixos-remote.sh;
|
||||
inherit runtimeInputs;
|
||||
}) // {
|
||||
# also expose this attribute to other derivations
|
||||
inherit runtimeInputs;
|
||||
}
|
||||
|
@ -1,8 +1,11 @@
|
||||
{
|
||||
perSystem = { pkgs, ... }: {
|
||||
packages = rec {
|
||||
perSystem = { config, pkgs, ... }: {
|
||||
packages = {
|
||||
nixos-remote = pkgs.callPackage ./. { };
|
||||
default = nixos-remote;
|
||||
default = config.packages.nixos-remote;
|
||||
};
|
||||
devShells.default = pkgs.mkShellNoCC {
|
||||
packages = config.packages.nixos-remote.runtimeInputs;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user