feat: flatpak module "wrapper"
This commit is contained in:
@@ -115,6 +115,8 @@
|
||||
git
|
||||
gcc # Added temporally so my neovim config doesn't break
|
||||
wget
|
||||
nixpkgs-fmt
|
||||
nixpkgs-lint
|
||||
];
|
||||
|
||||
environment.sessionVariables = {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.flatpaks.homeManagerModules.default
|
||||
../../modules/home-manager/flatpak.nix
|
||||
../../modules/home-manager/theme.nix
|
||||
../../modules/home-manager/config/terminal.nix
|
||||
];
|
||||
@@ -26,16 +26,6 @@
|
||||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
|
||||
services.flatpak = {
|
||||
enableModule = true;
|
||||
remotes = {
|
||||
"flathub" = "https://dl.flathub.org/repo/flathub.flatpakrepo";
|
||||
"flathub-beta" = "https://dl.flathub.org/beta-repo/flathub-beta.flatpakrepo";
|
||||
};
|
||||
packages = [
|
||||
"flathub:app/nz.mega.MEGAsync//stable"
|
||||
];
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
@@ -50,6 +40,11 @@
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"electron-25.9.0"
|
||||
];
|
||||
|
||||
flatpak.enable = true;
|
||||
flatpak.packages = [
|
||||
"flathub:app/nz.mega.MEGAsync//stable"
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
obsidian
|
||||
|
||||
26
modules/home-manager/flatpak.nix
Normal file
26
modules/home-manager/flatpak.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ config, inputs, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.flatpak;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.flatpaks.homeManagerModules.default
|
||||
];
|
||||
options.flatpak = {
|
||||
enable = lib.mkEnableOption "Enable flatpak module";
|
||||
packages = lib.mkOption {
|
||||
default = [ ];
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.flatpak = {
|
||||
enableModule = true;
|
||||
remotes = {
|
||||
"flathub" = "https://dl.flathub.org/repo/flathub.flatpakrepo";
|
||||
"flathub-beta" = "https://dl.flathub.org/beta-repo/flathub-beta.flatpakrepo";
|
||||
};
|
||||
packages = cfg.packages;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user