From 43e0bd9a62111dfdefdc0bb20d8273f7c1c3e3f5 Mon Sep 17 00:00:00 2001 From: ChUrl Date: Tue, 9 Aug 2022 16:40:41 +0200 Subject: [PATCH] flatpak module assert flatpak is enabled --- modules/flatpak.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/flatpak.nix b/modules/flatpak.nix index f2a81735..6af6b873 100644 --- a/modules/flatpak.nix +++ b/modules/flatpak.nix @@ -1,4 +1,4 @@ -{ config, lib, mylib, pkgs, ... }: +{ config, nixosConfig, lib, mylib, pkgs, ... }: with lib; with mylib.modules; @@ -16,8 +16,8 @@ in { options.modules.flatpak = { enable = mkBoolOpt false "Enable flatpak support"; - fontFix = mkBoolOpt false "Link fonts to ~/.local/share/fonts so flatpak apps can find them"; - iconFix = mkBoolOpt false "Link icons to ~/.local/share/icons so flatpak apps can find them"; + fontFix = mkBoolOpt true "Link fonts to ~/.local/share/fonts so flatpak apps can find them"; + iconFix = mkBoolOpt true "Link icons to ~/.local/share/icons so flatpak apps can find them"; autoUpdate = mkBoolOpt false "Update flatpak apps on nixos-rebuild"; autoPrune = mkBoolOpt false "Remove unused packages on nixos-rebuild"; @@ -26,7 +26,7 @@ in { # TODO: Do this for strings + packages discord.enable = mkBoolOpt false "Enable Discord"; spotify.enable = mkBoolOpt false "Enable Spotify"; - flatseal.enable = mkBoolOpt false "Enable Flatseal"; + flatseal.enable = mkBoolOpt true "Enable Flatseal"; bottles.enable = mkBoolOpt false "Enable Bottles"; # This is mainly used by other modules to allow them to use flatpak packages @@ -45,6 +45,12 @@ in { }; config = mkIf cfg.enable { + assertions = [ + (mkIf cfg.enable { + assertion = nixosConfig.services.flatpak.enable; + message = "Cannot use the flatpak module with flatpak disabled in nixos!"; + }) + ]; # NOTE: Is already set by flatpak.enable in configuration.nix # xdg.systemDirs.data = [