File tree 2 files changed +15
-4
lines changed
2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 102
102
REMOTE_SUDO_COMMAND = ''{{default "${ deployment . sudo . command } " .LP_REMOTE_SUDO_COMMAND}}'' ;
103
103
REMOTE_SUDO_OPTS = ''{{default "${ pkgs . lib . concatStrings deployment . sudo . opts } " .LP_REMOTE_SUDO_OPTS}}'' ;
104
104
REBUILD_ACTION = ''{{default "switch" .REBUILD_ACTION}}'' ;
105
+ REMOTE_CONFIG_DIR = deployment . config-dir ;
105
106
LOCAL_FLAKE_SOURCE = configFlake ;
106
107
HOSTNAME = hostName ;
107
108
} ;
187
188
'' else ''
188
189
{{.REMOTE_COMMAND}} {{.REMOTE_SSH_OPTS}} {{.REMOTE_USER}}@{{.REMOTE_HOST}} \
189
190
"${ optionalString useSudo "{{.REMOTE_SUDO_COMMAND}} {{.REMOTE_SUDO_OPTS}}" } nixos-rebuild {{.REBUILD_ACTION}} \
190
- --flake ' {{.LOCAL_FLAKE_SOURCE}} #{{.HOSTNAME}}' "
191
+ --flake "$(readlink -f {{.REMOTE_CONFIG_DIR}}/flake) #{{.HOSTNAME}}" "
191
192
'' )
192
193
] ;
193
194
} ;
203
204
--to ssh://{{.REMOTE_USER}}@{{.REMOTE_HOST}} \
204
205
{{.LOCAL_FLAKE_SOURCE}}
205
206
''
207
+ ''
208
+ {{.REMOTE_COMMAND}} {{.REMOTE_SSH_OPTS}} {{.REMOTE_USER}}@{{.REMOTE_HOST}} \
209
+ "${ optionalString useSudo "{{.REMOTE_SUDO_COMMAND}} {{.REMOTE_SUDO_OPTS}}" } ln -sfn {{.LOCAL_FLAKE_SOURCE}} {{.REMOTE_CONFIG_DIR}}/flake"
210
+ ''
206
211
] ;
207
212
} ;
208
213
} // hostConfig . config . lollypops . extraTasks ;
Original file line number Diff line number Diff line change 51
51
in
52
52
{
53
53
54
- imports = [
55
- ( mkRemovedOptionModule [ "lollypops" "deployment" "config-dir" ] "The flake is now stored in the Nix store directly." )
56
- ] ;
54
+ # imports = [
55
+ # (mkRemovedOptionModule ["lollypops" "deployment" "config-dir"] "The flake is now stored in the Nix store directly.")
56
+ # ];
57
57
58
58
options . lollypops = {
59
59
93
93
description = "Evaluate locally instead of on the remote when rebuilding" ;
94
94
} ;
95
95
96
+ config-dir = mkOption {
97
+ type = types . str ;
98
+ default = "/var/src/lollypops" ;
99
+ description = "Path to place the configuration on the remote host" ;
100
+ } ;
101
+
96
102
group = mkOption {
97
103
type = types . str ;
98
104
default = "default" ;
You can’t perform that action at this time.
0 commit comments