feat: declaratively install flatpak
Some checks failed
Check flake / check (push) Has been cancelled

This commit is contained in:
Youwen Wu 2024-12-08 16:42:57 -08:00
parent 8f86ce2201
commit 2b2c43ad06
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
7 changed files with 65 additions and 4 deletions

View file

@ -511,6 +511,21 @@
"type": "github"
}
},
"nix-flatpak": {
"locked": {
"lastModified": 1733345341,
"narHash": "sha256-8S58zrdpzGhax6tmn1i+R3AA0N9DJMu5FQI8JkA0NNU=",
"owner": "gmodena",
"repo": "nix-flatpak",
"rev": "ebb0be49fc381112ff37726c6dd6df4df2ef5a1b",
"type": "github"
},
"original": {
"owner": "gmodena",
"repo": "nix-flatpak",
"type": "github"
}
},
"nix-homebrew": {
"inputs": {
"brew-src": "brew-src",
@ -740,6 +755,7 @@
"homebrew-core": "homebrew-core",
"lanzaboote": "lanzaboote",
"nix-darwin": "nix-darwin",
"nix-flatpak": "nix-flatpak",
"nix-homebrew": "nix-homebrew",
"nix-index-database": "nix-index-database",
"nixos-wsl": "nixos-wsl",

View file

@ -24,6 +24,8 @@
inputs.nixpkgs.follows = "nixpkgs";
};
nix-flatpak.url = "github:gmodena/nix-flatpak";
nix-homebrew = {
url = "github:zhaofengli-wip/nix-homebrew";
inputs.nixpkgs.follows = "nixpkgs";

View file

@ -86,8 +86,6 @@
# };
# };
services.flatpak.enable = true;
boot.initrd.luks.devices."luks-52d1be6d-b32f-41e0-a6d7-2ff52599fe7c".device = "/dev/disk/by-uuid/52d1be6d-b32f-41e0-a6d7-2ff52599fe7c";
services.tlp.enable = true;

View file

@ -17,6 +17,7 @@
../../modules/linux/wine
../../modules/linux/stylix
../../modules/linux/distrobox
../../modules/linux/flatpak
../../overlays
{
home-manager.useGlobalPkgs = true;

View file

@ -126,8 +126,6 @@
services.xserver.videoDrivers = [ "nvidia" ];
services.flatpak.enable = true;
# services.desktopManager.plasma6.enable = true;
# Configure keymap in X11

View file

@ -17,6 +17,7 @@
../../modules/linux/audio-prod
../../modules/linux/stylix
../../modules/linux/wine
../../modules/linux/flatpak
../../overlays
{
home-manager.useGlobalPkgs = true;

View file

@ -0,0 +1,45 @@
# NOTE: this module is IMPURE. Flatpaks are declaratively specified but not
# versioned. Therefore, they are not included in generational rollbacks and
# persist between generations. This is not ideal, but at least it is a better
# situation than imperative installation
{ inputs, ... }:
{
imports = [
inputs.nix-flatpak.nixosModules.nix-flatpak
];
services.flatpak = {
enable = true;
overrides = {
global = {
Context.sockets = [
"wayland"
"!x11"
"!fallback-x11"
];
Environment = {
# Fix un-themed cursor in some Wayland apps
XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons";
};
};
};
update.auto = {
enable = true;
onCalendar = "weekly";
};
packages = [
{
flatpakref = "https://sober.vinegarhq.org/sober.flatpakref";
sha256 = "sha256:1pj8y1xhiwgbnhrr3yr3ybpfis9slrl73i0b1lc9q89vhip6ym2l";
}
{
appId = "org.vinegarhq.Sober";
origin = "sober";
}
];
};
}