Add flatpak

This commit is contained in:
muon 2026-01-17 11:01:49 +00:00
parent ce74d1b0eb
commit 5770fcf23d
6 changed files with 69 additions and 0 deletions

17
flake.lock generated
View file

@ -335,6 +335,22 @@
"type": "github"
}
},
"nix-flatpak": {
"locked": {
"lastModified": 1739444422,
"narHash": "sha256-iAVVHi7X3kWORftY+LVbRiStRnQEob2TULWyjMS6dWg=",
"owner": "gmodena",
"repo": "nix-flatpak",
"rev": "5e54c3ca05a7c7d968ae1ddeabe01d2a9bc1e177",
"type": "github"
},
"original": {
"owner": "gmodena",
"ref": "latest",
"repo": "nix-flatpak",
"type": "github"
}
},
"nix-index-database": {
"inputs": {
"nixpkgs": [
@ -511,6 +527,7 @@
"home-manager": "home-manager",
"impermanence": "impermanence",
"nix-alien": "nix-alien",
"nix-flatpak": "nix-flatpak",
"nix-minecraft": "nix-minecraft",
"nixpkgs": "nixpkgs_3",
"nvf": "nvf",

View file

@ -27,6 +27,8 @@
# nix-minecraft.url = "github:Infinidoge/nix-minecraft";
valheim-server.url = "github:kmjayadeep/valheim-server-flake";
valheim-server.inputs.nixpkgs.follows = "nixpkgs";
nix-flatpak.url = "github:gmodena/nix-flatpak?ref=latest";
};
outputs = inputs @ {

View file

@ -79,6 +79,9 @@ in {
mods.unfree.nvidia.enable = true;
mods.unfree.minecraft.enable = true;
mods.flatpak.enable = true;
mods.flatpak.stremio.enable = true;
# Hardware preferences
## Mouse

View file

@ -11,6 +11,7 @@
./server
./sops
./security
./flatpak
./impermanence.nix

View file

@ -0,0 +1,26 @@
{
pkgs,
config,
inputs,
lib,
...
}: let
cfg = config.mods.flatpak;
in
with lib; {
options.mods.flatpak.enable =
mkEnableOption "enables flatpak programs";
imports = [
inputs.nix-flatpak.nixosModules.nix-flatpak
./stremio.nix
];
config = mkIf cfg.enable {
services.flatpak.enable = true;
xdg.portal.enable = true;
xdg.portal.extraPortals = [
pkgs.xdg-desktop-portal
];
};
}

View file

@ -0,0 +1,20 @@
{
config,
lib,
...
}: let
cfg = config.mods.flatpak.stremio;
in
with lib; {
options.mods.flatpak.stremio.enable =
mkEnableOption "enables stremio flatpak";
config = mkIf cfg.enable {
services.flatpak.packages = [
{
appId = "com.stremio.Stremio";
origin = "flathub";
}
];
};
}