diff --git a/flake.lock b/flake.lock index 3459fab..7b5c470 100644 --- a/flake.lock +++ b/flake.lock @@ -1,38 +1,5 @@ { "nodes": { - "aquamarine": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1724273991, - "narHash": "sha256-+aUSOXKGpS5CRm1oTitgNAr05ThQNbKIXalZHl3nC6Y=", - "owner": "hyprwm", - "repo": "aquamarine", - "rev": "9a3161ad4c78dc420d1cbb3aae638222608c7de4", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "aquamarine", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -53,168 +20,6 @@ "type": "github" } }, - "hyprcursor": { - "inputs": { - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1722623071, - "narHash": "sha256-sLADpVgebpCBFXkA1FlCXtvEPu1tdEsTfqK1hfeHySE=", - "owner": "hyprwm", - "repo": "hyprcursor", - "rev": "912d56025f03d41b1ad29510c423757b4379eb1c", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprcursor", - "type": "github" - } - }, - "hyprland": { - "inputs": { - "aquamarine": "aquamarine", - "hyprcursor": "hyprcursor", - "hyprlang": "hyprlang", - "hyprutils": "hyprutils", - "hyprwayland-scanner": "hyprwayland-scanner", - "nixpkgs": "nixpkgs", - "systems": "systems", - "xdph": "xdph" - }, - "locked": { - "lastModified": 1724660854, - "narHash": "sha256-cbW1Uvl/aQMcgZBIebKGTVtcZsL8yluLC8+LDSrsqpI=", - "ref": "refs/heads/main", - "rev": "28f6c2df5923bfe514d238399f934fc80bb1449d", - "revCount": 5138, - "submodules": true, - "type": "git", - "url": "https://github.com/hyprwm/Hyprland" - }, - "original": { - "submodules": true, - "type": "git", - "url": "https://github.com/hyprwm/Hyprland" - } - }, - "hyprland-protocols": { - "inputs": { - "nixpkgs": [ - "hyprland", - "xdph", - "nixpkgs" - ], - "systems": [ - "hyprland", - "xdph", - "systems" - ] - }, - "locked": { - "lastModified": 1721326555, - "narHash": "sha256-zCu4R0CSHEactW9JqYki26gy8h9f6rHmSwj4XJmlHgg=", - "owner": "hyprwm", - "repo": "hyprland-protocols", - "rev": "5a11232266bf1a1f5952d5b179c3f4b2facaaa84", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-protocols", - "type": "github" - } - }, - "hyprlang": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1724174162, - "narHash": "sha256-fOOBLwil6M9QWMCiSULwjMQzrXhHXUnEqmjHX5ZHeVI=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "16e5c9465f04477d8a3dd48a0a26bf437986336c", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, - "hyprutils": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1722869141, - "narHash": "sha256-0KU4qhyMp441qfwbirNg3+wbm489KnEjXOz2I/RbeFs=", - "owner": "hyprwm", - "repo": "hyprutils", - "rev": "0252fd13e78e60fb0da512a212e56007515a49f7", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprutils", - "type": "github" - } - }, - "hyprwayland-scanner": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1721324119, - "narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=", - "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "type": "github" - } - }, "impermanence": { "locked": { "lastModified": 1724489415, @@ -231,22 +36,6 @@ } }, "nixpkgs": { - "locked": { - "lastModified": 1724224976, - "narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "c374d94f1536013ca8e92341b540eba4c22f9c62", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { "locked": { "lastModified": 1724224976, "narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=", @@ -280,56 +69,10 @@ "root": { "inputs": { "home-manager": "home-manager", - "hyprland": "hyprland", "impermanence": "impermanence", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "nur": "nur" } - }, - "systems": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "xdph": { - "inputs": { - "hyprland-protocols": "hyprland-protocols", - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1724073926, - "narHash": "sha256-nWlUL43jOFHf+KW6Hqrx+W/r1XdXuDyb0wC/SrHsOu4=", - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "rev": "a08ecbbf33598924e93542f737fc6169a26b481e", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index ffb622e..ce92bda 100644 --- a/flake.nix +++ b/flake.nix @@ -9,12 +9,6 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; - - hyprland = { - type = "git"; - url = "https://github.com/hyprwm/Hyprland"; - submodules = true; - }; }; outputs = { nixpkgs, impermanence, home-manager, nur, ... } @ inputs: diff --git a/home/default.nix b/home/default.nix index 12411df..4e3f971 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,47 +1,26 @@ -{ inputs, config, pkgs, ... }: +{ config, ... }: { - imports = [ - ./persist.nix - ]; - - environment.variables = { - ZDOTDIR = "/home/hu/.config/zsh"; - EDITOR = "nvim"; - }; - users.users.hu = { isNormalUser = true; - extraGroups = [ "wheel" "libvirtd" ]; - shell = pkgs.zsh; + extraGroups = [ "wheel" ]; hashedPasswordFile = "/nix/config/secrets/pass"; }; home-manager = { useGlobalPkgs = true; useUserPackages = true; - extraSpecialArgs = { - inherit inputs; - }; users.hu = { home.username = "hu"; home.homeDirectory = "/home/hu"; home.stateVersion = config.system.stateVersion; - imports = [ - ./packages/zsh.nix - ./packages/git.nix - ./packages/gtk.nix - ./packages/hyprland.nix - ./packages/foot.nix - ./packages/firefox.nix - ./packages/rofi.nix - ./packages/fastfetch.nix - ./packages/nvim.nix - ./packages/waybar.nix - ./packages/virt-manager.nix - ]; + xdg.enable = true; }; }; + + imports = [ + ./persist.nix + ]; } diff --git a/home/packages/fastfetch.nix b/home/packages/fastfetch.nix deleted file mode 100644 index 3f94611..0000000 --- a/home/packages/fastfetch.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ ... }: - -{ - programs.fastfetch = { - enable = true; - settings = { - modules = [ - "title" - "separator" - "os" - "kernel" - "initsystem" - "uptime" - "datetime" - "packages" - "terminal" - "wm" - "shell" - "cpu" - "gpu" - "memory" - "break" - "colors" - ]; - }; - }; -} - diff --git a/home/packages/firefox.nix b/home/packages/firefox.nix deleted file mode 100644 index c9f53df..0000000 --- a/home/packages/firefox.nix +++ /dev/null @@ -1,407 +0,0 @@ -{ config, pkgs, ... }: - -{ - programs.firefox = { - enable = true; - package = pkgs.firefox-esr; - policies = { - EnableTrackingProtection = { - Value = true; - Cryptomining = true; - Fingerprinting = true; - EmailTracking = true; - }; - DisableTelemetry = true; - DisablePocket = true; - DisableFirefoxStudies = true; - DisableFirefoxAccounts = true; - DisableAccounts = true; - DontCheckDefaultBrowser = true; - OverrideFirstRunPage = ""; - OverridePostUpdatePage = ""; - NoDefaultBookmarks = true; - Cookies = { - Behaviour = "reject-foreign"; - BehaviourPrivateBrowsing = "reject-foreign"; - }; - - SearchEngines = { # ESR only - Remove = [ "Bing" "Google" "DuckDuckGo" "Wikipedia (en)" ]; - }; - - ExtensionSettings = { - "wikipedia@search.mozilla.org" = { - installation_mode = "blocked"; - }; - - "google@search.mozilla.org" = { - installation_mode = "blocked"; - }; - - "bing@search.mozilla.org" = { - installation_mode = "blocked"; - }; - - "ddg@search.mozilla.org" = { - installation_mode = "blocked"; - }; - }; - - "3rdparty".Extensions = { - "uBlock0@raymondhill.net".adminSettings = { - userSettings = { - importedLists = [ - "https://raw.githubusercontent.com/DandelionSprout/adfilt/master/LegitimateURLShortener.txt" - ]; - externalLists = "https://raw.githubusercontent.com/DandelionSprout/adfilt/master/LegitimateURLShortener.txt"; - }; - selectedFilterLists = [ - "https://raw.githubusercontent.com/DandelionSprout/adfilt/master/LegitimateURLShortener.txt" - "user-filters" - "ublock-filters" - "ublock-badware" - "ublock-privacy" - "ublock-quick-fixes" - "ublock-unbreak" - "easylist" - "adguard-generic" - "adguard-mobile" - "easyprivacy" - "adguard-spyware" - "adguard-spyware-url" - "block-lan" - "urlhaus-1" - "curben-phishing" - "plowe-0" - "dpollock-0" - "fanboy-cookiemonster" - "ublock-cookies-easylist" - "adguard-cookies" - "ublock-cookies-adguard" - "fanboy-social" - "adguard-social" - "fanboy-thirdparty_social" - "easylist-chat" - "easylist-newsletters" - "easylist-notifications" - "easylist-annoyances" - "adguard-mobile-app-banners" - "adguard-other-annoyances" - "adguard-popup-overlays" - "adguard-widgets" - "ublock-annoyances" - "ALB-0" - "BGR-0" - "CHN-0" - "CZE-0" - "DEU-0" - "EST-0" - "ara-0" - "spa-1" - "spa-0" - "FIN-0" - "FRA-0" - "GRC-0" - "HRV-0" - "HUN-0" - "IDN-0" - "ISR-0" - "IND-0" - "IRN-0" - "ISL-0" - "ITA-0" - "JPN-1" - "KOR-1" - "LTU-0" - "LVA-0" - "MKD-0" - "NLD-0" - "NOR-0" - "POL-0" - "POL-2" - "ROU-1" - "RUS-0" - "SWE-1" - "SVN-0" - "THA-0" - "TUR-0" - "VIE-1" - ]; - }; - }; - }; - - profiles.shaga = { - isDefault = true; - search = { - force = true; - default = "Gruble"; - order = [ "Gruble" "Nix Packages" "Nix Options" "Home-manager options" ]; - engines = { - "Gruble" = { - urls = [ - { - template = "https://gruble.de/search"; - params = [ - { name = "q"; value = "{searchTerms}"; } - ]; - } - ]; - iconUpdateURL = "https://gruble.de/favicon.ico"; - updateInterval = 7 * 24 * 60 * 60 * 1000; # Weekly - definedAliases = [ "@g" ]; - }; - "Nix Packages" = { - urls = [{ - template = "https://search.nixos.org/packages"; - params = [ - { name = "type"; value = "packages"; } - { name = "channel"; value = "unstable"; } - { name = "query"; value = "{searchTerms}"; } - ]; - }]; - iconUpdateURL = "https://nixos.org/favicon.png"; - updateInterval = 7 * 24 * 60 * 60 * 1000; # Weekly - definedAliases = [ "@np" ]; - }; - "Nix Options" = { - urls = [{ - template = "https://search.nixos.org/options"; - params = [ - { name = "type"; value = "packages"; } - { name = "channel"; value = "unstable"; } - { name = "query"; value = "{searchTerms}"; } - ]; - }]; - iconUpdateURL = "https://nixos.org/favicon.png"; - updateInterval = 7 * 24 * 60 * 60 * 1000; # Weekly - definedAliases = [ "@no" ]; - }; - "Home-manager options" = { - urls = [{ - template = "https://home-manager-options.extranix.com"; - params = [ - { name = "release"; value = "master"; } - { name = "query"; value = "{searchTerms}"; } - ]; - }]; - iconUpdateURL = "https://home-manager-options.extranix.com/images/favicon.png"; - updateInterval = 7 * 24 * 60 * 60 * 1000; # Weekly - definedAliases = [ "@ho" ]; - }; - }; - }; - - extensions = with config.nur.repos.rycee.firefox-addons; [ - ublock-origin - image-search-options - bitwarden - translate-web-pages - tampermonkey - ]; - - settings = { - "browser.urlbar.quicksuggest.contextualOptIn.topPosition" = false; - "extensions.postDownloadThirdPartyPrompt" = false; - "extensions.getAddons.cache.enabled" = false; - "browser.search.update" = false; - "extensions.autoDisableScopes" = 0; - "browser.startup.page" = 0; - "browser.startup.homepage" = "about:blank"; - "browser.newtabpage.enabled" = false; - "browser.newtabpage.activity-stream.showSponsored" = false; - "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; - "browser.newtabpage.activity-stream.default.sites" = ""; - "geo.provider.use_gpsd" = false; - "extensions.getAddons.showPane" = false; - "htmlaboutaddons.recommendations.enabled" = false; - "discovery.enabled" = false; - "browser.shopping.experience2023.enabled" = false; - "app.shield.optoutstudies.enabled" = false; - "app.normandy.enabled" = false; - "app.normandy.api_url" = ""; - "breakpad.reportURL" = ""; - "browser.newtabpage.activity-stream.feeds.telemetry" = false; - "browser.newtabpage.activity-stream.telemetry" = false; - "browser.search.serpEventTelemetry.enabled" = false; - "dom.security.unexpected_system_load_telemetry_enabled" = false; - "network.trr.confirmation_telemetry_enabled" = false; - "security.app_menu.recordEventTelemetry" = false; - "security.certerrors.recordEventTelemetry" = false; - "security.protectionspopup.recordEventTelemetry" = false; - "toolkit.telemetry.bhrPing.enabled" = false; - "toolkit.telemetry.firstShutdownPing.enabled" = false; - "toolkit.telemetry.newProfilePing.enabled" = false; - "toolkit.telemetry.pioneer-new-studies-available" = false; - "toolkit.telemetry.shutdownPingSender.enabled" = false; - "toolkit.telemetry.unified" = false; - "toolkit.telemetry.updatePing.enabled" = false; - "toolkit.telemetry.server" = "127.0.0.1"; - "browser.newtabpage.activity-stream.telemetry.structuredIngestion.endpoint" = "127.0.0.1"; - "browser.tabs.crashReporting.sendReport" = false; - "browser.crashReports.unsubmittedCheck.autoSubmit2" = false; - "captivedetect.canonicalURL" = ""; - "network.captive-portal-service.enabled" = false; - "network.connectivity-service.enabled" = false; - "browser.safebrowsing.downloads.remote.enabled" = false; - "browser.urlbar.speculativeConnect.enabled" = false; - "browser.search.suggest.enabled" = false; - "browser.urlbar.suggest.quicksuggest.nonsponsored" = false; - "browser.urlbar.suggest.quicksuggest.sponsored" = false; - "browser.urlbar.suggest.searches" = false; - "browser.urlbar.suggest.bookmark" = false; - "browser.urlbar.suggest.addons" = false; - "browser.urlbar.suggest.calculator" = false; - "browser.urlbar.suggest.clipboard" = false; - "browser.urlbar.suggest.engines" = false; - "browser.urlbar.suggest.history" = false; - "browser.urlbar.suggest.mdn" = false; - "browser.urlbar.suggest.openpage" = false; - "browser.urlbar.suggest.pocket" = false; - "browser.urlbar.suggest.recentsearches" = false; - "browser.urlbar.suggest.remotetab" = false; - "browser.urlbar.suggest.topsites" = false; - "browser.urlbar.suggest.trending" = false; - "browser.urlbar.suggest.weather" = false; - "browser.urlbar.suggest.yelp" = false; - "browser.urlbar.richSuggestions.tail" = false; - "browser.urlbar.quicksuggest.shouldShowOnboardingDialog" = false; - "browser.urlbar.quicksuggest.rustEnabled" = false; - "browser.urlbar.richSuggestions.featureGate" = false; - "browser.urlbar.trending.featureGate" = false; - "browser.urlbar.addons.featureGate" = false; - "browser.urlbar.mdn.featureGate" = false; - "browser.urlbar.pocket.featureGate" = false; - "browser.urlbar.weather.featureGate" = false; - "browser.formfill.enable" = false; - "dom.forms.autocomplete.formautofill" = false; - "extensions.formautofill.addresses.capture.enabled" = false; - "extensions.formautofill.creditCards.enabled" = false; - "signon.autofillForms" = false; - "signon.rememberSignons" = false; - "signon.formlessCapture.enabled" = false; - "network.auth.subresource-http-auth-allow" = 1; - "dom.security.https_only_mode" = true; - "network.http.referer.XOriginTrimmingPolicy" = 2; - "privacy.userContext.enabled" = true; - "privacy.userContext.ui.enabled" = true; - "privacy.sanitize.sanitizeOnShutdown" = true; - "privacy.clearHistory.siteSettings" = true; - "media.peerconnection.ice.no_host" = true; - "browser.download.start_downloads_in_tmp_dir" = true; - "browser.helperApps.deleteTempFileOnExit" = true; - "browser.uitour.enabled" = false; - "pdfjs.enableScripting" = false; - "browser.download.useDownloadDir" = false; - "browser.download.alwaysOpenPanel" = true; - "browser.download.manager.addToRecentDocs" = false; - "browser.download.always_ask_before_handling_new_types" = true; - "browser.contentblocking.category" = "strict"; - "privacy.clearOnShutdown.cache" = true; - "privacy.clearOnShutdown.downloads" = true; - "privacy.clearOnShutdown.formdata" = true; - "privacy.clearOnShutdown.history" = true; - "privacy.clearOnShutdown.sessions" = true; - "privacy.clearOnShutdown.cookies" = true; - "privacy.clearOnShutdown.offlineApps" = true; - "privacy.clearSiteData.historyFormDataAndDownloads" = true; - "browser.startup.homepage_override.mstone" = "ignore"; - "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false; - "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false; - "extensions.activeThemeID" = "firefox-compact-dark@mozilla.org"; - "browser.messaging-system.whatsNewPanel.enabled" = false; - "browser.urlbar.showSearchTerms.enabled" = false; - "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.havePinned" = ""; - "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.searchEngines" = ""; - - # https://github.com/elFarto/nvidia-vaapi-driver?tab=readme-ov-file#firefox - "media.ffmpeg.vaapi.enabled" = true; - "media.rdd-ffmpeg.enabled" = true; - "media.av1.enabled" = false; - - # Options for the firefox-ui-fix using Photon - # https://github.com/black7375/Firefox-UI-Fix/blob/master/user.js - "userChrome.tab.connect_to_window" = true; - "userChrome.tab.color_like_toolbar" = true; - "userChrome.tab.lepton_like_padding" = false; - "userChrome.tab.photon_like_padding" = true; - "userChrome.tab.dynamic_separator" = false; - "userChrome.tab.static_separator" = true; - "userChrome.tab.static_separator.selected_accent" = false; - "userChrome.tab.newtab_button_like_tab" = false; - "userChrome.tab.newtab_button_smaller" = true; - "userChrome.tab.newtab_button_proton" = false; - "userChrome.icon.panel_full" = false; - "userChrome.icon.panel_photon" = true; - "userChrome.icon.panel_sparse" = false; - "userChrome.tab.box_shadow" = false; - "userChrome.tab.bottom_rounded_corner" = false; - "userChrome.tab.photon_like_contextline" = true; - "userChrome.rounding.square_tab" = true; - "toolkit.legacyUserProfileCustomizations.stylesheets" = true; - "svg.context-properties.content.enabled" = true; - "browser.compactmode.show" = true; - "browser.newtabpage.activity-stream.improvesearch.handoffToAwesomebar" = false; - "layout.css.has-selector.enabled" = true; - "userChrome.compatibility.theme" = true; - "userChrome.compatibility.os" = true; - "userChrome.theme.built_in_contrast" = true; - "userChrome.theme.system_default" = true; - "userChrome.theme.proton_color" = true; - "userChrome.theme.proton_chrome" = true; - "userChrome.theme.fully_color" = true; - "userChrome.theme.fully_dark" = true; - "userChrome.decoration.cursor" = true; - "userChrome.decoration.field_border" = true; - "userChrome.decoration.download_panel" = true; - "userChrome.decoration.animate" = true; - "userChrome.padding.tabbar_width" = true; - "userChrome.padding.tabbar_height" = true; - "userChrome.padding.toolbar_button" = true; - "userChrome.padding.navbar_width" = true; - "userChrome.padding.urlbar" = true; - "userChrome.padding.bookmarkbar" = true; - "userChrome.padding.infobar" = true; - "userChrome.padding.menu" = true; - "userChrome.padding.bookmark_menu" = true; - "userChrome.padding.global_menubar" = true; - "userChrome.padding.panel" = true; - "userChrome.padding.popup_panel" = true; - "userChrome.tab.multi_selected" = true; - "userChrome.tab.unloaded" = true; - "userChrome.tab.letters_cleary" = true; - "userChrome.tab.close_button_at_hover" = true; - "userChrome.tab.sound_hide_label" = true; - "userChrome.tab.sound_with_favicons" = true; - "userChrome.tab.pip" = true; - "userChrome.tab.container" = true; - "userChrome.tab.crashed" = true; - "userChrome.fullscreen.overlap" = true; - "userChrome.fullscreen.show_bookmarkbar" = true; - "userChrome.icon.library" = true; - "userChrome.icon.panel" = true; - "userChrome.icon.menu" = true; - "userChrome.icon.context_menu" = true; - "userChrome.icon.global_menu" = true; - "userChrome.icon.global_menubar" = true; - "userChrome.icon.1-25px_stroke" = true; - "userContent.player.ui" = true; - "userContent.player.icon" = true; - "userContent.player.noaudio" = true; - "userContent.player.size" = true; - "userContent.player.click_to_play" = true; - "userContent.player.animate" = true; - "userContent.newTab.full_icon" = true; - "userContent.newTab.animate" = true; - "userContent.newTab.pocket_to_last" = true; - "userContent.newTab.searchbar" = true; - "userContent.page.field_border" = true; - "userContent.page.illustration" = true; - "userContent.page.proton_color" = true; - "userContent.page.dark_mode" = true; - "userContent.page.proton" = true; - }; - }; - }; -} - diff --git a/home/packages/foot.nix b/home/packages/foot.nix deleted file mode 100644 index addcb80..0000000 --- a/home/packages/foot.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ ... }: - -{ - programs.foot = { - enable = true; - settings = { - main = { - pad = "6x6 center"; - font = "Go Mono Nerd Font:size=12"; - }; - - mouse = { - hide-when-typing = "yes"; - }; - - scrollback = { - lines = 10000; - }; - - colors = { - alpha = 0.9; - - foreground = "c5c9c5"; - background = "181616"; - selection-foreground = "c8c093"; - selection-background = "2d4f67"; - - regular0 = "0d0c0c"; - regular1 = "c4746e"; - regular2 = "8a9a7b"; - regular3 = "c4b28a"; - regular4 = "8ba4b0"; - regular5 = "a292a3"; - regular6 = "8ea4a2"; - regular7 = "c8c093"; - - bright0 = "a6a69c"; - bright1 = "e46876"; - bright2 = "87a987"; - bright3 = "e6c384"; - bright4 = "7fb4ca"; - bright5 = "938aa9"; - bright6 = "7aa89f"; - bright7 = "c5c9c5"; - - "16" = "b6927b"; - "17" = "b98d7b"; - }; - }; - }; -} - diff --git a/home/packages/git.nix b/home/packages/git.nix deleted file mode 100644 index 77b7f94..0000000 --- a/home/packages/git.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ ... }: - -{ - programs.git = { - enable = true; - - userName = "caem"; - userEmail = "me@caem.dev"; - signing = { - key = "E50FC66B5062070DC462661C69A830D03203405F"; - signByDefault = true; - }; - - extraConfig = { - init.defaultBranch = "master"; - }; - }; -} - diff --git a/home/packages/gtk.nix b/home/packages/gtk.nix deleted file mode 100644 index b7ed053..0000000 --- a/home/packages/gtk.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ pkgs, ... }: - -{ - home.pointerCursor = { - gtk.enable = true; - name = "Bibata-Modern-Classic"; - package = pkgs.bibata-cursors; - size = 24; - }; - - dconf.settings = { - "org/gnome/desktop/interface" = { - color-scheme = "prefer-dark"; - }; - }; - - gtk = { - enable = true; - theme = { - name = "adw-gtk3-dark"; - package = pkgs.adw-gtk3; - }; - - iconTheme = { - name = "Adwaita"; - package = pkgs.adwaita-icon-theme; - }; - }; -} - diff --git a/home/packages/hyprland.nix b/home/packages/hyprland.nix deleted file mode 100644 index d5e96ff..0000000 --- a/home/packages/hyprland.nix +++ /dev/null @@ -1,120 +0,0 @@ -{ ... }: - -{ - services.hyprpaper = { - enable = true; - settings = { - ipc = "on"; - splash = false; - preload = [ - "/nix/config/assets/wallpaper.jpg" - ]; - wallpaper = [ - ",/nix/config/assets/wallpaper.jpg" - ]; - }; - }; - - wayland.windowManager.hyprland = { - enable = true; - systemd = { - enable = true; - variables = [ "--all" ]; - }; - - settings = { - "$mod" = "SUPER"; - "$terminal" = "foot"; - "$menu" = "rofi -show drun"; - - monitor = "DP-1,1920x1080@144,auto,1"; - - cursor = { - no_hardware_cursors = true; - }; - - render = { - explicit_sync = 0; - }; - - input = { - kb_layout = "gb:intl"; - follow_mouse = 1; - }; - - general = { - gaps_in = 3; - gaps_out = 6; - border_size = 2; - layout = "master"; - allow_tearing = true; - "col.inactive_border" = "rgb(242424)"; - "col.active_border" = "rgb(3584E4)"; - }; - - master = { - mfact = 0.5; - }; - - decoration = { - rounding = 5; - blur = { - enabled = true; - size = 4; - passes = 1; - }; - }; - - bindm = [ - "$mod, mouse:272, movewindow" - "$mod, mouse:273, resizewindow" - ]; - - bind = [ - "$mod, P, exec, $menu" - "$mod, RETURN, exec, $terminal" - ", Scroll_Lock, exec, pavucontrol" - "$mod, f, exec, nautilus" - - ", XF86AudioLowerVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%-" - ", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%+" - ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" - ", Pause, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" - - "$mod SHIFT, C, killactive" - "$mod, SPACE, togglefloating" - "$mod SHIFT, M, exit," - - "$mod SHIFT, RETURN, layoutmsg, swapwithmaster" - "$mod SHIFT, h, layoutmsg, mfact -0.05" - "$mod SHIFT, l, layoutmsg, mfact +0.05" - - "$mod, h, movefocus, l" - "$mod, j, movefocus, d" - "$mod, k, movefocus, u" - "$mod, l, movefocus, r" - - "$mod, 1, workspace, 1" - "$mod, 2, workspace, 2" - "$mod, 3, workspace, 3" - "$mod, 4, workspace, 4" - "$mod, 5, workspace, 5" - "$mod, 6, workspace, 6" - "$mod, 7, workspace, 7" - "$mod, 8, workspace, 8" - "$mod, 9, workspace, 9" - - "$mod SHIFT, 1, movetoworkspace, 1" - "$mod SHIFT, 2, movetoworkspace, 2" - "$mod SHIFT, 3, movetoworkspace, 3" - "$mod SHIFT, 4, movetoworkspace, 4" - "$mod SHIFT, 5, movetoworkspace, 5" - "$mod SHIFT, 6, movetoworkspace, 6" - "$mod SHIFT, 7, movetoworkspace, 7" - "$mod SHIFT, 8, movetoworkspace, 8" - "$mod SHIFT, 9, movetoworkspace, 9" - ]; - }; - }; -} - diff --git a/home/packages/nvim.nix b/home/packages/nvim.nix deleted file mode 100644 index 8128917..0000000 --- a/home/packages/nvim.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ pkgs, config, ... }: - -{ - programs.neovim = { - enable = true; - defaultEditor = true; - extraPackages = with pkgs; [ - lua-language-server - nodePackages.intelephense - nodePackages.typescript-language-server - clang-tools - ripgrep - nil - gcc - basedpyright - rust-analyzer - zathura - git - texliveFull - luajitPackages.jsregexp - luajitPackages.luarocks - fd - texlab - haskell-language-server - ]; - }; - - home.file."${config.xdg.configHome}/nvim" = { - source = ../../dotfiles/nvim; - recursive = true; - }; -} - diff --git a/home/packages/qt.nix b/home/packages/qt.nix deleted file mode 100644 index bf45b3b..0000000 --- a/home/packages/qt.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ ... }: - -{ - qt = { - enable = true; - platformTheme = "gnome"; - style = "adwaita-dark"; - }; -} - diff --git a/home/packages/rofi.nix b/home/packages/rofi.nix deleted file mode 100644 index 5981bbb..0000000 --- a/home/packages/rofi.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ pkgs, ... }: - -{ - programs.rofi = { - enable = true; - package = pkgs.rofi-wayland; - theme = "sidebar"; - }; -} diff --git a/home/packages/virt-manager.nix b/home/packages/virt-manager.nix deleted file mode 100644 index ab4c517..0000000 --- a/home/packages/virt-manager.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ ... }: - -{ - dconf.settings = { - "org/virt-manager/virt-manager/connections" = { - autoconnect = ["qemu:///system"]; - uris = ["qemu:///system"]; - }; - }; -} diff --git a/home/packages/waybar.nix b/home/packages/waybar.nix deleted file mode 100644 index 41e252b..0000000 --- a/home/packages/waybar.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ ... }: - -{ - programs.waybar = { - enable = true; - systemd = { - enable = true; - }; - - settings = { - bar = { - layer = "top"; - position = "top"; - height = 32; - output = [ - "DP-1" - ]; - - modules-left = [ "hyprland/workspaces" "hyprland/submap" ]; - modules-center = [ "hyprland/window" ]; - modules-right = [ "tray" "clock" ]; - }; - }; - style = '' - * { - all: unset; - border-radius: 0; - font-family: "Go Mono Nerd Font"; - font-size: 11pt; - min-height: 0; - } - - window#waybar { - color: #c5c9c5; - background: #181616; - border-bottom: 2px solid rgba(53,132,228, 1); - } - - #workspaces button { - padding: 0 8pt 0 8pt; - } - - #workspaces button.active { - color: #3584e4; - } - - #clock { - padding: 0 8pt 0 8pt; - } - ''; - }; -} - diff --git a/home/packages/zsh.nix b/home/packages/zsh.nix deleted file mode 100644 index 219aa39..0000000 --- a/home/packages/zsh.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ config, pkgs, ... }: - -{ - home.packages = with pkgs; [ - fzf - thefuck - zsh-fzf-tab - zsh-completions - zsh-autosuggestions - zsh-syntax-highlighting - nix-zsh-completions - zsh-nix-shell - ]; - - home.sessionVariables = { - ZDOTDIR = "${config.xdg.configHome}/zsh"; - }; - - home.file."${config.xdg.configHome}/zsh/conf.d" = { - source = ../../dotfiles/zsh/conf.d; - recursive = true; - }; - - home.file."${config.xdg.configHome}/zsh/.zshrc" = { - text = '' - #!/usr/bin/env zsh - - SYNTAX_PLUGIN="${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" - AUTOSUGGEST_PLUGIN="${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh" - NIX_SHELL_PLUGIN="${pkgs.zsh-nix-shell}/share/zsh-nix-shell/nix-shell.plugin.zsh" - FZF_TAB_PLUGIN="${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh" - '' + (builtins.readFile ../../dotfiles/zsh/.zshrc); - }; -} - diff --git a/home/persist.nix b/home/persist.nix index e3393d1..1372dce 100644 --- a/home/persist.nix +++ b/home/persist.nix @@ -19,27 +19,8 @@ { directory = ".ssh"; mode = "0700"; } { directory = ".nixops"; mode = "0700"; } { directory = ".local/share/keyrings"; mode = "0700"; } - ".local/share/direnv" - ".mozilla/firefox/shaga" - ".config/Signal" - ".config/vesktop" - ".config/tutanota-desktop" - ".config/tuta_integration" - ".config/Element" { directory = ".pki"; mode = "0700"; } - ".local/share/nvim" - ".local/state/nvim" - ".steam" - ".local/share/Steam" - ".local/share/honkers-railway-launcher" - ".local/share/PrismLauncher" - ".xlcore" - ".local/share/Euro Truck Simulator 2" - ".local/share/osu" - ".config/OpenTabletDriver" - ]; - - files = [ + ".local/share/direnv" ]; }; } diff --git a/hosts/workstation/default.nix b/hosts/workstation/default.nix index 9264576..d177fff 100644 --- a/hosts/workstation/default.nix +++ b/hosts/workstation/default.nix @@ -4,6 +4,7 @@ imports = [ ./hardware-configuration.nix ./persist.nix + ../../home/default.nix ../../modules/system/basic.nix ../../modules/desktop/environments/hyprland.nix @@ -12,8 +13,10 @@ ../../modules/desktop/apps/games.nix ../../modules/desktop/apps/multimedia.nix ../../modules/system/virtualisation.nix - - ../../home/default.nix + ../../modules/system/development.nix + ../../modules/packages/firefox.nix + ../../modules/packages/zsh.nix + ../../modules/packages/fastfetch.nix ]; boot.loader.efi.canTouchEfiVariables = true; @@ -83,11 +86,6 @@ ''; }; - networking.firewall = { - allowedTCPPorts = [ 25565 ]; - allowedUDPPorts = [ 25565 ]; - }; - system.stateVersion = "23.11"; } diff --git a/modules/desktop/apps/communication.nix b/modules/desktop/apps/communication.nix index 9f9d11c..fe72f8a 100644 --- a/modules/desktop/apps/communication.nix +++ b/modules/desktop/apps/communication.nix @@ -1,6 +1,14 @@ { pkgs, ... }: { + environment.persistence."/nix/persist".users.hu.directories = [ + ".config/Signal" + ".config/vesktop" + ".config/tutanota-desktop" + ".config/tuta_integration" + ".config/Element" + ]; + environment.systemPackages = with pkgs; [ tutanota-desktop signal-desktop diff --git a/modules/desktop/apps/games.nix b/modules/desktop/apps/games.nix index ea41e26..94ace75 100644 --- a/modules/desktop/apps/games.nix +++ b/modules/desktop/apps/games.nix @@ -1,6 +1,16 @@ { pkgs, ... }: { + environment.persistence."/nix/persist".users.hu.directories = [ + ".steam" + ".local/share/Steam" + ".local/share/honkers-railway-launcher" + ".local/share/PrismLauncher" + ".xlcore" + ".local/share/Euro Truck Simulator 2" + ".local/share/osu" + ]; + programs.steam = { enable = true; remotePlay.openFirewall = false; @@ -14,5 +24,11 @@ osu-lazer-bin protontricks ]; + + # Minecraft server + networking.firewall = { + allowedTCPPorts = [ 25565 ]; + allowedUDPPorts = [ 25565 ]; + }; } diff --git a/modules/desktop/apps/multimedia.nix b/modules/desktop/apps/multimedia.nix index 249b76d..68cd442 100644 --- a/modules/desktop/apps/multimedia.nix +++ b/modules/desktop/apps/multimedia.nix @@ -1,6 +1,10 @@ { pkgs, ... }: { + environment.persistence."/nix/persist".users.hu.directories = [ + ".config/OpenTabletDriver" + ]; + environment.systemPackages = with pkgs; [ mpv imagemagick diff --git a/modules/desktop/environments/hyprland.nix b/modules/desktop/environments/hyprland.nix index e08b254..80d8ba9 100644 --- a/modules/desktop/environments/hyprland.nix +++ b/modules/desktop/environments/hyprland.nix @@ -3,6 +3,9 @@ { imports = [ ../../system/fonts.nix + ../../packages/waybar.nix + ../../packages/rofi.nix + ../../packages/foot.nix ]; environment.systemPackages = with pkgs; [ @@ -58,5 +61,158 @@ xdg-desktop-portal-gtk ]; }; + + home-manager.users.hu = { + home.pointerCursor = { + gtk.enable = true; + name = "Bibata-Modern-Classic"; + package = pkgs.bibata-cursors; + size = 24; + }; + + dconf.settings = { + "org/gnome/desktop/interface" = { + color-scheme = "prefer-dark"; + }; + }; + + gtk = { + enable = true; + theme = { + name = "adw-gtk3-dark"; + package = pkgs.adw-gtk3; + }; + + iconTheme = { + name = "Adwaita"; + package = pkgs.adwaita-icon-theme; + }; + }; + + qt = { + enable = true; + platformTheme.name = "adwaita"; + style = { + name = "adwaita-dark"; + package = pkgs.adwaita-qt; + }; + }; + + services.hyprpaper = { + enable = true; + settings = { + ipc = "on"; + splash = false; + preload = [ + "/nix/config/assets/wallpaper.jpg" + ]; + wallpaper = [ + ",/nix/config/assets/wallpaper.jpg" + ]; + }; + }; + + wayland.windowManager.hyprland = { + enable = true; + systemd = { + enable = true; + variables = [ "--all" ]; + }; + + settings = { + "$mod" = "SUPER"; + "$terminal" = "foot"; + "$menu" = "rofi -show drun"; + + monitor = "DP-1,1920x1080@144,auto,1"; + + cursor = { + no_hardware_cursors = true; + }; + + render = { + explicit_sync = 0; + }; + + input = { + kb_layout = "gb:intl"; + follow_mouse = 1; + }; + + general = { + gaps_in = 3; + gaps_out = 6; + border_size = 2; + layout = "master"; + allow_tearing = true; + "col.inactive_border" = "rgb(242424)"; + "col.active_border" = "rgb(3584E4)"; + }; + + master = { + mfact = 0.5; + }; + + decoration = { + rounding = 5; + blur = { + enabled = true; + size = 4; + passes = 1; + }; + }; + + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + ]; + + bind = [ + "$mod, P, exec, $menu" + "$mod, RETURN, exec, $terminal" + ", Scroll_Lock, exec, pavucontrol" + "$mod, f, exec, nautilus" + + ", XF86AudioLowerVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%-" + ", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%+" + ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + ", Pause, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" + + "$mod SHIFT, C, killactive" + "$mod, SPACE, togglefloating" + "$mod SHIFT, M, exit," + + "$mod SHIFT, RETURN, layoutmsg, swapwithmaster" + "$mod SHIFT, h, layoutmsg, mfact -0.05" + "$mod SHIFT, l, layoutmsg, mfact +0.05" + + "$mod, h, movefocus, l" + "$mod, j, movefocus, d" + "$mod, k, movefocus, u" + "$mod, l, movefocus, r" + + "$mod, 1, workspace, 1" + "$mod, 2, workspace, 2" + "$mod, 3, workspace, 3" + "$mod, 4, workspace, 4" + "$mod, 5, workspace, 5" + "$mod, 6, workspace, 6" + "$mod, 7, workspace, 7" + "$mod, 8, workspace, 8" + "$mod, 9, workspace, 9" + + "$mod SHIFT, 1, movetoworkspace, 1" + "$mod SHIFT, 2, movetoworkspace, 2" + "$mod SHIFT, 3, movetoworkspace, 3" + "$mod SHIFT, 4, movetoworkspace, 4" + "$mod SHIFT, 5, movetoworkspace, 5" + "$mod SHIFT, 6, movetoworkspace, 6" + "$mod SHIFT, 7, movetoworkspace, 7" + "$mod SHIFT, 8, movetoworkspace, 8" + "$mod SHIFT, 9, movetoworkspace, 9" + ]; + }; + }; + }; } diff --git a/modules/packages/fastfetch.nix b/modules/packages/fastfetch.nix new file mode 100644 index 0000000..b6589ba --- /dev/null +++ b/modules/packages/fastfetch.nix @@ -0,0 +1,30 @@ +{ ... }: + +{ + home-manager.users.hu = { + programs.fastfetch = { + enable = true; + settings = { + modules = [ + "title" + "separator" + "os" + "kernel" + "initsystem" + "uptime" + "datetime" + "packages" + "terminal" + "wm" + "shell" + "cpu" + "gpu" + "memory" + "break" + "colors" + ]; + }; + }; + }; +} + diff --git a/modules/packages/firefox.nix b/modules/packages/firefox.nix new file mode 100644 index 0000000..5380a67 --- /dev/null +++ b/modules/packages/firefox.nix @@ -0,0 +1,413 @@ +{ config, pkgs, ... }: + +{ + environment.persistence."/nix/persist".users.hu.directories = [ + ".mozilla/firefox/shaga" + ]; + + home-manager.users.hu = { + programs.firefox = { + enable = true; + package = pkgs.firefox-esr; + policies = { + EnableTrackingProtection = { + Value = true; + Cryptomining = true; + Fingerprinting = true; + EmailTracking = true; + }; + DisableTelemetry = true; + DisablePocket = true; + DisableFirefoxStudies = true; + DisableFirefoxAccounts = true; + DisableAccounts = true; + DontCheckDefaultBrowser = true; + OverrideFirstRunPage = ""; + OverridePostUpdatePage = ""; + NoDefaultBookmarks = true; + Cookies = { + Behaviour = "reject-foreign"; + BehaviourPrivateBrowsing = "reject-foreign"; + }; + + SearchEngines = { # ESR only + Remove = [ "Bing" "Google" "DuckDuckGo" "Wikipedia (en)" ]; + }; + + ExtensionSettings = { + "wikipedia@search.mozilla.org" = { + installation_mode = "blocked"; + }; + + "google@search.mozilla.org" = { + installation_mode = "blocked"; + }; + + "bing@search.mozilla.org" = { + installation_mode = "blocked"; + }; + + "ddg@search.mozilla.org" = { + installation_mode = "blocked"; + }; + }; + + "3rdparty".Extensions = { + "uBlock0@raymondhill.net".adminSettings = { + userSettings = { + importedLists = [ + "https://raw.githubusercontent.com/DandelionSprout/adfilt/master/LegitimateURLShortener.txt" + ]; + externalLists = "https://raw.githubusercontent.com/DandelionSprout/adfilt/master/LegitimateURLShortener.txt"; + }; + selectedFilterLists = [ + "https://raw.githubusercontent.com/DandelionSprout/adfilt/master/LegitimateURLShortener.txt" + "user-filters" + "ublock-filters" + "ublock-badware" + "ublock-privacy" + "ublock-quick-fixes" + "ublock-unbreak" + "easylist" + "adguard-generic" + "adguard-mobile" + "easyprivacy" + "adguard-spyware" + "adguard-spyware-url" + "block-lan" + "urlhaus-1" + "curben-phishing" + "plowe-0" + "dpollock-0" + "fanboy-cookiemonster" + "ublock-cookies-easylist" + "adguard-cookies" + "ublock-cookies-adguard" + "fanboy-social" + "adguard-social" + "fanboy-thirdparty_social" + "easylist-chat" + "easylist-newsletters" + "easylist-notifications" + "easylist-annoyances" + "adguard-mobile-app-banners" + "adguard-other-annoyances" + "adguard-popup-overlays" + "adguard-widgets" + "ublock-annoyances" + "ALB-0" + "BGR-0" + "CHN-0" + "CZE-0" + "DEU-0" + "EST-0" + "ara-0" + "spa-1" + "spa-0" + "FIN-0" + "FRA-0" + "GRC-0" + "HRV-0" + "HUN-0" + "IDN-0" + "ISR-0" + "IND-0" + "IRN-0" + "ISL-0" + "ITA-0" + "JPN-1" + "KOR-1" + "LTU-0" + "LVA-0" + "MKD-0" + "NLD-0" + "NOR-0" + "POL-0" + "POL-2" + "ROU-1" + "RUS-0" + "SWE-1" + "SVN-0" + "THA-0" + "TUR-0" + "VIE-1" + ]; + }; + }; + }; + + profiles.shaga = { + isDefault = true; + search = { + force = true; + default = "Gruble"; + order = [ "Gruble" "Nix Packages" "Nix Options" "Home-manager options" ]; + engines = { + "Gruble" = { + urls = [ + { + template = "https://gruble.de/search"; + params = [ + { name = "q"; value = "{searchTerms}"; } + ]; + } + ]; + iconUpdateURL = "https://gruble.de/favicon.ico"; + updateInterval = 7 * 24 * 60 * 60 * 1000; # Weekly + definedAliases = [ "@g" ]; + }; + "Nix Packages" = { + urls = [{ + template = "https://search.nixos.org/packages"; + params = [ + { name = "type"; value = "packages"; } + { name = "channel"; value = "unstable"; } + { name = "query"; value = "{searchTerms}"; } + ]; + }]; + iconUpdateURL = "https://nixos.org/favicon.png"; + updateInterval = 7 * 24 * 60 * 60 * 1000; # Weekly + definedAliases = [ "@np" ]; + }; + "Nix Options" = { + urls = [{ + template = "https://search.nixos.org/options"; + params = [ + { name = "type"; value = "packages"; } + { name = "channel"; value = "unstable"; } + { name = "query"; value = "{searchTerms}"; } + ]; + }]; + iconUpdateURL = "https://nixos.org/favicon.png"; + updateInterval = 7 * 24 * 60 * 60 * 1000; # Weekly + definedAliases = [ "@no" ]; + }; + "Home-manager options" = { + urls = [{ + template = "https://home-manager-options.extranix.com"; + params = [ + { name = "release"; value = "master"; } + { name = "query"; value = "{searchTerms}"; } + ]; + }]; + iconUpdateURL = "https://home-manager-options.extranix.com/images/favicon.png"; + updateInterval = 7 * 24 * 60 * 60 * 1000; # Weekly + definedAliases = [ "@ho" ]; + }; + }; + }; + + extensions = with config.nur.repos.rycee.firefox-addons; [ + ublock-origin + image-search-options + bitwarden + translate-web-pages + tampermonkey + ]; + + settings = { + "browser.urlbar.quicksuggest.contextualOptIn.topPosition" = false; + "extensions.postDownloadThirdPartyPrompt" = false; + "extensions.getAddons.cache.enabled" = false; + "browser.search.update" = false; + "extensions.autoDisableScopes" = 0; + "browser.startup.page" = 0; + "browser.startup.homepage" = "about:blank"; + "browser.newtabpage.enabled" = false; + "browser.newtabpage.activity-stream.showSponsored" = false; + "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; + "browser.newtabpage.activity-stream.default.sites" = ""; + "geo.provider.use_gpsd" = false; + "extensions.getAddons.showPane" = false; + "htmlaboutaddons.recommendations.enabled" = false; + "discovery.enabled" = false; + "browser.shopping.experience2023.enabled" = false; + "app.shield.optoutstudies.enabled" = false; + "app.normandy.enabled" = false; + "app.normandy.api_url" = ""; + "breakpad.reportURL" = ""; + "browser.newtabpage.activity-stream.feeds.telemetry" = false; + "browser.newtabpage.activity-stream.telemetry" = false; + "browser.search.serpEventTelemetry.enabled" = false; + "dom.security.unexpected_system_load_telemetry_enabled" = false; + "network.trr.confirmation_telemetry_enabled" = false; + "security.app_menu.recordEventTelemetry" = false; + "security.certerrors.recordEventTelemetry" = false; + "security.protectionspopup.recordEventTelemetry" = false; + "toolkit.telemetry.bhrPing.enabled" = false; + "toolkit.telemetry.firstShutdownPing.enabled" = false; + "toolkit.telemetry.newProfilePing.enabled" = false; + "toolkit.telemetry.pioneer-new-studies-available" = false; + "toolkit.telemetry.shutdownPingSender.enabled" = false; + "toolkit.telemetry.unified" = false; + "toolkit.telemetry.updatePing.enabled" = false; + "toolkit.telemetry.server" = "127.0.0.1"; + "browser.newtabpage.activity-stream.telemetry.structuredIngestion.endpoint" = "127.0.0.1"; + "browser.tabs.crashReporting.sendReport" = false; + "browser.crashReports.unsubmittedCheck.autoSubmit2" = false; + "captivedetect.canonicalURL" = ""; + "network.captive-portal-service.enabled" = false; + "network.connectivity-service.enabled" = false; + "browser.safebrowsing.downloads.remote.enabled" = false; + "browser.urlbar.speculativeConnect.enabled" = false; + "browser.search.suggest.enabled" = false; + "browser.urlbar.suggest.quicksuggest.nonsponsored" = false; + "browser.urlbar.suggest.quicksuggest.sponsored" = false; + "browser.urlbar.suggest.searches" = false; + "browser.urlbar.suggest.bookmark" = false; + "browser.urlbar.suggest.addons" = false; + "browser.urlbar.suggest.calculator" = false; + "browser.urlbar.suggest.clipboard" = false; + "browser.urlbar.suggest.engines" = false; + "browser.urlbar.suggest.history" = false; + "browser.urlbar.suggest.mdn" = false; + "browser.urlbar.suggest.openpage" = false; + "browser.urlbar.suggest.pocket" = false; + "browser.urlbar.suggest.recentsearches" = false; + "browser.urlbar.suggest.remotetab" = false; + "browser.urlbar.suggest.topsites" = false; + "browser.urlbar.suggest.trending" = false; + "browser.urlbar.suggest.weather" = false; + "browser.urlbar.suggest.yelp" = false; + "browser.urlbar.richSuggestions.tail" = false; + "browser.urlbar.quicksuggest.shouldShowOnboardingDialog" = false; + "browser.urlbar.quicksuggest.rustEnabled" = false; + "browser.urlbar.richSuggestions.featureGate" = false; + "browser.urlbar.trending.featureGate" = false; + "browser.urlbar.addons.featureGate" = false; + "browser.urlbar.mdn.featureGate" = false; + "browser.urlbar.pocket.featureGate" = false; + "browser.urlbar.weather.featureGate" = false; + "browser.formfill.enable" = false; + "dom.forms.autocomplete.formautofill" = false; + "extensions.formautofill.addresses.capture.enabled" = false; + "extensions.formautofill.creditCards.enabled" = false; + "signon.autofillForms" = false; + "signon.rememberSignons" = false; + "signon.formlessCapture.enabled" = false; + "network.auth.subresource-http-auth-allow" = 1; + "dom.security.https_only_mode" = true; + "network.http.referer.XOriginTrimmingPolicy" = 2; + "privacy.userContext.enabled" = true; + "privacy.userContext.ui.enabled" = true; + "privacy.sanitize.sanitizeOnShutdown" = true; + "privacy.clearHistory.siteSettings" = true; + "media.peerconnection.ice.no_host" = true; + "browser.download.start_downloads_in_tmp_dir" = true; + "browser.helperApps.deleteTempFileOnExit" = true; + "browser.uitour.enabled" = false; + "pdfjs.enableScripting" = false; + "browser.download.useDownloadDir" = false; + "browser.download.alwaysOpenPanel" = true; + "browser.download.manager.addToRecentDocs" = false; + "browser.download.always_ask_before_handling_new_types" = true; + "browser.contentblocking.category" = "strict"; + "privacy.clearOnShutdown.cache" = true; + "privacy.clearOnShutdown.downloads" = true; + "privacy.clearOnShutdown.formdata" = true; + "privacy.clearOnShutdown.history" = true; + "privacy.clearOnShutdown.sessions" = true; + "privacy.clearOnShutdown.cookies" = true; + "privacy.clearOnShutdown.offlineApps" = true; + "privacy.clearSiteData.historyFormDataAndDownloads" = true; + "browser.startup.homepage_override.mstone" = "ignore"; + "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false; + "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false; + "extensions.activeThemeID" = "firefox-compact-dark@mozilla.org"; + "browser.messaging-system.whatsNewPanel.enabled" = false; + "browser.urlbar.showSearchTerms.enabled" = false; + "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.havePinned" = ""; + "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.searchEngines" = ""; + + # https://github.com/elFarto/nvidia-vaapi-driver?tab=readme-ov-file#firefox + "media.ffmpeg.vaapi.enabled" = true; + "media.rdd-ffmpeg.enabled" = true; + "media.av1.enabled" = false; + + # Options for the firefox-ui-fix using Photon + # https://github.com/black7375/Firefox-UI-Fix/blob/master/user.js + "userChrome.tab.connect_to_window" = true; + "userChrome.tab.color_like_toolbar" = true; + "userChrome.tab.lepton_like_padding" = false; + "userChrome.tab.photon_like_padding" = true; + "userChrome.tab.dynamic_separator" = false; + "userChrome.tab.static_separator" = true; + "userChrome.tab.static_separator.selected_accent" = false; + "userChrome.tab.newtab_button_like_tab" = false; + "userChrome.tab.newtab_button_smaller" = true; + "userChrome.tab.newtab_button_proton" = false; + "userChrome.icon.panel_full" = false; + "userChrome.icon.panel_photon" = true; + "userChrome.icon.panel_sparse" = false; + "userChrome.tab.box_shadow" = false; + "userChrome.tab.bottom_rounded_corner" = false; + "userChrome.tab.photon_like_contextline" = true; + "userChrome.rounding.square_tab" = true; + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + "svg.context-properties.content.enabled" = true; + "browser.compactmode.show" = true; + "browser.newtabpage.activity-stream.improvesearch.handoffToAwesomebar" = false; + "layout.css.has-selector.enabled" = true; + "userChrome.compatibility.theme" = true; + "userChrome.compatibility.os" = true; + "userChrome.theme.built_in_contrast" = true; + "userChrome.theme.system_default" = true; + "userChrome.theme.proton_color" = true; + "userChrome.theme.proton_chrome" = true; + "userChrome.theme.fully_color" = true; + "userChrome.theme.fully_dark" = true; + "userChrome.decoration.cursor" = true; + "userChrome.decoration.field_border" = true; + "userChrome.decoration.download_panel" = true; + "userChrome.decoration.animate" = true; + "userChrome.padding.tabbar_width" = true; + "userChrome.padding.tabbar_height" = true; + "userChrome.padding.toolbar_button" = true; + "userChrome.padding.navbar_width" = true; + "userChrome.padding.urlbar" = true; + "userChrome.padding.bookmarkbar" = true; + "userChrome.padding.infobar" = true; + "userChrome.padding.menu" = true; + "userChrome.padding.bookmark_menu" = true; + "userChrome.padding.global_menubar" = true; + "userChrome.padding.panel" = true; + "userChrome.padding.popup_panel" = true; + "userChrome.tab.multi_selected" = true; + "userChrome.tab.unloaded" = true; + "userChrome.tab.letters_cleary" = true; + "userChrome.tab.close_button_at_hover" = true; + "userChrome.tab.sound_hide_label" = true; + "userChrome.tab.sound_with_favicons" = true; + "userChrome.tab.pip" = true; + "userChrome.tab.container" = true; + "userChrome.tab.crashed" = true; + "userChrome.fullscreen.overlap" = true; + "userChrome.fullscreen.show_bookmarkbar" = true; + "userChrome.icon.library" = true; + "userChrome.icon.panel" = true; + "userChrome.icon.menu" = true; + "userChrome.icon.context_menu" = true; + "userChrome.icon.global_menu" = true; + "userChrome.icon.global_menubar" = true; + "userChrome.icon.1-25px_stroke" = true; + "userContent.player.ui" = true; + "userContent.player.icon" = true; + "userContent.player.noaudio" = true; + "userContent.player.size" = true; + "userContent.player.click_to_play" = true; + "userContent.player.animate" = true; + "userContent.newTab.full_icon" = true; + "userContent.newTab.animate" = true; + "userContent.newTab.pocket_to_last" = true; + "userContent.newTab.searchbar" = true; + "userContent.page.field_border" = true; + "userContent.page.illustration" = true; + "userContent.page.proton_color" = true; + "userContent.page.dark_mode" = true; + "userContent.page.proton" = true; + }; + }; + }; + }; +} + diff --git a/modules/packages/foot.nix b/modules/packages/foot.nix new file mode 100644 index 0000000..545c8c9 --- /dev/null +++ b/modules/packages/foot.nix @@ -0,0 +1,54 @@ +{ ... }: + +{ + home-manager.users.hu = { + programs.foot = { + enable = true; + settings = { + main = { + pad = "6x6 center"; + font = "Go Mono Nerd Font:size=12"; + }; + + mouse = { + hide-when-typing = "yes"; + }; + + scrollback = { + lines = 10000; + }; + + colors = { + alpha = 0.9; + + foreground = "c5c9c5"; + background = "181616"; + selection-foreground = "c8c093"; + selection-background = "2d4f67"; + + regular0 = "0d0c0c"; + regular1 = "c4746e"; + regular2 = "8a9a7b"; + regular3 = "c4b28a"; + regular4 = "8ba4b0"; + regular5 = "a292a3"; + regular6 = "8ea4a2"; + regular7 = "c8c093"; + + bright0 = "a6a69c"; + bright1 = "e46876"; + bright2 = "87a987"; + bright3 = "e6c384"; + bright4 = "7fb4ca"; + bright5 = "938aa9"; + bright6 = "7aa89f"; + bright7 = "c5c9c5"; + + "16" = "b6927b"; + "17" = "b98d7b"; + }; + }; + }; + }; +} + diff --git a/modules/packages/git.nix b/modules/packages/git.nix new file mode 100644 index 0000000..ca48463 --- /dev/null +++ b/modules/packages/git.nix @@ -0,0 +1,21 @@ +{ ... }: + +{ + home-manager.users.hu = { + programs.git = { + enable = true; + + userName = "caem"; + userEmail = "me@caem.dev"; + signing = { + key = "E50FC66B5062070DC462661C69A830D03203405F"; + signByDefault = true; + }; + + extraConfig = { + init.defaultBranch = "master"; + }; + }; + }; +} + diff --git a/modules/packages/nvim.nix b/modules/packages/nvim.nix new file mode 100644 index 0000000..082b061 --- /dev/null +++ b/modules/packages/nvim.nix @@ -0,0 +1,44 @@ +{ pkgs, ... }: + +{ + environment.persistence."/nix/persist".users.hu.directories = [ + ".local/share/nvim" + ".local/state/nvim" + ]; + + environment.variables = { + EDITOR = "nvim"; + }; + + home-manager.users.hu = { + programs.neovim = { + enable = true; + defaultEditor = true; + extraPackages = with pkgs; [ + lua-language-server + nodePackages.intelephense + nodePackages.typescript-language-server + clang-tools + ripgrep + nil + gcc + basedpyright + rust-analyzer + zathura + git + texliveFull + luajitPackages.jsregexp + luajitPackages.luarocks + fd + texlab + haskell-language-server + ]; + }; + + home.file."/home/hu/.config/nvim" = { + source = ../../dotfiles/nvim; + recursive = true; + }; + }; +} + diff --git a/modules/packages/rofi.nix b/modules/packages/rofi.nix new file mode 100644 index 0000000..3471aa6 --- /dev/null +++ b/modules/packages/rofi.nix @@ -0,0 +1,11 @@ +{ pkgs, ... }: + +{ + home-manager.users.hu = { + programs.rofi = { + enable = true; + package = pkgs.rofi-wayland; + theme = "sidebar"; + }; + }; +} diff --git a/home/packages/tmux.nix b/modules/packages/tmux.nix similarity index 100% rename from home/packages/tmux.nix rename to modules/packages/tmux.nix diff --git a/modules/packages/waybar.nix b/modules/packages/waybar.nix new file mode 100644 index 0000000..5ef14b7 --- /dev/null +++ b/modules/packages/waybar.nix @@ -0,0 +1,55 @@ +{ ... }: + +{ + home-manager.users.hu = { + programs.waybar = { + enable = true; + systemd = { + enable = true; + }; + + settings = { + bar = { + layer = "top"; + position = "top"; + height = 32; + output = [ + "DP-1" + ]; + + modules-left = [ "hyprland/workspaces" "hyprland/submap" ]; + modules-center = [ "hyprland/window" ]; + modules-right = [ "tray" "clock" ]; + }; + }; + style = '' + * { + all: unset; + border-radius: 0; + font-family: "Go Mono Nerd Font"; + font-size: 11pt; + min-height: 0; + } + + window#waybar { + color: #c5c9c5; + background: #181616; + border-bottom: 2px solid rgba(53,132,228, 1); + } + + #workspaces button { + padding: 0 8pt 0 8pt; + } + + #workspaces button.active { + color: #3584e4; + } + + #clock { + padding: 0 8pt 0 8pt; + } + ''; + }; + }; +} + diff --git a/modules/packages/zsh.nix b/modules/packages/zsh.nix new file mode 100644 index 0000000..8b7ed1c --- /dev/null +++ b/modules/packages/zsh.nix @@ -0,0 +1,43 @@ +{ pkgs, ... }: + +{ + users.users.hu.shell = pkgs.zsh; + + environment.variables = { + ZDOTDIR = "/home/hu/.config/zsh"; + }; + + home-manager.users.hu = { + home.packages = with pkgs; [ + fzf + thefuck + zsh-fzf-tab + zsh-completions + zsh-autosuggestions + zsh-syntax-highlighting + nix-zsh-completions + zsh-nix-shell + ]; + + home.sessionVariables = { + ZDOTDIR = "/home/hu/.config/zsh"; + }; + + home.file."/home/hu/.config/zsh/conf.d" = { + source = ../../dotfiles/zsh/conf.d; + recursive = true; + }; + + home.file."/home/hu/.config/zsh/.zshrc" = { + text = '' + #!/usr/bin/env zsh + + SYNTAX_PLUGIN="${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" + AUTOSUGGEST_PLUGIN="${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh" + NIX_SHELL_PLUGIN="${pkgs.zsh-nix-shell}/share/zsh-nix-shell/nix-shell.plugin.zsh" + FZF_TAB_PLUGIN="${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh" + '' + (builtins.readFile ../../dotfiles/zsh/.zshrc); + }; + }; +} + diff --git a/modules/system/development.nix b/modules/system/development.nix new file mode 100644 index 0000000..65aa113 --- /dev/null +++ b/modules/system/development.nix @@ -0,0 +1,8 @@ +{ ... }: + +{ + imports = [ + ../packages/git.nix + ../packages/nvim.nix + ]; +} diff --git a/modules/system/virtualisation.nix b/modules/system/virtualisation.nix index 0528c47..891a978 100644 --- a/modules/system/virtualisation.nix +++ b/modules/system/virtualisation.nix @@ -3,4 +3,16 @@ { virtualisation.libvirtd.enable = true; programs.virt-manager.enable = true; + + users.users.hu.extraGroups = [ "libvirtd" ]; + + home-manager.users.hu = { + dconf.settings = { + "org/virt-manager/virt-manager/connections" = { + autoconnect = ["qemu:///system"]; + uris = ["qemu:///system"]; + }; + }; + }; } +