Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dotfiles
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jens Nolte
dotfiles
Commits
7265988e
Commit
7265988e
authored
4 years ago
by
Jens Nolte
Browse files
Options
Downloads
Patches
Plain Diff
Configure '--log-format bar-with-logs' for deploy script
parent
54280153
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/deploy
+5
-4
5 additions, 4 deletions
bin/deploy
with
5 additions
and
4 deletions
bin/deploy
+
5
−
4
View file @
7265988e
...
@@ -67,6 +67,7 @@ fi
...
@@ -67,6 +67,7 @@ fi
operation
=
$original_operation
operation
=
$original_operation
set_profile
=
""
set_profile
=
""
reboot
=
""
reboot
=
""
readonly
common_nix_flags
=(
--log-format
bar-with-logs
)
if
[[
"
$operation
"
=
"switch"
||
"
$operation
"
=
"boot"
]]
if
[[
"
$operation
"
=
"switch"
||
"
$operation
"
=
"boot"
]]
then
then
...
@@ -96,7 +97,7 @@ fi
...
@@ -96,7 +97,7 @@ fi
if
[[
"
$operation
"
=
"iso"
]]
if
[[
"
$operation
"
=
"iso"
]]
then
then
print_info
"Building iso image"
print_info
"Building iso image"
readonly
nixos_iso_path
=
$(
nix build
--no-link
--json
"path:
$MACHINES_PATH
#
nixosConfigurations.
$hostname
.config.system.build.iso
"
| jq
--raw-output
".[0].outputs.out"
)
readonly
nixos_iso_path
=
$(
nix build
$common_nix_flags
--no-link
--json
"path:
$MACHINES_PATH
#
isos.
$hostname
"
| jq
--raw-output
".[0].outputs.out"
)
print_info
"Iso generated"
print_info
"Iso generated"
print
$nixos_iso_path
print
$nixos_iso_path
...
@@ -105,7 +106,7 @@ fi
...
@@ -105,7 +106,7 @@ fi
print_info
"Evaluating target system configuration"
print_info
"Evaluating target system configuration"
readonly
system_installable
=
"path:
$MACHINES_PATH
#nixosConfigurations.
$hostname
.config.system.build.toplevel"
readonly
system_installable
=
"path:
$MACHINES_PATH
#nixosConfigurations.
$hostname
.config.system.build.toplevel"
readonly
nixos_config_path
=
$(
nix path-info
--json
"
$system_installable
"
| jq
--raw-output
".[0].path"
)
readonly
nixos_config_path
=
$(
nix path-info
$common_nix_flags
--json
"
$system_installable
"
| jq
--raw-output
".[0].path"
)
print
>
&2
"
$nixos_config_path
"
print
>
&2
"
$nixos_config_path
"
...
@@ -115,7 +116,7 @@ then
...
@@ -115,7 +116,7 @@ then
# local deploy
# local deploy
print_info
"Building target system configuration"
print_info
"Building target system configuration"
nix build
--no-link
"
$system_installable
"
nix build
$common_nix_flags
--no-link
"
$system_installable
"
if
[[
"
$operation
"
=
"build"
]]
if
[[
"
$operation
"
=
"build"
]]
then
then
...
@@ -138,7 +139,7 @@ then
...
@@ -138,7 +139,7 @@ then
else
else
# remote deploy
# remote deploy
nix copy
--substitute-on-destination
--to
"ssh://root@
$via_hostname
"
"
$system_installable
"
nix copy
$common_nix_flags
--substitute-on-destination
--to
"ssh://root@
$via_hostname
"
"
$system_installable
"
# The manual way to activate a system derivation
# The manual way to activate a system derivation
if
[[
-n
"
$set_profile
"
]]
if
[[
-n
"
$set_profile
"
]]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment