Merge branch 'main' into storage-refactor
This commit is contained in:
commit
3891f93dba
5 changed files with 172 additions and 0 deletions
|
|
@ -72,6 +72,9 @@ in {
|
|||
noita-entangled-worlds.enable = true;
|
||||
tor-browser.enable = true;
|
||||
gdx-liftoff.enable = true;
|
||||
proton-mail-pwa.enable = true;
|
||||
proton-calendar-pwa.enable = true;
|
||||
matrix-cyberia-pwa.enable = true;
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,5 +46,8 @@
|
|||
./gdx-liftoff.nix
|
||||
./tor-browser.nix
|
||||
./vmware-workstation.nix
|
||||
./proton-mail-pwa.nix
|
||||
./proton-calendar-pwa.nix
|
||||
./matrix-cyberia-pwa.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
56
modules/home-manager-modules/programs/matrix-cyberia-pwa.nix
Normal file
56
modules/home-manager-modules/programs/matrix-cyberia-pwa.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.programs.matrix-cyberia-pwa;
|
||||
isChromium = cfg.package == pkgs.chromium;
|
||||
isBrowserImpermanenceSupported = cfg.package == pkgs.chromium;
|
||||
in {
|
||||
options.programs.matrix-cyberia-pwa = {
|
||||
enable = lib.mkEnableOption "enable Matrix Cyberia PWA";
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.chromium;
|
||||
description = "Browser package to use for the PWA";
|
||||
};
|
||||
impermanence = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = isBrowserImpermanenceSupported;
|
||||
description = "Enable impermanence configuration for the PWA. Only automatically enabled when using chromium.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||
{
|
||||
warnings =
|
||||
lib.optional (config.impermanence.enable && !isBrowserImpermanenceSupported)
|
||||
"matrix-cyberia-pwa: Using unsupported package. You will need to manually configure pwa for ${cfg.package.pname}. Supported package(s) ${pkgs.chromium.pname}";
|
||||
}
|
||||
(
|
||||
lib.mkIf isChromium {
|
||||
xdg.desktopEntries.matrix-cyberia-pwa = {
|
||||
name = "Matrix (Cyberia)";
|
||||
type = "Application";
|
||||
exec = "${cfg.package}/bin/${cfg.package.pname} --app=https://chat.cyberia.club/";
|
||||
icon = "matrix";
|
||||
terminal = false;
|
||||
categories = ["Network" "InstantMessaging"];
|
||||
};
|
||||
}
|
||||
)
|
||||
(
|
||||
lib.mkIf (config.impermanence.enable && cfg.impermanence.enable && isChromium) {
|
||||
home.persistence."/persist${config.home.homeDirectory}" = {
|
||||
directories = [
|
||||
"${config.xdg.configHome}/chromium"
|
||||
];
|
||||
allowOther = true;
|
||||
};
|
||||
}
|
||||
)
|
||||
]);
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.programs.proton-calendar-pwa;
|
||||
isChromium = cfg.package == pkgs.chromium;
|
||||
isBrowserImpermanenceSupported = cfg.package == pkgs.chromium;
|
||||
in {
|
||||
options.programs.proton-calendar-pwa = {
|
||||
enable = lib.mkEnableOption "enable Proton Calendar PWA";
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.chromium;
|
||||
description = "Browser package to use for the PWA";
|
||||
};
|
||||
impermanence = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = isBrowserImpermanenceSupported;
|
||||
description = "Enable impermanence configuration for the PWA. Only automatically enabled when using chromium.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||
{
|
||||
warnings =
|
||||
lib.optional (config.impermanence.enable && !isBrowserImpermanenceSupported)
|
||||
"proton-calendar-pwa: Using unsupported package. You will need to manually configure pwa for ${cfg.package.pname}. Supported package(s) ${pkgs.chromium.pname}";
|
||||
}
|
||||
(
|
||||
lib.mkIf isChromium {
|
||||
xdg.desktopEntries.proton-calendar-pwa = {
|
||||
name = "Proton Calendar";
|
||||
type = "Application";
|
||||
exec = "${cfg.package}/bin/${cfg.package.pname} --app=https://calendar.proton.me";
|
||||
icon = "chrome-ojibjkjikcpjonjjngfkegflhmffeemk-Default";
|
||||
terminal = false;
|
||||
};
|
||||
}
|
||||
)
|
||||
(
|
||||
lib.mkIf (config.impermanence.enable && cfg.impermanence.enable && isChromium) {
|
||||
home.persistence."/persist${config.home.homeDirectory}" = {
|
||||
directories = [
|
||||
"${config.xdg.configHome}/chromium"
|
||||
];
|
||||
allowOther = true;
|
||||
};
|
||||
}
|
||||
)
|
||||
]);
|
||||
}
|
||||
55
modules/home-manager-modules/programs/proton-mail-pwa.nix
Normal file
55
modules/home-manager-modules/programs/proton-mail-pwa.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.programs.proton-mail-pwa;
|
||||
isChromium = cfg.package == pkgs.chromium;
|
||||
isBrowserImpermanenceSupported = cfg.package == pkgs.chromium;
|
||||
in {
|
||||
options.programs.proton-mail-pwa = {
|
||||
enable = lib.mkEnableOption "enable Proton Mail PWA";
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.chromium;
|
||||
description = "Browser package to use for the PWA";
|
||||
};
|
||||
impermanence = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = isBrowserImpermanenceSupported;
|
||||
description = "Enable impermanence configuration for the PWA. Only automatically enabled when using chromium.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||
{
|
||||
warnings =
|
||||
lib.optional (config.impermanence.enable && !isBrowserImpermanenceSupported)
|
||||
"proton-mail-pwa: Using unsupported package. You will need to manually configure pwa for ${cfg.package.pname}. Supported package(s) ${pkgs.chromium.pname}";
|
||||
}
|
||||
(
|
||||
lib.mkIf isChromium {
|
||||
xdg.desktopEntries.proton-mail-pwa = {
|
||||
name = "Proton Mail";
|
||||
type = "Application";
|
||||
exec = "${cfg.package}/bin/${cfg.package.pname} --app=https://mail.proton.me";
|
||||
icon = "chrome-jnpecgipniidlgicjocehkhajgdnjekh-Default";
|
||||
terminal = false;
|
||||
};
|
||||
}
|
||||
)
|
||||
(
|
||||
lib.mkIf (config.impermanence.enable && cfg.impermanence.enable && isChromium) {
|
||||
home.persistence."/persist${config.home.homeDirectory}" = {
|
||||
directories = [
|
||||
"${config.xdg.configHome}/chromium"
|
||||
];
|
||||
allowOther = true;
|
||||
};
|
||||
}
|
||||
)
|
||||
]);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue