Flatpak: install flathub using systemd service
This commit is contained in:
parent
0dd4f4c956
commit
6cf28e30a7
1 changed files with 13 additions and 6 deletions
|
|
@ -2,11 +2,18 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
services.flatpak.enable = true;
|
services.flatpak.enable = true;
|
||||||
system.activationScripts = {
|
|
||||||
flatpak.text = ''
|
/*
|
||||||
echo "adding flatpak repos..."
|
Create systemd service that adds flathub after getting network
|
||||||
repo=${pkgs.fetchurl { url = "https://dl.flathub.org/repo/flathub.flatpakrepo"; hash = "sha256-M3HdJQ5h2eFjNjAHP+/aFTzUQm9y9K+gwzc64uj+oDo="; } }
|
This adds it automatically, which avoids the whack ass way I was
|
||||||
${pkgs.flatpak}/bin/flatpak remote-add --if-not-exists flathub $repo
|
doing that before
|
||||||
'';
|
*/
|
||||||
|
systemd.services.flathub-add = {
|
||||||
|
description = "Add flathub repo to system flatpak install";
|
||||||
|
script = "${pkgs.flatpak}/bin/flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo";
|
||||||
|
serviceConfig.Type = "oneshot";
|
||||||
|
wantedBy = [ "network-online.target" ];
|
||||||
|
# Run after networking is working
|
||||||
|
after = [ "NetworkManager-wait-online.service" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue