mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 01:38:06 +00:00
[Packages/Flatpak] Enable flatpak when desktop is enabled
This commit is contained in:
parent
3d766db870
commit
eb361ed428
2 changed files with 26 additions and 0 deletions
|
|
@ -11,6 +11,7 @@ in
|
||||||
./programs
|
./programs
|
||||||
./overlays.nix
|
./overlays.nix
|
||||||
./packages/unstable.nix
|
./packages/unstable.nix
|
||||||
|
./packages/flatpak.nix
|
||||||
(mkRenamedOptionModule [ "aviallon" "programs" "compileFlags" ] [ "aviallon" "optimizations" "extraCompileFlags" ])
|
(mkRenamedOptionModule [ "aviallon" "programs" "compileFlags" ] [ "aviallon" "optimizations" "extraCompileFlags" ])
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
25
packages/flatpak.nix
Normal file
25
packages/flatpak.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
{ config, pkgs, lib, ...}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
desktopCfg = config.aviallon.desktop;
|
||||||
|
in {
|
||||||
|
config = {}
|
||||||
|
// {
|
||||||
|
services.flatpak.enable = mkDefault true;
|
||||||
|
systemd.services.flatpak-add-flathub = {
|
||||||
|
script = ''
|
||||||
|
exec ${pkgs.flatpak}/bin/flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||||
|
'';
|
||||||
|
requires = [
|
||||||
|
"network-online.target"
|
||||||
|
];
|
||||||
|
after = [
|
||||||
|
"network-online.target"
|
||||||
|
];
|
||||||
|
wantedBy = [
|
||||||
|
"graphical.target"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue