add flatpaks
This commit is contained in:
parent
37e662fb55
commit
b9cdbd90c5
7 changed files with 125 additions and 63 deletions
|
@ -22,7 +22,7 @@ in
|
|||
};
|
||||
stateVersion = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "23.11";
|
||||
default = "25.05";
|
||||
description = "Home manager state version";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
defaultKeymap = "emacs";
|
||||
|
||||
initExtra = ''
|
||||
initContent = ''
|
||||
# Set editor to neovim, TODO only do this if mod.neovim is enabled
|
||||
export EDITOR=nvim
|
||||
export VISUAL=nvim
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
inputs = {
|
||||
home-manager.url = "github:rycee/home-manager/release-25.05";
|
||||
ragenix.url = "github:yaxitech/ragenix";
|
||||
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
|
||||
|
||||
# hyprland.url = "github:hyprwm/Hyprland";
|
||||
# cosmic.url = "github:lilyinstarlight/nixos-cosmic";
|
||||
|
@ -11,6 +12,7 @@
|
|||
{
|
||||
home-manager,
|
||||
ragenix,
|
||||
nix-flatpak,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
@ -25,6 +27,7 @@
|
|||
imports = [
|
||||
home-manager.nixosModules.home-manager
|
||||
ragenix.nixosModules.age
|
||||
nix-flatpak.nixosModules.nix-flatpak
|
||||
./_home_manager
|
||||
./options.nix
|
||||
./general
|
||||
|
@ -37,6 +40,7 @@
|
|||
config = {
|
||||
_module.args = {
|
||||
inherit ragenix;
|
||||
inherit nix-flatpak;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -13,6 +13,7 @@ in
|
|||
./docker.nix
|
||||
./podman.nix
|
||||
./incus.nix
|
||||
./flatpaks.nix
|
||||
];
|
||||
config = {
|
||||
assertions = [
|
||||
|
|
58
common/programs/flatpaks.nix
Normal file
58
common/programs/flatpaks.nix
Normal file
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
ccfg = import ../config.nix;
|
||||
cfg_path = [
|
||||
ccfg.custom_config_key
|
||||
"programs"
|
||||
"flatpaks"
|
||||
];
|
||||
cfg = lib.attrsets.getAttrFromPath cfg_path config;
|
||||
in
|
||||
{
|
||||
options =
|
||||
{ }
|
||||
// lib.attrsets.setAttrByPath cfg_path {
|
||||
enable = lib.mkEnableOption "flatpaks";
|
||||
packages = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
description = "List of Flatpak package names to install.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.flatpak = {
|
||||
enable = true;
|
||||
packages = cfg.packages;
|
||||
overrides = {
|
||||
global = {
|
||||
Context.sockets = [
|
||||
"wayland"
|
||||
"x11"
|
||||
];
|
||||
|
||||
Environment = {
|
||||
XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons";
|
||||
GTK_THEME = "Adwaita:dark";
|
||||
# Force wayland as much as possible.
|
||||
ELECTRON_OZONE_PLATFORM_HINT = "wayland"; # or 'auto'
|
||||
};
|
||||
};
|
||||
"org.signal.Signal" = {
|
||||
Environment = {
|
||||
SIGNAL_PASSWORD_STORE = "gnome-libsecret";
|
||||
};
|
||||
Context = {
|
||||
sockets = [
|
||||
"xfg-settings"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue