From 7c2b4776b750f083d33e2204a11f9206e4600341 Mon Sep 17 00:00:00 2001 From: xenia Date: Sat, 14 Jun 2025 20:24:09 +0200 Subject: [PATCH] nur + firefox config for gender-station --- flake.lock | 65 ++++++++++++++++++++++++++ flake.nix | 20 ++++++-- nixos/machines/gender-station/home.nix | 45 ++++++++++++++++++ 3 files changed, 127 insertions(+), 3 deletions(-) create mode 100644 nixos/machines/gender-station/home.nix diff --git a/flake.lock b/flake.lock index c775c8a2..d4f13782 100644 --- a/flake.lock +++ b/flake.lock @@ -36,6 +36,27 @@ "type": "github" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nur", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -310,6 +331,28 @@ "type": "github" } }, + "nur": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": [ + "nixpkgs" + ], + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1748727834, + "narHash": "sha256-8UBiCifl+p8q59vFL/DNhCZceuUEqHDf1yjInmj4xgU=", + "owner": "nix-community", + "repo": "NUR", + "rev": "324a167ce298504c15d415af48a01863873b8b1c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, "root": { "inputs": { "ansi-utils": "ansi-utils", @@ -320,6 +363,7 @@ "nixos-apple-silicon": "nixos-apple-silicon", "nixpkgs": "nixpkgs_2", "nixpkgs-unstable": "nixpkgs-unstable", + "nur": "nur", "unambig-path": "unambig-path", "unispect": "unispect" } @@ -400,6 +444,27 @@ "type": "github" } }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nur", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733222881, + "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "49717b5af6f80172275d47a418c9719a31a78b53", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, "unambig-path": { "inputs": { "flake-utils": "flake-utils_3", diff --git a/flake.nix b/flake.nix index 98ade3b1..1a64cfa8 100644 --- a/flake.nix +++ b/flake.nix @@ -38,12 +38,25 @@ url = "github:sodiboo/niri-flake"; inputs.nixpkgs.follows = "nixpkgs"; }; + + nur = { # only for firefox addons + url = "github:nix-community/NUR"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, nix-darwin, kak, unispect, ansi-utils, unambig-path, nixos-apple-silicon, niri }: + outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, nix-darwin, kak, unispect, ansi-utils, unambig-path, nixos-apple-silicon, niri, nur }: let - mkPkgs = system: import nixpkgs { system = system; config.allowUnfree = true; }; - mkPkgsUnstable = system: import nixpkgs-unstable { system = system; config.allowUnfree = true; }; + mkPkgs = system: import nixpkgs { + system = system; + config.allowUnfree = true; + overlays = [ nur.overlays.default ]; + }; + mkPkgsUnstable = system: import nixpkgs-unstable { + system = system; + config.allowUnfree = true; + overlays = [ nur.overlays.default ]; + }; mkPkgsUnsupported = system: import nixpkgs { system = system; config.allowUnfree = true; config.allowUnsupportedSystem = true; }; mkHome = {username, home-dir, prompt-color, system, pkgs} : import ./home/common.nix { inherit username home-dir prompt-color pkgs; @@ -274,6 +287,7 @@ home-manager.users.xenia = xenia.home; } { home-manager.users.xenia = xenia.pc; } + { home-manager.users.xenia = import ./nixos/machines/gender-station/home.nix { inherit pkgs; }; } ]; }; }; diff --git a/nixos/machines/gender-station/home.nix b/nixos/machines/gender-station/home.nix new file mode 100644 index 00000000..62e3c361 --- /dev/null +++ b/nixos/machines/gender-station/home.nix @@ -0,0 +1,45 @@ +{ pkgs }: +{ + + programs.firefox = { + enable = true; + + profiles."xenia" = { + extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [ + keepassxc-browser + no-pdf-download + ublock-origin + ]; + + settings = { + "app.shield.optoutstudies.enabled" = false; + "app.update.auto" = false; + "browser.bookmarks.restore_default_bookmarks" = false; + "browser.contentblocking.category" = "strict"; + "browser.discovery.enabled" = false; + "browser.laterrun.enabled" = false; + "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false; + "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false; + "browser.newtabpage.activity-stream.feeds.snippets" = false; + "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.havePinned" = ""; + "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.searchEngines" = ""; + "browser.newtabpage.activity-stream.section.highlights.includePocket" = false; + "browser.newtabpage.activity-stream.showSponsored" = false; + "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; + "browser.newtabpage.pinned" = false; + "browser.protections_panel.infoMessage.seen" = true; + "browser.quitShortcut.disabled" = true; + "browser.shell.checkDefaultBrowser" = false; + "browser.toolbars.bookmarks.visibility" = "new-tab"; + "extensions.pocket.enabled" = false; + "privacy.trackingprotection.enabled" = true; + "privacy.trackingprotection.socialtracking.enabled" = true; + + "sidebar.revamp" = true; + "sidebar.verticalTabs" = true; + "browser.ml.chat.enabled" = false; + "signon.rememberSignons" = false; + }; + }; + }; +}