feat: add firefox

This commit is contained in:
Truxnell 2024-03-31 21:40:20 +11:00
parent c6625642fd
commit 3554e1e7d4
11 changed files with 89 additions and 7 deletions

View file

@ -0,0 +1,5 @@
{ ... }: {
imports = [
./firefox
];
}

View file

@ -0,0 +1,39 @@
{ lib
, config
, self
, pkgs
, osConfig
, ...
}:
with lib;
let
cfg = config.myHome.programs.firefox;
in
{
options.myHome.programs.firefox.enable = mkEnableOption "Firefox";
config = mkIf cfg.enable {
programs.firefox = {
enable = true;
package = pkgs.firefox.override
{
extraPolicies = {
DontCheckDefaultBrowser = true;
DisablePocket = true;
# See nixpkgs' firefox/wrapper.nix to check which options you can use
nativeMessagingHosts = [
# Gnome shell native connector
pkgs.gnome-browser-connector
# plasma connector
# plasma5Packages.plasma-browser-integration
];
};
};
};
};
}

View file

@ -0,0 +1,5 @@
{ ... }: {
imports = [
./browsers
];
}

View file

@ -17,8 +17,24 @@ in
# Temporary make .config/wezterm/wezterm.lua link to the local copy
config = mkIf cfg.enable {
# xdg.configFile."wezterm/wezterm.lua".source = config.lib.file.mkOutOfStoreSymlink cfg.configPath;
programs.wezterm.package = pkgs.unstable.wezterm;
programs.wezterm = {
enable = true;
extraConfig = ''
local wez = require('wezterm')
return {
color_scheme = "Dracula (Official)",
check_for_updates = false,
window_background_opacity = .90,
window_padding = {
left = '2cell',
right = '2cell',
top = '1cell',
bottom = '0cell',
},
}
'';
};
};
}

View file

@ -9,9 +9,7 @@ with config;
config = {
myHome.username = "truxnell";
myHome.homeDirectory = "/home/truxnell/";
myHome.shell.starship.enable = true;
myHome.shell.fish.enable = true;
myHome.shell.wezterm.enable = true;
# services.gpg-agent.pinentryPackage = pkgs.pinentry-qt;
systemd.user.sessionVariables = {

View file

@ -1,3 +1,7 @@
{ lib, pkgs, self, config, ... }:
with config;
{ }
{
imports = [
./global.nix
];
}

View file

@ -1,6 +1,14 @@
{ lib, pkgs, self, config, ... }:
with config;
{
imports = [
./global.nix
];
myHome.programs.firefox.enable = true;
myHome.shell.starship.enable = true;
myHome.shell.fish.enable = true;
myHome.shell.wezterm.enable = true;
home = {
# Install these packages for my user
@ -9,7 +17,8 @@ with config;
steam
spotify
brightnessctl
prusaslicer
prusa-slicer
bitwarden
bat
dbus

View file

@ -34,6 +34,11 @@ in
layout = "us"; # `localctl` will give you
};
# GNOME connection to browsers - requires flag on browser as well
services.gnome.gnome-browser-connector.enable = lib.any
(user: user.programs.firefox.enable)
(lib.attrValues config.home-manager.users);
# TODO remove this when possible
# workaround for GNOME autologin
# https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229

View file

@ -1,5 +1,6 @@
{ lib
, config
, pkgs
, ...
}:

View file

@ -4,7 +4,7 @@
{
# deploy-rs overlay
deploy-rs = inputs.deploy-rs.overlays.default;
# The unstable nixpkgs set (declared in the flake inputs) will
# be accessible through 'pkgs.unstable'
unstable-packages = final: _prev: {

View file

@ -11,7 +11,7 @@ with config;
de.gnome.enable = true;
editor.vscodium.enable = true;
browser.firefox.enable = true;
# Lets see if fish everywhere is OK on the pi's
# TODO decide if i drop to bash on pis?
shell.fish.enable = true;