Skip to content

Commit

Permalink
systemd: start unit after multi-user.target (#37)
Browse files Browse the repository at this point in the history
* systemd: start unit after multi-user.targer.

Start the flatpak-managed-install service after
multi-user.target.
This should ensure that network interfaces are up,
and connectivity has been established.

* nixos: home-manager: remove RemainAfterExit

This is not really needed, since state changes
will be handled by a timer.
  • Loading branch information
gmodena authored Feb 15, 2024
1 parent 8d8da0b commit 2fd683c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions modules/home-manager.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ in
systemd.user.services."flatpak-managed-install" = {
Unit = {
After = [
"network.target"
"multi-user.target" # ensures that network & connectivity have been setup.
];
};
Install = {
WantedBy = [
"default.target"
"default.target" # multi-user target with a GUI. For a desktop, this is typically going to be the graphical.target
];
};
Service = {
Type = "oneshot";
Type = "oneshot"; # TODO: should this be an async startup, to avoid blocking on network at boot ?
ExecStart = import ./installer.nix { inherit cfg pkgs lib installation; };
};
};
Expand Down
10 changes: 5 additions & 5 deletions modules/nixos.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ in

config = lib.mkIf config.services.flatpak.enable {
systemd.services."flatpak-managed-install" = {
wants = [
"network-online.target"
];
wantedBy = [
"multi-user.target"
"default.target" # multi-user target with a GUI. For a desktop, this is typically going to be the graphical.target
];
after = [
"multi-user.target" # ensures that network & connectivity have been setup.
];
serviceConfig = {
Type = "oneshot";
Type = "oneshot"; # TODO: should this be an async startup, to avoid blocking on network at boot ?
ExecStart = import ./installer.nix { inherit cfg pkgs lib installation; };
};
};
Expand Down

0 comments on commit 2fd683c

Please sign in to comment.