Browse Source

Use custom firefox shim to keep trash out of $HOME

main
parent
commit
4fac81aa6a
Signed by: chris GPG Key ID: 3025DCBD46F81C0F
  1. 12
      README.org
  2. 1
      flake.nix
  3. 11
      modules/firefox.nix

12
README.org

@ -481,6 +481,7 @@ nixos = nixpkgs.lib.nixosSystem {
<<module-hugo>>
<<module-flakes>>
<<module-cachix>>
<<module-firefox>>
<<module-home-manager>>
];
};
@ -795,12 +796,17 @@ in {
#+BEGIN_SRC nix :noweb yes :tangle modules/firefox.nix
# <<file-warning>>
{ pkgs, ... }:
{ config, pkgs, ... }:
{
let
myFirefox = pkgs.writeShellScriptBin "firefox" ''
HOME=~/.local/share/mozilla ${pkgs.firefox-bin}/bin/firefox
'';
in {
# NOTE: Use the binary until module is developed.
environment.systemPackages = [
pkgs.firefox-bin
myFirefox
];
}
#+END_SRC

1
flake.nix

@ -25,6 +25,7 @@
./modules/hugo.nix
./modules/flakes.nix
./modules/cachix.nix
./modules/firefox.nix
inputs.home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;

11
modules/firefox.nix

@ -1,9 +1,14 @@
# This file is controlled by /etc/dotfiles/README.org
{ pkgs, ... }:
{ config, pkgs, ... }:
{
let
myFirefox = pkgs.writeShellScriptBin "firefox" ''
HOME=~/.local/share/mozilla ${pkgs.firefox-bin}/bin/firefox
'';
in {
# NOTE: Use the binary until module is developed.
environment.systemPackages = [
pkgs.firefox-bin
myFirefox
];
}
Loading…
Cancel
Save