mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-22 05:12:27 +00:00
i hate sed
This commit is contained in:
parent
4d478a1047
commit
1d9471a3ce
|
@ -37,7 +37,7 @@ install_docker() {
|
|||
;;
|
||||
nix-env)
|
||||
"$PACKAGER" -iA nixpkgs.docker
|
||||
"$ESCALATION_TOOL" sed -i -E '/^[[:space:]]*virtualisation\.docker\.enable/!b; s/^([[:space:]]*)virtualisation\.docker\.enable.*/\1virtualisation.docker.enable = true;/' "$NIXOS_CONFIG" || echo 'virtualisation.docker.enable = true;' | "$ESCALATION_TOOL" tee -a "$NIXOS_CONFIG"
|
||||
"$ESCALATION_TOOL" sed -i'' -E '/^[[:space:]]*virtualisation\.docker\.enable/!b; s/^([[:space:]]*)virtualisation\.docker\.enable.*/\1virtualisation.docker.enable = true;/' "$NIXOS_CONFIG" || echo 'virtualisation.docker.enable = true;' | "$ESCALATION_TOOL" tee -a "$NIXOS_CONFIG"
|
||||
"$ESCALATION_TOOL" nixos-rebuild switch
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -27,7 +27,7 @@ setup_flatpak() {
|
|||
;;
|
||||
nix-env)
|
||||
"$PACKAGER" -iA nixpkgs.flatpak
|
||||
"$ESCALATION_TOOL" sed -i -E '/^[[:space:]]*services\.flatpak\.enable/!b; s/^([[:space:]]*)services\.flatpak\.enable.*/\1services.flatpak.enable = true;/' "$NIXOS_CONFIG" || echo 'services.flatpak.enable = true;' | "$ESCALATION_TOOL" tee -a "$NIXOS_CONFIG"
|
||||
"$ESCALATION_TOOL" sed -i'' -E '/^[[:space:]]*services\.flatpak\.enable/!b; s/^([[:space:]]*)services\.flatpak\.enable.*/\1services.flatpak.enable = true;/' "$NIXOS_CONFIG" || echo 'services.flatpak.enable = true;' | "$ESCALATION_TOOL" tee -a "$NIXOS_CONFIG"
|
||||
"$ESCALATION_TOOL" nixos-rebuild switch
|
||||
;;
|
||||
*)
|
||||
|
|
Loading…
Reference in New Issue
Block a user