mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-09-11 16:45:28 +03:00
Merge #41
41: expose nixos-remote tools in devshell + envrc r=Mic92 a=Mic92 Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
This commit is contained in:
commit
f1052a76be
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