From 1d9471a3ce2973674075597f37b9ecdc7a549a6c Mon Sep 17 00:00:00 2001 From: Adam Perkowski Date: Sat, 5 Oct 2024 13:46:53 +0200 Subject: [PATCH] i hate sed --- core/tabs/applications-setup/docker-setup.sh | 2 +- core/tabs/applications-setup/setup-flatpak.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/tabs/applications-setup/docker-setup.sh b/core/tabs/applications-setup/docker-setup.sh index 845f62d5..4588a1d8 100755 --- a/core/tabs/applications-setup/docker-setup.sh +++ b/core/tabs/applications-setup/docker-setup.sh @@ -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 ;; *) diff --git a/core/tabs/applications-setup/setup-flatpak.sh b/core/tabs/applications-setup/setup-flatpak.sh index 1ef4a279..6eee92e3 100755 --- a/core/tabs/applications-setup/setup-flatpak.sh +++ b/core/tabs/applications-setup/setup-flatpak.sh @@ -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 ;; *)