From a725eafe63c8efbc85d2efe7115dd0ce9663ab48 Mon Sep 17 00:00:00 2001 From: Andre Date: Wed, 11 Dec 2024 11:49:19 -0500 Subject: [PATCH] General: move default Flatpak packages to their respective modules --- flake.lock | 6 +++--- modules/nixos/apps/office/default.nix | 1 + modules/nixos/ui/audio/default.nix | 4 ++++ modules/nixos/ui/flatpak/default.nix | 6 +++++- systems/x86_64-linux/Khanda/default.nix | 16 ++++++++-------- systems/x86_64-linux/Shura/default.nix | 8 -------- 6 files changed, 21 insertions(+), 20 deletions(-) diff --git a/flake.lock b/flake.lock index 9bc6ef2..d4768c0 100644 --- a/flake.lock +++ b/flake.lock @@ -350,11 +350,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1733550349, - "narHash": "sha256-NcGumB4Lr6KSDq+nIqXtNA8QwAQKDSZT7N9OTGWbTrs=", + "lastModified": 1733808091, + "narHash": "sha256-KWwINTQelKOoQgrXftxoqxmKFZb9pLVfnRvK270nkVk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e2605d0744c2417b09f8bf850dfca42fcf537d34", + "rev": "a0f3e10d94359665dba45b71b4227b0aeb851f8e", "type": "github" }, "original": { diff --git a/modules/nixos/apps/office/default.nix b/modules/nixos/apps/office/default.nix index 5c34dbe..3e3104d 100644 --- a/modules/nixos/apps/office/default.nix +++ b/modules/nixos/apps/office/default.nix @@ -17,6 +17,7 @@ in ${namespace}.ui.flatpak = { enable = true; packages = [ + "md.obsidian.Obsidian" "org.onlyoffice.desktopeditors" "us.zoom.Zoom" ]; diff --git a/modules/nixos/ui/audio/default.nix b/modules/nixos/ui/audio/default.nix index ee59c89..00745f9 100644 --- a/modules/nixos/ui/audio/default.nix +++ b/modules/nixos/ui/audio/default.nix @@ -47,5 +47,9 @@ in }; }; }; + + ${namespace}.ui.flatpak.packages = lib.mkIf config.${namespace}.ui.flatpak.enable [ + "com.github.wwmm.easyeffects" + ]; }; } diff --git a/modules/nixos/ui/flatpak/default.nix b/modules/nixos/ui/flatpak/default.nix index 9d86c82..cf73ddf 100644 --- a/modules/nixos/ui/flatpak/default.nix +++ b/modules/nixos/ui/flatpak/default.nix @@ -17,7 +17,11 @@ in packages = lib.mkOption { description = "Flatpak packages to install."; type = lib.types.listOf lib.types.str; - default = [ ]; + default = [ + "com.github.tchx84.Flatseal" + "org.mozilla.firefox" + "io.github.ungoogled_software.ungoogled_chromium" + ]; example = lib.literalExpression "[ \"com.valvesoftware.Steam\" ]"; }; remotes = lib.mkOption { diff --git a/systems/x86_64-linux/Khanda/default.nix b/systems/x86_64-linux/Khanda/default.nix index bbac147..40d4eb7 100644 --- a/systems/x86_64-linux/Khanda/default.nix +++ b/systems/x86_64-linux/Khanda/default.nix @@ -1,4 +1,9 @@ -{ config, namespace, ... }: +{ + config, + lib, + namespace, + ... +}: let # Do not change this value! This tracks when NixOS was installed on your system. @@ -69,14 +74,9 @@ in # Enable Flatpak support. enable = true; - # Define Flatpak packages to install. - packages = [ - "com.github.tchx84.Flatseal" - "com.github.wwmm.easyeffects" - "md.obsidian.Obsidian" - "net.codelogistics.webapps" + # Define extra Flatpak packages to install. + packages = lib.mkAfter [ "org.keepassxc.KeePassXC" - "org.mozilla.firefox" ]; useBindFS = true; diff --git a/systems/x86_64-linux/Shura/default.nix b/systems/x86_64-linux/Shura/default.nix index 4792095..28b76f1 100644 --- a/systems/x86_64-linux/Shura/default.nix +++ b/systems/x86_64-linux/Shura/default.nix @@ -95,14 +95,6 @@ in ui = { flatpak = { enable = true; - packages = [ - "com.github.tchx84.Flatseal" - "com.github.wwmm.easyeffects" - "md.obsidian.Obsidian" - "net.codelogistics.webapps" - "org.mozilla.firefox" - ]; - useBindFS = true; }; desktops.gnome.enable = true;