File tree Expand file tree Collapse file tree 4 files changed +30
-6
lines changed Expand file tree Collapse file tree 4 files changed +30
-6
lines changed Original file line number Diff line number Diff line change
1
+ use flake
Original file line number Diff line number Diff line change @@ -81,3 +81,17 @@ nixos-remote \
81
81
--flake ' your-flake#your-system' \
82
82
root@yourip
83
83
` ` `
84
+
85
+ # # Developer guide
86
+
87
+ To run ` nixos-remote` from the repo:
88
+
89
+ ` ` ` console
90
+ nix run . -- --help
91
+ ` ` `
92
+
93
+ To format the code
94
+
95
+ ` ` ` console
96
+ nix fmt
97
+ ` ` `
Original file line number Diff line number Diff line change 6
6
, coreutils
7
7
, curl
8
8
} :
9
- writeShellApplication {
10
- name = "nixos-remote" ;
11
- text = builtins . readFile ./nixos-remote.sh ;
9
+ let
12
10
runtimeInputs = [
13
11
openssh
14
12
gitMinimal # for git flakes
@@ -17,4 +15,12 @@ writeShellApplication {
17
15
coreutils
18
16
curl # when uploading tarballs
19
17
] ;
18
+ in
19
+ ( writeShellApplication {
20
+ name = "nixos-remote" ;
21
+ text = builtins . readFile ./nixos-remote.sh ;
22
+ inherit runtimeInputs ;
23
+ } ) // {
24
+ # also expose this attribute to other derivations
25
+ inherit runtimeInputs ;
20
26
}
Original file line number Diff line number Diff line change 1
1
{
2
- perSystem = { pkgs , ... } : {
3
- packages = rec {
2
+ perSystem = { config , pkgs , ... } : {
3
+ packages = {
4
4
nixos-remote = pkgs . callPackage ./. { } ;
5
- default = nixos-remote ;
5
+ default = config . packages . nixos-remote ;
6
+ } ;
7
+ devShells . default = pkgs . mkShellNoCC {
8
+ packages = config . packages . nixos-remote . runtimeInputs ;
6
9
} ;
7
10
} ;
8
11
}
You can’t perform that action at this time.
0 commit comments