diff --git a/nix/flake.lock b/flake.lock similarity index 98% rename from nix/flake.lock rename to flake.lock index e9a357f..e4a957e 100755 --- a/nix/flake.lock +++ b/flake.lock @@ -281,11 +281,11 @@ "nixvim": "nixvim" }, "locked": { - "lastModified": 1735080250, - "narHash": "sha256-94TdlH78zk6DxRHqSopImLju41MA7g4bp3bFa4J1tfU=", + "lastModified": 1736114968, + "narHash": "sha256-SLObAEcr36MpD59gdEtRw2t3DDXPepeAHSgOigf+kLg=", "ref": "refs/heads/master", - "rev": "5768956e7375b773abb7e2584f7de1a528fe3a46", - "revCount": 11, + "rev": "0256cebaca7690307fbf71b310b8fdb422160210", + "revCount": 13, "type": "git", "url": "https://git.4o1x5.dev/4o1x5/neo2005" }, diff --git a/nix/flake.nix b/flake.nix similarity index 54% rename from nix/flake.nix rename to flake.nix index c3d0b77..40211eb 100755 --- a/nix/flake.nix +++ b/flake.nix @@ -23,16 +23,17 @@ }; outputs = - { self - , nixpkgs - , home-manager - , nixpkgs-unstable - , nixpkgs-last - , nvidia-patch - , dttyper - , romodoro - , neo2005 - , ... + { + self, + nixpkgs, + home-manager, + nixpkgs-unstable, + nixpkgs-last, + nvidia-patch, + dttyper, + romodoro, + neo2005, + ... }@inputs: let system = "x86_64-linux"; @@ -47,18 +48,48 @@ specialArgs = { inputs = inputs; user = "grape"; + # Must be absolute path with no / at the end + dotfilepath = "/home/grape/dotfiles"; }; modules = [ # adding unstable overlay - ({ config, pkgs, ... }: { - nixpkgs.overlays = [ - overlay-unstable - nvidia-patch.overlays.default - ]; - }) + ( + { config, pkgs, ... }: + { + nixpkgs.overlays = [ + overlay-unstable + nvidia-patch.overlays.default + ]; + } + ) - ./system/drivers/shitvidia-patch.nix - ./configuration.nix + ./hosts/strix/configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + } + ]; + + }; + nixosConfigurations.thinkpad = nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { + inputs = inputs; + user = "peach"; + dotfilepath = "/home/peach/dotfiles"; + }; + modules = [ + ( + { config, pkgs, ... }: + { + nixpkgs.overlays = [ + overlay-unstable + ]; + } + ) + + ./hosts/thinkpad/configuration.nix home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; @@ -68,6 +99,5 @@ }; - }; } diff --git a/nix/apps/communication.nix b/hosts/strix/apps/communication.nix similarity index 100% rename from nix/apps/communication.nix rename to hosts/strix/apps/communication.nix diff --git a/nix/apps/graphics.nix b/hosts/strix/apps/graphics.nix similarity index 100% rename from nix/apps/graphics.nix rename to hosts/strix/apps/graphics.nix diff --git a/nix/apps/keepassxc.nix b/hosts/strix/apps/keepassxc.nix similarity index 100% rename from nix/apps/keepassxc.nix rename to hosts/strix/apps/keepassxc.nix diff --git a/nix/apps/music.nix b/hosts/strix/apps/music.nix similarity index 100% rename from nix/apps/music.nix rename to hosts/strix/apps/music.nix diff --git a/nix/apps/office.nix b/hosts/strix/apps/office.nix similarity index 100% rename from nix/apps/office.nix rename to hosts/strix/apps/office.nix diff --git a/nix/apps/prod.nix b/hosts/strix/apps/prod.nix similarity index 100% rename from nix/apps/prod.nix rename to hosts/strix/apps/prod.nix diff --git a/nix/apps/syncthing.nix b/hosts/strix/apps/syncthing.nix similarity index 100% rename from nix/apps/syncthing.nix rename to hosts/strix/apps/syncthing.nix diff --git a/nix/configs/alacritty.nix b/hosts/strix/configs/alacritty.nix similarity index 100% rename from nix/configs/alacritty.nix rename to hosts/strix/configs/alacritty.nix diff --git a/nix/configs/btop.nix b/hosts/strix/configs/btop.nix similarity index 100% rename from nix/configs/btop.nix rename to hosts/strix/configs/btop.nix diff --git a/nix/configs/dunst.nix b/hosts/strix/configs/dunst.nix similarity index 100% rename from nix/configs/dunst.nix rename to hosts/strix/configs/dunst.nix diff --git a/nix/configs/element.nix b/hosts/strix/configs/element.nix similarity index 100% rename from nix/configs/element.nix rename to hosts/strix/configs/element.nix diff --git a/hosts/strix/configs/firefox.nix b/hosts/strix/configs/firefox.nix new file mode 100644 index 0000000..b084ae8 --- /dev/null +++ b/hosts/strix/configs/firefox.nix @@ -0,0 +1,164 @@ +{ + pkgs, + user, + dotfilepath, + ... +}: +{ + home-manager.users.${user} = { + programs.firefox = { + enable = true; + profiles = { + "user" = { + isDefault = true; + id = 0; + + # TODO fix impurity + extraConfig = builtins.readFile "${dotfilepath}/hosts/strix/opt/firefox/user.js"; # custom userjs config + userChrome = builtins.readFile "${dotfilepath}/hosts/strix/opt/firefox/userChrome.css"; # browser styles + userContent = builtins.readFile "${dotfilepath}/hosts/strix/opt/firefox/userContent.css"; # browser styles + + extensions = with pkgs; [ + nur.repos.rycee.firefox-addons.ublock-origin + nur.repos.rycee.firefox-addons.clearurls # clear tracking urls + nur.repos.rycee.firefox-addons.stylus # cool styling for websites + nur.repos.rycee.firefox-addons.localcdn # locally stores frameworks such as vue, tailwind ect.. + nur.repos.rycee.firefox-addons.libredirect # redirects to libre version of spyware sites + nur.repos.rycee.firefox-addons.tridactyl # vim like keybinds + nur.repos.rycee.firefox-addons.istilldontcareaboutcookies # dismisses cookie banners + nur.repos.rycee.firefox-addons.noscript # block js + nur.repos.rycee.firefox-addons.tabliss # sexy new tab + nur.repos.rycee.firefox-addons.aw-watcher-web # activity watcher + nur.repos.rycee.firefox-addons.stylus # styling + nur.repos.rycee.firefox-addons.keepassxc-browser # password manager integration + ]; + search.force = true; + search.order = [ + "Searxng" + "DuckDuckGo" + ]; + search.default = "Searxng"; + search.engines = { + "Nix Packages" = { + urls = [ + { + template = "https://search.nixos.org/packages"; + params = [ + { + name = "type"; + value = "packages"; + } + { + name = "query"; + value = "{searchTerms}"; + } + ]; + } + ]; + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@np" ]; + }; + "Searxng" = { + urls = [ + { + template = "https://search.rhscz.eu/"; + params = [ + { + name = "q"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + "Home Manager" = { + definedAliases = [ "@hm" ]; + urls = [ + { + template = "https://home-manager-options.extranix.com/"; + params = [ + { + name = "query"; + value = "{searchTerms}"; + } + { + name = "release"; + value = "release-24.11"; + } + ]; + } + ]; + }; + "Youtube" = { + definedAliases = [ "@yt" ]; + urls = [ + { + template = "https://www.youtube.com/results"; + params = [ + { + name = "search_query"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + "Nix Options" = { + definedAliases = [ "@no" ]; + urls = [ + { + template = "https://search.nixos.org/options?type=packages"; + params = [ + { + name = "query"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + "Nix Wiki" = { + definedAliases = [ "@nw" ]; + urls = [ + { + template = "https://wiki.nixos.org/w/index.php"; + params = [ + { + name = "search"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + "Rust crates" = { + definedAliases = [ "@cr" ]; + urls = [ + { + template = "https://crates.io/search"; + params = [ + { + name = "q"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + }; + }; + }; + }; + + }; + programs.firejail = { + wrappedBinaries = { + firefox = { + executable = "${pkgs.firefox}/bin/firefox"; + profile = "${pkgs.firejail}/etc/firejail/firefox.profile"; + desktop = "${pkgs.firefox}/share/applications/firefox.desktop"; + }; + }; + }; + +} diff --git a/nix/configs/firewall.nix b/hosts/strix/configs/firewall.nix similarity index 100% rename from nix/configs/firewall.nix rename to hosts/strix/configs/firewall.nix diff --git a/nix/configs/gpu-screen-recorder.nix b/hosts/strix/configs/gpu-screen-recorder.nix similarity index 100% rename from nix/configs/gpu-screen-recorder.nix rename to hosts/strix/configs/gpu-screen-recorder.nix diff --git a/nix/configs/i3.nix b/hosts/strix/configs/i3.nix similarity index 98% rename from nix/configs/i3.nix rename to hosts/strix/configs/i3.nix index 3f693b0..bd2859f 100755 --- a/nix/configs/i3.nix +++ b/hosts/strix/configs/i3.nix @@ -2,10 +2,11 @@ pkgs, lib, user, + dotfilepath, ... }: let - scripts = "~/.config/scripts"; + scripts = "${dotfilepath}/scripts"; in { home-manager.users.${user}.xsession.windowManager.i3 = { diff --git a/nix/configs/kitty.nix b/hosts/strix/configs/kitty.nix similarity index 100% rename from nix/configs/kitty.nix rename to hosts/strix/configs/kitty.nix diff --git a/nix/configs/logseq.nix b/hosts/strix/configs/logseq.nix similarity index 100% rename from nix/configs/logseq.nix rename to hosts/strix/configs/logseq.nix diff --git a/nix/configs/neofetch.nix b/hosts/strix/configs/neofetch.nix similarity index 100% rename from nix/configs/neofetch.nix rename to hosts/strix/configs/neofetch.nix diff --git a/nix/configs/node_exporter.nix b/hosts/strix/configs/node_exporter.nix similarity index 100% rename from nix/configs/node_exporter.nix rename to hosts/strix/configs/node_exporter.nix diff --git a/nix/configs/nvim.nix b/hosts/strix/configs/nvim.nix similarity index 100% rename from nix/configs/nvim.nix rename to hosts/strix/configs/nvim.nix diff --git a/nix/configs/ollama.nix b/hosts/strix/configs/ollama.nix similarity index 100% rename from nix/configs/ollama.nix rename to hosts/strix/configs/ollama.nix diff --git a/nix/configs/picom.nix b/hosts/strix/configs/picom.nix similarity index 100% rename from nix/configs/picom.nix rename to hosts/strix/configs/picom.nix diff --git a/nix/configs/polybar.nix b/hosts/strix/configs/polybar.nix similarity index 100% rename from nix/configs/polybar.nix rename to hosts/strix/configs/polybar.nix diff --git a/nix/configs/polybar/bottom.nix b/hosts/strix/configs/polybar/bottom.nix similarity index 100% rename from nix/configs/polybar/bottom.nix rename to hosts/strix/configs/polybar/bottom.nix diff --git a/nix/configs/polybar/top.nix b/hosts/strix/configs/polybar/top.nix similarity index 100% rename from nix/configs/polybar/top.nix rename to hosts/strix/configs/polybar/top.nix diff --git a/nix/configs/rofi.nix b/hosts/strix/configs/rofi.nix similarity index 93% rename from nix/configs/rofi.nix rename to hosts/strix/configs/rofi.nix index 0e0f63f..46f2251 100755 --- a/nix/configs/rofi.nix +++ b/hosts/strix/configs/rofi.nix @@ -6,17 +6,17 @@ }: { - home-manager.users.${user}.programs.rofi = { + home-manager.users.grape.programs.rofi = { enable = true; font = "Jetbrains Mono"; - theme = "/home/grape/.config/rofi/theme.rasi"; + theme = "/home/${user}/.config/rofi/theme.rasi"; plugins = with pkgs; [ rofi-calc rofi-emoji ]; }; - home-manager.users.${user}.home.file.".config/rofi/theme.rasi" = { + home-manager.users.grape.home.file.".config/rofi/theme.rasi" = { enable = true; text = '' /******************************************************************************* diff --git a/nix/configs/st.nix b/hosts/strix/configs/st.nix similarity index 100% rename from nix/configs/st.nix rename to hosts/strix/configs/st.nix diff --git a/hosts/strix/configs/tmux.nix b/hosts/strix/configs/tmux.nix new file mode 100644 index 0000000..a67fe67 --- /dev/null +++ b/hosts/strix/configs/tmux.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: +{ + programs.tmux = { + enable = true; + extraConfig = '' + set -g allow-passthrough on + set -g default-shell "${pkgs.zsh}/bin/zsh" + set-window-option -g mode-keys vi + ''; + terminal = "screen-256color"; + #shell = "${pkgs.zsh}/bin/zsh"; + }; + +} diff --git a/nix/configs/vscode.nix b/hosts/strix/configs/vscode.nix similarity index 100% rename from nix/configs/vscode.nix rename to hosts/strix/configs/vscode.nix diff --git a/nix/configs/waydroid.nix b/hosts/strix/configs/waydroid.nix similarity index 100% rename from nix/configs/waydroid.nix rename to hosts/strix/configs/waydroid.nix diff --git a/hosts/strix/configuration.nix b/hosts/strix/configuration.nix new file mode 100755 index 0000000..241f916 --- /dev/null +++ b/hosts/strix/configuration.nix @@ -0,0 +1,152 @@ +{ config, pkgs, ... }: + +{ + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + + # system stuff + ./system/display.nix + ./system/sound.nix + ./system/essentials.nix + ./system/shell.nix + ./system/remap.nix + ./system/ssd.nix + + # rice and other usefull apps + ./desktop.nix + + # developing tools + ./dev.nix + + # music + ./apps/music.nix + + # gayming + ./gaming.nix + + # communcations apps + ./apps/communication.nix + + # password manager + ./apps/keepassxc.nix + + # productivity apps + ./apps/prod.nix + + # enabling sandboxing and other security measures + ./system/security.nix + + # file sync + ./apps/syncthing.nix + + # libreoffice + ./apps/office.nix + + # node xporter + #./configs/prometheus.nix + ./configs/neofetch.nix + ./configs/logseq.nix + ./configs/i3.nix + ./configs/rofi.nix + ./configs/picom.nix + ./configs/polybar.nix + ./configs/btop.nix + ./configs/dunst.nix + ./configs/ollama.nix + ./configs/vscode.nix + ./configs/gpu-screen-recorder.nix + ./configs/firefox.nix + ./configs/waydroid.nix + ./configs/element.nix + ./configs/nvim.nix + ./configs/node_exporter.nix + ./configs/tmux.nix + + # terminal + #./configs/st.nix # too minimal, most things dont work without a million tweaks + #./configs/kitty.nix # uses their own stupid xterm extension... + ./configs/alacritty.nix # just perfect, tho too much gpu usage + + # apps + ./apps/graphics.nix + + # other + ./configs/firewall.nix + + # drivers + ./system/drivers/shitvidia-patch.nix + ]; + + # adding nur + nixpkgs.config.packageOverrides = pkgs: { + nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") { + inherit pkgs; + }; + }; + + # adding flake support + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + + home-manager.users.grape = + { ... }: + { + home.stateVersion = "24.11"; + }; + + nixpkgs.config.permittedInsecurePackages = [ + "electron-27.3.11" + ]; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # kernel + #boot.kernelPackages = pkgs.linuxPackages_xanmod; # Gaming + + #boot.initrd.luks.devices."luks-f7e86dde-55a5-4306-a7c2-cf2d93c9ee0b".device = "/dev/disk/by-uuid/f7e86dde-55a5-4306-a7c2-cf2d93c9ee0b"; # old dead ssd rip 24.07.28 + boot.initrd.luks.devices."luks-da1b2f8c-877a-4c39-8965-a4af625718c".device = + "/dev/disk/by-uuid/da1b2f8c-877a-4c39-8965-a4af6a25718c"; + + networking.hostName = "strix"; + + # Enable networking + networking.networkmanager.enable = true; + + # Set your time zone. + time.timeZone = "Europe/Budapest"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "hu_HU.UTF-8"; + LC_IDENTIFICATION = "hu_HU.UTF-8"; + LC_MEASUREMENT = "hu_HU.UTF-8"; + LC_MONETARY = "hu_HU.UTF-8"; + LC_NAME = "hu_HU.UTF-8"; + LC_NUMERIC = "hu_HU.UTF-8"; + LC_PAPER = "hu_HU.UTF-8"; + LC_TELEPHONE = "hu_HU.UTF-8"; + LC_TIME = "hu_HU.UTF-8"; + }; + + users.users.grape = { + isNormalUser = true; + description = "grape"; + extraGroups = [ + "networkmanager" + "wheel" + "audio" + "docker" + ]; + }; + + nixpkgs.config.allowUnfree = true; + nix.settings.auto-optimise-store = true; + system.stateVersion = "24.11"; +} diff --git a/nix/desktop.nix b/hosts/strix/desktop.nix similarity index 100% rename from nix/desktop.nix rename to hosts/strix/desktop.nix diff --git a/nix/dev.nix b/hosts/strix/dev.nix similarity index 100% rename from nix/dev.nix rename to hosts/strix/dev.nix diff --git a/nix/gaming.nix b/hosts/strix/gaming.nix similarity index 100% rename from nix/gaming.nix rename to hosts/strix/gaming.nix diff --git a/nix/hardware-configuration.nix b/hosts/strix/hardware-configuration.nix similarity index 100% rename from nix/hardware-configuration.nix rename to hosts/strix/hardware-configuration.nix diff --git a/hosts/strix/opt/firefox/i2puser.js b/hosts/strix/opt/firefox/i2puser.js new file mode 100644 index 0000000..a443575 --- /dev/null +++ b/hosts/strix/opt/firefox/i2puser.js @@ -0,0 +1,332 @@ +user_pref("accessibility.force_disabled", 1); +user_pref("app.normandy.first_run", false); +user_pref("app.normandy.api_url", ""); +user_pref("app.normandy.enabled", false); +user_pref("app.normandy.optoutstudies.enabled", false); +user_pref("app.shield.optoutstudies.enabled", false); +user_pref("app.update.auto", false); +user_pref("app.update.BITS.enabled", false); +user_pref("app.update.channel", "i2pdbrowser"); +user_pref("app.update.disable_button.showUpdateHistory", true); +user_pref("app.update.enabled", false); +user_pref("app.update.interval", 0); +user_pref("app.update.service.enabled", false); +user_pref("app.update.url", ""); +user_pref("beacon.enabled", false); +pref("breakpad.reportURL", ""); +user_pref("browser.aboutHomeSnippets.updateUrl", ""); +user_pref("browser.aboutwelcome.enabled", false); +user_pref("browser.cache.disk.capacity", 131072); +user_pref("browser.cache.offline.enable", false); +user_pref("browser.casting.enabled", false); +user_pref("browser.contentblocking.database.enabled", false); +user_pref("browser.contentblocking.report.lockwise.enabled", false); +user_pref("browser.contentblocking.report.monitor.enabled", false); +user_pref("browser.crashReports.unsubmittedCheck.autoSubmit2", false); +user_pref("browser.discovery.enabled", false); +pref("browser.download.manager.retention", 0); +user_pref("browser.download.useDownloadDir", false); +user_pref("browser.feeds.showFirstRunUI", false); +user_pref("browser.fixup.alternate.enabled", false); +user_pref("browser.fixup.fallback-to-https", false); +user_pref("browser.formfill.enable", false); +user_pref("browser.formfill.expire_days", 0); +user_pref("browser.messaging-system.whatsNewPanel.enabled", false); +user_pref("browser.newtabpage.activity-stream.feeds.asrouterfeed", false); +user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false); +user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false); +user_pref("browser.newtabpage.activity-stream.default.sites", "http://i2pd.i2p/,http://333.i2p/,http://inr.i2p/,http://102chan.i2p/,http://flibusta.i2p/,http://fsoc.i2p/,http://lifebox.i2p/,http://onelon.i2p/,http://wiki.ilita.i2p/"); +user_pref("browser.newtabpage.activity-stream.discoverystream.enabled", false); +user_pref("browser.newtabpage.activity-stream.feeds.discoverystreamfeed", false); +user_pref("browser.newtabpage.activity-stream.feeds.section.highlights", false); +user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false); +user_pref("browser.newtabpage.activity-stream.feeds.snippets", false); +user_pref("browser.newtabpage.activity-stream.feeds.telemetry", false); +user_pref("browser.newtabpage.activity-stream.showSearch", true); +user_pref("browser.newtabpage.activity-stream.section.highlights.includePocket", false); +user_pref("browser.newtabpage.activity-stream.showSponsored", false); +user_pref("browser.newtabpage.activity-stream.showSponsoredTopSites", false); +user_pref("browser.newtabpage.activity-stream.telemetry", false); +pref("browser.newtabpage.activity-stream.topSitesRows", 2); +pref("browser.newtabpage.enhanced", false); +pref("browser.newtabpage.introShown", true); +user_pref("browser.onboarding.tour.onboarding-tour-addons.completed", true); +user_pref("browser.onboarding.tour.onboarding-tour-customize.completed", true); +user_pref("browser.onboarding.tour.onboarding-tour-default-browser.completed", true); +user_pref("browser.onboarding.tour.onboarding-tour-performance.completed", true); +user_pref("browser.onboarding.tour.onboarding-tour-private-browsing.completed", true); +user_pref("browser.onboarding.tour.onboarding-tour-screenshots.completed", true); +user_pref("browser.pagethumbnails.capturing_disabled", true); +user_pref("browser.ping-centre.telemetry", false); +user_pref("browser.places.smartBookmarksVersion", -1); +pref("browser.places.speculativeConnect.enabled", false); +pref("browser.reader.detectedFirstArticle", false); +pref("browser.region.network.url", ""); +pref("browser.region.update.enabled", false); +pref("browser.rights.3.shown", true); +user_pref("browser.safebrowsing.appRepURL", ""); +user_pref("browser.safebrowsing.blockedURIs.enabled", false); +user_pref("browser.safebrowsing.downloads.enabled", false); +user_pref("browser.safebrowsing.downloads.remote.enabled", false); +user_pref("browser.safebrowsing.gethashURL", ""); +user_pref("browser.safebrowsing.keyURL", "localhost"); +user_pref("browser.safebrowsing.malware.enabled", false); +user_pref("browser.safebrowsing.malware.reportURL", ""); +user_pref("browser.safebrowsing.phishing.enabled", false); +user_pref("browser.safebrowsing.provider.google.appRepURL", ""); +user_pref("browser.safebrowsing.provider.google.gethashURL", ""); +user_pref("browser.safebrowsing.provider.google.lists", ""); +user_pref("browser.safebrowsing.provider.google.reportURL", ""); +user_pref("browser.safebrowsing.provider.google.updateURL", ""); +user_pref("browser.safebrowsing.provider.mozilla.gethashURL", ""); +user_pref("browser.safebrowsing.provider.mozilla.lists", ""); +user_pref("browser.safebrowsing.provider.mozilla.updateURL", ""); +user_pref("browser.safebrowsing.reportErrorURL", ""); +user_pref("browser.safebrowsing.reportGenericURL", ""); +user_pref("browser.safebrowsing.reportMalwareErrorURL", ""); +user_pref("browser.safebrowsing.reportMalwareURL", ""); +user_pref("browser.safebrowsing.reportPhishURL", ""); +user_pref("browser.safebrowsing.reportURL", ""); +user_pref("browser.safebrowsing.updateURL", ""); +user_pref("browser.safebrowsing.warning.infoURL", ""); +user_pref("browser.search.countryCode", "US"); +user_pref("browser.search.defaultenginename", "YaCy 'legwork'"); +user_pref("browser.search.defaultenginename.US", "YaCy 'legwork'"); +user_pref("browser.search.geoSpecificDefaults", false); +user_pref("browser.search.geoSpecificDefaults.url", ""); +user_pref("browser.search.geoip.url", ""); +user_pref("browser.search.official", false); +user_pref("browser.search.order.1", "YaCy 'legwork'"); +user_pref("browser.search.order.2", ""); +user_pref("browser.search.order.3", ""); +user_pref("browser.search.order.US.1", "YaCy 'legwork'"); +user_pref("browser.search.order.US.2", ""); +user_pref("browser.search.order.US.3", ""); +user_pref("browser.search.redirectWindowsSearch", false); +user_pref("browser.search.region", "US"); +user_pref("browser.search.searchEnginesURL", ""); +user_pref("browser.search.suggest.enabled", false); +user_pref("browser.search.update", false); +user_pref("browser.send_pings", false); +pref("browser.send_pings.require_same_host", true); +user_pref("browser.shell.checkDefaultBrowser", false); +pref("browser.startup.homepage", "http://i2pd.i2p/"); +user_pref("browser.startup.homepage_override.mstone", "ignore"); +user_pref("browser.tabs.closeWindowWithLastTab", false); +user_pref("browser.tabs.crashReporting.sendReport", false); +user_pref("browser.translation.engine", ""); +user_pref("browser.uitour.enabled", false); +user_pref("browser.urlbar.dnsResolveSingleWordsAfterSearch", 0); +user_pref("browser.urlbar.formatting.enabled", false); +user_pref("browser.urlbar.maxRichResults", 12); +user_pref("browser.urlbar.speculativeConnect.enabled", false); +user_pref("browser.urlbar.suggest.quicksuggest.nonsponsored", false); +user_pref("browser.urlbar.suggest.quicksuggest.sponsored", false); +user_pref("browser.urlbar.suggest.searches", false); +user_pref("browser.urlbar.trimURLs", false); +user_pref("browser.usedOnWindows10", false); +user_pref("browser.usedOnWindows10.introURL", ""); +user_pref("camera.control.face_detection.enabled", false); +pref("canvas.capturestream.enabled", false); +user_pref("captivedetect.canonicalURL", ""); +pref("clipboard.autocopy", false); +user_pref("datareporting.healthreport.about.reportUrl", ""); +user_pref("datareporting.healthreport.about.reportUrlUnified", ""); +user_pref("datareporting.healthreport.documentServerURI", ""); +user_pref("datareporting.healthreport.pendingDeleteRemoteData", true); +user_pref("datareporting.healthreport.service.enabled", false); +user_pref("datareporting.healthreport.service.firstRun", false); +user_pref("datareporting.healthreport.uploadEnabled", false); +pref("datareporting.policy.dataSubmissionEnabled", false); +pref("datareporting.policy.firstRunTime", "0"); +pref("datareporting.sessions.current.clean", true); +pref("device.sensors.enabled", false); +pref("devtools.chrome.enabled", false); +pref("devtools.debugger.force-local", true); +pref("devtools.debugger.remote-enabled", false); +pref("devtools.webide.autoinstallADBHelper", false); +pref("devtools.webide.autoinstallFxdtAdapters", false); +pref("devtools.webide.enabled", false); +user_pref("devtools.whatsnew.enabled", false); +user_pref("devtools.whatsnew.feature-enabled", false); +pref("dom.allow_cut_copy", false); +pref("dom.archivereader.enabled", false); +pref("dom.battery.enabled", false); +pref("dom.enable_performance", false); +pref("dom.enable_user_timing", false); +pref("dom.event.clipboardevents.enabled", false); +pref("dom.flyweb.enabled", false); +pref("dom.gamepad.enabled", false); +pref("dom.ipc.plugins.flash.subprocess.crashreporter.enabled", false); +pref("dom.ipc.plugins.reportCrashURL", false); +pref("dom.maxHardwareConcurrency", 2); +pref("dom.mozTCPSocket.enabled", false); +pref("dom.netinfo.enabled", false); +pref("dom.network.enabled", false); +user_pref("dom.push.enabled", false); +user_pref("dom.security.https_first", false); +user_pref("dom.security.https_first_pbm", false); +pref("dom.telephony.enabled", false); +pref("dom.vibrator.enabled", false); +pref("dom.vr.enabled", false); +pref("dom.webaudio.enabled", false); +pref("dom.webnotifications.enabled", false); +pref("dom.workers.enabled", false); +pref("experiments.enabled", false); +pref("experiments.manifest.uri", ""); +pref("experiments.supported", false); +pref("extensions.abuseReport.enabled", false); +pref("extensions.autoDisableScopes", 0); +pref("extensions.blocklist.enabled", false); +pref("extensions.blocklist.url", ""); +user_pref("extensions.getAddons.cache.enabled", false); +user_pref("extensions.getAddons.showPane", false); +user_pref("extensions.htmlaboutaddons.recommendations.enabled", false); +pref("extensions.lazarus.showDonateNotification", false); +user_pref("extensions.pocket.enabled", false); +user_pref("extensions.screenshots.upload-disabled", true); +pref("extensions.shownSelectionUI", true); +user_pref("extensions.systemAddon.update.enabled", false); +user_pref("extensions.systemAddon.update.url", ""); +pref("extensions.ui.lastCategory", "addons://list/extension"); +pref("extensions.update.autoUpdateDefault", false); +user_pref("extensions.update.enabled", false); +pref("full-screen-api.approval-required", false); +pref("full-screen-api.warning.timeout", 0); +pref("general.buildID.override", "20100101"); +user_pref("general.platform.override", "Win32"); +user_pref("general.useragent.locale", "en-US"); +user_pref("general.useragent.override", "Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/78.0"); +pref("general.warnOnAboutConfig", false); +user_pref("geo.enabled", false); +user_pref("geo.wifi.logging.enabled", false); +user_pref("geo.wifi.uri", ""); +user_pref("identity.fxaccounts.commands.enabled", false); +user_pref("identity.fxaccounts.enabled", false); +user_pref("intl.locale.matchOS", true); +pref("javascript.use_us_english_locale", true); +pref("keyword.enabled", false); +pref("lightweightThemes.update.enabled", false); +pref("loop.logDomains", false); +user_pref("marionette.enabled", false); +// Allow .i2p domain +user_pref("browser.fixup.domainsuffixwhitelist.i2p", true); +// disable https only +user_pref("dom.security.https_only_mode", false); + + +user_pref("media.eme.enabled", false); +user_pref("media.getusermedia.audiocapture.enabled", false); +user_pref("media.getusermedia.screensharing.enabled", false); +pref("media.gmp-eme-adobe.enabled", false); +user_pref("media.gmp-gmpopenh264.enabled", false); +pref("media.gmp-gmpopenh264.provider.enabled", false); +pref("media.gmp-manager.cert.checkAttributes", false); +pref("media.gmp-manager.url", ""); +user_pref("media.navigator.enabled", false); +user_pref("media.navigator.video.enabled", false); +user_pref("media.peerconnection.enabled", false); +user_pref("media.peerconnection.ice.default_address_only", true); +user_pref("media.peerconnection.ice.no_host", true); +user_pref("media.peerconnection.identity.timeout", 1); +user_pref("media.peerconnection.turn.disable", true); +user_pref("media.peerconnection.use_document_iceservers", false); +user_pref("media.video_stats.enabled", false); +user_pref("media.webspeech.recognition.enable", false); +user_pref("media.webspeech.synth.enabled", false); +user_pref("messaging-system.rsexperimentloader.enabled", false); +user_pref("network.IDN.whitelist.i2p", true); +user_pref("network.IDN_show_punycode", true); +user_pref("network.allow-experiments", false); +user_pref("network.captive-portal-service.enabled", false); +user_pref("network.connectivity-service.enabled", false); +pref("network.cookie.prefsMigrated", true); +user_pref("network.dns.disableIPv6", true); +user_pref("network.dns.disablePrefetchFromHTTPS", true); +user_pref("network.dns.disablePrefetch", true); +user_pref("network.gio.supported-protocols", ""); +user_pref("network.http.speculative-parallel-limit", 0); +user_pref("network.jar.open-unsafe-types", false); +pref("network.manage-offline-status", false); +user_pref("network.negotiate-auth.allow-insecure-ntlm-v1", false); +user_pref("network.notify.changed", false); +pref("network.predictor.enabled", false); +pref("network.predictor.enable-prefetch", false); +user_pref("network.prefetch-next", false); +pref("network.protocol-handler.expose-all", true); +user_pref("network.protocol-handler.external-default", false); +user_pref("network.protocol-handler.warn-external-default", true); +user_pref("network.proxy.allow_bypass", false); +user_pref("network.proxy.ftp", "32.54.31.99"); +user_pref("network.proxy.ftp_port", 4447); +user_pref("network.proxy.socks", "32.54.31.99"); +user_pref("network.proxy.socks_port", 4447); +user_pref("network.proxy.socks_version", 5); +user_pref("network.proxy.no_proxies_on", "localhost, 127.0.0.1"); +user_pref("network.proxy.share_proxy_settings", true); +user_pref("network.proxy.socks_remote_dns", true); +user_pref("network.proxy.ssl", ""); +user_pref("network.proxy.ssl_port", 0); +user_pref("network.proxy.type", 1); +pref("network.http.speculative-parallel-limit", 0); +user_pref("network.trr.mode", 5); +user_pref("pdfjs.disabled", true); +user_pref("pdfjs.enableWebGL", false); +user_pref("permissions.default.camera", 2); +user_pref("permissions.default.desktop-notification", 2); +user_pref("permissions.default.geo", 2); +user_pref("permissions.default.microphone", 2); +user_pref("plugin.default_plugin_disabled", true); +user_pref("plugin.state.java", 0); +user_pref("plugin.state.libgnome-shell-browser-plugin", 0); +user_pref("plugins.click_to_play", true); +user_pref("plugins.load_appdir_plugins", false); +user_pref("plugins.update.notifyUser", false); +user_pref("plugins.update.url", ""); +pref("privacy.cpd.offlineApps", true); +pref("privacy.firstparty.isolate", true); +user_pref("privacy.resistFingerprinting", true); +pref("privacy.sanitize.timeSpan", 0); +user_pref("privacy.spoof_english", 2); +user_pref("privacy.trackingprotection.enabled", true); +//user_pref("privacy.userContext.enabled", true); +user_pref("reader.parse-on-load.enabled", false); +user_pref("reader.parse-on-load.force-enabled", false); +user_pref("security.insecure_field_warning.contextual.enabled", false); +user_pref("security.insecure_password.ui.enabled", false); +user_pref("security.ssl.errorReporting.enabled", false); +user_pref("security.OCSP.enabled", 0); +user_pref("services.blocklist.update_enabled", false); +pref("services.settings.server", ""); +user_pref("services.sync.enabled", false); +pref("services.sync.prefs.sync.browser.download.manager.scanWhenDone", false); +pref("services.sync.prefs.sync.browser.safebrowsing.enabled", false); +pref("services.sync.prefs.sync.browser.search.update", false); +pref("services.sync.prefs.sync.extensions.update.enabled", false); +pref("signon.autofillForms", false); +user_pref("signon.management.page.breach-alerts.enabled", false); +user_pref("signon.management.page.vulnerable-passwords.enabled", false); +pref("signon.rememberSignons", false); +//user_pref("startup.homepage_welcome_url", "http://i2pd.i2p/"); +pref("startup.homepage_welcome_url.additional", "about:blank"); +pref("toolkit.coverage.endpoint.base", ""); +pref("toolkit.coverage.opt-out", true); +user_pref("toolkit.telemetry.archive.enabled", false); +user_pref("toolkit.telemetry.bhrPing.enabled", false); +pref("toolkit.telemetry.coverage.opt-out", true); +user_pref("toolkit.telemetry.enabled", false); +user_pref("toolkit.telemetry.firstShutdownPing.enabled", false); +user_pref("toolkit.telemetry.newProfilePing.enabled", false); +user_pref("toolkit.telemetry.optoutSample", false); +user_pref("toolkit.telemetry.reportingpolicy.firstRun", false); +user_pref("toolkit.telemetry.server", ""); +user_pref("toolkit.telemetry.shutdownPingSender.enabled", false); +user_pref("toolkit.telemetry.unified", false); +user_pref("toolkit.telemetry.unifiedIsOptIn", true); +user_pref("toolkit.telemetry.updatePing.enabled", true); +user_pref("toolkit.winRegisterApplicationRestart", false); +user_pref("webgl.disable-extensions", true); +user_pref("webgl.disable-fail-if-major-performance-caveat", true); +user_pref("webgl.disabled", true); +user_pref("webgl.enable-debug-renderer-info", false); +user_pref("webgl.min_capability_mode", true); diff --git a/nix/opt/firefox/user.js b/hosts/strix/opt/firefox/user.js similarity index 100% rename from nix/opt/firefox/user.js rename to hosts/strix/opt/firefox/user.js diff --git a/nix/opt/firefox/userChrome.css b/hosts/strix/opt/firefox/userChrome.css similarity index 100% rename from nix/opt/firefox/userChrome.css rename to hosts/strix/opt/firefox/userChrome.css diff --git a/nix/opt/firefox/userContent.css b/hosts/strix/opt/firefox/userContent.css similarity index 100% rename from nix/opt/firefox/userContent.css rename to hosts/strix/opt/firefox/userContent.css diff --git a/nix/opt/neofetch.conf b/hosts/strix/opt/neofetch.conf similarity index 100% rename from nix/opt/neofetch.conf rename to hosts/strix/opt/neofetch.conf diff --git a/nix/opt/st/st.h b/hosts/strix/opt/st/st.h similarity index 100% rename from nix/opt/st/st.h rename to hosts/strix/opt/st/st.h diff --git a/nix/system/display.nix b/hosts/strix/system/display.nix similarity index 100% rename from nix/system/display.nix rename to hosts/strix/system/display.nix diff --git a/nix/system/drivers/shitvidia-patch.nix b/hosts/strix/system/drivers/shitvidia-patch.nix similarity index 95% rename from nix/system/drivers/shitvidia-patch.nix rename to hosts/strix/system/drivers/shitvidia-patch.nix index 5d20520..7e2fef6 100755 --- a/nix/system/drivers/shitvidia-patch.nix +++ b/hosts/strix/system/drivers/shitvidia-patch.nix @@ -17,7 +17,6 @@ in # TODO fix hybrid optimus shit mode... add "intel" for inner display to work services.xserver.videoDrivers = [ - #"modesetting" "nvidia" ]; @@ -38,6 +37,5 @@ in open = false; nvidiaSettings = true; package = pkgs.nvidia-patch.patch-nvenc (pkgs.nvidia-patch.patch-fbc package); - #inherit package; }; } diff --git a/nix/system/essentials.nix b/hosts/strix/system/essentials.nix similarity index 100% rename from nix/system/essentials.nix rename to hosts/strix/system/essentials.nix diff --git a/nix/system/remap.nix b/hosts/strix/system/remap.nix similarity index 100% rename from nix/system/remap.nix rename to hosts/strix/system/remap.nix diff --git a/nix/system/security.nix b/hosts/strix/system/security.nix similarity index 52% rename from nix/system/security.nix rename to hosts/strix/system/security.nix index aab0cce..0f59643 100755 --- a/nix/system/security.nix +++ b/hosts/strix/system/security.nix @@ -1,6 +1,12 @@ -{ pkgs, config, systemd,user ... }: { - + pkgs, + config, + systemd, + user, + ... +}: +{ + # enabling firejail for sandboxing programs.firejail = { enable = true; @@ -9,12 +15,14 @@ # enabling doas security.doas.enable = true; security.sudo.enable = false; - security.doas.extraRules = [{ - users = [ ${user} ]; - keepEnv = true; - persist = true; - }]; + security.doas.extraRules = [ + { + users = [ user ]; + keepEnv = true; + persist = true; + } + ]; - # setting up a polkit + # setting up a polkit security.polkit.enable = true; } diff --git a/nix/system/shell.nix b/hosts/strix/system/shell.nix similarity index 75% rename from nix/system/shell.nix rename to hosts/strix/system/shell.nix index ae66f87..f66c6c0 100755 --- a/nix/system/shell.nix +++ b/hosts/strix/system/shell.nix @@ -3,11 +3,6 @@ users.users.${user}.shell = pkgs.zsh; programs.zsh.enable = true; - - programs.tmux = { - enable = true; - }; - home-manager.users.${user} = { programs.zsh = { enable = true; @@ -17,25 +12,22 @@ shellAliases = { update = "doas nixos-rebuild switch --impure"; - # docker + # Docker shorthands dc = "docker compose"; dco = "docker container"; dn = "docker network"; dv = "docker volume"; code = "codium"; - # tmux + # Tmux shrothands # https://github.com/gabysbrain/machine_config/blob/master/config/tmux.nix ta = "tmux attach -t"; - tad = "tmux attach -d -t"; - ts = "tmux new-session -s"; tl = "tmux list-sessions"; - tkss = "tmux kill-session -t"; - tt = "tmux new-session -t"; + tks = "tmux kill-session -t"; + tn = "tmux new-session -t"; - #nix - garbage = "nix-collect-garbage -d"; #dev = "nix develop --command zsh"; + dev = ''nix develop "git+file://$(pwd)?submodules=1" --command zsh''; # ssh @@ -44,7 +36,7 @@ carbon = "ssh root@32.54.31.180"; lime = "ssh root@32.54.31.241"; - # remote deployment + # remote deployment for homelab deploy-carbon = "nixos-rebuild switch --flake .#carbon --target-host root@32.54.31.180 --show-trace"; deploy-lime = "nixos-rebuild switch --flake .#lime --target-host root@32.54.31.241 --show-trace"; deploy-pink = "nixos-rebuild switch --flake .#pink --target-host root@32.54.31.99 --show-trace"; @@ -57,21 +49,17 @@ sessionVariables = { EDITOR = "nvim"; + # https://discourse.nixos.org/t/tmux-doesnt-use-tmux-config-generated-by-nix/42392/2 + # for some reason tmux nix doesnt configure tmux right so I have to manually set it's configuration path + ZSH_TMUX_CONFIG = "/etc/tmux.conf"; }; antidote = { enable = true; - plugins = [ "marlonrichert/zsh-autocomplete" "zsh-users/zsh-syntax-highlighting" ]; - # Zplug - # plugins = [ - # { name = "marlonrichert/zsh-autocomplete"; } - # { name = "zsh-users/zsh-syntax-highlighting"; } - # ]; - # }; }; }; diff --git a/nix/system/sound.nix b/hosts/strix/system/sound.nix similarity index 100% rename from nix/system/sound.nix rename to hosts/strix/system/sound.nix diff --git a/nix/system/ssd.nix b/hosts/strix/system/ssd.nix similarity index 67% rename from nix/system/ssd.nix rename to hosts/strix/system/ssd.nix index 350a1e0..30bd3dc 100644 --- a/nix/system/ssd.nix +++ b/hosts/strix/system/ssd.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ services.smartd = { enable = true; @@ -15,4 +16,9 @@ } ]; }; + + # Automount shit, idk + services.devmon.enable = true; + services.gvfs.enable = true; + services.udisks2.enable = true; } diff --git a/hosts/thinkpad/apps/communication.nix b/hosts/thinkpad/apps/communication.nix new file mode 100755 index 0000000..8ee6113 --- /dev/null +++ b/hosts/thinkpad/apps/communication.nix @@ -0,0 +1,18 @@ +{ pkgs, config, ... }: +{ + + programs.steam.enable = true; + + environment.systemPackages = with pkgs; [ + mumble # voip + element-desktop # fully featured matrix client + #gomuks # tui matrix client + iamb + simplex-chat-desktop + + ]; + + + + +} diff --git a/hosts/thinkpad/apps/graphics.nix b/hosts/thinkpad/apps/graphics.nix new file mode 100644 index 0000000..82d25e4 --- /dev/null +++ b/hosts/thinkpad/apps/graphics.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: { + + environment.systemPackages = with pkgs; [ + #krita + #gimp + #figma-linux + #kdenlive + + # video cutting easy + losslesscut-bin + ]; +} diff --git a/hosts/thinkpad/apps/keepassxc.nix b/hosts/thinkpad/apps/keepassxc.nix new file mode 100755 index 0000000..1b9de9f --- /dev/null +++ b/hosts/thinkpad/apps/keepassxc.nix @@ -0,0 +1,8 @@ +{ pkgs, config, ... }: +{ + + environment.systemPackages = with pkgs; [ + keepassxc + ]; +} + diff --git a/hosts/thinkpad/apps/music.nix b/hosts/thinkpad/apps/music.nix new file mode 100755 index 0000000..1679b35 --- /dev/null +++ b/hosts/thinkpad/apps/music.nix @@ -0,0 +1,12 @@ +{ pkgs, config, ... }: { + environment.systemPackages = with pkgs; [ + playerctl + jamesdsp + yt-dlp + feishin + #mpv-unwrapped + qpwgraph + + ]; +} + diff --git a/hosts/thinkpad/apps/office.nix b/hosts/thinkpad/apps/office.nix new file mode 100755 index 0000000..15064e7 --- /dev/null +++ b/hosts/thinkpad/apps/office.nix @@ -0,0 +1,9 @@ +{ pkgs, config, ... }: +{ + environment.systemPackages = with pkgs; [ + libreoffice + onlyoffice-bin + ]; +} + + diff --git a/hosts/thinkpad/apps/prod.nix b/hosts/thinkpad/apps/prod.nix new file mode 100755 index 0000000..a5c78b6 --- /dev/null +++ b/hosts/thinkpad/apps/prod.nix @@ -0,0 +1,15 @@ +{ pkgs, config, inputs, ... }: { + environment.systemPackages = with pkgs; [ + taskwarrior + timewarrior + logseq + #inputs.romodoro.packages.x86_64-linux.default + taskwarrior-tui + inputs.dttyper.packages.x86_64-linux.default + + # For tracking activity across the whole computer + pkgs.last.activitywatch + ]; +} + + diff --git a/hosts/thinkpad/apps/syncthing.nix b/hosts/thinkpad/apps/syncthing.nix new file mode 100755 index 0000000..5250b59 --- /dev/null +++ b/hosts/thinkpad/apps/syncthing.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: { + services.syncthing = { + enable = true; + user = "grape"; + dataDir = "/home/grape/Documents"; + configDir = "/home/grape/.syncthing"; + }; +} diff --git a/hosts/thinkpad/configs/alacritty.nix b/hosts/thinkpad/configs/alacritty.nix new file mode 100644 index 0000000..ac88136 --- /dev/null +++ b/hosts/thinkpad/configs/alacritty.nix @@ -0,0 +1,41 @@ +{ pkgs, user, ... }: +{ + + home-manager.users.${user}.programs.alacritty = { + enable = true; + settings = { + font.normal = { + family = "Jetbrains Mono Nerd font"; + style = "Regular"; + }; + + colors = { + primary.background = "0x1E1E3F"; + primary.foreground = "0xE1EFFF"; + + cursor.text = "0x1E1E3F"; + cursor.cursor = "0xFAD000"; + + # Normal colors + normal.black = "0x000000"; + normal.red = "0xEC3A37"; + normal.green = "0x75e44c"; + normal.yellow = "0xFAD000"; + normal.blue = "0x6943FF"; + normal.magenta = "0xFF2C70"; + normal.cyan = "0x80FCFF"; + normal.white = "0xFFFFFF"; + + # Bright colors + bright.black = "0x5C5C61"; + bright.red = "0xEC3A37"; + bright.green = "0x3AD900"; + bright.yellow = "0xFAD000"; + bright.blue = "0x6943FF"; + bright.magenta = "0xFB94FF"; + bright.cyan = "0x80FCFF"; + bright.white = "0x2D2B55"; + }; + }; + }; +} diff --git a/hosts/thinkpad/configs/btop.nix b/hosts/thinkpad/configs/btop.nix new file mode 100644 index 0000000..a00c19e --- /dev/null +++ b/hosts/thinkpad/configs/btop.nix @@ -0,0 +1,8 @@ +{ pkgs, user, ... }: +{ + home-manager.users.${user} = { + programs.btop.settings = { + theme_background = false; + }; + }; +} diff --git a/hosts/thinkpad/configs/dunst.nix b/hosts/thinkpad/configs/dunst.nix new file mode 100644 index 0000000..0d8511b --- /dev/null +++ b/hosts/thinkpad/configs/dunst.nix @@ -0,0 +1,26 @@ +{ pkgs, user, ... }: { + + home-manager.users.${user}.services.dunst = { + enable = true; + settings = { + global = { + frame_color = "#1e66f5"; + separator_color = "frame"; + }; + urgency_low = { + background = "#191830"; + foreground = "#FFFFFF"; + }; + urgency_normal = { + background = "#191830"; + foreground = "#FFFFFF"; + }; + urgency_critical = { + background = "#191830"; + foreground = "#FFFFFF"; + frame_color = "#fe640b"; + }; + }; + }; + +} diff --git a/hosts/thinkpad/configs/element.nix b/hosts/thinkpad/configs/element.nix new file mode 100644 index 0000000..74b87c7 --- /dev/null +++ b/hosts/thinkpad/configs/element.nix @@ -0,0 +1,56 @@ +{ pkgs, user, ... }: +{ + # https://github.com/element-hq/element-web/blob/develop/config.sample.json + home-manager.users.${user}.home.file.".config/Element/config.json" = { + enable = true; + text = '' + { + "default_theme": "Purple", + "setting_defaults": { + "breadcrumbs": true, + "custom_themes": [ + { + "name": "Purple", + "is_dark": true, + "colors": { + "accent-color": "#FAd000", + "primary-color": "#FFF", + "warning-color": "#ec3a37f5", + "sidebar-color": "#192030", + "roomlist-background-color": "#131327", + "roomlist-text-color": "#FFF", + "roomlist-text-secondary-color": "#00ff00", + "roomlist-highlights-color": "#00000030", + "roomlist-separator-color": "#4d4d4d90", + "timeline-background-color": "#191830", + "timeline-text-color": "#fff", + "secondary-content": "#fff", + "tertiary-content": "#7870ab", + "quinary-content": "#fad000", + "timeline-text-secondary-color": "#FAD000", + "timeline-highlights-color": "#00000030", + "reaction-row-button-selected-bg-color": "#689d6a", + "menu-selected-color": "#fad000", + "icon-button-color": "#fad000", + "accent": "#689d6a", + "alert": "#cc241d", + "username-colors": [ + "#FAD000", + "#ff7200", + "#35ad68", + "#5d37f0", + "#80fcff", + "#3ad900", + "#b362ff", + "#fff" + ], + "avatar-background-colors": ["#458588", "#b16286", "#689d6a"] + } + } + ] + } + } + ''; + }; + +} diff --git a/nix/configs/firefox.nix b/hosts/thinkpad/configs/firefox.nix similarity index 99% rename from nix/configs/firefox.nix rename to hosts/thinkpad/configs/firefox.nix index 25ca677..ae35fa6 100644 --- a/nix/configs/firefox.nix +++ b/hosts/thinkpad/configs/firefox.nix @@ -146,7 +146,6 @@ }; }; - programs.firejail = { wrappedBinaries = { firefox = { diff --git a/hosts/thinkpad/configs/firewall.nix b/hosts/thinkpad/configs/firewall.nix new file mode 100644 index 0000000..12831c8 --- /dev/null +++ b/hosts/thinkpad/configs/firewall.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: { + networking.firewall = { + enable = true; + allowedUDPPorts = [ + ]; + allowedTCPPorts = [ + ]; + }; +} diff --git a/hosts/thinkpad/configs/gpu-screen-recorder.nix b/hosts/thinkpad/configs/gpu-screen-recorder.nix new file mode 100644 index 0000000..5955a09 --- /dev/null +++ b/hosts/thinkpad/configs/gpu-screen-recorder.nix @@ -0,0 +1,18 @@ +{ pkgs, config, ... }: +{ + environment.systemPackages = [ + (pkgs.runCommand "gpu-screen-recorder" + { + nativeBuildInputs = [ pkgs.makeWrapper ]; + } '' + mkdir -p $out/bin + makeWrapper ${pkgs.gpu-screen-recorder}/bin/gpu-screen-recorder $out/bin/gpu-screen-recorder \ + --prefix LD_LIBRARY_PATH : ${pkgs.libglvnd}/lib \ + --prefix LD_LIBRARY_PATH : ${config.boot.kernelPackages.nvidia_x11}/lib + '') + # for scripts + pkgs.xdotool + pkgs.jq + pkgs.pulseaudio + ]; +} diff --git a/hosts/thinkpad/configs/i3.nix b/hosts/thinkpad/configs/i3.nix new file mode 100755 index 0000000..6af356f --- /dev/null +++ b/hosts/thinkpad/configs/i3.nix @@ -0,0 +1,129 @@ +{ + pkgs, + lib, + user, + dotfilepath, + ... +}: +let + scripts = "${dotfilepath}/scripts"; +in + +{ + home-manager.users.${user}.xsession.windowManager.i3 = { + enable = true; + config = { + + # disable i3 bar + bars = [ ]; + + # Starting compositor and adding background to xroot via nitrogen + startup = [ + { + command = "nitrogen --set-zoom-fill ${dotfilepath}/bg.jpg"; + } + { + command = "picom -b"; + } + { + command = "polybar default"; + } + { + command = "polybar bottom"; + } + { + command = "aw-server"; + } + { + command = "aw-watcher-afk"; + } + { + command = "aw-watcher-window"; + } + ]; + # defining alt as modifier + modifier = "Mod1"; + gaps.inner = 12; + + # TODO add colors from variables + # colors for focused windows + colors.focused = { + background = "#FAD000"; + border = "#FAD000"; + childBorder = "#FFF"; + indicator = "#FAD000"; + text = "#FAD000"; + }; + colors.focusedInactive = { + background = "#FAD000"; + border = "#FAD000"; + childBorder = "#FFF"; + indicator = "#FAD000"; + text = "#FAD000"; + }; + + keybindings = lib.mkOptionDefault { + + # application keybinds + "mod4+d" = "exec rofi -show drun"; + "mod4+e" = "exec rofi -show calc"; + "mod4+f" = "exec rofi -show emoji"; + + "mod4+t" = "exec alacritty"; + "mod4+r" = "exec firefox"; + "mod4+m" = "exec feishin"; + "mod4+p" = "exec keepassxc"; + + # power off + "mod4+Shift+Delete" = "exec shutdown -h now"; + + # language settings + "mod4+1" = "exec setxkbmap us"; + "mod4+2" = "exec setxkbmap hu"; + + # picom + "mod4+o" = "exec ${scripts}/picom_opacity_toggle.sh"; + + # screenshot + "Print" = + "exec scrot '%Y-%m-%d_%H-%M-%S.png' -e 'mv $f ~/Pictures/screenshots && xclip -selection clipboard -t image/png -i ~/Pictures/screenshots/$f'"; + "Shift+Print" = + ''exec "NUM=$(echo $RANDOM) maim -s $HOME/Pictures/screenshots/$(date +%Y%m%d_%H%M)$NUM.png ; cat $HOME/Pictures/screenshots/$(date +%Y%m%d_%H%M)$NUM.png | xclip -selection clipboard -t image/png"''; + + # PLAYERCTL for mouse + "shift+XF86AudioRaiseVolume" = "exec --no-startup-id playerctl volume 0.1+"; + "shift+XF86AudioLowerVolume" = "exec --no-startup-id playerctl volume 0.1-"; + "Control+XF86AudioRaiseVolume" = "exec --no-startup-id playerctl position 10+"; + "Control+XF86AudioLowerVolume" = "exec --no-startup-id playerctl position 10-"; + "XF86AudioNext" = "exec --no-startup-id playerctl next"; + "XF86AudioPlay" = "exec --no-startup-id playerctl play-pause"; + "XF86AudioPrev" = "exec --no-startup-id playerctl previous"; + + # PLAYERCTL for keyboard + "Mod1+minus" = "exec --no-startup-id playerctl volume 0.1-"; + "Mod1+plus" = "exec --no-startup-id playerctl volume 0.1+"; + "Mod1+bracketleft" = "exec --no-startup-id playerctl position 10-"; + "Mod1+bracketright" = "exec --no-startup-id playerctl position 10+"; + "Mod1+l" = "exec --no-startup-id playerctl previous"; + "Mod1+semicolon" = "exec --no-startup-id playerctl play-pause"; + "Mod1+apostrophe" = "exec --no-startup-id playerctl next"; + + # adjusting system mvolume + "XF86AudioRaiseVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10%"; + "XF86AudioLowerVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% "; + "XF86AudioMute" = "exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle"; + "XF86AudioMicMute" = "exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle"; + + }; + }; + + # disable stupid and ugly title bars + # and for some reason client.active doesnt change the colors... + extraConfig = '' + default_border pixel 4 + default_floating_border pixel 1 + client.focused #FAD000 #285577 #ffffff #FAD000 #FAD000 + client.focused_inactive #063340 #141414 #000000 #121212 #063340 + ''; + }; +} diff --git a/hosts/thinkpad/configs/kitty.nix b/hosts/thinkpad/configs/kitty.nix new file mode 100644 index 0000000..f77aa53 --- /dev/null +++ b/hosts/thinkpad/configs/kitty.nix @@ -0,0 +1,17 @@ +{ pkgs, user, ... }: +{ + + home-manager.users.${user}.programs.kitty = { + + enable = true; + font.name = "Jetbrains Mono Nerd font"; + + extraConfig = '' + enable_audio_bell no + window_alert_on_bell no + foreground #dddddd + background #191830 + ''; + + }; +} diff --git a/hosts/thinkpad/configs/logseq.nix b/hosts/thinkpad/configs/logseq.nix new file mode 100644 index 0000000..be8bc9f --- /dev/null +++ b/hosts/thinkpad/configs/logseq.nix @@ -0,0 +1,22 @@ +{ pkgs, user, ... }: +{ + # + home-manager.users.${user}.home.file.".logseq/config/plugins.edn" = { + enable = true; + text = '' + { + :logseq-journals-calendar {:version "v0.10.10", :repo "xyhp915/logseq-journals-calendar", :effect true, :theme false} + :logseq-bullet-threading {:version "v1.1.4", :repo "pengx17/logseq-plugin-bullet-threading", :effect true, :theme false} + :logseq-heatmap {:version "v2.4.3", :repo "pengx17/logseq-plugin-heatmap", :effect true, :theme false} + :logseq-copy-code-plugin {:version "v1.2.0", :repo "vyleung/logseq-copy-code-plugin", :effect true, :theme false} + :logseq-fenced-cope-plus {:version "0.0.9", :repo "xyhp915/logseq-fenced-code-plus", :effect true, :theme false} + :logseq-excalidraw {:version "v1.5.1", :repo "haydenull/logseq-plugin-excalidraw", :effect true, :theme false} + :logseq-vim-shortcuts {:version "v0.1.22", :repo "vipzhicheng/logseq-plugin-vim-shortcuts", :effect true, :theme false} + :logseq-banners-plugin {:version "v3.4.11", :repo "yoyurec/logseq-banners-plugin", :effect true, :theme false} + :logseq-plugin-automatic-url-title {:version "v1.1.0", :repo "0x7b1/logseq-plugin-automatic-url-title", :effect true, :theme false} + :logseq-bionic-speedreader {:version "1.0.1", :repo "sawhney17/logseq-bionic-speedreader", :effect true, :theme false} + :logseq-drawio-plugin {:version "v1.7.0", :repo "lee88688/logseq-drawio-plugin", :effect true, :theme false} + } + ''; + }; +} diff --git a/hosts/thinkpad/configs/neofetch.nix b/hosts/thinkpad/configs/neofetch.nix new file mode 100644 index 0000000..32cd950 --- /dev/null +++ b/hosts/thinkpad/configs/neofetch.nix @@ -0,0 +1,8 @@ +{ pkgs, user, ... }: +{ + + home-manager.users.${user}.home.file.".config/neofetch/config.conf" = { + enable = true; + source = ../opt/neofetch.conf; + }; +} diff --git a/hosts/thinkpad/configs/nvim.nix b/hosts/thinkpad/configs/nvim.nix new file mode 100644 index 0000000..7f20966 --- /dev/null +++ b/hosts/thinkpad/configs/nvim.nix @@ -0,0 +1,6 @@ +{ pkgs, inputs, ... }: { + + environment.systemPackages = with pkgs; [ + inputs.neo2005.packages.x86_64-linux.default + ]; +} diff --git a/hosts/thinkpad/configs/picom.nix b/hosts/thinkpad/configs/picom.nix new file mode 100755 index 0000000..624dbc2 --- /dev/null +++ b/hosts/thinkpad/configs/picom.nix @@ -0,0 +1,61 @@ +{ pkgs, user, ... }: +{ + + home-manager.users.${user}.services.picom = { + enable = true; + backend = "glx"; + vSync = false; # disable vsync to reduce input delay + extraArgs = [ + "-b" + "--experimental-backends" + ]; # enable deamon mode and experimental backends for blur + + settings = { + + # Blurring + blur-method = "dual_kawase"; + blur-size = 12; + blur-strength = 9; + blur-background = true; + blur-kern = "3x3box"; + + blur-background-exclude = [ + "window_type = 'dock'" + "window_type = 'desktop'" + "_GTK_FRAME_EXTENTS@:c" + "class_g ~= 'slop'" + "class_g ~= 'Peek'" + ]; + + opacity-rule = [ + "80:class_g *= 'st'" + "80:class_g *= 'kitty'" + "80:class_g *= 'alacritty'" + "80:class_g *= 'Alacritty'" + "90:class_g *= 'jamesdsp'" + "90:class_g *= 'polybar'" + "80:class_g *= 'codium'" + "80:class_g *= 'code'" + "80:class_g *= 'Code'" + "80:class_g *= 'Rofi'" + "80:class_g *= 'lutris'" + "80:class_g *= 'Mumble'" + "80:class_g *= 'Feishin'" + "80:class_g *= 'feishin'" + "80:class_g *= 'Element'" + "85:class_g *= 'Logseq'" + "85:class_g *= 'Codium'" + ]; + + # rounding + corner-radius = 15; + round-borders = 1; + use-damage = false; + + inactive-opacity = 1.0; + frame-opacity = 1.0; + inactive-opacity-override = false; + + }; + }; +} diff --git a/hosts/thinkpad/configs/polybar.nix b/hosts/thinkpad/configs/polybar.nix new file mode 100644 index 0000000..a76bcf7 --- /dev/null +++ b/hosts/thinkpad/configs/polybar.nix @@ -0,0 +1,28 @@ +{ + pkgs, + user, + dotfilepath, + ... +}: +let + script = "${dotfilepath}/scripts"; +in +{ + + imports = [ + ./polybar/bottom.nix + ./polybar/top.nix + ]; + + home-manager.users.${user}.services.polybar = { + enable = true; + script = "${script}/polybar.sh"; + + config = { + "global/wm" = { + override-redirect = false; + }; + }; + + }; +} diff --git a/hosts/thinkpad/configs/polybar/bottom.nix b/hosts/thinkpad/configs/polybar/bottom.nix new file mode 100644 index 0000000..fcdd5fc --- /dev/null +++ b/hosts/thinkpad/configs/polybar/bottom.nix @@ -0,0 +1,125 @@ +{ pkgs, ... }: +let + # todo add this to flake.nix + colors = { + fg = "#FFFFFF"; + bg = "#191830"; + border = "#F72585"; + warn = "#f00"; + altfg = "#F72585"; + + invisible = "#00400080"; + + currentWorkspace = "#FAD000"; + seperatorColor = "#FAD000"; + }; + + script = "~/dotfiles/scripts"; +in +{ + + home-manager.users.grape.services.polybar = { + + config = { + + "module/cava" = { + type = "custom/script"; + tail = "true"; + exec = "${script}/cava.sh"; + format = "%{T2}%{F${colors.bg}}%{F-}%{T-}