diff --git a/programs/default.nix b/programs/default.nix index c72af1b5..c6074b84 100644 --- a/programs/default.nix +++ b/programs/default.nix @@ -3,6 +3,7 @@ _: { ./shell ./editors ./ssh + ./desktop ]; home-manager.users.root.imports = [ ./home-manager.nix diff --git a/programs/desktop/default.nix b/programs/desktop/default.nix new file mode 100644 index 00000000..37636303 --- /dev/null +++ b/programs/desktop/default.nix @@ -0,0 +1,5 @@ +{config, ...}: { + home-manager.users.darkkirb.imports = mkIf config.isGraphical [ + ./home-manager.nix + ]; +} diff --git a/programs/desktop/firefox/default.nix b/programs/desktop/firefox/default.nix new file mode 100644 index 00000000..c29dfe2b --- /dev/null +++ b/programs/desktop/firefox/default.nix @@ -0,0 +1,31 @@ +{ + pkgs, + config, + ... +}: { + programs.firefox = { + enable = true; + profiles.default = { + containersForce = true; + extensions = []; # TODO + path = "${config.xdg.dataHome}/mozilla/default"; + settings = { + "extensions.autoDisableScopes" = 0; + }; + userChrome = '' + #main-window #titlebar { + overflow: hidden; + transition: height 0.3s 0.3s !important; + } + /* Default state: Set initial height to enable animation */ + #main-window #titlebar { height: 3em !important; } + #main-window[uidensity="touch"] #titlebar { height: 3.35em !important; } + #main-window[uidensity="compact"] #titlebar { height: 2.7em !important; } + /* Hidden state: Hide native tabs strip */ + #main-window[titlepreface*="​"] #titlebar { height: 0 !important; } + /* Hidden state: Fix z-index of active pinned tabs */ + #main-window[titlepreface*="​"] #tabbrowser-tabs { z-index: 0 !important; } + ''; + }; + }; +} diff --git a/programs/desktop/home-manager.nix b/programs/desktop/home-manager.nix new file mode 100644 index 00000000..5f1b9dc7 --- /dev/null +++ b/programs/desktop/home-manager.nix @@ -0,0 +1,5 @@ +_: { + imports = [ + ./firefox + ]; +}