From 7bccf9bf8c581a3abaa000ad32be0ebe98fe3495 Mon Sep 17 00:00:00 2001 From: buffet Date: Sat, 22 Oct 2022 13:52:08 +0000 Subject: [PATCH] feat(browser): use firefox not chromium --- fanya.nix | 2 ++ flake.lock | 18 +++++++++++++++++- flake.nix | 1 + impermanence.nix | 1 - programs/chromium.nix | 19 ------------------- programs/default.nix | 2 +- programs/firefox.nix | 33 +++++++++++++++++++++++++++++++++ programs/sway.nix | 2 +- 8 files changed, 55 insertions(+), 23 deletions(-) delete mode 100644 programs/chromium.nix create mode 100644 programs/firefox.nix diff --git a/fanya.nix b/fanya.nix index d51d0dd..23d0363 100644 --- a/fanya.nix +++ b/fanya.nix @@ -2,6 +2,7 @@ pkgs, agenix, home-manager, + nur, ... }: let password = "$6$FHwMlUwmRdAsPqS4$4XND0L0EEVf2Mhc/tvo6y3ZLIrMTOlsIZrG3w69EeXvtVZhdeNyoDOkPNIe.GBB8.PrchuUKDacqbvcvyuPkt0"; @@ -9,6 +10,7 @@ in { imports = [ agenix.nixosModule home-manager.nixosModule + nur.nixosModules.nur ./impermanence.nix ./programs ./system.nix diff --git a/flake.lock b/flake.lock index 9ecba22..fd60baf 100644 --- a/flake.lock +++ b/flake.lock @@ -120,6 +120,21 @@ "type": "github" } }, + "nur": { + "locked": { + "lastModified": 1666442350, + "narHash": "sha256-fqEXNsVN0PR4Xn9+cqKsv2FtRSXawUnpQg89vukvZjg=", + "owner": "nix-community", + "repo": "NUR", + "rev": "9ac088a698c05304275199db5039a0525764724c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, "root": { "inputs": { "agenix": "agenix", @@ -128,7 +143,8 @@ "home-manager": "home-manager", "impermanence": "impermanence", "lsp-trouble": "lsp-trouble", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "nur": "nur" } } }, diff --git a/flake.nix b/flake.nix index 1320936..97b9f96 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,7 @@ inputs = { impermanence.url = "github:nix-community/impermanence"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05"; + nur.url = "github:nix-community/NUR"; agenix = { url = "github:ryantm/agenix"; diff --git a/impermanence.nix b/impermanence.nix index 858942e..937b2d2 100644 --- a/impermanence.nix +++ b/impermanence.nix @@ -34,7 +34,6 @@ allowOther = true; directories = [ - "chromium/.config/chromium" "data/books" "data/docs" "data/git" diff --git a/programs/chromium.nix b/programs/chromium.nix deleted file mode 100644 index 77275b9..0000000 --- a/programs/chromium.nix +++ /dev/null @@ -1,19 +0,0 @@ -_: { - home-manager.users.buffet = { - home.sessionVariables = { - BROWSER = "chromium"; - NIXOS_OZONE_WL = "1"; - }; - - programs.chromium = { - enable = true; - extensions = [ - {id = "nngceckbapebfimnlniiiahkandclblb";} # Bitwarden - {id = "gcbommkclmclpchllfjekcdonpmejbdp";} # HTTPS Everywhere - {id = "fihnjjcciajhdojfnbdddfaoknhalnja";} # I don't care about cookies - {id = "hlepfoohegkhhmjieoechaddaejaokhf";} # Refined GitHub - {id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";} # uBlock Origin - ]; - }; - }; -} diff --git a/programs/default.nix b/programs/default.nix index d22d778..7684e13 100644 --- a/programs/default.nix +++ b/programs/default.nix @@ -4,7 +4,7 @@ _: { ./bash.nix ./borg.nix ./cargo.nix - ./chromium.nix + ./firefox.nix ./git.nix ./gpg.nix ./mako.nix diff --git a/programs/firefox.nix b/programs/firefox.nix new file mode 100644 index 0000000..575a852 --- /dev/null +++ b/programs/firefox.nix @@ -0,0 +1,33 @@ +{ + config, + pkgs, + ... +}: { + home-manager.users.buffet = { + programs.firefox = { + enable = true; + package = pkgs.firefox-wayland; + + extensions = with config.nur.repos.rycee.firefox-addons; [ + bitwarden + https-everywhere + i-dont-care-about-cookies + refined-github + sidebery + ublock-origin + ]; + + profiles."buffet" = { + settings = { + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + }; + + userChrome = '' + #TabsToolbar { + visibility: collapse !important; + } + ''; + }; + }; + }; +} diff --git a/programs/sway.nix b/programs/sway.nix index fab159d..11a9f1b 100644 --- a/programs/sway.nix +++ b/programs/sway.nix @@ -12,7 +12,7 @@ xwayland = false; config = let - browser = "chromium"; + browser = "firefox"; mod = "Mod4"; terminal = "alacritty"; theme = import ../theme.nix;