diff --git a/homes/x86_64-linux/kb@LoyAdjo/default.nix b/homes/x86_64-linux/kb@LoyAdjo/default.nix index ff5b7b7..b8188c1 100644 --- a/homes/x86_64-linux/kb@LoyAdjo/default.nix +++ b/homes/x86_64-linux/kb@LoyAdjo/default.nix @@ -75,7 +75,7 @@ services.ssh-agent.enable = true; - suits.desktop.enable = true; + suites.desktop.enable = true; home.stateVersion = "24.05"; } diff --git a/homes/x86_64-linux/kb@Ohybke/chromium.nix b/homes/x86_64-linux/kb@Ohybke/chromium.nix deleted file mode 100644 index d9b37b0..0000000 --- a/homes/x86_64-linux/kb@Ohybke/chromium.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ config, pkgs, lib, inputs, ... }: -{ - programs.chromium = { - enable = true; - package = pkgs.ungoogled-chromium.override { enableWideVine = true; }; - commandLineArgs = [ - "--extension-mime-request-handling=always-prompt-for-install" # Enable Extension-Install Dialogue - "--enable-features=NoReferrers,SpoofWebGLInfo" # Feature Flags - "--no-default-browser-check" - ]; - extensions = let - createChromiumExtensionFor = browserVersion: { id, sha256, version }: { - inherit id; - crxPath = builtins.fetchurl { - url = "https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&prodversion=${browserVersion}&x=id%3D${id}%26installsource%3Dondemand%26uc"; - name = "${id}.crx"; - inherit sha256; - }; - inherit version; - }; - createChromiumExtension = createChromiumExtensionFor (lib.versions.major pkgs.ungoogled-chromium.version); - in [ - { # Chromium Web Store - id = "ocaahdebbfolfmndjeplogmgcagdmblk"; - crxPath = builtins.fetchurl { - url = "https://github.com/NeverDecaf/chromium-web-store/releases/download/v1.5.5/Chromium.Web.Store.crx"; - name = "ocaahdebbfolfmndjeplogmgcagdmblk.crx"; - sha256 = "sha256:0ck5k4gs5cbwq1wd5i1aka5hwzlnyc4c513sv13vk9s0dlhbz4z5"; - }; - version = "1.5.4.3"; - } - (createChromiumExtension { # uBlock Origin - id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; - sha256 = "sha256-cT7Pj59uyWd0B/BCQqMvqYalDM/KZou1c+XqMC7IG5k="; - version = "1.65.0"; - }) - (createChromiumExtension { # I still don't care about cookies - id = "edibdbjcniadpccecjdfdjjppcpchdlm"; - sha256 = "sha256:11k7cxcjafs8ziaxl4bilbfwbgl2yf1p6v1bvwszadcr14xyvgsj"; - version = "1.1.4"; - }) - (createChromiumExtension { # KeePassXC-Browser - id = "oboonakemofpalcgghocfoadofidjkkk"; - sha256 = "sha256-/WHmIE+tbdm3a1QZSFH5tsf3gqOCT2GrfD8TfrvMC3Q="; - version = "1.9.9.1"; - }) - (createChromiumExtension { # LanguageTool - id = "oldceeleldhonbafppcapldpdifcinji"; - sha256 = "sha256-c1rqueEpFqZvgS4TpyeC3HlVNQ06CLjNlaYOKsq0rp0="; - version = "9.0.1"; - }) - (createChromiumExtension { # dark reader - id = "eimadpbcbfnmbkopoojfekhnkhdbieeh"; - sha256 = "sha256-8/tzlj4xc1h/+Zeek4r9l0I4/Kw3EJgLaqTTxZbRGcU="; - version = "4.9.110"; - }) - ]; - }; -} diff --git a/homes/x86_64-linux/kb@Ohybke/default.nix b/homes/x86_64-linux/kb@Ohybke/default.nix index 823ce78..1ebcb30 100644 --- a/homes/x86_64-linux/kb@Ohybke/default.nix +++ b/homes/x86_64-linux/kb@Ohybke/default.nix @@ -1,8 +1,6 @@ { config, pkgs, lib, inputs, ... }: { imports = [ - ./firefox.nix - ./chromium.nix ./ssh.nix ]; @@ -43,7 +41,6 @@ webcord # Customization razergenie - firefoxpwa # Development vscodium scrcpy @@ -60,8 +57,12 @@ mosh btop fastfetch + kicad ]; + suites.desktop.enable = true; + suites.desktop.sway-experiments.enable = true; + services.syncthing.enable = true; services.syncthing.extraOptions = [ "--config=/home/kb/.config/syncthing" diff --git a/homes/x86_64-linux/kb@Ohybke/firefox.nix b/homes/x86_64-linux/kb@Ohybke/firefox.nix deleted file mode 100644 index b511970..0000000 --- a/homes/x86_64-linux/kb@Ohybke/firefox.nix +++ /dev/null @@ -1,128 +0,0 @@ -{ config, pkgs, lib, inputs, ... }: -let - # Firefox Profile Setting States - lock-false = { - Value = false; - Status = "locked"; - }; - lock-true = { - Value = true; - Status = "locked"; - }; - lock-empty-string = { - Value = ""; - Status = "locked"; - }; -in { - programs.firefox = { - enable = true; - nativeMessagingHosts = []; # pkgs.firefoxpwa removed. I use ungoogled-chromiums PWA Implementation for better stability. - policies = { - # --------- Privacy --------- - DisableTelemetry = true; - DisableFirefoxStudies = true; - DisablePocket = true; - DisableFirefoxAccounts = true; - AutofillAddressEnabled = false; - AutofillCreditCardEnabled = false; - OfferToSaveLogins = false; - FirefoxHome.TopSites = false; - FirefoxHome.SponsoredTopSites = false; - Preferences = { - "browser.newtabpage.pinned" = lock-empty-string; - "browser.topsites.contile.enabled" = lock-false; - }; - # -------- Opiniated -------- - DontCheckDefaultBrowser = true; - DisableProfileImport = true; - SearchBar = "unified"; - SearchEngines.Add = [ # Only Available in ESR Releases https://mozilla.github.io/policy-templates/#searchengines--add - { - Name = "Brave"; - URLTemplate = "https://search.brave.com/search?q={searchTerms}"; - Alias = "br"; - IconURL = "https://cdn.search.brave.com/serp/v3/_app/immutable/assets/brave-search-icon.CsIFM2aN.svg"; - } - ]; - # Extensions https://mozilla.github.io/policy-templates#extensionsettings - ExtensionSettings = { - "uBlock0@raymondhill.net" = { # uBlock Origin: https://addons.mozilla.org/en-US/firefox/addon/ublock-origin - install_url = "https://addons.mozilla.org/firefox/downloads/file/4458450/ublock_origin-1.63.2.xpi"; - installation_mode = "normal_installed"; - private_browsing = true; - }; - "idcac-pub@guus.ninja" = { # I still don't care about cookies: https://addons.mozilla.org/en-US/firefox/addon/istilldontcareaboutcookies/ - install_url = "https://addons.mozilla.org/firefox/downloads/file/4216095/istilldontcareaboutcookies-1.1.4.xpi"; - installation_mode = "normal_installed"; - private_browsing = true; - }; - "keepassxc-browser@keepassxc.org" = { # KeePassXC-Browser: https://addons.mozilla.org/en-US/firefox/addon/keepassxc-browser - install_url = "https://addons.mozilla.org/firefox/downloads/file/4441759/keepassxc_browser-1.9.7.xpi"; - installation_mode = "normal_installed"; - }; - "offline-qr-code@rugk.github.io" = { # Offline QR Code Generator: https://addons.mozilla.org/en-US/firefox/addon/offline-qr-code-generator/ - install_url = "https://addons.mozilla.org/firefox/downloads/file/4349427/offline_qr_code_generator-1.9.xpi"; - installation_mode = "normal_installed"; - }; - "addon@darkreader.org" = { # Dark Reader: https://addons.mozilla.org/en-US/firefox/addon/darkreader/ - install_url = "https://addons.mozilla.org/firefox/downloads/file/4439735/darkreader-4.9.103.xpi"; - installation_mode = "normal_installed"; - }; - "languagetool-webextension@languagetool.org" = { # LanguageTool: https://addons.mozilla.org/en-US/firefox/addon/languagetool - install_url = "https://addons.mozilla.org/firefox/downloads/file/4470413/languagetool-8.19.4.xpi"; - installation_mode = "normal_installed"; - }; - }; - Bookmarks = [ - { - Title = "Syncthing"; - URL = "localhost:8384"; - Placement = "toolbar"; - } - { - Title = "NixOS Search - Packages"; - URL = "https://search.nixos.org/packages?channel=unstable"; - Placement = "toolbar"; - Folder = "NixOS"; - } - { - Title = "NixOS Search - Options"; - URL = "https://search.nixos.org/options?channel=unstable"; - Placement = "toolbar"; - Folder = "NixOS"; - } - { - Title = "Home Manager Search - Options"; - URL = "https://home-manager-options.extranix.com/?release=master"; - Placement = "toolbar"; - Folder = "NixOS"; - } - { - Title = "Lix"; - URL = "https://lix.systems/"; - Placement = "toolbar"; - Folder = "NixOS"; - } - { - Title = "AUX - Homepage"; - URL = "https://auxolotl.org/en/"; - Placement = "toolbar"; - Folder = "NixOS"; - } - { - Title = "AUX - Forum"; - URL = "https://forum.aux.computer/"; - Placement = "toolbar"; - Folder = "NixOS"; - } - { - Title = "Nix Pills"; - URL = "https://nixos.org/guides/nix-pills/"; - Placement = "toolbar"; - Folder = "NixOS"; - } - ]; - }; - }; -} - diff --git a/homes/x86_64-linux/kb@Ohybke/ssh.nix b/homes/x86_64-linux/kb@Ohybke/ssh.nix index 7dbc361..2b7b4d5 100644 --- a/homes/x86_64-linux/kb@Ohybke/ssh.nix +++ b/homes/x86_64-linux/kb@Ohybke/ssh.nix @@ -128,6 +128,13 @@ identityFile = "~/.ssh/id_ed25519_sk_rk_kb-ssh@lar3"; port = 7299; }; + programs.ssh.matchBlocks."remoteunlock@mow0m" = { + host = "remoteunlock-mow0m"; + hostname = "mow0m"; + user = "root"; + identityFile = "~/.ssh/remoteunlock-mow0m"; + port = 2550; + }; # Nix Build Hosts programs.ssh.matchBlocks."nix-builder@pkpnafs" = { diff --git a/modules/home/suites/desktop/chromium.nix b/modules/home/suites/desktop/chromium.nix new file mode 100644 index 0000000..162cd29 --- /dev/null +++ b/modules/home/suites/desktop/chromium.nix @@ -0,0 +1,63 @@ +{ lib, config, pkgs, ... }: +let + cfg = config.suites.desktop; +in +{ + config = lib.mkIf cfg.enable { + programs.chromium = lib.mkIf cfg.chromium.enable { + enable = true; + package = pkgs.ungoogled-chromium.override { enableWideVine = cfg.chromium.enableWideVine; }; + commandLineArgs = [ + "--extension-mime-request-handling=always-prompt-for-install" # Enable Extension-Install Dialogue + "--enable-features=NoReferrers,SpoofWebGLInfo" # Feature Flags + "--no-default-browser-check" + ]; + extensions = let + createChromiumExtensionFor = browserVersion: { id, sha256, version }: { + inherit id; + crxPath = builtins.fetchurl { + url = "https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&prodversion=${browserVersion}&x=id%3D${id}%26installsource%3Dondemand%26uc"; + name = "${id}.crx"; + inherit sha256; + }; + inherit version; + }; + createChromiumExtension = createChromiumExtensionFor (lib.versions.major pkgs.ungoogled-chromium.version); + in (lib.lists.optionals (cfg.chromium.disableChromiumWebStore == false) [{ # Chromium Web Store + id = "ocaahdebbfolfmndjeplogmgcagdmblk"; + crxPath = builtins.fetchurl { + url = "https://github.com/NeverDecaf/chromium-web-store/releases/download/v1.5.5.2/Chromium.Web.Store.crx"; + name = "ocaahdebbfolfmndjeplogmgcagdmblk.crx"; + sha256 = "sha256-0g4AKed9vPf0TPI6OawpjiusvyBJEab5XYNHmg9BpfE="; + }; + version = "1.5.5.2"; + }]) ++ + (lib.lists.optionals (cfg.chromium.disableuBlockOrigin == false) [(createChromiumExtension { # uBlock Origin + id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; + sha256 = "sha256-7Q4HPf4cIdi63SudWwzLVy9n3uba2H6cmzhSzxdBXjA="; + version = "1.67.0"; + })]) ++ + (lib.lists.optionals (cfg.chromium.disableIDontCareAboutCookies == false) [(createChromiumExtension { # I still don't care about cookies + id = "edibdbjcniadpccecjdfdjjppcpchdlm"; + sha256 = "sha256:11k7cxcjafs8ziaxl4bilbfwbgl2yf1p6v1bvwszadcr14xyvgsj"; + version = "1.1.8"; + })]) ++ + (lib.lists.optionals (cfg.chromium.disableKeepassxcBrowser == false) [(createChromiumExtension { # KeePassXC-Browser + id = "oboonakemofpalcgghocfoadofidjkkk"; + sha256 = "sha256-Xrpca6iyVN4okVLCQmrtn73dZYDP28S5LBMUX1Qz/nI="; + version = "1.9.11"; + })]) ++ + (lib.lists.optionals (cfg.chromium.disableLanguageTool == false) [(createChromiumExtension { # LanguageTool + id = "oldceeleldhonbafppcapldpdifcinji"; + sha256 = "sha256-UEIQ9nOg7f31nRPQB7Jxbl7PlWx7d9ixAfHXXmKPT5A="; + version = "10.0.1"; + })]) ++ + (lib.lists.optionals (cfg.chromium.disableDarkReader == false) [(createChromiumExtension { # dark reader + id = "eimadpbcbfnmbkopoojfekhnkhdbieeh"; + sha256 = "sha256-8/tzlj4xc1h/+Zeek4r9l0I4/Kw3EJgLaqTTxZbRGcU="; + version = "4.9.115"; + })]); + }; + + }; +} diff --git a/modules/home/suites/desktop/default.nix b/modules/home/suites/desktop/default.nix index 7729ff7..3e30372 100644 --- a/modules/home/suites/desktop/default.nix +++ b/modules/home/suites/desktop/default.nix @@ -1,9 +1,14 @@ { lib, config, pkgs, ... }: let - cfg = config.suits.desktop; -in -{ - options.suits.desktop = { + cfg = config.suites.desktop; +in { + + imports = [ + ./firefox.nix + ./chromium.nix + ]; + + options.suites.desktop = { enable = lib.mkEnableOption "Desktop"; firefox.enable = lib.mkOption { @@ -89,181 +94,16 @@ in default = false; example = true; }; + + sway-experiments.enable = lib.mkOption { + type = with lib.types; bool; + default = false; + example = true; + description = "Enable Sway Experiments"; + }; }; config = lib.mkIf cfg.enable { - - programs.firefox = lib.mkIf cfg.firefox.enable { - enable = true; - nativeMessagingHosts = []; # pkgs.firefoxpwa removed. I use ungoogled-chromiums PWA Implementation for better stability. - policies = { - # --------- Privacy --------- - DisableTelemetry = true; - DisableFirefoxStudies = true; - DisablePocket = true; - DisableFirefoxAccounts = true; - AutofillAddressEnabled = false; - AutofillCreditCardEnabled = false; - OfferToSaveLogins = false; - FirefoxHome.TopSites = false; - FirefoxHome.SponsoredTopSites = false; - Preferences = { - "browser.newtabpage.pinned" = { - Value = ""; - Status = "locked"; - }; - "browser.topsites.contile.enabled" = { - Value = false; - Status = "locked"; - }; - }; - # -------- Opiniated -------- - DontCheckDefaultBrowser = true; - DisableProfileImport = true; - SearchBar = "unified"; - SearchEngines.Add = [ # Only Available in ESR Releases https://mozilla.github.io/policy-templates/#searchengines--add - { - Name = "Brave"; - URLTemplate = "https://search.brave.com/search?q={searchTerms}"; - Alias = "br"; - IconURL = "https://cdn.search.brave.com/serp/v3/_app/immutable/assets/brave-search-icon.CsIFM2aN.svg"; - } - ]; - # Extensions https://mozilla.github.io/policy-templates#extensionsettings - ExtensionSettings = { - "uBlock0@raymondhill.net" = lib.mkIf (cfg.firefox.disableuBlockOrigin == false) { # uBlock Origin: https://addons.mozilla.org/en-US/firefox/addon/ublock-origin - install_url = "https://addons.mozilla.org/firefox/downloads/file/4573289/ublock_origin-1.66.0.xpi"; - installation_mode = "normal_installed"; - private_browsing = true; - }; - "idcac-pub@guus.ninja" = lib.mkIf (cfg.firefox.disableIDontCareAboutCookies == false) { # I still don't care about cookies: https://addons.mozilla.org/en-US/firefox/addon/istilldontcareaboutcookies/ - install_url = "https://addons.mozilla.org/firefox/downloads/file/4216095/istilldontcareaboutcookies-1.1.4.xpi"; - installation_mode = "normal_installed"; - private_browsing = true; - }; - "keepassxc-browser@keepassxc.org" = lib.mkIf (cfg.firefox.disableKeepassxcBrowser == false) { # KeePassXC-Browser: https://addons.mozilla.org/en-US/firefox/addon/keepassxc-browser - install_url = "https://addons.mozilla.org/firefox/downloads/file/4575368/keepassxc_browser-1.9.9.6.xpi"; - installation_mode = "normal_installed"; - }; - "offline-qr-code@rugk.github.io" = lib.mkIf (cfg.firefox.disableOfflineQr == false) { # Offline QR Code Generator: https://addons.mozilla.org/en-US/firefox/addon/offline-qr-code-generator/ - install_url = "https://addons.mozilla.org/firefox/downloads/file/4349427/offline_qr_code_generator-1.9.xpi"; - installation_mode = "normal_installed"; - }; - "addon@darkreader.org" = lib.mkIf (cfg.firefox.disableDarkReader == false) { # Dark Reader: https://addons.mozilla.org/en-US/firefox/addon/darkreader/ - install_url = "https://addons.mozilla.org/firefox/downloads/file/4535824/darkreader-4.9.110.xpi"; - installation_mode = "normal_installed"; - }; - "languagetool-webextension@languagetool.org" = lib.mkIf (cfg.firefox.disableLanguageTool == false) { # LanguageTool: https://addons.mozilla.org/en-US/firefox/addon/languagetool - install_url = "https://addons.mozilla.org/firefox/downloads/file/4538560/languagetool-9.0.1.xpi"; - installation_mode = "normal_installed"; - }; - }; - Bookmarks = lib.mkIf (cfg.firefox.disableDefaultBookmarks == false) [ - { - Title = "Syncthing"; - URL = "localhost:8384"; - Placement = "toolbar"; - } - { - Title = "NixOS Search - Packages"; - URL = "https://search.nixos.org/packages?channel=unstable"; - Placement = "toolbar"; - Folder = "NixOS"; - } - { - Title = "NixOS Search - Options"; - URL = "https://search.nixos.org/options?channel=unstable"; - Placement = "toolbar"; - Folder = "NixOS"; - } - { - Title = "Home Manager Search - Options"; - URL = "https://home-manager-options.extranix.com/?release=master"; - Placement = "toolbar"; - Folder = "NixOS"; - } - { - Title = "Lix"; - URL = "https://lix.systems/"; - Placement = "toolbar"; - Folder = "NixOS"; - } - { - Title = "AUX - Homepage"; - URL = "https://auxolotl.org/en/"; - Placement = "toolbar"; - Folder = "NixOS"; - } - { - Title = "AUX - Forum"; - URL = "https://forum.aux.computer/"; - Placement = "toolbar"; - Folder = "NixOS"; - } - { - Title = "Nix Pills"; - URL = "https://nixos.org/guides/nix-pills/"; - Placement = "toolbar"; - Folder = "NixOS"; - } - ]; - }; - }; - programs.chromium = lib.mkIf cfg.chromium.enable { - enable = true; - package = pkgs.ungoogled-chromium.override { enableWideVine = cfg.chromium.enableWideVine; }; - commandLineArgs = [ - "--extension-mime-request-handling=always-prompt-for-install" # Enable Extension-Install Dialogue - "--enable-features=NoReferrers,SpoofWebGLInfo" # Feature Flags - "--no-default-browser-check" - ]; - extensions = let - createChromiumExtensionFor = browserVersion: { id, sha256, version }: { - inherit id; - crxPath = builtins.fetchurl { - url = "https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&prodversion=${browserVersion}&x=id%3D${id}%26installsource%3Dondemand%26uc"; - name = "${id}.crx"; - inherit sha256; - }; - inherit version; - }; - createChromiumExtension = createChromiumExtensionFor (lib.versions.major pkgs.ungoogled-chromium.version); - in (lib.lists.optionals (cfg.chromium.disableChromiumWebStore == false) [{ # Chromium Web Store - id = "ocaahdebbfolfmndjeplogmgcagdmblk"; - crxPath = builtins.fetchurl { - url = "https://github.com/NeverDecaf/chromium-web-store/releases/download/v1.5.5/Chromium.Web.Store.crx"; - name = "ocaahdebbfolfmndjeplogmgcagdmblk.crx"; - sha256 = "sha256-0g4AKed9vPf0TPI6OawpjiusvyBJEab5XYNHmg9BpfE="; - }; - version = "1.5.5"; - }]) ++ - (lib.lists.optionals (cfg.chromium.disableuBlockOrigin == false) [(createChromiumExtension { # uBlock Origin - id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; - sha256 = "sha256-HFD1A9b9958FbtjJGjWl5FnsttsNZBTsdVyaE5N151A="; - version = "1.66.0"; - })]) ++ - (lib.lists.optionals (cfg.chromium.disableIDontCareAboutCookies == false) [(createChromiumExtension { # I still don't care about cookies - id = "edibdbjcniadpccecjdfdjjppcpchdlm"; - sha256 = "sha256:11k7cxcjafs8ziaxl4bilbfwbgl2yf1p6v1bvwszadcr14xyvgsj"; - version = "1.1.4"; - })]) ++ - (lib.lists.optionals (cfg.chromium.disableKeepassxcBrowser == false) [(createChromiumExtension { # KeePassXC-Browser - id = "oboonakemofpalcgghocfoadofidjkkk"; - sha256 = "sha256-N/CRVkNiNmtGn5A7C3SD+5rnnyKG+VA3Pkn1s9vr7EM="; - version = "1.9.9.6"; - })]) ++ - (lib.lists.optionals (cfg.chromium.disableLanguageTool == false) [(createChromiumExtension { # LanguageTool - id = "oldceeleldhonbafppcapldpdifcinji"; - sha256 = "sha256-eTBLiCz8V1eoXFOdrZYXxuxv/amjCspuN+90PeTkJS4="; - version = "9.3.1"; - })]) ++ - (lib.lists.optionals (cfg.chromium.disableDarkReader == false) [(createChromiumExtension { # dark reader - id = "eimadpbcbfnmbkopoojfekhnkhdbieeh"; - sha256 = "sha256-8/tzlj4xc1h/+Zeek4r9l0I4/Kw3EJgLaqTTxZbRGcU="; - version = "4.9.110"; - })]); - }; - }; } diff --git a/modules/home/suites/desktop/firefox.nix b/modules/home/suites/desktop/firefox.nix new file mode 100644 index 0000000..6a47cbd --- /dev/null +++ b/modules/home/suites/desktop/firefox.nix @@ -0,0 +1,125 @@ +{ lib, config, pkgs, ... }: +let + cfg = config.suites.desktop; +in +{ + config = lib.mkIf cfg.enable { + + programs.firefox = lib.mkIf cfg.firefox.enable { + enable = true; + nativeMessagingHosts = []; # pkgs.firefoxpwa removed. I use ungoogled-chromiums PWA Implementation for better stability. + policies = { + # --------- Privacy --------- + DisableTelemetry = true; + DisableFirefoxStudies = true; + DisablePocket = true; + DisableFirefoxAccounts = true; + AutofillAddressEnabled = false; + AutofillCreditCardEnabled = false; + OfferToSaveLogins = false; + FirefoxHome.TopSites = false; + FirefoxHome.SponsoredTopSites = false; + Preferences = { + "browser.newtabpage.pinned" = { + Value = ""; + Status = "locked"; + }; + "browser.topsites.contile.enabled" = { + Value = false; + Status = "locked"; + }; + }; + # -------- Opiniated -------- + DontCheckDefaultBrowser = true; + DisableProfileImport = true; + SearchBar = "unified"; + SearchEngines.Add = [ # Only Available in ESR Releases https://mozilla.github.io/policy-templates/#searchengines--add + { + Name = "Brave"; + URLTemplate = "https://search.brave.com/search?q={searchTerms}"; + Alias = "br"; + IconURL = "https://cdn.search.brave.com/serp/v3/_app/immutable/assets/brave-search-icon.CsIFM2aN.svg"; + } + ]; + # Extensions https://mozilla.github.io/policy-templates#extensionsettings + ExtensionSettings = { + "uBlock0@raymondhill.net" = lib.mkIf (cfg.firefox.disableuBlockOrigin == false) { # uBlock Origin: https://addons.mozilla.org/en-US/firefox/addon/ublock-origin + install_url = "https://addons.mozilla.org/firefox/downloads/file/4598854/ublock_origin-1.67.0.xpi"; + installation_mode = "normal_installed"; + private_browsing = true; + }; + "idcac-pub@guus.ninja" = lib.mkIf (cfg.firefox.disableIDontCareAboutCookies == false) { # I still don't care about cookies: https://addons.mozilla.org/en-US/firefox/addon/istilldontcareaboutcookies/ + install_url = "https://addons.mozilla.org/firefox/downloads/file/4613590/istilldontcareaboutcookies-1.1.8.xpi"; + installation_mode = "normal_installed"; + private_browsing = true; + }; + "keepassxc-browser@keepassxc.org" = lib.mkIf (cfg.firefox.disableKeepassxcBrowser == false) { # KeePassXC-Browser: https://addons.mozilla.org/en-US/firefox/addon/keepassxc-browser + install_url = "https://addons.mozilla.org/firefox/downloads/file/4592023/keepassxc_browser-1.9.10.xpi"; + installation_mode = "normal_installed"; + }; + "offline-qr-code@rugk.github.io" = lib.mkIf (cfg.firefox.disableOfflineQr == false) { # Offline QR Code Generator: https://addons.mozilla.org/en-US/firefox/addon/offline-qr-code-generator/ + install_url = "https://addons.mozilla.org/firefox/downloads/file/4349427/offline_qr_code_generator-1.9.xpi"; + installation_mode = "normal_installed"; + }; + "addon@darkreader.org" = lib.mkIf (cfg.firefox.disableDarkReader == false) { # Dark Reader: https://addons.mozilla.org/en-US/firefox/addon/darkreader/ + install_url = "https://addons.mozilla.org/firefox/downloads/file/4625542/darkreader-4.9.116.xpi"; + installation_mode = "normal_installed"; + }; + "languagetool-webextension@languagetool.org" = lib.mkIf (cfg.firefox.disableLanguageTool == false) { # LanguageTool: https://addons.mozilla.org/en-US/firefox/addon/languagetool + install_url = "https://addons.mozilla.org/firefox/downloads/file/4538560/languagetool-9.0.1.xpi"; + installation_mode = "normal_installed"; + }; + }; + Bookmarks = lib.mkIf (cfg.firefox.disableDefaultBookmarks == false) [ + { + Title = "Syncthing"; + URL = "localhost:8384"; + Placement = "toolbar"; + } + { + Title = "NixOS Search - Packages"; + URL = "https://search.nixos.org/packages?channel=unstable"; + Placement = "toolbar"; + Folder = "NixOS"; + } + { + Title = "NixOS Search - Options"; + URL = "https://search.nixos.org/options?channel=unstable"; + Placement = "toolbar"; + Folder = "NixOS"; + } + { + Title = "Home Manager Search - Options"; + URL = "https://home-manager-options.extranix.com/?release=master"; + Placement = "toolbar"; + Folder = "NixOS"; + } + { + Title = "Lix"; + URL = "https://lix.systems/"; + Placement = "toolbar"; + Folder = "NixOS"; + } + { + Title = "AUX - Homepage"; + URL = "https://auxolotl.org/en/"; + Placement = "toolbar"; + Folder = "NixOS"; + } + { + Title = "AUX - Forum"; + URL = "https://forum.aux.computer/"; + Placement = "toolbar"; + Folder = "NixOS"; + } + { + Title = "Nix Pills"; + URL = "https://nixos.org/guides/nix-pills/"; + Placement = "toolbar"; + Folder = "NixOS"; + } + ]; + }; + }; + }; +} diff --git a/modules/home/suites/desktop/sway.nix b/modules/home/suites/desktop/sway.nix new file mode 100644 index 0000000..68e87f9 --- /dev/null +++ b/modules/home/suites/desktop/sway.nix @@ -0,0 +1,124 @@ +{ config, pkgs, lib, inputs, ... }: let + + cfg = config.suites.desktop; + + # Keybinds + keybinds = { + mod = "Mod"; + + focusRight = "${keybinds.mod}+Right"; + focusLeft = "${keybinds.mod}+Left"; + focusUp = "${keybinds.mod}+Up"; + focusDown = "${keybinds.mod}+Down"; + + moveRight = "${keybinds.mod}+Shift+Right"; + moveLeft = "${keybinds.mod}+Shift+Left"; + moveUp = "${keybinds.mod}+Shift+Up"; + moveDown = "${keybinds.mod}+Shift+Down"; + + toggleTiling = "${keybinds.mod}+Space"; + toggleFullscreen = "${keybinds.mod}+F"; + + modeResize = "${keybinds.mod}+R"; # Use Arrow-Keys to Resize, Exit using Esc or Enter + + switchWS1 = "${keybinds.mod}+1"; + switchWS2 = "${keybinds.mod}+2"; + switchWS3 = "${keybinds.mod}+3"; + switchWS4 = "${keybinds.mod}+4"; + switchWS5 = "${keybinds.mod}+5"; + nextWS = "${keybinds.mod}+Tab"; + previousWS = "${keybinds.mod}+Shift+Tab"; + + moveToWS1 = "${keybinds.mod}+Shift+1"; + moveToWS2 = "${keybinds.mod}+Shift+2"; + moveToWS3 = "${keybinds.mod}+Shift+3"; + moveToWS4 = "${keybinds.mod}+Shift+4"; + moveToWS5 = "${keybinds.mod}+Shift+5"; + + launcher = "${keybinds.mod}+D"; + appLauncher = "${keybinds.mod}+Shift+D"; + + exit = "${keybinds.mod}+Shift+E"; + reloadConfig = "${keybinds.mod}+Shift+C"; + close = "${keybinds.mod}+Backspace"; + + viewScratchpad = "${keybinds.mod}+-"; + moveToScratchpad = "${keybinds.mod}+Shift+-"; + + }; + + fonts = { + general = "Noto Sans"; + symbol = "FontAwesome"; + emoji = "Twitter Color Emoji"; + + size = 10; + sizeSmall = 8; + }; + + +in { + + config = lib.mkIf ( cfg.enable && cfg.sway-experiments.enable ) { + + # Inspiration and Template: https://git.sr.ht/~hervyqa/swayhome + + # Software + # SoundMenu: pwvucontrol + # NetworkMenu: networkmanagerapplet + + # Launcher: Wofi + # - Bluetooth: dmenu-bluetooth + # - Emoji: wofi-emoji + # - Power: wofi-power-menu + # - Network: networkmanager_dmenu + + # Design + # [WS1-5] 23:25[Stat] [Tray][Vol][Bri][Key][Con][Bat] + # Status: [Privacy] [Keyboard State] Caffeine, Media(mpris) + # Volume: Scroll=Vol, RClick=Mute, LClick=SoundMenu (wireplumber) + # Bright: Scroll=Bri, LClick=Redshift + # Keybrd: Scroll=Bri, Click=Switch (language) + # Bluetooth: LClick=dmenu-bluetooth, RClick=Toggle, MClick=Airplane + # Network: LClick=networkmanager_dmenu, RClick=ToggleWifiEther, MClick=Airplane + # Airplane: LClick=enableNetwork, RClick=enableBluetooth + # Battery: LClick=PowerMode, RClick=Caffeine(idle inhibitor) + + + # Desktop + wayland.windowManager.sway.enable = true; + # wayland.windowManager.sway.package = null; # Package gets Managed by System + + # Lockscreen + programs.swaylock.enable = true; + # programs.swaylock.settings = { + # font = "${fonts.general}"; + # font-size = fonts.size; + # disable-caps-lock-text = true; + # ignore-empty-password = true; + # indicator-caps-lock = true; + # indicator-radius = 50; + # indicator-thickness = 10; + # }; + + # Bar + programs.waybar.enable = true; + # Configuration Template: https://github.com/Alexays/Waybar/blob/master/resources/config.jsonc + # Wiki: https://github.com/Alexays/Waybar/wiki/Module:-Custom:-Examples + programs.waybar.settings.mainBar = { + layer = "bottom"; + }; + + # Launcher + programs.wofi.enable = true; + #programs.wofi.settings = { + # location = "bottom-right"; + # allow_markup = true; + # width = 250; + #}; + + + # Theme + #fonts.fontconfig.enable = true; + }; +}