diff options
author | azahi <azat@bahawi.net> | 2024-11-17 18:21:17 +0300 |
---|---|---|
committer | azahi <azat@bahawi.net> | 2024-11-17 18:21:17 +0300 |
commit | fc2e6a3a6b568d5ae1004723ea54c123af7e9242 (patch) | |
tree | 5adf2a7741c6ee319833fe6079f9958961ef56b5 /modules | |
parent | 2024-11-10 (diff) |
Diffstat (limited to '')
-rw-r--r-- | modules/docker.nix | 9 | ||||
-rw-r--r-- | modules/firefox/addons.json | 3 | ||||
-rw-r--r-- | modules/firefox/addons.nix | 33 | ||||
-rw-r--r-- | modules/firefox/default.nix | 29 | ||||
-rw-r--r-- | modules/firefox/userChrome.css | 140 | ||||
-rw-r--r-- | modules/firefox/userContent.css | 7 | ||||
-rw-r--r-- | modules/podman.nix | 29 | ||||
-rw-r--r-- | modules/psd.nix | 1 | ||||
-rw-r--r-- | modules/syncthing.nix | 5 | ||||
-rw-r--r-- | modules/wayland.nix | 7 |
10 files changed, 66 insertions, 197 deletions
diff --git a/modules/docker.nix b/modules/docker.nix index 62dc095..330d417 100644 --- a/modules/docker.nix +++ b/modules/docker.nix @@ -5,14 +5,13 @@ pkgs, ... }: -with lib; let cfg = config.nixfiles.modules.docker; in { - options.nixfiles.modules.docker.enable = mkEnableOption "Docker"; + options.nixfiles.modules.docker.enable = lib.mkEnableOption "Docker"; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { assertions = [ { assertion = cfg.enable -> !config.nixfiles.modules.podman.enable; @@ -20,12 +19,14 @@ in } ]; + ark.directories = [ "/var/lib/docker" ]; + nixfiles.modules.common.shell.aliases.d = "docker"; secrets.containers-auth = { file = "${inputs.self}/secrets/containers-auth"; path = "${config.my.home}/.docker/config.json"; - owner = my.username; + owner = lib.my.username; inherit (config.my) group; }; diff --git a/modules/firefox/addons.json b/modules/firefox/addons.json index 2a217c2..f189ed7 100644 --- a/modules/firefox/addons.json +++ b/modules/firefox/addons.json @@ -7,9 +7,6 @@ "slug": "consent-o-matic" }, { - "slug": "darkreader" - }, - { "slug": "furiganaize" }, { diff --git a/modules/firefox/addons.nix b/modules/firefox/addons.nix index ebe834a..6fac4df 100644 --- a/modules/firefox/addons.nix +++ b/modules/firefox/addons.nix @@ -52,27 +52,6 @@ platforms = platforms.all; }; }; - "darkreader" = buildFirefoxXpiAddon { - pname = "darkreader"; - version = "4.9.94"; - addonId = "addon@darkreader.org"; - url = "https://addons.mozilla.org/firefox/downloads/file/4359254/darkreader-4.9.94.xpi"; - sha256 = "251c4e7d0a30c0cab006803600e59ab92dcc0c606429740d42677846d4c9ccd6"; - meta = with lib; { - homepage = "https://darkreader.org/"; - description = "Dark mode for every website. Take care of your eyes, use dark theme for night and daily browsing."; - license = licenses.mit; - mozPermissions = [ - "alarms" - "contextMenus" - "storage" - "tabs" - "theme" - "<all_urls>" - ]; - platforms = platforms.all; - }; - }; "furiganaize" = buildFirefoxXpiAddon { pname = "furiganaize"; version = "0.7.2"; @@ -288,10 +267,10 @@ }; "ublock-origin" = buildFirefoxXpiAddon { pname = "ublock-origin"; - version = "1.60.0"; + version = "1.61.0"; addonId = "uBlock0@raymondhill.net"; - url = "https://addons.mozilla.org/firefox/downloads/file/4359936/ublock_origin-1.60.0.xpi"; - sha256 = "e2cda9b2a1b0a7f6e5ef0da9f87f28df52f8560587ba2e51a3003121cfb81600"; + url = "https://addons.mozilla.org/firefox/downloads/file/4382536/ublock_origin-1.61.0.xpi"; + sha256 = "e6fd55b799a568c66c10892a8f22428e6773fe16d7466ce9dee2952f224b203d"; meta = with lib; { homepage = "https://github.com/gorhill/uBlock#ublock-origin"; description = "Finally, an efficient wide-spectrum content blocker. Easy on CPU and memory."; @@ -348,10 +327,10 @@ }; "violentmonkey" = buildFirefoxXpiAddon { pname = "violentmonkey"; - version = "2.26.0"; + version = "2.28.0"; addonId = "{aecec67f-0d10-4fa7-b7c7-609a2db280cf}"; - url = "https://addons.mozilla.org/firefox/downloads/file/4362578/violentmonkey-2.26.0.xpi"; - sha256 = "47b61fd463602a38bf67591ab94c60d3f1a02ad4f81b9a8a3de97d5461b2e12e"; + url = "https://addons.mozilla.org/firefox/downloads/file/4379821/violentmonkey-2.28.0.xpi"; + sha256 = "30bc3db14194a5197e4721d419123f3a02b9c6f3e94646724aa991137121bcba"; meta = with lib; { homepage = "https://violentmonkey.github.io/"; description = "Userscript support for browsers, open source."; diff --git a/modules/firefox/default.nix b/modules/firefox/default.nix index 51e464f..c207930 100644 --- a/modules/firefox/default.nix +++ b/modules/firefox/default.nix @@ -41,28 +41,6 @@ in mkCssWithRoot = css: mkMerge [ - # https://github.com/tinted-theming/base24/blob/master/styling.md - (with config.colors.withHashtag; '' - :root { - --black: ${base01}; - --red: ${base08}; - --green: ${base0B}; - --yellow: ${base09}; - --blue: ${base0D}; - --magenta: ${base0E}; - --cyan: ${base0C}; - --white: ${base06}; - --bright-black: ${base02}; - --bright-red: ${base12}; - --bright-green: ${base14}; - --bright-yellow: ${base13}; - --bright-blue: ${base16}; - --bright-magenta: ${base17}; - --bright-cyan: ${base15}; - --bright-white: ${base07}; - --background: ${base00}; - --foreground: ${base05}; - '') ( let mapFonts = concatMapStringsSep ", " (font: ''"${font}"''); @@ -70,6 +48,7 @@ in in with config.fonts.fontconfig.defaultFonts; '' + :root { --serif-font-family: ${mapFonts serif}, serif; --serif-font-size: ${size}; --sans-serif-font-family: ${mapFonts sansSerif}, sans-serif; @@ -124,7 +103,6 @@ in with addons; [ consent-o-matic - darkreader furiganaize languagetool metamask @@ -422,6 +400,10 @@ in name = "Bookmarks Toolbar"; toolbar = true; bookmarks = with config.nixfiles.modules; [ + { + name = "XUL"; + url = "chrome://browser/content/browser.xhtml"; + } (mkIf syncthing.enable { name = "Syncthing"; url = "http://${config.services.syncthing.guiAddress}"; @@ -530,6 +512,7 @@ in "browser.tabs.warnOnClose" = false; "browser.tabs.warnOnCloseOtherTabs" = false; "browser.tabs.warnOnOpen" = false; + "browser.theme.dark-private-windows" = false; "browser.toolbars.bookmarks.visibility" = "newtab"; "browser.translations.enable" = false; "browser.urlbar.decodeURLsOnCopy" = true; diff --git a/modules/firefox/userChrome.css b/modules/firefox/userChrome.css index 80d1f7a..aeb1c8f 100644 --- a/modules/firefox/userChrome.css +++ b/modules/firefox/userChrome.css @@ -1,23 +1,9 @@ @-moz-document url(chrome://browser/content/browser.xhtml) { - /* - *** - * Tabbar - *** - */ - - /* - * Apply colours and fonts. - */ - .tabbrowser-tab { - color: var(--background-alt) !important; + #urlbar { font-family: var(--sans-serif-font-family) !important; font-size: var(--sans-serif-font-size) !important; } - .tabbrowser-tab[visuallyselected="true"] { - background: var(--background) !important; - color: var(--foreground) !important; - } /* * Not sure why is this shit even exists... @@ -34,32 +20,6 @@ } /* - * Disable borders and margins. - */ - #tabbrowser-tabs { - border-inline-start: 0 !important; - /* padding-inline-start: 0 !important; */ - margin-inline-start: 0 !important; - } - #tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs]) - > #tabbrowser-arrowscrollbox - > .tabbrowser-tab[first-visible-unpinned-tab] { - margin-inline-start: none !important; - } - .tabbrowser-tab::after, - .tabbrowser-tab::before { - border: none !important; - } - - /* - * Make tabs backgroundless. - */ - /* .tab-background, */ - /* .tab-line { */ - /* display: none !important; */ - /* } */ - - /* * Stretch tabs to the max by default. */ .tabbrowser-tab[fadein]:not([pinned="true"]) { @@ -67,14 +27,6 @@ } /* - * Fix favicon location. - */ - .tab-icon-image { - margin-inline-end: 10px !important; - margin-top: 0px !important; - } - - /* * "C-t" exists. */ #tabs-newtab-button, @@ -90,64 +42,13 @@ } /* - *** - * Navbar & urlbar. - *** - */ - - /* - * Remove padding between urlbar and side elements. + * Remove padding between URL bar and side elements. */ #customizableui-special-spring1, #customizableui-special-spring2 { display: none !important; } - #urlbar { - background: var(--background) !important; - color: var(--foreground) !important; - font-family: var(--sans-serif-font-family) !important; - font-size: var(--sans-serif-font-size) !important; - border-color: transparent !important; - } - - /* #urlbar:not(:-moz-lwtheme):not([focused="true"]) > #urlbar-background, */ - /* #searchbar:not(:-moz-lwtheme):not(:focus-within) { */ - /* border: none !important; */ - /* } */ - - /* #urlbar *|*.textbox-input::-moz-placeholder { */ - /* color: transparent !important; */ - /* } */ - - /* .urlbar-icon:hover:not([disabled]), */ - /* .urlbar-icon-wrapper:hover:not([disabled]) { */ - /* background-color: var(--background-alt) !important; */ - /* } */ - - /* #urlbar-background { */ - /* background: transparent !important; */ - /* } */ - - /* .urlbarView-tags, */ - /* .urlbarView-url, */ - /* .urlbarView-title:not(:empty) ~ .urlbarView-action { */ - /* font-size: var(--sans-serif-font-size) !important; */ - /* } */ - - .urlbarView-row[label="Firefox Suggest"] { - margin-block-start: 0 !important; - } - .urlbarView-row[label="Firefox Suggest"]::before { - display: none !important; - } - - /* - *** - * Misc. - *** - */ - /* * Call indicator that some "designer" decided to make floating and impossible * to hide. @@ -157,16 +58,41 @@ } /* - * Disable some context menu entries. - */ - #context-navigation { + * Context menu. Both for tabs and page. + */ + #context-bookmarklink, + #context-inspect-a11y, + #context-navigation, + #context-pocket, + #context-print-selection, + #context-searchselect, + #context-selectall, + #context-sendimage, + #context-sendlinktodevice, + #context-sendpagetodevice, + #context-viewsource, + #context_bookmarkTab, + #context_moveTabOptions, + #context_selectAllTabs, + #context_sendTabToDevice, + menuseparator { display: none !important; } /* - * Remove dumb websites that Mozilla is forced to include. + * Unify margins for tab browser. */ - .search-one-offs { - display: none !important; + #tabbrowser-tabs { + margin-inline-start: 0 !important; + border-inline-start: 0 !important; + padding-inline-start: calc( + var(--tab-overflow-pinned-tabs-width) + 2px + ) !important; + margin-inline-start: 0 !important; + } + #tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs])[orient="horizontal"] + > #tabbrowser-arrowscrollbox + > .tabbrowser-tab:nth-child(1 of :not([pinned], [hidden])) { + margin-inline-start: 0 !important; } } diff --git a/modules/firefox/userContent.css b/modules/firefox/userContent.css index 96bb529..72382db 100644 --- a/modules/firefox/userContent.css +++ b/modules/firefox/userContent.css @@ -1,16 +1,11 @@ @-moz-document media-document(all) { body { background-image: none !important; - background-color: var(--background) !important; + background-color: var(--background-color-box) !important; } } @-moz-document regexp("about:(blank|home|newtab|privatebrowsing|welcome)") { - html, - body { - background: var(--background) !important; - } - body { display: none !important; } diff --git a/modules/podman.nix b/modules/podman.nix index bdef5be..6c4b20a 100644 --- a/modules/podman.nix +++ b/modules/podman.nix @@ -5,14 +5,13 @@ pkgs, ... }: -with lib; let cfg = config.nixfiles.modules.podman; in { - options.nixfiles.modules.podman.enable = mkEnableOption "Podman"; + options.nixfiles.modules.podman.enable = lib.mkEnableOption "Podman"; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { assertions = [ { assertion = cfg.enable -> !config.nixfiles.modules.docker.enable; @@ -20,33 +19,31 @@ in } ]; + ark.directories = [ "/var/lib/containers" ]; + nixfiles.modules.common.shell.aliases.p = "podman"; secrets.containers-auth = { file = "${inputs.self}/secrets/containers-auth"; path = "${config.dirs.config}/containers/auth.json"; - owner = my.username; + owner = lib.my.username; inherit (config.my) group; }; virtualisation.podman = { enable = true; - dockerCompat = true; - dockerSocket.enable = true; + dockerCompat = false; + dockerSocket.enable = false; }; - environment.systemPackages = with pkgs; [ podman-compose ]; + environment.systemPackages = [ pkgs.podman-compose ]; my.extraGroups = [ "podman" ]; - hm.xdg.configFile = { - "containers/registries.conf".source = pkgs.writers.writeTOML "containers-registries.toml" { - registries.search.registries = [ "docker.io" ]; - }; - - "containers/storage.conf".source = pkgs.writers.writeTOML "containers-storage.toml" { - storage.driver = "overlay"; - }; - }; + hm.xdg.configFile."containers/registries.conf".source = + pkgs.writers.writeTOML "containers-registries.toml" + { + registries.search.registries = [ "docker.io" ]; + }; }; } diff --git a/modules/psd.nix b/modules/psd.nix index f974af2..5bb9dc3 100644 --- a/modules/psd.nix +++ b/modules/psd.nix @@ -17,6 +17,7 @@ in xdg.configFile."psd/psd.conf".text = '' USE_OVERLAYFS="yes" + USE_BACKUPS="no" ''; }; diff --git a/modules/syncthing.nix b/modules/syncthing.nix index e261a12..e61c080 100644 --- a/modules/syncthing.nix +++ b/modules/syncthing.nix @@ -121,11 +121,6 @@ in devices = notHeadless; versioning = trashcan; }; - pass = { - path = config.hm.programs.password-store.settings.PASSWORD_STORE_DIR; - devices = notOther; - versioning = trashcan; - }; org = { path = "${documents}/org"; devices = all; diff --git a/modules/wayland.nix b/modules/wayland.nix index 1ad4fe3..f15f66e 100644 --- a/modules/wayland.nix +++ b/modules/wayland.nix @@ -22,12 +22,7 @@ in wlr-randr ]; - sessionVariables = { - NIXOS_OZONE_WL = 1; - QT_QPA_PLATFORM = "wayland"; - SDL_VIDEODRIVER = "wayland"; - XDG_SESSION_TYPE = "wayland"; - }; + sessionVariables.NIXOS_OZONE_WL = 1; }; }; } |