Refactor the whole configuration #1
1 changed files with 60 additions and 81 deletions
|
@ -3,11 +3,10 @@
|
|||
# https://github.com/schizofox/schizofox/blob/cdf69b2a445ff12680657a3bd44ce7c406bf2ae6/flake/modules/home-manager/default.nix
|
||||
|
||||
{ ... }: final: prev: {
|
||||
firefox-esr-wrapped = let
|
||||
sandboxFirefox = base: let
|
||||
sandboxed = prev.mkNixPak {
|
||||
firefox-esr = let
|
||||
sandboxed-firefox-esr = prev.mkNixPak {
|
||||
config = { sloth, ... }: {
|
||||
app.package = base;
|
||||
app.package = prev.firefox-esr;
|
||||
app.binPath = "bin/firefox-esr";
|
||||
flatpak.appId = "org.mozilla.firefox";
|
||||
|
||||
|
@ -75,26 +74,6 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
in sandboxed.config.env;
|
||||
baseWrapped = sandboxFirefox prev.firefox-esr;
|
||||
|
||||
finalizePackage = base: base // {
|
||||
inherit (prev.firefox-esr)
|
||||
meta
|
||||
browserName
|
||||
binaryName
|
||||
version;
|
||||
|
||||
unwrapped = prev.firefox-esr;
|
||||
|
||||
override = attrs: let
|
||||
firefoxWithCfg = if attrs ? cfg
|
||||
then prev.firefox-esr.override attrs
|
||||
else prev.firefox-esr;
|
||||
in finalizePackage (sandboxFirefox firefoxWithCfg);
|
||||
|
||||
overrideAttrs = f: finalizePackage (sandboxFirefox prev.firefox-esr);
|
||||
};
|
||||
in
|
||||
finalizePackage baseWrapped;
|
||||
sandboxed-firefox-esr.config.env;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue