diff --git a/flake.lock b/flake.lock index ebe7e20..da7d461 100644 --- a/flake.lock +++ b/flake.lock @@ -63,11 +63,11 @@ ] }, "locked": { - "lastModified": 1731496216, - "narHash": "sha256-nlQrNN+tmJ+iP6Ck/czwZI0Hxz3oNvUyGkVruxJwgwA=", + "lastModified": 1731774881, + "narHash": "sha256-1Dxryiw8u2ejntxrrv3sMtIE8WHKxmlN4KeH+uMGbmc=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "3b00e96f90cb0040de6d88ad99bf5f4d443f0c59", + "rev": "b31a6a4da8199ae3489057db7d36069a70749a56", "type": "github" }, "original": { @@ -269,11 +269,11 @@ "systems": "systems_6" }, "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -435,11 +435,11 @@ ] }, "locked": { - "lastModified": 1731604581, - "narHash": "sha256-Qq2YZZaDTB3FZLWU/Hgh1uuWlUBl3cMLGB99bm7rFUM=", + "lastModified": 1731832479, + "narHash": "sha256-icDDuYwJ0avTMZTxe1qyU/Baht5JOqw4pb5mWpR+hT0=", "owner": "nix-community", "repo": "home-manager", - "rev": "1d0862ee2d7c6f6cd720d6f32213fa425004be10", + "rev": "5056a1cf0ce7c2a08ab50713b6c4af77975f6111", "type": "github" }, "original": { @@ -456,11 +456,11 @@ ] }, "locked": { - "lastModified": 1731535640, - "narHash": "sha256-2EckCJn4wxran/TsRiCOFcmVpep2m9EBKl99NBh2GnM=", + "lastModified": 1731604581, + "narHash": "sha256-Qq2YZZaDTB3FZLWU/Hgh1uuWlUBl3cMLGB99bm7rFUM=", "owner": "nix-community", "repo": "home-manager", - "rev": "35b055009afd0107b69c286fca34d2ad98940d57", + "rev": "1d0862ee2d7c6f6cd720d6f32213fa425004be10", "type": "github" }, "original": { @@ -533,11 +533,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1731712919, - "narHash": "sha256-sWM0V0enjbxuODQQ5Jau98EYBEzyDMrR6a1uKjYB1HE=", + "lastModified": 1731862009, + "narHash": "sha256-d8LfYzT5NRmEjySLTekmrMIROSpwm5usVFwDWC73qWU=", "ref": "refs/heads/main", - "rev": "7affc34ab43c5d5cbf670759b839a9e990d8bbea", - "revCount": 5457, + "rev": "8d5cdedbd350b4730a1aa57dc5491c88dff3415e", + "revCount": 5466, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -608,11 +608,11 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1731664774, - "narHash": "sha256-Do6AzcTlJrULDpgEJVyCkX1Js+8R18g1m0cPf0FJ77g=", + "lastModified": 1731838078, + "narHash": "sha256-xx8APBr8MnUY/bKcYq/u/Ygbt05dhQUoYRzK5NYBCrY=", "owner": "Jas-SinghFSU", "repo": "HyprPanel", - "rev": "0c6a19ab8900c0e27eb3b8dd0b96cde9a67981e9", + "rev": "1c287a92bdeeec13b9954cae36b18c8e2504292e", "type": "github" }, "original": { @@ -674,11 +674,11 @@ ] }, "locked": { - "lastModified": 1731518387, - "narHash": "sha256-aZZw1ZvTMLkcA6udlvkA3hrCkuipoWLy8s/JNnIclxY=", + "lastModified": 1731702627, + "narHash": "sha256-+JeO9gevnXannQxMfR5xzZtF4sYmSlWkX/BPmPx0mWk=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "315fba5d21d87ddb756d4bebdb49f99d86b0ffe8", + "rev": "e911361a687753bbbdfe3b6a9eab755ecaf1d9e1", "type": "github" }, "original": { @@ -773,11 +773,11 @@ ] }, "locked": { - "lastModified": 1731454423, - "narHash": "sha256-TtwvgFxUa0wyptLhQbKaixgNW1UXf3+TDqfX3Kp63oM=", + "lastModified": 1731642829, + "narHash": "sha256-vG+O2RZRzYZ8BUMNNJ+BLSj6PUoGW7taDQbp6QNJ3Xo=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "6c71c49e2448e51ad830ed211024e6d0edc50116", + "rev": "f86f158efd4bab8dce3e207e4621f1df3a760b7a", "type": "github" }, "original": { @@ -788,11 +788,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1731740897, - "narHash": "sha256-teFd31vsE/0Z0WR6XVeKhKPw6Eyb2gXGpG0tjpMfBDM=", + "lastModified": 1731797098, + "narHash": "sha256-UhWmEZhwJZmVZ1jfHZFzCg+ZLO9Tb/v3Y6LC0UNyeTo=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "c2c275fbb2e656948ba6e1f67b8ddd430f158c5f", + "rev": "672ac2ac86f7dff2f6f3406405bddecf960e0db6", "type": "github" }, "original": { @@ -834,29 +834,13 @@ "type": "github" } }, - "nixpkgs-stable_2": { - "locked": { - "lastModified": 1730602179, - "narHash": "sha256-efgLzQAWSzJuCLiCaQUCDu4NudNlHdg2NzGLX5GYaEY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "3c2f1c4ca372622cb2f9de8016c9a0b1cbd0f37c", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "release-24.05", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_2": { "locked": { - "lastModified": 1731139594, - "narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=", + "lastModified": 1731676054, + "narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2", + "rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add", "type": "github" }, "original": { @@ -884,11 +868,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1729880355, - "narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=", + "lastModified": 1731676054, + "narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add", "type": "github" }, "original": { @@ -916,11 +900,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1731319897, - "narHash": "sha256-PbABj4tnbWFMfBp6OcUK5iGy1QY+/Z96ZcLpooIbuEI=", + "lastModified": 1731676054, + "narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "dc460ec76cbff0e66e269457d7b728432263166c", + "rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add", "type": "github" }, "original": { @@ -932,11 +916,11 @@ }, "nixpkgs_7": { "locked": { - "lastModified": 1725194671, - "narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=", + "lastModified": 1731531548, + "narHash": "sha256-sz8/v17enkYmfpgeeuyzniGJU0QQBfmAjlemAUYhfy8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b833ff01a0d694b910daca6e2ff4a3f26dee478c", + "rev": "24f0d4acd634792badd6470134c387a3b039dace", "type": "github" }, "original": { @@ -961,11 +945,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1731707185, - "narHash": "sha256-IfA3x0eL4Be/7hvdvGSnT8fgiXz7GL3PtjGw3BH68gM=", + "lastModified": 1731780782, + "narHash": "sha256-CG3rcxcZEViYEUTAXatqXrW0Gn9tQvydF+lLYH+0VPA=", "owner": "nix-community", "repo": "nixvim", - "rev": "be455f7f2714ce3479ae5bb662a03bd450f45793", + "rev": "9d99d7cfdbd7f94da9571a4d7bbb9de185241935", "type": "github" }, "original": { @@ -990,6 +974,21 @@ "type": "github" } }, + "nur": { + "locked": { + "lastModified": 1731863972, + "narHash": "sha256-E3QBnpoTVvKY8HZH99qIxRfoSgvJQuo5GbA8Tsmt2es=", + "owner": "nix-community", + "repo": "NUR", + "rev": "ac3ca33bee0460cd09d79288aada1f29e6f6aacf", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, "nuschtosSearch": { "inputs": { "flake-utils": "flake-utils_2", @@ -1000,11 +999,11 @@ ] }, "locked": { - "lastModified": 1731347683, - "narHash": "sha256-BcSWCEUBShuB32LPif+EG0XGXyUi2jyjCSpGE1rbOws=", + "lastModified": 1731582522, + "narHash": "sha256-1w6aM4bG5cl2E4jHLPnMKkrUO4tY1jUX1NI6/RwJN7Y=", "owner": "NuschtOS", "repo": "search", - "rev": "135d202e032be70c93b6d7d53592ef4799d6efde", + "rev": "13300b2297c51368e0892c3ebe220f688014fe15", "type": "github" }, "original": { @@ -1082,6 +1081,7 @@ "nixpkgs": "nixpkgs_6", "nixvim": "nixvim", "nixy-wallpapers": "nixy-wallpapers", + "nur": "nur", "pia": "pia", "sops-nix": "sops-nix", "spicetify-nix": "spicetify-nix", @@ -1140,15 +1140,14 @@ "inputs": { "nixpkgs": [ "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable_2" + ] }, "locked": { - "lastModified": 1731748189, - "narHash": "sha256-Zd/Uukvpcu26M6YGhpbsgqm6LUSLz+Q8mDZ5LOEGdiE=", + "lastModified": 1731862312, + "narHash": "sha256-NVUTFxKrJp/hjehlF1IvkPnlRYg/O9HFVutbxOM8zNM=", "owner": "Mic92", "repo": "sops-nix", - "rev": "d2bd7f433b28db6bc7ae03d5eca43564da0af054", + "rev": "472741cf3fee089241ac9ea705bb2b9e0bfa2978", "type": "github" }, "original": { @@ -1165,11 +1164,11 @@ ] }, "locked": { - "lastModified": 1731730585, - "narHash": "sha256-nyetM6Y0dMy2XH1KPlBLhh8jj0CnK1bkO0E6jg+iqQY=", + "lastModified": 1731816930, + "narHash": "sha256-PitzPtc36GdVBdxpU2A61pbJcM/KJlsEkFRagzkW3Yc=", "owner": "Gerg-L", "repo": "spicetify-nix", - "rev": "bec1abb9826ddb6f13c621c1092b1396e8cf1b10", + "rev": "f3d75d6a7ca1fdd7b3943a8b257c413c7e3b307a", "type": "github" }, "original": { @@ -1195,11 +1194,11 @@ "tinted-tmux": "tinted-tmux" }, "locked": { - "lastModified": 1731657386, - "narHash": "sha256-Mm/JL8tFUS1SOmmZDPcswExUxzw0VpHcEyZI1h58CGA=", + "lastModified": 1731861652, + "narHash": "sha256-71iRk7zLR+r9urKPEoutLqPm3Tex6gLbZyWPI4VoHIs=", "owner": "danth", "repo": "stylix", - "rev": "5ab1207b2fdeb5a022f2dd7cccf6be760f1b150f", + "rev": "9b61cc39b2c82f01b63bb0ae85865d7372697fc4", "type": "github" }, "original": { @@ -1427,11 +1426,11 @@ ] }, "locked": { - "lastModified": 1730743262, - "narHash": "sha256-iTLqj3lU8kFehPm5tXpctzkD274t/k1nwSSq3qCWXeg=", + "lastModified": 1731703417, + "narHash": "sha256-rheDc/7C+yI+QspYr9J2z9kQ5P9F4ATapI7qyFAe1XA=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "09b23cef06fe248e61cec8862c04b9bcb62f4b6d", + "rev": "8070f36deec723de71e7557441acb17e478204d3", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 6e9a63a..47a257f 100644 --- a/flake.nix +++ b/flake.nix @@ -41,7 +41,7 @@ url = "github:Fuwn/pia.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; - + nur.url = "github:nix-community/NUR"; }; outputs = inputs@{ nixpkgs, ... }: { @@ -51,37 +51,8 @@ system = "x86_64-linux"; modules = [ { - nixpkgs.overlays = [ - inputs.hyprpanel.overlay - # FIXME: Temp fix - (final: prev: { - matugen = final.rustPlatform.buildRustPackage rec { - pname = "matugen"; - version = "2.4.0"; - - src = final.fetchFromGitHub { - owner = "InioX"; - repo = "matugen"; - rev = "refs/tags/v${version}"; - hash = - "sha256-l623fIVhVCU/ylbBmohAtQNbK0YrWlEny0sC/vBJ+dU="; - }; - - cargoHash = - "sha256-FwQhhwlldDskDzmIOxhwRuUv8NxXCxd3ZmOwqcuWz64="; - - meta = { - description = "Material you color generation tool"; - homepage = "https://github.com/InioX/matugen"; - changelog = - "https://github.com/InioX/matugen/blob/${src.rev}/CHANGELOG.md"; - license = final.lib.licenses.gpl2Only; - maintainers = with final.lib.maintainers; [ lampros ]; - mainProgram = "matugen"; - }; - }; - }) - ]; + nixpkgs.overlays = + [ inputs.hyprpanel.overlay inputs.nur.overlay ]; _module.args = { inherit inputs; }; } inputs.nixos-hardware.nixosModules.omen-16-n0005ne # CHANGEME: check https://github.com/NixOS/nixos-hardware diff --git a/home/programs/firefox/default.nix b/home/programs/firefox/default.nix new file mode 100644 index 0000000..b5c465d --- /dev/null +++ b/home/programs/firefox/default.nix @@ -0,0 +1,236 @@ +{ pkgs, ... }: { + programs.firefox = { + enable = true; + package = pkgs.firefox-esr; + + profiles = { + default = { + extensions = with pkgs.nur.repos.rycee.firefox-addons; [ + ublock-origin + vimium + sponsorblock + youtube-recommended-videos + scroll_anywhere + newtab-adapter + plasma-integration + ]; + }; + + settings = { + + webgl.disabled = true; + "layers.acceleration.force-enabled" = true; + toolkit.legacyUserProfileCustomizations.stylesheets = true; + + # ---------------------------------------------- + # Browser + # ---------------------------------------------- + + browser.aboutConfig.showWarning = false; + + browser.uidensity = 1; + compactmode.show = true; + tabs.warnOnClose = false; + + aboutwelcome.enabled = false; + bookmarks.restore_default_bookmarks = false; + contentblocking.category = "standard"; + ctrlTab.sortByRecentlyUsed = true; + + newtabpage = { + enabled = false; + + activity-stream = { + showSearch = false; + newtabpage.activity-stream.showSponsored = false; + newtabpage.activity-stream.showSponsoredTopSites = false; + newtabpage.activity-stream.showWeather = false; + newtabpage.activity-stream.system.showSponsored = false; + }; + }; + + # ---------------------------------------------- + # Sensors + # ---------------------------------------------- + + device.sensors.enabled = false; + device.sensors.motion.enabled = false; + extensions.pocket.enabled = false; + + geo.enabled = false; + + # ---------------------------------------------- + # Network + # ---------------------------------------------- + + network.trr.custom_uri = "https://dns.quad9.net/dns-query"; + network.trr.uri = "https://dns.quad9.net/dns-query"; + + # ---------------------------------------------- + # Privacy + # ---------------------------------------------- + + privacy = { + bounceTrackingProtection.hasMigratedUserActivationData = true; + donottrackheader.enabled = true; + fingerprintingProtection = true; + globalprivacycontrol.enabled = true; + globalprivacycontrol.was_ever_enabled = true; + resistFingerprinting = true; + }; + + # ---------------------------------------------- + # Services + # ---------------------------------------------- + + services.sync.engine.addons = false; + services.sync.nextSync = 0; + + signon.firefoxRelay.feature = "disabled"; + signon.generation.enabled = "false"; + }; + + userChrome = '' + /* Base color for the theme, dependent on whether it's a light theme or not */ + @media (prefers-color-scheme: dark) { + :root { + --accent-color: #11111b; + } + } + + @media (prefers-color-scheme: light) { + :root { + --accent-color: #dce0e8; + } + } + + /*====== Aesthetics ======*/ + + #navigator-toolbox { + border-bottom: none !important; + } + + #titlebar { + background: var(--accent-color) !important; + } + + /* Sets the toolbar color */ + toolbar#nav-bar { + background: var(--accent-color) !important; + box-shadow: none !important; + } + + /* Sets the URL bar color */ + #urlbar { + background: var(--accent-color) !important; + } + + #urlbar-background { + background: var(--accent-color) !important; + border: none !important; + } + + #urlbar-input-container { + border: none !important; + } + + /*====== UI Settings ======*/ + + :root { + --navbarWidth: 500px; + /* Set width of navbar */ + } + + /* If the window is wider than 1000px, use flex layout */ + @media (min-width: 1000px) { + #navigator-toolbox { + display: flex; + flex-direction: row; + flex-wrap: wrap; + } + + /* Url bar */ + #nav-bar { + order: 2; + width: var(--navbarWidth); + } + + /* Tab bar */ + #titlebar { + order: 1; + width: calc(100vw - var(--navbarWidth) - 1px); + } + + /* Bookmarks bar */ + #PersonalToolbar { + order: 3; + width: 100%; + } + + /* Fix urlbar sometimes being misaligned */ + :root[uidensity="compact"] #urlbar { + --urlbar-toolbar-height: 39.60px !important; + } + + :root[uidensity="touch"] #urlbar { + --urlbar-toolbar-height: 49.00px !important; + } + } + + /*====== Simplifying interface ======*/ + + /* Autohide back button when disabled */ + #back-button, + #forward-button, + /* Remove UI elements */ + #identity-box, + /* Site information */ + #tracking-protection-icon-container, + /* Shield icon */ + #page-action-buttons> :not(#urlbar-zoom-button, #star-button-box), + /* All url bar icons except for zoom level and bookmarks */ + #urlbar-go-button, + /* Search URL magnifying glass */ + #alltabs-button, + /* Menu to display all tabs at the end of tabs bar */ + .titlebar-buttonbox-container + + /* Minimize, maximize, and close buttons */ + { + display: none !important; + } + + #nav-bar { + box-shadow: none !important; + } + + /* Remove "padding" left and right from tabs */ + .titlebar-spacer { + display: none !important; + } + + /* Fix URL bar overlapping elements */ + #urlbar-container { + min-width: none !important; + } + + /* Remove gap after pinned tabs */ + #tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs])>#tabbrowser-arrowscrollbox>.tabbrowser-tab[first-visible-unpinned-tab] { + margin-inline-start: 0 !important; + } + + /* Hide the hamburger menu */ + #PanelUI-menu-button { + padding: 0px !important; + } + + #PanelUI-menu-button .toolbarbutton-icon { + width: 0px !important; + } + + #PanelUI-menu-button .toolbarbutton-badge-stack { + padding: 0px !important; + }''; + }; + }; +} diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index 89fbb51..a0a94ee 100644 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -17,6 +17,7 @@ ../../home/programs/thunar ../../home/programs/lazygit ../../home/programs/nh + ../../home/programs/firefox # Scripts ../../home/scripts # All scripts @@ -75,7 +76,6 @@ # Backup vscode - firefox neovide ];