From d8a5045f6167605f75bee8e4ebddcd8ccf26a7e4 Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Fri, 25 Oct 2024 14:46:24 +0200 Subject: [PATCH] system: Set flatpak as module --- hosts/perso-desktop/configuration.nix | 1 + hosts/perso-laptop/configuration.nix | 4 ++++ modules/system/apps/default.nix | 1 + modules/system/apps/flatpak/default.nix | 17 +++++++++++++++++ modules/system/common.nix | 2 -- modules/system/server/docker/default.nix | 1 + 6 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 modules/system/apps/flatpak/default.nix diff --git a/hosts/perso-desktop/configuration.nix b/hosts/perso-desktop/configuration.nix index 99b3ba2..823bc70 100644 --- a/hosts/perso-desktop/configuration.nix +++ b/hosts/perso-desktop/configuration.nix @@ -21,6 +21,7 @@ modules.system = { apps = { + flatpak.enable = true; steam.enable = true; }; diff --git a/hosts/perso-laptop/configuration.nix b/hosts/perso-laptop/configuration.nix index 37c845a..e532911 100644 --- a/hosts/perso-laptop/configuration.nix +++ b/hosts/perso-laptop/configuration.nix @@ -33,6 +33,10 @@ }; modules.system = { + apps = { + flatpak.enable = true; + }; + desktop = { plasma.enable = true; }; diff --git a/modules/system/apps/default.nix b/modules/system/apps/default.nix index 557c5f2..501551c 100644 --- a/modules/system/apps/default.nix +++ b/modules/system/apps/default.nix @@ -2,6 +2,7 @@ { imports = [ + ./flatpak ./steam ]; } diff --git a/modules/system/apps/flatpak/default.nix b/modules/system/apps/flatpak/default.nix new file mode 100644 index 0000000..9285773 --- /dev/null +++ b/modules/system/apps/flatpak/default.nix @@ -0,0 +1,17 @@ +{ config, lib, ... }: + +with lib; +let + cfg = config.modules.system.apps.flatpak; +in +{ + options.modules.system.apps.flatpak = { + enable = mkEnableOption '' + Enable flatpak + ''; + }; + + config = mkIf cfg.enable { + services.flatpak.enable = true; # Important can't be enabled from home-manager + }; +} \ No newline at end of file diff --git a/modules/system/common.nix b/modules/system/common.nix index 5838226..e216574 100644 --- a/modules/system/common.nix +++ b/modules/system/common.nix @@ -65,8 +65,6 @@ extraGroups = [ "networkmanager" "wheel" ]; }; - services.flatpak.enable = true; # Important can't be enabled from home-manager - # Downloads and provides debug symbols and source code for nix derivations to gdb and other debuginfod-capable debuggers as needed. # Require https://github.com/symphorien/nixseparatedebuginfod?tab=readme-ov-file#gdb services.nixseparatedebuginfod.enable = true; diff --git a/modules/system/server/docker/default.nix b/modules/system/server/docker/default.nix index dfdd13b..215d470 100644 --- a/modules/system/server/docker/default.nix +++ b/modules/system/server/docker/default.nix @@ -14,6 +14,7 @@ in virtualisation.docker = { enable = true; }; + virtualisation.oci-containers.backend = "docker"; users.users.florian.extraGroups = [ "docker" ]; };