commit 8065685ccbdbb8aca96f4ef49311244b930f52ad Author: zulumann Date: Wed Apr 30 20:47:57 2025 +0200 2025.04.30-20:50 diff --git a/nixos_24.11_cinnamon/NixOS_Install.sh b/nixos_24.11_cinnamon/NixOS_Install.sh new file mode 100644 index 0000000..89d1811 --- /dev/null +++ b/nixos_24.11_cinnamon/NixOS_Install.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash +# +################################################################################ +# +# +# post-installation script for NixOS +# +# +# +################################################################################ +# +while : +do +clear +echo "" +echo "\033[1m I N S T A L L NixOS" +echo " --------------------------" +echo "\033[0m" +echo " 01.Copy over configs" +echo " 02.Rebuld System" +echo " 03.Upgrade System" +echo " 04.Cleanup System" +echo "" +echo " x. Exit" +echo "" +echo -n " Please enter option [01 - 05]" +read opt +case $opt in +################################################################################## +01) echo "************ Copy over configs **********************"; +################################################################################## +sudo cp /etc/nixos /etc/bak.nixos +sudo cp -vf *.nix /etc/nixos/ +sudo cp -vrf home /etc/nixos/ +sudo cp -vrf config /etc/nixos/ +sudo chown -R root:root /etc/nixos/ +;; + +################################################################################## +02) echo "************ Rebuld System ****************"; +################################################################################## +sudo nixos-rebuild switsh +;; + +################################################################################## +03) echo "************ Upgrade System *****************"; +################################################################################## +sudo nixos-rebuild switsh --upgrade +;; + +################################################################################## +04) echo "************ Cleanup System ******************"; +################################################################################## +nix-collect-garbage -d && sudo nix-collect-garbage -d +;; + +x) echo ""; +exit 1;; +*) echo " Press [enter] key to continue. . ."; +read enterKey;; +esac +done \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/appimage.nix b/nixos_24.11_cinnamon/config/appimage.nix new file mode 100644 index 0000000..fcf6463 --- /dev/null +++ b/nixos_24.11_cinnamon/config/appimage.nix @@ -0,0 +1,16 @@ +{ config, pkgs, ... }: + +{ + boot.binfmt = { + registrations.appimage = { + wrapInterpreterInShell = false; + interpreter = "${pkgs.appimage-run}/bin/appimage-run"; + recognitionType = "magic"; + offset = 0; + mask = "\\xff\\xff\\xff\\xff\\x00\\x00\\x00\\x00\\xff\\xff\\xff"; + magicOrExtension = "\\x7fELF....AI\\x02"; + }; + # run aarch64 binaries + emulatedSystems = [ "aarch64-linux" ]; + }; +} \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/default.nix b/nixos_24.11_cinnamon/config/default.nix new file mode 100644 index 0000000..0485eb9 --- /dev/null +++ b/nixos_24.11_cinnamon/config/default.nix @@ -0,0 +1,27 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ./tweaks + ./appimage.nix + ./desktop-cinnamon.nix + ./distrobox.nix + ./firefox.nix + ./flatpak.nix + ./fonts.nix + ./gpu-amd.nix + #./gpu-intel.nix + ./kvm.nix + #./laptop.nix + ./mpd.nix + ./nix-ld.nix + ./pkgs-cli.nix + ./pkgs-extra.nix + ./printer.nix + ./samba.nix + #./samba-nas.nix + ./samba-srv.nix + ./steam.nix + ./syncthing.nix + ]; +} diff --git a/nixos_24.11_cinnamon/config/desktop-cinnamon.nix b/nixos_24.11_cinnamon/config/desktop-cinnamon.nix new file mode 100644 index 0000000..93c11af --- /dev/null +++ b/nixos_24.11_cinnamon/config/desktop-cinnamon.nix @@ -0,0 +1,100 @@ +{ config, pkgs, ... }: + +{ + + services = { + # Enable the X11 windowing system + xserver = { + enable = true; + xkb.layout = "de"; + xkb.variant = ""; + xkb.options = "eurosign:e"; + exportConfiguration = true; + enableCtrlAltBackspace = true; + wacom.enable = true; + + # Enable Lightdm + displayManager = { + lightdm.enable = true; + lightdm.background = /etc/nixos/config/home/wallpaper/wallpaper05.jpg; + lightdm.greeters.slick.theme.name = "Arc-Dark"; + lightdm.greeters.slick.iconTheme.name = "Papirus-Dark"; + lightdm.greeters.slick.cursorTheme.name = "Numix-Cursor"; + lightdm.greeters.slick.extraConfig = "activate-numlock=true"; + }; + + # Enable the Cinnamon Desktop Environment + desktopManager = { + xterm.enable = false; + cinnamon.enable = true; + }; + }; + + displayManager.defaultSession = "cinnamon"; + #bamf.enable = true; + libinput.enable = false; + }; + + # Enable Programs + programs = { + dconf.enable = true; + geary.enable = false; + }; + + # Enable xdg portal + xdg.portal = { + enable = true; + extraPortals = [ pkgs.xdg-desktop-portal-xapp ]; + }; + + # Environment variables + environment.variables = { + EDITOR = "nano"; + BROWSER = "firefox"; + QT_QPA_PLATFORM = "xcb"; + #QT_QPA_PLATFORMTHEME = lib.mkForce "qt5ct"; + }; + + environment.sessionVariables = rec { + XDG_CACHE_HOME = "$HOME/.cache"; + XDG_CONFIG_HOME = "$HOME/.config"; + XDG_DATA_HOME = "$HOME/.local/share"; + XDG_STATE_HOME = "$HOME/.local/state"; + XDG_BIN_HOME = "$HOME/.local/bin"; + PATH = [ + "${XDG_BIN_HOME}" + ]; + }; + + environment.systemPackages = with pkgs; [ + nemo-emblems + nemo-with-extensions + nemo-fileroller + nemo-python + bulky + file-roller + gnome-system-monitor + gnome-disk-utility + plank + numlockx + ]; + + environment.cinnamon.excludePackages = with pkgs; [ + onboard + hexchat + xterm + ]; + + networking.firewall = { + allowedTCPPorts = [ + 42000 # Warpinator used for transfer + 42001 # Warpinator authentication port + ]; + + allowedUDPPorts = [ + 42000 # Warpinator used for transfer + 42001 # Warpinator authentication port + ]; + }; + +} diff --git a/nixos_24.11_cinnamon/config/distrobox.nix b/nixos_24.11_cinnamon/config/distrobox.nix new file mode 100644 index 0000000..41bb00c --- /dev/null +++ b/nixos_24.11_cinnamon/config/distrobox.nix @@ -0,0 +1,13 @@ +{ config, pkgs, ... }: + +{ + + virtualisation.docker.enable = true; + users.users.zulumann.extraGroups = [ "docker" ]; + + environment.systemPackages = with pkgs; [ + distrobox # Wrapper around podman or docker to create and start containers + boxbuddy # An unofficial GUI for managing your Distroboxes + ]; + +} \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/firefox.nix b/nixos_24.11_cinnamon/config/firefox.nix new file mode 100644 index 0000000..bc4b279 --- /dev/null +++ b/nixos_24.11_cinnamon/config/firefox.nix @@ -0,0 +1,196 @@ +{ config, pkgs, ... }: + +{ + programs.firefox = { + enable = true; + languagePacks = [ "de" ]; + preferences = { + "extensions.pocket.enabled" = false; + "extensions.screenshots.disabled" = false; + "browser.topsites.contile.enabled" = false; + "browser.formfill.enable" = false; + "browser.search.suggest.enabled" = false; + "browser.search.suggest.enabled.private" = false; + "browser.urlbar.suggest.searches" = false; + "browser.urlbar.showSearchSuggestionsFirst" = false; + "browser.newtabpage.activity-stream.feeds.section.topstories" = false; + "browser.newtabpage.activity-stream.feeds.snippets" = false; + "browser.newtabpage.activity-stream.section.highlights.includePocket" = false; + "browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = false; + "browser.newtabpage.activity-stream.section.highlights.includeDownloads" = false; + "browser.newtabpage.activity-stream.section.highlights.includeVisited" = false; + "browser.newtabpage.activity-stream.showSponsored" = false; + "browser.newtabpage.activity-stream.system.showSponsored" = false; + "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; + }; + + policies = { + CaptivePortal = false; + DisableFirefoxAccounts = false; + DisableAccounts = false; + DisableFirefoxScreenshots = true; + DisableTelemetry = true; + DisableFirefoxStudies = true; + DisablePocket = true; + DontCheckDefaultBrowser = true; + PasswordManagerEnabled = false; + OverrideFirstRunPage = ""; + OverridePostUpdatePage = ""; + DisplayBookmarksToolbar = "always"; # alternatives: "always" or "newtab" + DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on" + SearchBar = "separate"; # alternative: "unified" + + EnableTrackingProtection = { + Value= true; + Locked = true; + Cryptomining = true; + Fingerprinting = true; + }; + + FirefoxHome = { + Highlights = false; + Pocket = false; + Search = true; + Snippets = false; + TopSites = false; + }; + + settings = { + "browser.download.panel.shown" = true; + "dom.security.https_only_mode" = true; + "general.smoothScroll" = true; + "gfx.webrender.enabled" = true; + "layout.css.backdrop-filter.enabled" = true; + "media.videocontrols.picture-in-picture.video-toggle.enabled" = false; + "signon.rememberSignons" = false; + "svg.context-properties.content.enabled" = true; + + # We handle this elsewhere + "browser.shell.checkDefaultBrowser" = false; + + # Don't allow websites to prevent use of right-click, or otherwise + # messing with the context menu. + "dom.event.contextmenu.enabled" = true; + + # Don't allow websites to prevent copy and paste. Disable + # notifications of copy, paste, or cut functions. Stop webpage + # knowing which part of the page had been selected. + "dom.event.clipboardevents.enabled" = true; + + # Do not track from battery status. + "dom.battery.enabled" = false; + + # Show punycode. Help protect from character 'spoofing'. + "network.IDN_show_punycode" = true; + + # Disable site reading installed plugins. + "plugins.enumerable_names" = ""; + + # Use Mozilla instead of Google here. + "geo.provider.network.url" = + "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"; + + # Safe browsing + "browser.safebrowsing.enabled" = false; + "browser.safebrowsing.phishing.enabled" = false; + "browser.safebrowsing.malware.enabled" = false; + "browser.safebrowsing.downloads.enabled" = false; + "browser.safebrowsing.provider.google4.updateURL" = ""; + "browser.safebrowsing.provider.google4.reportURL" = ""; + "browser.safebrowsing.provider.google4.reportPhishMistakeURL" = ""; + "browser.safebrowsing.provider.google4.reportMalwareMistakeURL" = ""; + "browser.safebrowsing.provider.google4.lists" = ""; + "browser.safebrowsing.provider.google4.gethashURL" = ""; + "browser.safebrowsing.provider.google4.dataSharingURL" = ""; + "browser.safebrowsing.provider.google4.dataSharing.enabled" = false; + "browser.safebrowsing.provider.google4.advisoryURL" = ""; + "browser.safebrowsing.provider.google4.advisoryName" = ""; + "browser.safebrowsing.provider.google.updateURL" = ""; + "browser.safebrowsing.provider.google.reportURL" = ""; + "browser.safebrowsing.provider.google.reportPhishMistakeURL" = ""; + "browser.safebrowsing.provider.google.reportMalwareMistakeURL" = ""; + "browser.safebrowsing.provider.google.pver" = ""; + "browser.safebrowsing.provider.google.lists" = ""; + "browser.safebrowsing.provider.google.gethashURL" = ""; + "browser.safebrowsing.provider.google.advisoryURL" = ""; + "browser.safebrowsing.downloads.remote.url" = ""; + + # Don't call home on new tabs + "browser.selfsupport.url" = ""; + "browser.aboutHomeSnippets.updateUrL" = ""; + "browser.startup.homepage_override.mstone" = "ignore"; + "browser.startup.homepage_override.buildID" = ""; + "startup.homepage_welcome_url" = ""; + "startup.homepage_welcome_url.additional" = ""; + "startup.homepage_override_url" = ""; + + # Firefox experiments... + "experiments.activeExperiment" = false; + "experiments.enabled" = false; + "experiments.supported" = false; + "extensions.pocket.enabled" = false; + "identity.fxaccounts.enabled" = false; + + # Privacy + "privacy.donottrackheader.enabled" = true; + "privacy.donottrackheader.value" = 1; + "privacy.trackingprotection.enabled" = true; + "privacy.trackingprotection.socialtracking.enabled" = true; + "privacy.firstparty.isolate" = true; + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + "toolkit.telemetry.enabled" = false; + "toolkit.telemetry.unified" = false; + "toolkit.telemetry.archive.enabled" = false; + "browser.toolbars.bookmarks.visibility" = "never"; + + # Cookies + "network.cookie.cookieBehavior" = 1; + + # Perf + "gfx.webrender.all" = true; + "media.ffmpeg.vaapi.enabled" = true; + "media.ffvpx.enabled" = false; + "media.rdd-vpx.enabled" = false; + "gfx.webrender.compositor.force-enabled" = true; + "media.navigator.mediadatadecoder_vpx_enabled" = true; + "webgl.force-enabled" = true; + "layers.acceleration.force-enabled" = true; + "layers.offmainthreadcomposition.enabled" = true; + "layers.offmainthreadcomposition.async-animations" = true; + "layers.async-video.enabled" = true; + "html5.offmainthread" = true; + }; + }; + }; + + programs.firefox.policies = { + ExtensionSettings = with builtins; + let extension = shortId: uuid: { + name = uuid; + value = { + install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi"; + installation_mode = "normal_installed"; + }; + }; + in listToAttrs [ + (extension "torrent-to-web" "torrent-to-web@dasprids.de") + (extension "Cookie-AutoDelete" "CookieAutoDelete@kennydo.com") + (extension "ublock-origin" "uBlock0@raymondhill.net") + (extension "bitwarden-password-manager" "{446900e4-71c2-419f-a6a7-df9c091e268b}") + (extension "no-gender" "{f0bb47a1-a5b1-4a4c-80fb-556d6a60e45c}") + (extension "get-rss-feed-url" "{15bdb1ce-fa9d-4a00-b859-66c214263ac0}") + (extension "freshrss-watcher" "{8276b2b6-a974-4254-8647-79c691694b10}") + (extension "bookmarked-speed-dial" "{83a9ecbd-0360-4fee-8822-233ed92cf930}") + (extension "i-still-don't-care-about-cookies" "idcac-pub@guus.ninja") + #(extension "joplin-web-clipper" "{8419486a-54e9-11e8-9401-ac9e17909436}") + #(extension "umatrix" "uMatrix@raymondhill.net") + #(extension "libredirect" "7esoorv3@alefvanoon.anonaddy.me") + #(extension "clearurls" "{74145f27-f039-47ce-a470-a662b129930a}") + ]; + # To add additional extensions, find it on addons.mozilla.org, find + # the short ID in the url (like https://addons.mozilla.org/en-US/firefox/addon/!SHORT_ID!/) + # Then, download the XPI by filling it in to the install_url template, unzip it, + # run `jq .browser_specific_settings.gecko.id manifest.json` or + # `jq .applications.gecko.id manifest.json` to get the UUID + }; +} \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/flatpak.nix b/nixos_24.11_cinnamon/config/flatpak.nix new file mode 100644 index 0000000..6eeaaf6 --- /dev/null +++ b/nixos_24.11_cinnamon/config/flatpak.nix @@ -0,0 +1,14 @@ +{ config, pkgs, ... }: + +{ + + services.flatpak.enable = true; + + systemd.services.flatpak-repo = { + wantedBy = [ "multi-user.target" ]; + path = [ pkgs.flatpak ]; + script = '' + flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo + ''; + }; +} \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/fonts.nix b/nixos_24.11_cinnamon/config/fonts.nix new file mode 100644 index 0000000..be64652 --- /dev/null +++ b/nixos_24.11_cinnamon/config/fonts.nix @@ -0,0 +1,16 @@ +{ config, pkgs, ... }: + + # Enable Fonts + fonts = { + fontDir.enable = true; + enableGhostscriptFonts = true; + packages = with pkgs; [ + corefonts + terminus_font + ubuntu_font_family + liberation_ttf + dejavu_fonts + ]; + }; + +} \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/gpu-amd.nix b/nixos_24.11_cinnamon/config/gpu-amd.nix new file mode 100644 index 0000000..f6e7118 --- /dev/null +++ b/nixos_24.11_cinnamon/config/gpu-amd.nix @@ -0,0 +1,42 @@ +{ config, pkgs, ... }: + +{ + + boot.initrd.kernelModules = [ "amdgpu" ]; + + # Enable amdgpu + services.xserver = { + videoDrivers = [ "amdgpu" ]; + deviceSection = ''Option "TearFree" "true"''; + }; + + hardware.graphics = { + enable = true; + enable32Bit = true; + }; + + # Enable AMDVLK and OpenCL + hardware.graphics.extraPackages = with pkgs; [ + amdvlk + rocmPackages.clr.icd + ]; + + hardware.graphics.extraPackages32 = with pkgs; [ + driversi686Linux.amdvlk + ]; + + environment.systemPackages = with pkgs; [ + lact # Linux AMDGPU Controller + hwdata # Hardware Database, including Monitors, pci.ids, usb.ids, and video cards + libdrm + vulkan-loader + vulkan-tools + vkbasalt + radeontop + xorg.xf86videoamdgpu + ]; + + systemd.packages = with pkgs; [ lact ]; + systemd.services.lactd.wantedBy = ["multi-user.target"]; + +} \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/gpu-intel.nix b/nixos_24.11_cinnamon/config/gpu-intel.nix new file mode 100755 index 0000000..d6ccc38 --- /dev/null +++ b/nixos_24.11_cinnamon/config/gpu-intel.nix @@ -0,0 +1,27 @@ +{ config, pkgs, ... }: + +{ + + boot.initrd.kernelModules = [ "i915" ]; + + # Enable framebuffer compression (FBC) + boot.kernelParams = [ "i915.enable_fbc=1" ]; + + # Enable OpenGL drivers + hardware.graphics = { + enable = true; + extraPackages = with pkgs; [ + intel-media-driver # LIBVA_DRIVER_NAME=iHD + vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) + vaapiVdpau + libvdpau-va-gl + ]; + }; + + # Enables Bluetooth + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + }; + +} \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/home/default.nix b/nixos_24.11_cinnamon/config/home/default.nix new file mode 100644 index 0000000..4fa3288 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/default.nix @@ -0,0 +1,14 @@ +{ pkgs, config, ... }: + +{ + imports = [ + # Enable &/ Configure Programs + ./config-rsync.nix + ./config-ssh.nix + ./profile-sync-daemon.nix + + # Place Home Files Like Pictures + #./files.nix + ]; + +} diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/compare-save-for-later.nemo_action b/nixos_24.11_cinnamon/config/home/nemo_actions/compare-save-for-later.nemo_action new file mode 100644 index 0000000..c09a169 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/compare-save-for-later.nemo_action @@ -0,0 +1,9 @@ +[Nemo Action] +Active=true +Name=Compare later +Name[de]=Speichere Datei für späteren Vergleich +Comment=Save file for comparison later. +Exec= +Icon-Name=meld +Selection=S +Extensions=any diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/compare-with-saved.nemo_action b/nixos_24.11_cinnamon/config/home/nemo_actions/compare-with-saved.nemo_action new file mode 100644 index 0000000..85220b0 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/compare-with-saved.nemo_action @@ -0,0 +1,9 @@ +[Nemo Action] +Active=true +Name=Compare with saved element +Name[de]=Vergleiche Datei mit gespeicherten Element +Comment=Compare %F saved file or directory. +Exec= +Icon-Name=meld +Selection=S +Extensions=any diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/compare.sh b/nixos_24.11_cinnamon/config/home/nemo_actions/compare.sh new file mode 100755 index 0000000..c14b031 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/compare.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +savedfile=/var/tmp/compare-save-for-later.$USER +comparator=meld +if [ "$1" == "save" ]; then + shift + echo "$*" > "$savedfile" +elif [ "$1" == "compare" ]; then + shift + "$comparator" "$*" "$(cat $savedfile)" +fi diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/deja-dup_previous_version.nemo_action b/nixos_24.11_cinnamon/config/home/nemo_actions/deja-dup_previous_version.nemo_action new file mode 100644 index 0000000..dc65bb3 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/deja-dup_previous_version.nemo_action @@ -0,0 +1,8 @@ +[Nemo Action] +Active=true +Name=Frühere Version... +Comment=Frühere Version wiederherstellen +Exec=/nix/store/gvqrq3k7ng060c4rbw1clx2xf4xpnqq7-system-path/bin/deja-dup --restore '%U' +Icon-Name=deja-dup +Selection=S +Extensions=any; diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/deja-dup_restore_missing.nemo_action b/nixos_24.11_cinnamon/config/home/nemo_actions/deja-dup_restore_missing.nemo_action new file mode 100644 index 0000000..e68e6cc --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/deja-dup_restore_missing.nemo_action @@ -0,0 +1,8 @@ +[Nemo Action] +Active=true +Name=Fehlende Daten Wiederherstellen... +Comment=Prüfe auf fehlende Dateien oder Verzeichnisse +Exec=/nix/store/gvqrq3k7ng060c4rbw1clx2xf4xpnqq7-system-path/bin/deja-dup --restore-missing '%F' +Icon-Name=deja-dup +Selection=none +Extensions=any; diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage.nemo_action b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage.nemo_action new file mode 100644 index 0000000..7647d6b --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage.nemo_action @@ -0,0 +1,23 @@ +[Nemo Action] +Name=GNOME System Monitor +Name[bg_BG]=Наблюдение на системата +Name[cs]=Sledování systému GNOME +Name[da]=GNOME Systemovervågning +Name[es]=Monitor del sistema GNOME +Name[fi]=Järjestelmän valvonta +Name[fr]=Moniteur système (Gnome System Monitor) +Name[hr]=GNOME nadgledatelj sustava +Name[hu]=GNOME Rendszerfigyelő +Name[it]=Monitor di sistema di GNOME +Name[nl]=GNOME Systeemmonitor +Name[pt]=Monitor de sistemas GNOME +Name[pt_BR]=Monitor do sistema GNOME +Name[ru]=Системный Монитор GNOME +Name[sv]=GNOME Systemövervakare +Name[tr]=GNOME Sistem Monitörü +Name[zh]=GNOME系统监视器 +Exec=gnome-system-monitor +Icon-Name=org.gnome.SystemMonitor-symbolic +Selection=None +Extensions=any; +Conditions=desktop; diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/icon.png b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/icon.png new file mode 100755 index 0000000..fdfeb38 Binary files /dev/null and b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/icon.png differ diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/metadata.json b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/metadata.json new file mode 100755 index 0000000..5e37e3b --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/metadata.json @@ -0,0 +1,8 @@ +{ + "description": "Open GNOME System Monitor with a right-click on the desktop", + "uuid": "gnome-system-monitor@100savage", + "name": "GNOME System Monitor", + "author": "100savage", + "version": "1.0", + "last-edited": 1716054950 +} \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/bg_BG.po b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/bg_BG.po new file mode 100755 index 0000000..c7a0657 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/bg_BG.po @@ -0,0 +1,27 @@ +# GNOME System Monitor +# Copyright (C) 2023 +# 100% Savage <136998211+100savage@users.noreply.github.com> +# +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-12 16:06-0500\n" +"PO-Revision-Date: \n" +"Last-Translator: Angel Ivanov \n" +"Language-Team: \n" +"Language: bg_BG\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 3.0.1\n" + +#. metadata.json->description +msgid "Open GNOME System Monitor with a right-click on the desktop" +msgstr "Отваря \"Наблюдение на системата\" от контекстното меню на Работния плот" + +#. metadata.json->name +#. Name +msgid "GNOME System Monitor" +msgstr "Наблюдение на системата" diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/cs.po b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/cs.po new file mode 100755 index 0000000..478165e --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/cs.po @@ -0,0 +1,27 @@ +# GNOME System Monitor +# Copyright (C) 2023 +# 100% Savage <136998211+100savage@users.noreply.github.com> +# +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-12 16:06-0500\n" +"PO-Revision-Date: \n" +"Last-Translator: Internet Addict \n" +"Language-Team: \n" +"Language: cs\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n>=2 && n<=4 ? 1 : 2);\n" +"X-Generator: Poedit 3.0.1\n" + +#. metadata.json->description +msgid "Open GNOME System Monitor with a right-click on the desktop" +msgstr "Otevřete Sledování systému GNOME kliknutím pravým tlačítkem myši na pracovní plochu" + +#. metadata.json->name +#. Name +msgid "GNOME System Monitor" +msgstr "Sledování systému GNOME" diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/da.po b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/da.po new file mode 100755 index 0000000..26faa7f --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/da.po @@ -0,0 +1,27 @@ +# GNOME System Monitor +# Copyright (C) 2023 +# 100% Savage <136998211+100savage@users.noreply.github.com> +# +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-12 16:06-0500\n" +"PO-Revision-Date: 2023-12-12 16:07-0500\n" +"Last-Translator: Alan Mortensen \n" +"Language-Team: \n" +"Language: da\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 3.0.1\n" + +#. metadata.json->description +msgid "Open GNOME System Monitor with a right-click on the desktop" +msgstr "Åbn GNOME Systemovervågning ved at højreklikke på skrivebordet" + +#. metadata.json->name +#. Name +msgid "GNOME System Monitor" +msgstr "GNOME Systemovervågning" diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/es.po b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/es.po new file mode 100755 index 0000000..e8c3bb3 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/es.po @@ -0,0 +1,26 @@ +# GNOME System Monitor +# Copyright (C) 2023 +# 100% Savage <136998211+100savage@users.noreply.github.com> +# +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-12 16:06-0500\n" +"PO-Revision-Date: 2023-12-12 16:07-0500\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.4\n" + +#. metadata.json->description +msgid "Open GNOME System Monitor with a right-click on the desktop" +msgstr "Abra el Monitor del Sistema GNOME con un clic derecho en el escritorio" + +#. metadata.json->name +#. Name +msgid "GNOME System Monitor" +msgstr "Monitor del sistema GNOME" diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/fi.po b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/fi.po new file mode 100755 index 0000000..567fdc6 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/fi.po @@ -0,0 +1,27 @@ +# GNOME System Monitor +# Copyright (C) 2023 +# 100% Savage <136998211+100savage@users.noreply.github.com> +# +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-12 16:06-0500\n" +"PO-Revision-Date: 2023-12-25 09:44+0200\n" +"Last-Translator: Kimmo Kujansuu \n" +"Language-Team: \n" +"Language: fi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.3\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. metadata.json->description +msgid "Open GNOME System Monitor with a right-click on the desktop" +msgstr "Järjestelmän valvonta auki painamalla työpöydällä hiiren painiketta" + +#. metadata.json->name +#. Name +msgid "GNOME System Monitor" +msgstr "Järjestelmän valvonta" diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/fr.po b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/fr.po new file mode 100755 index 0000000..d3e32cc --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/fr.po @@ -0,0 +1,27 @@ +# GNOME System Monitor +# Copyright (C) 2023 +# 100% Savage <136998211+100savage@users.noreply.github.com> +# +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-12 16:06-0500\n" +"PO-Revision-Date: 2023-12-12 16:07-0500\n" +"Last-Translator: Claudiux \n" +"Language-Team: \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 3.0.1\n" + +#. metadata.json->description +msgid "Open GNOME System Monitor with a right-click on the desktop" +msgstr "Ouvre le moniteur système de Gnome d'un clic-droit sur le bureau" + +#. metadata.json->name +#. Name +msgid "GNOME System Monitor" +msgstr "Moniteur système (Gnome System Monitor)" diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/gnome-system-monitor@100savage.pot b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/gnome-system-monitor@100savage.pot new file mode 100755 index 0000000..6abc366 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/gnome-system-monitor@100savage.pot @@ -0,0 +1,26 @@ +# GNOME System Monitor +# Copyright (C) 2023 +# 100% Savage <136998211+100savage@users.noreply.github.com> +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-12 16:06-0500\n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.4\n" + +#. metadata.json->description +msgid "Open GNOME System Monitor with a right-click on the desktop" +msgstr "" + +#. metadata.json->name +#. Name +msgid "GNOME System Monitor" +msgstr "" diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/hr.po b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/hr.po new file mode 100755 index 0000000..804f071 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/hr.po @@ -0,0 +1,27 @@ +# GNOME System Monitor +# Copyright (C) 2023 +# 100% Savage <136998211+100savage@users.noreply.github.com> +# +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-12 16:06-0500\n" +"PO-Revision-Date: \n" +"Last-Translator: Mikeyy\n" +"Language-Team: \n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" +"X-Generator: Poedit 3.0.1\n" + +#. metadata.json->description +msgid "Open GNOME System Monitor with a right-click on the desktop" +msgstr "Otvori GNOME nadgledatelja sustava s desnim klikom na radnu površinu" + +#. metadata.json->name +#. Name +msgid "GNOME System Monitor" +msgstr "GNOME nadgledatelj sustava " diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/hu.po b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/hu.po new file mode 100755 index 0000000..2d0193c --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/hu.po @@ -0,0 +1,26 @@ +# GNOME System Monitor +# Copyright (C) 2023 +# 100% Savage <136998211+100savage@users.noreply.github.com> +# +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-03 14:12-0500\n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: hu\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.0.1\n" + +#. metadata.json->description +msgid "Open GNOME System Monitor with a right-click on the desktop" +msgstr "Nyissa meg a GNOME Rendszerfigyelőt jobb egérgombbal az asztalra kattintva" + +#. metadata.json->name +#. Name +msgid "GNOME System Monitor" +msgstr "GNOME Rendszerfigyelő" diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/it.po b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/it.po new file mode 100755 index 0000000..1876922 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/it.po @@ -0,0 +1,29 @@ +# GNOME System Monitor +# Copyright (C) 2023 +# 100% Savage <136998211+100savage@users.noreply.github.com> +# +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-12 16:06-0500\n" +"PO-Revision-Date: 2023-12-12 16:07-0500\n" +"Last-Translator: Dragone2 \n" +"Language-Team: \n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 3.0.1\n" + +#. metadata.json->description +msgid "Open GNOME System Monitor with a right-click on the desktop" +msgstr "" +"Apri il Monitor di sistema di GNOME facendo clic con il pulsante destro del " +"mouse sul desktop" + +#. metadata.json->name +#. Name +msgid "GNOME System Monitor" +msgstr "Monitor di sistema di GNOME" diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/nl.po b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/nl.po new file mode 100755 index 0000000..28e25f2 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/nl.po @@ -0,0 +1,25 @@ +# GNOME System Monitor +# Copyright (C) 2023 +# 100% Savage <136998211+100savage@users.noreply.github.com> +# +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-12 16:06-0500\n" +"PO-Revision-Date: 2024-04-18 09:57+0200\n" +"Last-Translator: qadzek\n" +"Language-Team: \n" +"Language: nl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. metadata.json->description +msgid "Open GNOME System Monitor with a right-click on the desktop" +msgstr "Open GNOME Systeemmonitor met een rechtermuisklik op het bureaublad" + +#. metadata.json->name +#. Name +msgid "GNOME System Monitor" +msgstr "GNOME Systeemmonitor" diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/pt.po b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/pt.po new file mode 100755 index 0000000..c1cd15d --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/pt.po @@ -0,0 +1,26 @@ +# GNOME System Monitor +# Copyright (C) 2023 +# 100% Savage <136998211+100savage@users.noreply.github.com> +# +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-12 16:06-0500\n" +"PO-Revision-Date: 2023-12-18 23:14-0100\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.4\n" + +#. metadata.json->description +msgid "Open GNOME System Monitor with a right-click on the desktop" +msgstr "Abra o Monitor de Sistemas GNOME com um clique direito na área de trabalho" + +#. metadata.json->name +#. Name +msgid "GNOME System Monitor" +msgstr "Monitor de sistemas GNOME" diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/pt_BR.po b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/pt_BR.po new file mode 100755 index 0000000..506d0b4 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/pt_BR.po @@ -0,0 +1,27 @@ +# GNOME System Monitor +# Copyright (C) 2023 +# 100% Savage <136998211+100savage@users.noreply.github.com> +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-12 16:06-0500\n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.4.2\n" + +#. metadata.json->description +msgid "Open GNOME System Monitor with a right-click on the desktop" +msgstr "Abra o monitor de sistema GNOME com um clique no botão direito do mouse na área de trabalho" + +#. metadata.json->name +#. Name +msgid "GNOME System Monitor" +msgstr "Monitor do sistema GNOME" diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/ru.po b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/ru.po new file mode 100755 index 0000000..1c050fe --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/ru.po @@ -0,0 +1,26 @@ +# GNOME System Monitor +# Copyright (C) 2023 +# 100% Savage <136998211+100savage@users.noreply.github.com> +# +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-12 16:06-0500\n" +"PO-Revision-Date: 2023-12-12 16:07-0500\n" +"Last-Translator: blogdron\n" +"Language-Team: \n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.4.1\n" + +#. metadata.json->description +msgid "Open GNOME System Monitor with a right-click on the desktop" +msgstr "Запустить GNOME System Monitor из контекстного меню рабочего стола" + +#. metadata.json->name +#. Name +msgid "GNOME System Monitor" +msgstr "Системный Монитор GNOME" diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/sv.po b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/sv.po new file mode 100755 index 0000000..2e19a23 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/sv.po @@ -0,0 +1,28 @@ +# Swedish translation for gnome-system-monitor@100savage. +# Copyright (C) 2023 +# 100% Savage <136998211+100savage@users.noreply.github.com> +# Åke Engelbrektson , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-12 16:06-0500\n" +"PO-Revision-Date: \n" +"Last-Translator: Åke Engelbrektson \n" +"Language-Team: \n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.4.2\n" + +#. metadata.json->description +msgid "Open GNOME System Monitor with a right-click on the desktop" +msgstr "Öppna GNOME Systemövervakare med ett högerklick på skrivbordet" + +#. metadata.json->name +#. Name +msgid "GNOME System Monitor" +msgstr "GNOME Systemövervakare" diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/tr.po b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/tr.po new file mode 100755 index 0000000..68733e7 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/tr.po @@ -0,0 +1,27 @@ +# GNOME System Monitor +# Copyright (C) 2023 +# 100% Savage <136998211+100savage@users.noreply.github.com> +# +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-12 16:06-0500\n" +"PO-Revision-Date: \n" +"Last-Translator: Serkan ÖNDER \n" +"Language-Team: \n" +"Language: tr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 3.0.1\n" + +#. metadata.json->description +msgid "Open GNOME System Monitor with a right-click on the desktop" +msgstr "Masaüstüne sağ tıklayarak GNOME Sistem Monitörü'nü açın" + +#. metadata.json->name +#. Name +msgid "GNOME System Monitor" +msgstr "GNOME Sistem Monitörü" diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/zh.po b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/zh.po new file mode 100755 index 0000000..96f5a13 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/gnome-system-monitor@100savage/po/zh.po @@ -0,0 +1,27 @@ +# GNOME System Monitor +# Copyright (C) 2023 +# 100% Savage <136998211+100savage@users.noreply.github.com> +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-12-12 16:06-0500\n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: zh\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.4.2\n" + +#. metadata.json->description +msgid "Open GNOME System Monitor with a right-click on the desktop" +msgstr "在桌面上右键单击打开GNOME系统监视器" + +#. metadata.json->name +#. Name +msgid "GNOME System Monitor" +msgstr "GNOME系统监视器" diff --git a/nixos_24.11_cinnamon/config/home/nemo_actions/meld-diff.nemo_action b/nixos_24.11_cinnamon/config/home/nemo_actions/meld-diff.nemo_action new file mode 100755 index 0000000..804f33b --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_actions/meld-diff.nemo_action @@ -0,0 +1,25 @@ +[Nemo Action] + +Active=true + +Name=Compare with meld +Name[cz]=Srovnání s meld +Name[de]=Mit meld vergleichen +Name[fr]=Comparer avec meld +Name[nl]=Vergelijk met meld + +Comment=Show differences between files or directories +Comment[cz]=Ukázat rozdíly mezi souborama a složky +Comment[de]=Zeige Unterschiede zwischen Dateien oder Ordnern + +Exec=meld %F + +Icon-Name=meld + +Selection=m + +Extensions=any; + +Dependencies=meld; + +EscapeSpaces=true diff --git a/nixos_24.11_cinnamon/config/home/nemo_scripts/Folder/Chown.sh b/nixos_24.11_cinnamon/config/home/nemo_scripts/Folder/Chown.sh new file mode 100755 index 0000000..e864c66 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_scripts/Folder/Chown.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# Set IFS so that it won't consider spaces as entry separators. Without this, spaces in file/folder names can make the loop go wacky. +IFS=$'\n' + +# See if the Nautilus environment variable is empty +if [ -z $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS ]; then + # If it's blank, set it equal to $1 + NAUTILUS_SCRIPT_SELECTED_FILE_PATHS=$1 +fi + +# Loop through the list (from either Nautilus or the command line) +for ARCHIVE_FULLPATH in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS; do + NEWDIRNAME=${ARCHIVE_FULLPATH%.*} + FILENAME=${ARCHIVE_FULLPATH##*/} + NAME=${ARCHIVE_FULLPATH##*/.*} + + gnome-terminal -x sudo chown -R zulumann:zulumann "$ARCHIVE_FULLPATH" + notify-send -t 5000 -i /usr/share/icons/gnome/32x32/status/info.png "Chowning Of File(s)/Folder(s) Finished" +done diff --git a/nixos_24.11_cinnamon/config/home/nemo_scripts/Folder/Folder_new.sh b/nixos_24.11_cinnamon/config/home/nemo_scripts/Folder/Folder_new.sh new file mode 100755 index 0000000..597a15b --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_scripts/Folder/Folder_new.sh @@ -0,0 +1,305 @@ +#/bin/sh +############################################################ +# Dateien +############################################################ +mkdir -p Dateien +mkdir -p Dateien/eBooks-XXX +mkdir -p Dateien/eBooks +mkdir -p Dateien/eBooks/01_Neu +mkdir -p Dateien/eBooks/02_Handbuch +mkdir -p Dateien/eBooks/03_Linux +mkdir -p Dateien/eBooks/03_Linux/RaspberryPi +mkdir -p Dateien/eBooks/04_Linux-Zeitschriften +mkdir -p Dateien/eBooks/05_Computer +mkdir -p Dateien/eBooks/06_Computer-Zeitschriften +mkdir -p Dateien/eBooks/Biografie +mkdir -p Dateien/eBooks/Erotik +mkdir -p Dateien/eBooks/Finanzen +mkdir -p Dateien/eBooks/Fotografie +mkdir -p Dateien/eBooks/Fantasy-SciFi +mkdir -p Dateien/eBooks/Fotografie +mkdir -p Dateien/eBooks/Heimwerker +mkdir -p Dateien/eBooks/Heimwerker/Garten +mkdir -p Dateien/eBooks/Heimwerker/Heimwerker/Haus +mkdir -p Dateien/eBooks/Heimwerker/Heimwerker/Heizung +mkdir -p Dateien/eBooks/Heimwerker/Heimwerker/Photovoltaik +mkdir -p Dateien/eBooks/Historisch +mkdir -p Dateien/eBooks/Horror +mkdir -p Dateien/eBooks/Humor-Satire +mkdir -p Dateien/eBooks/Krimi-Thriller +mkdir -p Dateien/eBooks/Kochbücher +mkdir -p Dateien/eBooks/Kochbücher/Rezepte +mkdir -p Dateien/eBooks/Roman +mkdir -p Dateien/eBooks/Reiseführer +mkdir -p Dateien/eBooks/Medizin +mkdir -p Dateien/eBooks/Zeitschriften +mkdir -p Dateien/eBooks/Sachbuch-Fachbuch +mkdir -p Dateien/eBooks/Sachbuch-Fachbuch/Duden +mkdir -p Dateien/eBooks/Sachbuch-Fachbuch/Gesundkeit +mkdir -p Dateien/eBooks/Sachbuch-Fachbuch/Fuer_Dummies +mkdir -p Dateien/eBooks/Sachbuch-Fachbuch/Survival +mkdir -p Dateien/eBooks/Sachbuch-Fachbuch/Psychologie +mkdir -p Dateien/eBooks/Sachbuch-Fachbuch/Massage +mkdir -p Dateien/eBooks/Sachbuch-Fachbuch/Duden +mkdir -p Dateien/eBooks/Sachbuch-Fachbuch/Yoga + + +chmod -R 777 Dateien + +############################################################ +# GameLibrary +############################################################ +mkdir -p GameLibrary/Steam +mkdir -p GameLibrary/ConsoleGames/Apps +mkdir -p GameLibrary/ConsoleGames/Bios +mkdir -p GameLibrary/ConsoleGames/Atari2600 +mkdir -p GameLibrary/ConsoleGames/Commodore64 +mkdir -p GameLibrary/ConsoleGames/GameBoy +mkdir -p GameLibrary/ConsoleGames/GameBoyAdvanced +mkdir -p GameLibrary/ConsoleGames/GameBoyColour +mkdir -p GameLibrary/ConsoleGames/Sega32x +mkdir -p GameLibrary/ConsoleGames/SegaMegaDrive +mkdir -p GameLibrary/ConsoleGames/SegaCD +mkdir -p GameLibrary/ConsoleGames/SegaSaturn +mkdir -p GameLibrary/ConsoleGames/SNES +mkdir -p GameLibrary/ConsoleGames/SonyPS1 +mkdir -p GameLibrary/ConsoleGames/SonyPS2 +mkdir -p GameLibrary/ConsoleGames/SonyPSP +mkdir -p GameLibrary/ConsoleGames/Nintendo64 + +chmod -R 777 GameLibrary + +############################################################ +# Multimedia +############################################################ +mkdir -p Multimedia +mkdir -p Multimedia/Filme +mkdir -p Multimedia/Filme/Abenteuer,Action +mkdir -p Multimedia/Filme/Animation +mkdir -p Multimedia/Filme/Biografie +mkdir -p Multimedia/Filme/Drama +mkdir -p Multimedia/Filme/Familie +mkdir -p Multimedia/Filme/Fantasy +mkdir -p Multimedia/Filme/Erotik +mkdir -p Multimedia/Filme/Historie +mkdir -p Multimedia/Filme/Horror +mkdir -p Multimedia/Filme/Krimi +mkdir -p Multimedia/Filme/Komoedie +mkdir -p Multimedia/Filme/Kriegsfilm +mkdir -p Multimedia/Filme/SciFi +mkdir -p Multimedia/Filme/Thriller +mkdir -p Multimedia/Filme/Thriller,Horror +mkdir -p Multimedia/Filme/Western + +mkdir -p Multimedia/Musik +mkdir -p Multimedia/Musik/AcidJazz,Jazz +mkdir -p Multimedia/Musik/Blues +mkdir -p Multimedia/Musik/Blues-Rock +mkdir -p Multimedia/Musik/Chillout,Relax,Lounge +mkdir -p Multimedia/Musik/Classical +mkdir -p Multimedia/Musik/Country +mkdir -p Multimedia/Musik/Disco +mkdir -p Multimedia/Musik/Electronic +mkdir -p Multimedia/Musik/Fun +mkdir -p Multimedia/Musik/Funk,Soul,RnB +mkdir -p Multimedia/Musik/Heavy-Metal +mkdir -p Multimedia/Musik/Instrumental +mkdir -p Multimedia/Musik/NDH +mkdir -p Multimedia/Musik/NewAge +mkdir -p Multimedia/Musik/Other +mkdir -p Multimedia/Musik/POP +mkdir -p Multimedia/Musik/Punk +mkdir -p Multimedia/Musik/Reggae +mkdir -p Multimedia/Musik/Rock_Alternative +mkdir -p Multimedia/Musik/Rock_deutsch +mkdir -p Multimedia/Musik/Rock_Hard_Rock +mkdir -p Multimedia/Musik/Rock_Mittelalter +mkdir -p Multimedia/Musik/Rock_Progressive +mkdir -p Multimedia/Musik/Soundtrack +mkdir -p Multimedia/Musik/HipHop-RAP +mkdir -p Multimedia/Musik/Tracks +mkdir -p Multimedia/Musik/Rename + +mkdir -p Multimedia/Hoerbuecher +mkdir -p Multimedia/Hoerbuecher/Action-Abenteuer +mkdir -p Multimedia/Hoerbuecher/Comedy +mkdir -p Multimedia/Hoerbuecher/Doku-Menschen-Wissen +mkdir -p Multimedia/Hoerbuecher/Drama +mkdir -p Multimedia/Hoerbuecher/Fantasy +mkdir -p Multimedia/Hoerbuecher/Erotik +mkdir -p Multimedia/Hoerbuecher/Horror-Grusel +mkdir -p Multimedia/Hoerbuecher/Krimi-Thriller +mkdir -p Multimedia/Hoerbuecher/Ratgeber-Esoterik +mkdir -p Multimedia/Hoerbuecher/Romane +mkdir -p Multimedia/Hoerbuecher/Science-Fiction +mkdir -p Multimedia/Hoerbuecher/Sprachkurse + +mkdir -p Multimedia/Hoerspiele +mkdir -p Multimedia/Hoerspiele/Action-Abenteuer +mkdir -p Multimedia/Hoerspiele/Comedy +mkdir -p Multimedia/Hoerspiele/Doku-Menschen-Wissen +mkdir -p Multimedia/Hoerspiele/Drama +mkdir -p Multimedia/Hoerspiele/Erotik +mkdir -p Multimedia/Hoerspiele/Fantasy +mkdir -p Multimedia/Hoerspiele/Horror-Grusel +mkdir -p Multimedia/Hoerspiele/Krimi-Thriller +mkdir -p Multimedia/Hoerspiele/Romane +mkdir -p Multimedia/Hoerspiele/Romanze +mkdir -p Multimedia/Hoerspiele/Science-Fiction + +chmod -R 777 Multimedia + +############################################################ +# XXX +############################################################ +mkdir -p XXX +mkdir -p XXX/Clip +mkdir -p XXX/Clip/AllSex +mkdir -p XXX/Clip/AllSex/SinfulXXX +mkdir -p XXX/Clip/Amateur +mkdir -p XXX/Clip/Amateur/MatureNL +mkdir -p XXX/Clip/Anal +mkdir -p XXX/Clip/Anal/Anal_Vids +mkdir -p XXX/Clip/Anal/21EroticAnal +mkdir -p XXX/Clip/Anal/AnalMom +mkdir -p XXX/Clip/Anal/AssholeFever +mkdir -p XXX/Clip/Anal/Tushy +mkdir -p XXX/Clip/Asian +mkdir -p XXX/Clip/Asian/JapanHDV +mkdir -p XXX/Clip/BigCock +mkdir -p XXX/Clip/BigBooties +mkdir -p XXX/Clip/BigTits +mkdir -p XXX/Clip/BigTits/Aletta_Ocean_Live +mkdir -p XXX/Clip/BigTits/WifeysWorld +mkdir -p XXX/Clip/BigTits/DDF-Busty +mkdir -p XXX/Clip/BigTits/NF-Busty +mkdir -p XXX/Clip/BigTits/Porn-Mega-Load +mkdir -p XXX/Clip/Cartoon +mkdir -p XXX/Clip/CreamPie +mkdir -p XXX/Clip/Extrem +mkdir -p XXX/Clip/Extrem/Bruce_And_Morgan +mkdir -p XXX/Clip/Extrem/Feminized +mkdir -p XXX/Clip/Extrem/Fisting +mkdir -p XXX/Clip/Extrem/Horror-Porn +mkdir -p XXX/Clip/Extrem/Trans +mkdir -p XXX/Clip/Fetisch,BDSM,SM +mkdir -p XXX/Clip/Fetisch,BDSM,SM/Bondage +mkdir -p XXX/Clip/Fetisch,BDSM,SM/Feet +mkdir -p XXX/Clip/Fetisch,BDSM,SM/Femdom +mkdir -p XXX/Clip/Fetisch,BDSM,SM/Rubber +mkdir -p XXX/Clip/Fetisch,BDSM,SM/HuCows +mkdir -p XXX/Clip/Freaky-Fembots +mkdir -p XXX/Clip/GERMAN +mkdir -p XXX/Clip/Gloryholes +mkdir -p XXX/Clip/Guide +mkdir -p XXX/Clip/Hand-Blowjob +mkdir -p XXX/Clip/Hand-Blowjob/4KCFNM +mkdir -p XXX/Clip/Hand-Blowjob/Lady_Voyeurs +mkdir -p XXX/Clip/Hand-Blowjob/Edge_Queens +mkdir -p XXX/Clip/Hand-Blowjob/MYLKED +mkdir -p XXX/Clip/Hand-Blowjob/PureCFNM +mkdir -p XXX/Clip/Hand-Blowjob/Over40Handjobs +mkdir -p XXX/Clip/HandyPorn +mkdir -p XXX/Clip/Hentaied +mkdir -p XXX/Clip/Interracial +mkdir -p XXX/Clip/Lesbian +mkdir -p XXX/Clip/Latina +mkdir -p XXX/Clip/Massage +mkdir -p XXX/Clip/Massage/Hegre +mkdir -p XXX/Clip/Massage/MassageRooms +mkdir -p XXX/Clip/Massage/NuruMassage +mkdir -p XXX/Clip/Massage/ThaiPussyMassage +mkdir -p XXX/Clip/MILF +mkdir -p XXX/Clip/MILF/Aunt_Judys_XXX +mkdir -p XXX/Clip/MILF/GrandMams +mkdir -p XXX/Clip/MILF/Mature4K +mkdir -p XXX/Clip/MILF/MatureGapers +mkdir -p XXX/Clip/MyDirtyHobby +mkdir -p XXX/Clip/MyDirtyHobby/#Other# +mkdir -p XXX/Clip/Orgie,GangBang,Threesomes +mkdir -p XXX/Clip/Orgie,GangBang,Threesomes/DPFanatics +mkdir -p XXX/Clip/POV +mkdir -p XXX/Clip/Private +mkdir -p XXX/Clip/Private-Society +mkdir -p XXX/Clip/Stocking +mkdir -p XXX/Clip/Rimming +mkdir -p XXX/Clip/Solo+Masturbation+Toy +mkdir -p XXX/Clip/Solo+Masturbation+Toy/Extrem +mkdir -p XXX/Clip/Solo+Masturbation+Toy/Fucking-Machine +mkdir -p XXX/Clip/Solo+Masturbation+Toy/ManyVids +mkdir -p XXX/Clip/Squirting +mkdir -p XXX/Clip/Teen +mkdir -p XXX/Clip/Uniform + +mkdir -p XXX/Filme +mkdir -p XXX/Filme/AllSex +mkdir -p XXX/Filme/Amateur +mkdir -p XXX/Filme/Anal +mkdir -p XXX/Filme/Asian +mkdir -p XXX/Filme/BigBooties +mkdir -p XXX/Filme/BigTits +mkdir -p XXX/Filme/Cartoon +mkdir -p XXX/Filme/Extrem +mkdir -p XXX/Filme/Fetisch,BDSM,SM +mkdir -p XXX/Filme/GERMAN +mkdir -p XXX/Filme/Gloryholes +mkdir -p XXX/Filme/Guide +mkdir -p XXX/Filme/Hand-Blowjob +mkdir -p XXX/Filme/Interracial +mkdir -p XXX/Filme/Lesbian +mkdir -p XXX/Filme/Latina +mkdir -p XXX/Filme/Massage +mkdir -p XXX/Filme/MILF +mkdir -p XXX/Filme/Stocking +mkdir -p XXX/Filme/Orgie,GangBang,Threesomes +mkdir -p XXX/Filme/POV +mkdir -p XXX/Filme/Rimming +mkdir -p XXX/Filme/Solo+Masturbation+Toy +mkdir -p XXX/Filme/Squirting +mkdir -p XXX/Filme/Teen +mkdir -p XXX/Filme/Uniform + +chmod -R 777 XXX + +############################################################ +# Downloads +############################################################ +mkdir -p Downloads +mkdir -p Downloads/01_jDownloader +mkdir -p Downloads/02_Torrent +mkdir -p Downloads/03_Linux +mkdir -p Downloads/04_Windows +mkdir -p Downloads/05_eBooks +mkdir -p Downloads/06_Multimedia +mkdir -p Downloads/06_Multimedia/AudioBooks +mkdir -p Downloads/06_Multimedia/Filme +mkdir -p Downloads/06_Multimedia/Musik/ +mkdir -p Downloads/06_Multimedia/Musik/AcidJazz,Jazz +mkdir -p Downloads/06_Multimedia/Musik/Blues +mkdir -p Downloads/06_Multimedia/Musik/Blues-Rock +mkdir -p Downloads/06_Multimedia/Musik/Chillout,Relax,Lounge +mkdir -p Downloads/06_Multimedia/Musik/Classical +mkdir -p Downloads/06_Multimedia/Musik/Country +mkdir -p Downloads/06_Multimedia/Musik/Disco +mkdir -p Downloads/06_Multimedia/Musik/Electronic +mkdir -p Downloads/06_Multimedia/Musik/Fun +mkdir -p Downloads/06_Multimedia/Musik/Funk,Soul,RnB +mkdir -p Downloads/06_Multimedia/Musik/Heavy-Metal +mkdir -p Downloads/06_Multimedia/Musik/Instrumental +mkdir -p Downloads/06_Multimedia/Musik/NDH +mkdir -p Downloads/06_Multimedia/Musik/NewAge +mkdir -p Downloads/06_Multimedia/Musik/Other +mkdir -p Downloads/06_Multimedia/Musik/POP +mkdir -p Downloads/06_Multimedia/Musik/Punk +mkdir -p Downloads/06_Multimedia/Musik/Reggae +mkdir -p Downloads/06_Multimedia/Musik/Rock_Alternative +mkdir -p Downloads/06_Multimedia/Musik/Rock_deutsch +mkdir -p Downloads/06_Multimedia/Musik/Rock_Hard_Rock +mkdir -p Downloads/06_Multimedia/Musik/Rock_Mittelalter +mkdir -p Downloads/06_Multimedia/Musik/Rock_Progressive +mkdir -p Downloads/06_Multimedia/Musik/Soundtrack +mkdir -p Downloads/06_Multimedia/Musik/HipHop-RAP +mkdir -p Downloads/06_Multimedia/Musik/Tracks +mkdir -p Downloads/06_Multimedia/XXX + +chmod -R 777 Downloads diff --git a/nixos_24.11_cinnamon/config/home/nemo_scripts/Folder/Folder_zip.sh b/nixos_24.11_cinnamon/config/home/nemo_scripts/Folder/Folder_zip.sh new file mode 100755 index 0000000..0246769 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_scripts/Folder/Folder_zip.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +for i in */; do zip -r "${i%/}.zip" "$i"; done diff --git a/nixos_24.11_cinnamon/config/home/nemo_scripts/Folder/Unlock.sh b/nixos_24.11_cinnamon/config/home/nemo_scripts/Folder/Unlock.sh new file mode 100755 index 0000000..3cf38c4 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_scripts/Folder/Unlock.sh @@ -0,0 +1,3 @@ +#!/bin/bash +chmod -R 777 "$1" +chown -R $USER:$USER "$1" diff --git a/nixos_24.11_cinnamon/config/home/nemo_scripts/M3u/M3u_Playlist#01.sh b/nixos_24.11_cinnamon/config/home/nemo_scripts/M3u/M3u_Playlist#01.sh new file mode 100755 index 0000000..1bfa9b1 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_scripts/M3u/M3u_Playlist#01.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# bash script to create playlist files in music subdirectories +# +find . -type d | +while read subdir +do + + if [[ -f ./"$subdir"/"${subdir##*/}.m3u" ]] + then + echo "File "$subdir"/*.m3u already exists, skipping" + else + echo would build for $subdir + for filename in "$subdir"/* + do + if [ ${filename: -4} == ".mp3" ] || [ ${filename: -5} == ".flac" ] || [ ${filename: -5} == ".loss" ] || [ ${filename: -5} == ".aiff" ] || [ ${filename: -4} == ".aif" ] + then + echo "${filename##*/}" >> ./"$subdir"/"${subdir##*/}.m3u" + fi +done + fi +done diff --git a/nixos_24.11_cinnamon/config/home/nemo_scripts/M3u/M3u_Playlist#02.sh b/nixos_24.11_cinnamon/config/home/nemo_scripts/M3u/M3u_Playlist#02.sh new file mode 100755 index 0000000..1f8fca6 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_scripts/M3u/M3u_Playlist#02.sh @@ -0,0 +1,91 @@ +#!/usr/bin/env bash +# +# -------------------------------------------------------------------------------------------------- +# +# Create m3u8 playlists +# +# Created by @hasecilu +# Based on gists: "Eddy-Barraud/playlist-all.sh" and "scarlson/playlist.sh" +# +# -------------------------------------------------------------------------------------------------- + +v=1 # verbosity, 0/1 + +function playlists() { + # First argument is the mode (recursive, single) + # Second argument is the path of the directory + + cd "$2" || exit + [ "$v" -eq 1 ] && echo "${PWD##*/}" | figlet -f small | lolcat + + # Delete old m3u and m3u8 playlists + find . -type f -name "*.m3u*" -delete # If "-delete" didn't work use: "-exec rm {} \;" + + # Create new playlists + find ~+ -type d | sort | + while read -r subdir; do + for filename in "$subdir"/*; do + if [[ $filename =~ \.(acc|aif|aiff|flac|m4a|mp3|ogg|wav|wma)$ ]]; then + if [ "$1" == "-r" ]; then + echo "${filename##*/}" >>"$subdir/${subdir##*/}.m3u8" + [ "$v" -eq 1 ] && echo -e "${subdir##*/}.m3u8\t\t${filename##*/}" | lolcat + elif [ "$1" == "-s" ]; then + relative_path=${subdir#"$PWD"} # Remove common path + relative_path=${relative_path:1} # Remove leading '/' character + [ "$PWD" == "$subdir" ] && slash="" || slash="/" + echo "$relative_path$slash${filename##*/}" >>"$PWD/${PWD##*/}.m3u8" + [ "$v" -eq 1 ] && echo -e "${PWD##*/}.m3u8\t\t$relative_path$slash${filename##*/}" | lolcat + elif [ "$1" == "-cd" ]; then + album=$(dirname "$subdir") + # Join album and CD directory + album_cd=$(basename "$album")/$(basename "$subdir") + album_cd=${album_cd//\// } # Replace '/' for space ' ' + echo "${filename##*/}" >>"$subdir/$album_cd.m3u8" + [ "$v" -eq 1 ] && echo -e "$album_cd.m3u8\t\t${filename##*/}" | lolcat + fi + fi + done + done +} + +function default() { + # Create one playlist for every directory that has at least one audio file + playlists -r $HOME/Music + + # For specific directories that have several nested directories + # create a single playlist that includes all subdirectories + playlists -s $HOME/Music/VeryObscureGenre + + # For directory-albums that contains various CDs subdirectories + # create one playlist for every CD preserving the album name + playlists -cd $HOME/Music/Album +} + +function help() { + echo -e "\nDescription :" + echo -e "\tThis script creates music playlist(s) for a given directory." + echo -e "\nArguments :" + echo -e "\t-r recursively create playlists" + echo -e "\t-s create a single playlist" + echo -e "\t-cd recursively create playlists of a album directory that contains CDs as subdirectories" + echo -e "\t-h show help" +} + +# -------------------------------------------------------------------------------------------------- +# Main code + +if [ $# -eq 0 ]; then + default +elif [ $# -eq 2 ]; then + if [[ "$1" == "-r" ]]; then + playlists -r "$2" + elif [[ "$1" == "-s" ]]; then + playlists -s "$2" + elif [[ "$1" == "-cd" ]]; then + playlists -cd "$2" + else + help + fi +else + help +fi diff --git a/nixos_24.11_cinnamon/config/home/nemo_scripts/M3u/M3u_Playlist#03.sh b/nixos_24.11_cinnamon/config/home/nemo_scripts/M3u/M3u_Playlist#03.sh new file mode 100755 index 0000000..87f581c --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_scripts/M3u/M3u_Playlist#03.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +# +# bash script to create playlist files in music subdirectories +# +# Steve Carlson (stevengcarlson@gmail.com) + +find . -type d | +while read subdir +do + rm -f "$subdir"/*.m3u + for filename in "$subdir"/* + do + if [ ${filename: -4} == ".mp3" ] || [ ${filename: -5} == ".flac" ] || [ ${filename: -5} == ".loss" ] || [ ${filename: -5} == ".aiff" ] || [ ${filename: -4} == ".aif" ] + then + echo "${filename##*/}" >> ./"$subdir"/"${subdir##*/}.m3u" + fi + done + +done + diff --git a/nixos_24.11_cinnamon/config/home/nemo_scripts/M3u/M3u_multi_directory.sh b/nixos_24.11_cinnamon/config/home/nemo_scripts/M3u/M3u_multi_directory.sh new file mode 100755 index 0000000..b0af14d --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_scripts/M3u/M3u_multi_directory.sh @@ -0,0 +1,12 @@ +#!/bin/bash +touch ${PWD##*/}.m3u +export IFS=$'\n' +for i in $(find $1 -name "*.mp3" -type f) +do +echo "$i" |sed 's/..\(.*\)/\1/' >> ${PWD##*/}.m3u +done + +shuf ${PWD##*/}.m3u > ${PWD##*/}2.m3u +shuf ${PWD##*/}2.m3u > ${PWD##*/}.m3u +rm ${PWD##*/}2.m3u +exit 0 diff --git a/nixos_24.11_cinnamon/config/home/nemo_scripts/M3u/M3u_single_directory.sh b/nixos_24.11_cinnamon/config/home/nemo_scripts/M3u/M3u_single_directory.sh new file mode 100755 index 0000000..35ab8f0 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_scripts/M3u/M3u_single_directory.sh @@ -0,0 +1,3 @@ +#!/bin/bash +ls -d * | grep .mp3 > "${PWD##*/}.m3u" +exit 0 diff --git a/nixos_24.11_cinnamon/config/home/nemo_scripts/M3u_Playlist.sh b/nixos_24.11_cinnamon/config/home/nemo_scripts/M3u_Playlist.sh new file mode 100755 index 0000000..87f581c --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_scripts/M3u_Playlist.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +# +# bash script to create playlist files in music subdirectories +# +# Steve Carlson (stevengcarlson@gmail.com) + +find . -type d | +while read subdir +do + rm -f "$subdir"/*.m3u + for filename in "$subdir"/* + do + if [ ${filename: -4} == ".mp3" ] || [ ${filename: -5} == ".flac" ] || [ ${filename: -5} == ".loss" ] || [ ${filename: -5} == ".aiff" ] || [ ${filename: -4} == ".aif" ] + then + echo "${filename##*/}" >> ./"$subdir"/"${subdir##*/}.m3u" + fi + done + +done + diff --git a/nixos_24.11_cinnamon/config/home/nemo_scripts/Rename/Rename_Files.sh b/nixos_24.11_cinnamon/config/home/nemo_scripts/Rename/Rename_Files.sh new file mode 100755 index 0000000..27a9c6e --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_scripts/Rename/Rename_Files.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +# +rename 's/ä/ae/g' * +rename 's/Ä/Ae/g' * +rename 's/ö/oe/g' * +rename 's/Ö/Oe/g' * +rename 's/ü/ue/g' * +rename 's/Ü/Ue/g' * +rename 's/ß/ss/g' * +exit 0 diff --git a/nixos_24.11_cinnamon/config/home/nemo_scripts/Rename/Rename_MP3.sh b/nixos_24.11_cinnamon/config/home/nemo_scripts/Rename/Rename_MP3.sh new file mode 100755 index 0000000..61f8588 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_scripts/Rename/Rename_MP3.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# +rm *.url + +rename 's/ - / ./g' * + +rename 's/*.jpg/ folder.jpg/g' * +rename 's/cover.jpg/ folder.jpg/g' * +rename 's/Cover.jpg/ folder.jpg/g' * + + + +exit 0 + + +rename 'y/ /\_/' \* diff --git a/nixos_24.11_cinnamon/config/home/nemo_scripts/Rename/Rename_XXX.sh b/nixos_24.11_cinnamon/config/home/nemo_scripts/Rename/Rename_XXX.sh new file mode 100755 index 0000000..5636975 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_scripts/Rename/Rename_XXX.sh @@ -0,0 +1,169 @@ +#!/usr/bin/env bash +# +#Replace spaces in filenames with underscores +#rename 'y/./\_/' \* + + +# rename 's/txt /md/g' * + +#rename 's/./_/g' *.mp4 +#rename 's/ - / ./g' * +#rename 's/XXX.720p.HEVC.x265.PRT.mp4/ (720p).mp4/g' * +#rename 's/XXX.1080p.HEVC.x265.PRT.mp4/ (1080p).mp4/g' * + +rename 's/21EroticAnal/21 Erotic Anal/g' * +rename 's/AuntJudysXXX/Aunt Judys XXX/g' * +rename 's/AfricanCasting/African Casting/g' * +rename 's/AnalVids/Anal Vids/g' * +rename 's/AlettaOcean/Aletta Ocean/g' * +rename 's/AllGirlMassage/All Girl Massage /g' * +rename 's/Aletta OceanLive/Aletta Ocean Live/g' * + +rename 's/Brazzersexxtra/Brazzers Exxtra/g' * +rename 's/BrazzersExxtra/Brazzers Exxtra/g' * +rename 's/BigWetButts/Big Wet Butts/g' * +rename 's/BigNaturals/Big Naturals/g' * +rename 's/BigCockBully/Big Cock Bully/g' * +rename 's/BadMilfs/Bad Milfs/g' * +rename 's/BrownBunnies/Brown Bunnies/g' * + +rename 's/DaneJones/Dane Jones/g' * +rename 's/DigitalPlayground/Digital Playground/g' * +rename 's/DirtyWivesClub/Dirty Wives Club/g' * + +rename 's/EdgeQueens/Edge Queens/g' * +rename 's/ErotiqueTVLive/Erotique TV Live/g' * +rename 's/EvilAngel/Evil Angel/g' * + +rename 's/FrolicMe/Frolic Me/g' * +rename 's/FakehubOriginals/Fake Hub Originals/g' * +rename 's/FemdomEmpire/Femdom Empire/g' * +rename 's/FirstAnalQuest/First Anal Quest/g' * +rename 's/FamilyScrew/Family Screw/g' * +rename 's/FirstAnalQuesty/First Anal Quest/g' * +rename 's/FinishHim/Finish Him/g' * + +rename 's/GotMylf/Got Mylf /g' * +rename 's/GirlsRimming/Girls Rimming/g' * +rename 's/Gloryhole/Gloryhole/g' * +rename 's/GloryHole/Gloryhole/g' * +rename 's/Gloryhole-Initiations/Gloryhole-Initiations/g' * +rename 's/GloryHoleSecrets/Gloryhole-Secrets/g' * +rename 's/GloryholeSecrets/Gloryhole-Secrets/g' * + +rename 's/MomIsHorny/Mom Is Horny/g' * +rename 's/MomDrips/Mom Drips/g' * +rename 's/MatureGapers/Mature Gapers/g' * +rename 's/MamsCasting/Mams Casting/g' * +rename 's/MomsBangTeens/Moms Bang Teens/g' * +rename 's/MommyBlowsBest/Mommy Blows Best/g' * +rename 's/MomXXX/Mom XXX/g' * +rename 's/MagmaFilm/Magma Film/g' * +rename 's/MMVFilms/MMV Films/g' * +rename 's/MylfBlows/Mylf Blows/g' * +rename 's/Mysistershotfriend/Mysisters Hot Friend/g' * + +rename 's/TittyAttack/Titty Attack/g' * +rename 's/TrueAnal/True Anal/g' * +rename 's/TonightsGirlfriend/Tonights Girlfriend/g' * +rename 's/TrueAmateurs/True Amateurs/g' * +rename 's/TushyRaw/Tushy Raw/g' * + + +rename 's/Hucows/HuCows/g' * +rename 's/HorrorPorn/Horror Porn/g' * +rename 's/HerLimit/Her Limit/g' * + +rename 's/UpHerAsshole/Up Her Asshole/g' * + +rename 's/LadyVoyeurs/Lady Voyeurs/g' * +rename 's/LittleAsians/Little Asians/g' * +rename 's/LadyVoyeurs/Lady Voyeurs/g' * +rename 's/LustyGrandmas/Lusty Grandmas/g' * + +rename 's/PublicAgent/Public Agent/g' * +rename 's/PornMegaLoad/Porn Mega Load/g' * + +rename 's/WeFuckBlackGirls/We Fuck Black Girls/g' * + +rename 's/RoundAndBrown/Round And Brown/g' * +rename 's/xxx/ xxx/g' * +rename 's/NewSensations/New Sensations/g' * +rename 's/ThaiGirlsWild/Thai Girls Wild/g' * +rename 's/HandsOnHardcore/Hands On Hardcore/g' * + +rename 's/JacquieEtMichelTV/Jacquie Et Michel TV/g' * +rename 's/JulesJordan/Jules Jordan/g' * +rename 's/JapanHDV/Japan HDV/g' * +rename 's/NFBusty/NFBusty/g' * + +rename 's/UltraFilms/Ultra Films/g' * +rename 's/SexMex/Sex Mex/g' * +rename 's/SwallowSalon/Swallow Salon/g' * +rename 's/Sinfulxxx/Sinful XXX/g' * + + +rename 's/AllAnalAllTheTime/All Anal All The Time/g' * +rename 's/ComeInside/Come Inside/g' * +rename 's/CuckHunter/Cuck Hunter/g' * +rename 's/DivineBitches/Divine Bitches/g' * +rename 's/EverythingButt/Everything Butt/g' * +rename 's/FreakyFembots/Freaky Fembots/g' * +rename 's/FreeUseMILF/Free Use MILF/g' * +rename 's/HollandschePassie/Hollandsche Passie/g' * +rename 's/HussiePass/Hussie Pass/g' * +rename 's/ImNotYourMommy/Im Not Your Mommy/g' * +rename 's/MomsBoyToy/Moms Boy Toy/g' * +rename 's/MomsTeachSex/Moms Teach Sex/g' * +rename 's/MySistersHotFriend/My Sisters Hot Friend/g' * +rename 's/BrutalSessions/Brutal Sessions/g' * +rename 's/DoctorAdventures/Doctor Adventures/g' * +rename 's/SofieMarieXXX/Sofie Marie/g' * +rename 's/YoungerMommy/Younger Mommy/g' * +rename 's/AnalMom/Anal Mom/g' * +rename 's/DirtyMasseur/Dirty Masseur/g' * +rename 's/FilthyTaboo/Filthy Taboo/g' * +rename 's/RealWifeStories/Real Wife Stories/g' * +rename 's/SexArt/Sex Art/g' * +rename 's/SpyFam/Spy Fam/g' * +rename 's/KinkFeatures/Kink Features/g' * +rename 's/KinkTestShoots/Kink Test Shoots/g' * +rename 's/MassageRooms/Massage Rooms/g' * + + +#rename 's/FamilyTherapyXXX/Family Therapy XXX/g' * +rename 's/Hegre Art/Hegre/g' * +rename 's/MeanMassage/Mean Massage/g' * +rename 's/NuruMassage/Nuru Massage/g' * +rename 's/PornWorld/Porn World/g' * +rename 's/TrickyMasseur/Tricky Masseur/g' * +rename 's/KinkySpa/Kinky Spa/g' * +rename 's/EroticSpice/Erotic Spice/g' * + +rename 's/LittleCaprice-Dreams/Little Caprice-Dreams/g' * + +rename 's/BigButtsLikeItBig/Big Butts Like It Big/g' * +rename 's/FisterTwister/Fister Twister/g' * +rename 's/GoStuckYourself/Go Stuck Yourself/g' * +rename 's/HogTied/Hog Tied/g' * +rename 's/DeviceBondage/Device Bondage/g' * +rename 's/HotAndMean/Hot And Mean/g' * +rename 's/HotwifeXXX/Hotwife XXX/g' * +rename 's/LetsTryAnal/Lets Try Anal/g' * +rename 's/LilHumpers/Lil Humpers/g' * +rename 's/LittleCaprice-Dreams/Little Caprice-Dreams/g' * +rename 's/LoveHerAss/Love Her Ass/g' * +rename 's/MyBabysittersClub/My Babysitters Club/g' * +rename 's/MylfSelects/Mylf Selects/g' * +rename 's/MyWifesHotFriend/My Wifes Hot Friend/g' * +rename 's/NaughtyAmerica/Naughty America/g' * +rename 's/PrivateSociety/Private Society/g' * +rename 's/RoccoSiffredi/Rocco Siffredi/g' * +rename 's/SinfulXXX/Sinful XXX/g' * +rename 's/TeamSkeetX/Team SkeetX/g' * +rename 's/TheLesbianExperience/The Lesbian Experience/g' * +rename 's/Watch4Beauty/Watch4Beauty/g' * +rename 's/YoungCourtesans/Young Courtesans/g' * +#rename 's/AnalJust/Anal Just/g' * +#rename 's/xxx/xxx/g' * +#rename 's/xxx/xxx/g' * diff --git a/nixos_24.11_cinnamon/config/home/nemo_scripts/Rename/Rename_sh_to_txt.sh b/nixos_24.11_cinnamon/config/home/nemo_scripts/Rename/Rename_sh_to_txt.sh new file mode 100755 index 0000000..977a01f --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_scripts/Rename/Rename_sh_to_txt.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +# +rename 's/*.sh /*.txt/g' * +rename 's/md /txt/g' * + +exit 0 diff --git a/nixos_24.11_cinnamon/config/home/nemo_scripts/Rename/Rename_txt.sh b/nixos_24.11_cinnamon/config/home/nemo_scripts/Rename/Rename_txt.sh new file mode 100755 index 0000000..de911ea --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_scripts/Rename/Rename_txt.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +# +rename 's/txt /md/g' * + +exit 0 diff --git a/nixos_24.11_cinnamon/config/home/nemo_scripts/Rename_MP3.sh b/nixos_24.11_cinnamon/config/home/nemo_scripts/Rename_MP3.sh new file mode 100755 index 0000000..61f8588 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/nemo_scripts/Rename_MP3.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# +rm *.url + +rename 's/ - / ./g' * + +rename 's/*.jpg/ folder.jpg/g' * +rename 's/cover.jpg/ folder.jpg/g' * +rename 's/Cover.jpg/ folder.jpg/g' * + + + +exit 0 + + +rename 'y/ /\_/' \* diff --git a/nixos_24.11_cinnamon/config/home/playbooks/apt-dist.yml b/nixos_24.11_cinnamon/config/home/playbooks/apt-dist.yml new file mode 120000 index 0000000..e547586 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/playbooks/apt-dist.yml @@ -0,0 +1 @@ +/nix/store/jhbyl0y5l3hi2g7qblmidk37cpg9agnn-home-manager-files/Ansible/playbooks/apt-dist.yml \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/home/profile-sync-daemon.nix b/nixos_24.11_cinnamon/config/home/profile-sync-daemon.nix new file mode 100644 index 0000000..bf3cd24 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/profile-sync-daemon.nix @@ -0,0 +1,56 @@ +{ config, pkgs, ... }: + +{ + services.psd = { + enable = true; + resyncTimer = "30min"; + }; + + home.file = { + ".config/psd/psd.conf" = { + text = '' + # $XDG_CONFIG_HOME/psd/psd.conf + # + # For documentation, refer man 1 psd or to the wiki page + # https://wiki.archlinux.org/index.php/Profile-sync-daemon + + ## NOTE the following: + ## To protect data from corruption, in the event that you do make an edit while + ## psd is active, any changes made will be applied the next time you start psd. + + # Uncomment and set to "yes" to use overlayfs instead of a full copy to reduce + # the memory costs and to improve sync/unsync operations. Note that your kernel + # MUST have this module available in order to use this mode. + USE_OVERLAYFS="yes" + + # Uncomment and set to "yes" to resync on suspend to reduce potential data loss. + # Note that your system MUST have gdbus from glib2 installed to use this mode. + USE_SUSPSYNC="yes" + + # List any browsers in the array below to have managed by psd. Useful if you do + # not wish to have all possible browser profiles managed which is the default if + # this array is left commented. + # Possible values: + # chromium + # firefox + # firefox-trunk + # vivaldi + # vivaldi-snapshot + BROWSERS=(firefox) + # Uncomment and set to "no" to completely disable the crash recovery feature. + # + # The default is to create crash recovery backups if the system is ungracefully + # powered-down due to a kernel panic, hitting the reset switch, battery going + # dead, etc. Some users keep very diligent backups and don't care to have this + # feature enabled. + USE_BACKUPS="yes" + + # Uncomment and set to an integer that is the maximum number of crash recovery + # snapshots to keep (the oldest ones are deleted first). + # The default is to save the most recent 5 crash recovery snapshots. + BACKUP_LIMIT=5 + ''; + }; + }; + +} diff --git a/nixos_24.11_cinnamon/config/home/samba-secrets b/nixos_24.11_cinnamon/config/home/samba-secrets new file mode 100644 index 0000000..0f1aa78 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/samba-secrets @@ -0,0 +1,3 @@ +username=zulumann +domain=WORKGROUP +password= diff --git a/nixos_24.11_cinnamon/config/home/script/SetupHome.sh b/nixos_24.11_cinnamon/config/home/script/SetupHome.sh new file mode 100644 index 0000000..20be0e6 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/script/SetupHome.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash +# + +# Setup Dirs +#rm -R /home/$USER/Dokumente +rm -R /home/$USER/Musik +rm -R /home/$USER/Videos +rm -R /home/$USER/Öffentlich +mkdir -p /home/$USER/Android +mkdir -p /home/$USER/Android/Backup-Android +mkdir -p /home/$USER/Android/Redmi_Note +mkdir -p /home/$USER/Android/Tablet +mkdir -p /home/$USER/Android/Teracube +mkdir -p /home/$USER/Applications +mkdir -p /home/$USER/Ansible +mkdir -p /home/$USER/Backup +mkdir -p /home/$USER/Backup/Software +mkdir -p /home/$USER/Backup/rotate +mkdir -p /home/$USER/GIT +mkdir -p /home/$USER/Games +mkdir -p /home/$USER/Games/Bottles +mkdir -p /home/$USER/Games/GOG +mkdir -p /home/$USER/Games/Lutris +mkdir -p /home/$USER/Games/Heroic +mkdir -p /home/$USER/MyGit +mkdir -p /home/$USER/MyStuff +mkdir -p /home/$USER/MyStuff/01Work +mkdir -p /home/$USER/MyStuff/02CherryTree +mkdir -p /home/$USER/MyStuff/03CryptBox +mkdir -p /home/$USER/MyStuff/Dokumente +mkdir -p /home/$USER/MyStuff/Scripte +mkdir -p /home/$USER/MyStuff/Diba-Konto +mkdir -p /home/$USER/MyStuff/Mail-Archiv +mkdir -p /home/$USER/MyStuff/KeepassXC +mkdir -p /home/$USER/MyStuff/PC+Netzwerk +mkdir -p /home/$USER/MyStuff/Paperwork +mkdir -p /home/$USER/ownCloud +mkdir -p /home/$USER/ownCloud/Arbeit +mkdir -p /home/$USER/ownCloud/FileDrop +mkdir -p /home/$USER/ownCloud/Upload +mkdir -p /home/$USER/Share-Cloud +mkdir -p /home/$USER/Share-Priv +mkdir -p /home/$USER/Share-SMB +mkdir -p /home/$USER/Share-VM +mkdir -p /home/$USER/Sync +# Setup config aacs +mkdir -p /home/$USER/.config/aacs/ +cd /home/$USER/.config/aacs/ && wget --no-check-certificate http://vlc-bluray.whoknowsmy.name/files/KEYDB.cfg + + +#ln -sf /home/$USER/MyStuff/Dokumente ~/Dokumente +#ln -sf /home/$USER/MyStuff/01Work /home/$USER/Schreibtisch/Work + + +cat > /home/$USER/.profile <<"EOF" +export GTK_THEME=Arc-Dark +EOF diff --git a/nixos_24.11_cinnamon/config/home/script/custom-info-script.sh b/nixos_24.11_cinnamon/config/home/script/custom-info-script.sh new file mode 100644 index 0000000..56372e4 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/script/custom-info-script.sh @@ -0,0 +1,64 @@ +#!/run/current-system/sw/bin/sh +# Tolga Erok + +# Reload the sysctl Configuration +# doas sysctl --system + +# Set PATH to include the necessary command directories +export PATH="/run/current-system/sw/bin:$PATH" + +# Fetch RAM information +RAM_INSTALLED=$(free -h | awk '/^Mem/ {print $2}') +RAM_USED=$(free -h | awk '/^Mem/ {print $3}') + +# Fetch and filter tmpfs information from df, including device information +# TMPFS_USED=$(df -h | awk '/tmpfs/ {print $1 "\t" $3 "\t" $5}' | column -t) +TMPFS_USED=$(df -h) + +# Fetch zramswap information +ZRAMSWAP_USED=$(zramctl | grep /dev/zram0 | awk '{print $4}') + +# Fetch earlyoom information +EARLYOOM_USED=$(pgrep earlyoom &>/dev/null && echo -e "\e[32mRunning\e[34m" || echo -e "\e[31mNot Running\e[34m") + +# Check if the service is active +if systemctl --quiet is-active configure-flathub-repo.service; then + FLATHUB_ACTIVE="\e[32mActive\e[0m" +else + FLATHUB_ACTIVE="\e[33mInactive\e[0m" +fi + +# Check if the service is enabled (loaded) +if systemctl is-enabled configure-flathub-repo.service; then + FLATHUB_LOADED="\e[32mLoaded\e[0m" +else + FLATHUB_LOADED="\e[33mNot Loaded\e[0m" +fi + +#if flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo; then +# echo -e "\e[34m[\e[32m✔\e[34m] Flathub repo added and configured successfully \e[32m¯\_(ツ)_/¯\e[0m\n " +#else +# echo -e "\e[34m[\e[31m✘\e[34m] \e[31mError:\e[34m Failed to configure Flathub repo \e[31m¯\_(ツ)_/¯\e[0m\n" +#fi + +stdbuf -o0 printf "" +echo -e "\e[1;32m[✔]\e[0m Restarting kernel tweaks...\n" +sleep 1 +sudo sysctl --system +sleep 1 + +# Print descriptions in yellow and results in blue +printf "\n\e[33mRAM Installed:\e[0m %s\n" "$RAM_INSTALLED" +printf "\e[33mRAM Used:\e[0m %s\n" " $RAM_USED" +printf "\n\e[33mDisk space and TMPS Used:\e[0m\n%s\n" "$TMPFS_USED" +printf "\n\e[33mZRAMSWAP Used:\e[0m %s\n" " $ZRAMSWAP_USED" +printf "\e[33mEarlyoom Status:\e[0m %s\n" "$EARLYOOM_USED" +echo -e "\nFlathub Service Status: $FLATHUB_ACTIVE / $FLATHUB_LOADED" + +lfs +duf +figlet system updated +# espeak -v en+m7 -s 165 "system! up! dated! kernel! tweaks! applied!" --punct="," 2>/dev/null + +sleep 30 + diff --git a/nixos_24.11_cinnamon/config/home/script/flatpak.sh b/nixos_24.11_cinnamon/config/home/script/flatpak.sh new file mode 100644 index 0000000..98cab2d --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/script/flatpak.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +# +################################################################################ +# +# +# post-installation script for Linux +# +# +# +################################################################################ + +while : +do +clear +echo "" +echo "\033[1m I N S T A L L Flatpack on NixOS " +echo " ----------------------------------------" +echo "\033[0m" +echo "01.Setup Flatpack Themes" +echo "02.Install Flatseal" +echo "03.Install Flatsweep" +echo "04.Install Lutris" +echo "05.Install Heroic Games Launcher" +echo "" +echo " x. Exit" +echo "" +echo -n " Please enter option [01 - 05]" +read opt +case $opt in +################################################################################## +01) echo "************ Setup Flatpack Themes **********************"; +################################################################################## +mkdir ~/.themes +cp -R /run/current-system/sw/share/themes/Arc-Dark ~/.themes/ +cp -R /run/current-system/sw/share/icons/Papirus-Dark ~/.icons +sudo flatpak override --filesystem=$HOME/.themes +sudo flatpak override --env=GTK_THEME=Arc-Dark +;; + +################################################################################## +02) echo "************ Install Flatseal ****************"; +################################################################################## +flatpak install -y flathub com.github.tchx84.Flatseal +;; + +################################################################################## +03) echo "************ Install Flatsweep *****************"; +################################################################################## +flatpak install -y flathub io.github.giantpinkrobots.flatsweep +;; + +################################################################################## +04) echo "************ Install Lutris ******************"; +################################################################################## +flatpak install -y flathub net.lutris.Lutris +;; + +################################################################################## +05) echo "************ Install Heroic Games Launcher **************************"; +################################################################################## +flatpak install -y flathub com.heroicgameslauncher.hgl +;; + +x) echo ""; +exit 1;; +*) echo " Press [enter] key to continue. . ."; +read enterKey;; +esac +done diff --git a/nixos_24.11_cinnamon/config/home/script/nix_config_backup.sh b/nixos_24.11_cinnamon/config/home/script/nix_config_backup.sh new file mode 100755 index 0000000..0d81c9e --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/script/nix_config_backup.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +# +################################################################################ +# +# Backup /etc/nixos to Fileserver01 +# +################################################################################ +# -a (Kurzversion für --archive): gleiche Bedeutung wie -rlptgoD +# -r (Kurzversion für --recursive): Unterverzeichnisse kopieren +# -l (Kurzversion für --links): symbolische Links kopierenrsync +# -p (Kurzversion für --perms): Rechte der Quelldatei beibehalten +# -t (Kurzversion für --times): Zeiten der Quelldatei beibehalten +# -g (Kurzversion für --group): Gruppenrechte der Quelldatei beibehalten +# -o (Kurzversion für --owner): Besitzrechte der Quelldatei beibehalten (nur als root User möglich) +# -D (Kurzversion für --devices --specials): Gerätedateien der Quelldatei beibehalten (nur als root User möglich) +# -v (Kurzversion für --verbose): zeigt während der Ausführung an welche Dateien synchronisiert werden +# -z +# --delete: entfernt Dateien im Zielverzeichnis die mittelerweile im Quellverzeichnis nicht mehr vorhanden sind +# rsync --dry-run +################################################################################ +# rsync -rdt rsync://192.168.10.52/ +# +source=/etc/nixos/ +destination=rsync://192.168.10.52:873/Backup/NixOS-Sys-Backup/$HOSTNAME/ + +rsync -a -v --delete --progress --partial "${source}" "${destination}" + +sleep 60 + diff --git a/nixos_24.11_cinnamon/config/home/script/rsync-exlude-home b/nixos_24.11_cinnamon/config/home/script/rsync-exlude-home new file mode 100644 index 0000000..a108ce8 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/script/rsync-exlude-home @@ -0,0 +1,36 @@ +- Downloads +- Games +- Share-Cloud +- Share-Priv +- Share-SMB +- Share-VM +- Sync +- VM-Image +- Code Cache +- cache* +- Cache* +- Cache_* +- *_cache +- *Cache +- DawnGraphiteCache +- log* +- logs +- tmp +- Trash +- .config +- .config/syncthing +- .config/unity3d +- .config/ownCloud +- .local +- .local/state +- .local/share/containers +- .local/share/flatpak +- .local/share/keyrings +- .local/share/nomic.ai +- .local/share/Steam +- .jd2 +- .conkyrc +- .* +- *.LOG +- LOG +- *.old diff --git a/nixos_24.11_cinnamon/config/home/ssh/authorized_keys b/nixos_24.11_cinnamon/config/home/ssh/authorized_keys new file mode 100644 index 0000000..0513668 --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/ssh/authorized_keys @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDRdiYgMyVjyXbbk2/lzFVRIK23JTICCmla0T0NNdP7LyAOiisV5lTg7PgFLFxaJ5QWSOUPcXwdhkkwT3yCGgzbWSS4sPGcon6hhFmaw54VITzkGK96e6/C/1X+L2BivYeaSSMBsezEScm8Ahl+uW7d2UmBzqTCg07dBWz1oyrgp9CKG5OuhdcKDdQ7w6t/YJNurYMr4nWHq7LKW9YwrRtmMPBoomoF01/4xO2YTWV6nrvEjui2JQMZJ0S3yigxVeP5TtWV26MY9IXIp8go7zrqEX34oVCHyRUtHMIIfWXR43pHOsLmzcpA5UnnuNQh4SO1BUjlEvFdQPLETfjmPxVk4GMBPfL0O81sgLck6drVKg2gsnTMUm/aSkn3Y845dKCaJes8s089RGVOIl5cnufB/HJ04im++2P/rmY1H1kxHu1jTHnxx78fvcHZ93Gco7X3j9pFrMsBxzG0wDkZGGRiNIeWjjGihQScMe7G/1aIWgHxZYmLVfdNPiDMYyBjvD6I2HxbAhWOdiYPXEjyKZAGa6IXGh9BEURlxFI1k7fKcs2AncL6Q2fXJQKzqfHD6dqndmVIzfj3gBLSSDTnfkOSCM2fBmHbgBuoUuIL6E7eFKxRpmw0Dh568VXQI0lBsmbDwiut4fTAuh/JF1yCCVW3qFMUT27RA6Z+15k0dQEFLw== zulumann@wlin001-lmde4 diff --git a/nixos_24.11_cinnamon/config/home/ssh/config-ssh.nix b/nixos_24.11_cinnamon/config/home/ssh/config-ssh.nix new file mode 100644 index 0000000..e335cef --- /dev/null +++ b/nixos_24.11_cinnamon/config/home/ssh/config-ssh.nix @@ -0,0 +1,180 @@ +{ config, pkgs, ... }: + +{ + + programs.ssh = { + enable = true; + matchBlocks = { + + ### Network Hosts ### + htpc01 = { + hostname = "htpc01.local"; + user = "kodi"; + port = 22; + # identityFile = "~/.ssh/id_rsa.pub"; + }; + + nas = { + hostname = "192.168.20.90"; + user = "root"; + port = 22; + }; + + pve01 = { + hostname = "192.168.10.50"; + user = "root"; + port = 22; + }; + + ### Proxmox PVE01 LAN ### + pfsense = { + hostname = "192.168.10.1"; + user = "admin"; + port = 22; + }; + + opnsense = { + hostname = "192.168.10.1"; + user = "root"; + port = 22; + }; + + fileserver01 = { + hostname = "192.168.10.52"; + user = "root"; + port = 22; + }; + + checkmk = { + hostname = "192.168.50.53"; + user = "root"; + port = 22; + }; + + pbs01 = { + hostname = "192.168.10.54"; + user = "root"; + port = 22; + }; + + docker-lan = { + hostname = "192.168.10.55"; + user = "root"; + port = 22; + }; + + jdownloader = { + hostname = "192.168.10.57"; + user = "root"; + port = 22; + }; + + vserver01 = { + hostname = "192.168.10.180"; + user = "root"; + port = 22; + }; + + adgurd = { + hostname = "192.168.178.10"; + user = "root"; + port = 22; + }; + + ### Proxmox PVE01 DMZ ### + aptcache = { + hostname = "192.168.50.10"; + user = "root"; + port = 22; + }; + + docker-dmz = { + hostname = "192.168.50.11"; + user = "root"; + port = 22; + }; + + rustdesk = { + hostname = "192.168.50.12"; + user = "root"; + port = 22; + }; + + radicale = { + hostname = "192.168.50.13"; + user = "root"; + port = 22; + }; + + mumble = { + hostname = "192.168.50.14"; + user = "root"; + port = 22; + }; + + meet = { + hostname = "192.168.50.15"; + user = "root"; + port = 22; + }; + + mail = { + hostname = "192.168.50.16"; + user = "root"; + port = 22; + }; + + freshrss = { + hostname = "192.168.50.17"; + user = "root"; + port = 22; + }; + + owncloud = { + hostname = "192.168.50.18"; + user = "root"; + port = 22; + }; + + websrv01 = { + hostname = "192.168.50.19"; + user = "root"; + port = 22; + }; + + websrv02 = { + hostname = "192.168.50.20"; + user = "root"; + port = 22; + }; + + gitea = { + hostname = "192.168.50.21"; + user = "root"; + port = 22; + }; + + ### Proxmox PVE01 IOT ### + jellyfin = { + hostname = "192.168.60.20"; + user = "root"; + port = 22; + }; + + ### Proxmox PVE01 VPN ### + seedbox = { + hostname = "192.168.20.10"; + user = "root"; + port = 22; + }; + + ### Internet Hosts ### + strato = { + hostname = "85.215.43.109"; + user = "root"; + port = 63007; + }; + }; + }; + +} diff --git a/nixos_24.11_cinnamon/config/home/wallpaper/5120x2880.jpg b/nixos_24.11_cinnamon/config/home/wallpaper/5120x2880.jpg new file mode 100644 index 0000000..5201b05 Binary files /dev/null and b/nixos_24.11_cinnamon/config/home/wallpaper/5120x2880.jpg differ diff --git a/nixos_24.11_cinnamon/config/home/wallpaper/Coasto 3.jpg b/nixos_24.11_cinnamon/config/home/wallpaper/Coasto 3.jpg new file mode 100644 index 0000000..afead77 Binary files /dev/null and b/nixos_24.11_cinnamon/config/home/wallpaper/Coasto 3.jpg differ diff --git a/nixos_24.11_cinnamon/config/home/wallpaper/DarkCyan.png b/nixos_24.11_cinnamon/config/home/wallpaper/DarkCyan.png new file mode 100644 index 0000000..d30202d Binary files /dev/null and b/nixos_24.11_cinnamon/config/home/wallpaper/DarkCyan.png differ diff --git a/nixos_24.11_cinnamon/config/home/wallpaper/Mountain_04.jpg b/nixos_24.11_cinnamon/config/home/wallpaper/Mountain_04.jpg new file mode 100644 index 0000000..4c4224a Binary files /dev/null and b/nixos_24.11_cinnamon/config/home/wallpaper/Mountain_04.jpg differ diff --git a/nixos_24.11_cinnamon/config/home/wallpaper/Textur_01.jpg b/nixos_24.11_cinnamon/config/home/wallpaper/Textur_01.jpg new file mode 100644 index 0000000..6ff4c33 Binary files /dev/null and b/nixos_24.11_cinnamon/config/home/wallpaper/Textur_01.jpg differ diff --git a/nixos_24.11_cinnamon/config/home/wallpaper/adapta_backgrounds01.jpg b/nixos_24.11_cinnamon/config/home/wallpaper/adapta_backgrounds01.jpg new file mode 100644 index 0000000..e1a5907 Binary files /dev/null and b/nixos_24.11_cinnamon/config/home/wallpaper/adapta_backgrounds01.jpg differ diff --git a/nixos_24.11_cinnamon/config/home/wallpaper/adapta_backgrounds03.jpg b/nixos_24.11_cinnamon/config/home/wallpaper/adapta_backgrounds03.jpg new file mode 100644 index 0000000..0548530 Binary files /dev/null and b/nixos_24.11_cinnamon/config/home/wallpaper/adapta_backgrounds03.jpg differ diff --git a/nixos_24.11_cinnamon/config/home/wallpaper/adapta_backgrounds04.jpg b/nixos_24.11_cinnamon/config/home/wallpaper/adapta_backgrounds04.jpg new file mode 100644 index 0000000..a993e56 Binary files /dev/null and b/nixos_24.11_cinnamon/config/home/wallpaper/adapta_backgrounds04.jpg differ diff --git a/nixos_24.11_cinnamon/config/home/wallpaper/cubes_1080.jpg b/nixos_24.11_cinnamon/config/home/wallpaper/cubes_1080.jpg new file mode 100644 index 0000000..b65aff1 Binary files /dev/null and b/nixos_24.11_cinnamon/config/home/wallpaper/cubes_1080.jpg differ diff --git a/nixos_24.11_cinnamon/config/home/wallpaper/greenish.jpg b/nixos_24.11_cinnamon/config/home/wallpaper/greenish.jpg new file mode 100644 index 0000000..b47e924 Binary files /dev/null and b/nixos_24.11_cinnamon/config/home/wallpaper/greenish.jpg differ diff --git a/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper01.jpg b/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper01.jpg new file mode 100644 index 0000000..e1a5907 Binary files /dev/null and b/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper01.jpg differ diff --git a/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper02.jpg b/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper02.jpg new file mode 100644 index 0000000..0548530 Binary files /dev/null and b/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper02.jpg differ diff --git a/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper03.jpg b/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper03.jpg new file mode 100644 index 0000000..a993e56 Binary files /dev/null and b/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper03.jpg differ diff --git a/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper04.png b/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper04.png new file mode 100644 index 0000000..d30202d Binary files /dev/null and b/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper04.png differ diff --git a/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper05.jpg b/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper05.jpg new file mode 100644 index 0000000..5201b05 Binary files /dev/null and b/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper05.jpg differ diff --git a/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper06.jpg b/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper06.jpg new file mode 100644 index 0000000..b65aff1 Binary files /dev/null and b/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper06.jpg differ diff --git a/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper07.jpg b/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper07.jpg new file mode 100644 index 0000000..6ff4c33 Binary files /dev/null and b/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper07.jpg differ diff --git a/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper08.jpg b/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper08.jpg new file mode 100644 index 0000000..afead77 Binary files /dev/null and b/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper08.jpg differ diff --git a/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper09.png b/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper09.png new file mode 100644 index 0000000..013e6a3 Binary files /dev/null and b/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper09.png differ diff --git a/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper10.png b/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper10.png new file mode 100644 index 0000000..2cd684f Binary files /dev/null and b/nixos_24.11_cinnamon/config/home/wallpaper/wallpaper10.png differ diff --git a/nixos_24.11_cinnamon/config/kvm.nix b/nixos_24.11_cinnamon/config/kvm.nix new file mode 100644 index 0000000..299d940 --- /dev/null +++ b/nixos_24.11_cinnamon/config/kvm.nix @@ -0,0 +1,60 @@ +{ config, pkgs, ... }: + +{ + + boot.kernelParams = [ "amd_iommu=on" "pcie_aspm=off" ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModprobeConfig = "options kvm_amd nested=1"; + + # Enable dconf (System Management Tool) + # programs.dconf.enable = true; + + # Add user to libvirtd group + users.users.zulumann.extraGroups = [ "libvirtd" "kvm" ]; + + # Install necessary packages + environment.systemPackages = with pkgs; [ + libvirt + qemu + qemu_kvm + OVMFFull + virt-manager + virt-viewer + spice spice-gtk + spice-protocol + adwaita-icon-theme + python3 + iproute2 + bridge-utils + ]; + + # Manage the virtualisation services + virtualisation = { + libvirtd = { + enable = true; + qemu = { + swtpm.enable = true; + ovmf.enable = true; + ovmf.packages = [ pkgs.OVMFFull.fd ]; + }; + }; + spiceUSBRedirection.enable = true; + }; + + # Enable VirtioFS + virtualisation.libvirtd.qemu.vhostUserPackages = [ pkgs.virtiofsd ]; + + environment.sessionVariables.LIBVIRT_DEFAULT_URI = [ "qemu:///system" ]; + services.spice-vdagentd.enable = true; + + # Enable Bridge-Network + networking.firewall.checkReversePath = false; + networking.interfaces.eth0.useDHCP = true; + networking.interfaces.br-lan.useDHCP = true; + networking.bridges = { + "br-lan" = { + interfaces = [ "eth0" ]; + }; + }; + +} \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/laptop.nix b/nixos_24.11_cinnamon/config/laptop.nix new file mode 100644 index 0000000..98c1064 --- /dev/null +++ b/nixos_24.11_cinnamon/config/laptop.nix @@ -0,0 +1,5 @@ +{ config, pkgs, ... }: + +{ + +} \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/mpd.nix b/nixos_24.11_cinnamon/config/mpd.nix new file mode 100644 index 0000000..a0bb148 --- /dev/null +++ b/nixos_24.11_cinnamon/config/mpd.nix @@ -0,0 +1,44 @@ +{ config, pkgs, ... }: + +# aplay -l +# aplay --list-pcm +# pacmd list-modules +# pacmd list-cards + +{ + services.mpd = { + enable = true; + user = "zulumann"; + musicDirectory = "/run/media/zulumann/HDD1.5TB/Audio/Musik"; + playlistDirectory = "/run/media/zulumann/HDD1.5TB/Audio/Playlists"; + network.listenAddress = "any"; + startWhenNeeded = true; # systemd feature: only start MPD service upon connection to its socket + extraConfig = '' + audio_output { + type "alsa" + name "My ALSA" + device "hw:0,0" # optional + format "44100:16:2" # optional + mixer_type "hardware" + mixer_device "default" + mixer_control "PCM" + } + + audio_output { + type "pipewire" + name "My PipeWire Output" + } + ''; + }; + + systemd.services.mpd.environment = { + # https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/609 + XDG_RUNTIME_DIR = + "/run/user/1000"; # User-id 1000 must match above user. MPD will look inside this directory for the PipeWire socket. + }; + + environment.systemPackages = with pkgs; [ + #gmpc # Gnome Music Player Client + cantata + ]; +} \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/nix-ld.nix b/nixos_24.11_cinnamon/config/nix-ld.nix new file mode 100644 index 0000000..df8e146 --- /dev/null +++ b/nixos_24.11_cinnamon/config/nix-ld.nix @@ -0,0 +1,63 @@ +{ config, pkgs, ... }: + +{ + + # Enable LD Fix + programs.nix-ld.enable = true; + programs.nix-ld.libraries = with pkgs; [ + # Add any missing dynamic libraries for unpackaged + # programs here, NOT in environment.systemPackages + alsa-lib + at-spi2-atk + at-spi2-core + atk + cairo + cups + curl + dbus + expat + fontconfig + freetype + fuse3 + gdk-pixbuf + glib + gtk3 + icu + libGL + libappindicator-gtk3 + libdrm + libglvnd + libnotify + libpulseaudio + libunwind + libusb1 + libuuid + libxkbcommon + libxml2 + mesa + nspr + nss + openssl + pango + pipewire + stdenv.cc.cc + systemd + vulkan-loader + xorg.libX11 + xorg.libXScrnSaver + xorg.libXcomposite + xorg.libXcursor + xorg.libXdamage + xorg.libXext + xorg.libXfixes + xorg.libXi + xorg.libXrandr + xorg.libXrender + xorg.libXtst + xorg.libxcb + xorg.libxkbfile + xorg.libxshmfence + zlib + ]; + +} \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/pkgs-cli.nix b/nixos_24.11_cinnamon/config/pkgs-cli.nix new file mode 100644 index 0000000..17d0706 --- /dev/null +++ b/nixos_24.11_cinnamon/config/pkgs-cli.nix @@ -0,0 +1,96 @@ +{ config, pkgs, ... }: + +{ + + # Enable tmux + programs.tmux = { + enable = true; + shortcut = "a"; + # aggressiveResize = true; -- Disabled to be iTerm-friendly + baseIndex = 1; + newSession = true; + # Stop tmux+escape craziness. + escapeTime = 0; + # Force tmux to use /tmp for sockets (WSL2 compat) + secureSocket = false; + + plugins = with pkgs; [ + tmuxPlugins.better-mouse-mode + ]; + + extraConfig = '' + # https://old.reddit.com/r/tmux/comments/mesrci/tmux_2_doesnt_seem_to_use_256_colors/ + set -g default-terminal "xterm-256color" + set -ga terminal-overrides ",*256col*:Tc" + set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' + set-environment -g COLORTERM "truecolor" + + # Mouse works as expected + set-option -g mouse on + # easy-to-remember split pane commands + bind | split-window -h -c "#{pane_current_path}" + bind - split-window -v -c "#{pane_current_path}" + bind c new-window -c "#{pane_current_path}" + ''; + }; + + # Setup bash + programs.bash = { + completion.enable = true; + enableLsColors = true; + shellAliases = { + set-default-boot="sudo /run/current-system/bin/switch-to-configuration boot"; + full-system-clean="nix-collect-garbage -d && sudo nix-collect-garbage -d"; + full-system-upgrade="sudo nixos-rebuild switch --upgrade && flatpak update -y && nix-env -u '*'"; + list-system-configurations="ls -l /nix/var/nix/profiles/system-*-link"; + system-rebuild="sudo nixos-rebuild switch"; + system-repair="sudo nixos-rebuild switch --repair"; + full-system-repair="sudo nix-store --verify --check-contents --repair"; + system-upgrade-information="sudo nixos-rebuild switch --upgrade dry-build"; + local-upgrade="sudo nix-channel --update nixpkgs && nix-env -u '*'"; + }; + }; + + environment.systemPackages = with pkgs; [ + bash + bash-completion + bash-preexec + bashdb + bashSnippets + curl # A command line tool for transferring files with URL syntax + dnsutils # Domain name server + diffutils # Commands for showing the differences between files (diff, cmp, etc.) + git # Distributed version control system + mc # File Manager and User Shell for the GNU Project + htop # An interactive process viewer + rsync # Fast incremental file transfer utility + wget # Tool for retrieving files using HTTP, HTTPS, and FTP + nettools # A set of tools for controlling the network subsystem + ncdu # Disk usage analyzer with an ncurses interface + # nfs-utils # Linux user-space NFS utilities + pciutils # inspecting and manipulating configuration of PCI devices + pwgen # Password generator + # pwgen-secure # Secure password generation library to replace pwgen + # ranger + renameutils # A set of programs to make renaming of files faster + rename # Rename files according to a Perl rewrite expression + # smartmontools # Tools for monitoring the health of hard drives + # imagemagick # A software suite to create, edit, compose, or convert bitmap images + lshw # Provide detailed information on the hardware configuration + lsof # A tool to list open files + unrar # Utility for RAR archives + unzip # An extraction utility for archives compressed + zip # Compressor/archiver for creating and modifying zipfiles + p7zip # A new p7zip fork with additional codecs + + # --------------------------------------------------------------------- + # NIX-Tools + # --------------------------------------------------------------------- + niv # Nix dependency management + nix-bash-completions # Bash completions for Nix, NixOS, and NixOps + nix-index # A files database for nixpkgs + nix-prefetch-git # nix-prefetch-git + # nixos-generators # Collection of image builders + ]; + +} diff --git a/nixos_24.11_cinnamon/config/pkgs-extra.nix b/nixos_24.11_cinnamon/config/pkgs-extra.nix new file mode 100644 index 0000000..33e6dd1 --- /dev/null +++ b/nixos_24.11_cinnamon/config/pkgs-extra.nix @@ -0,0 +1,219 @@ +{ config, pkgs, ... }: + +let + unstableTarball = + fetchTarball + https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz; +in +{ + imports = + [ # Include the results of the hardware scan. + /etc/nixos/hardware-configuration.nix + ]; + + nixpkgs.config = { + packageOverrides = pkgs: { + unstable = import unstableTarball { + config = config.nixpkgs.config; + }; + }; + }; + + # Allow unfree packages + nixpkgs.config = { + allowUnfree = true; + permittedInsecurePackages = [ ]; + }; + + # Enable Java + programs.java = { + enable = true; + package = pkgs.jdk11; + }; + + environment.systemPackages = with pkgs; [ + # --------------------------------------------------------------------- + # Accessories + # --------------------------------------------------------------------- + authenticator # Two-factor authentication code generator for GNOME + bleachbit # A program to clean your computer + # czkawka # A simple, fast and easy to use app to remove unnecessary files + conky + clipit + bitwarden # bitwarden-desktop + # deja-dup # A simple backup tool + gnome-decoder # Scan and Generate QR Codes + gnome-obfuscate # Censor private information + gnome-maps # A map application for GNOME 3 + # gpt4all # A free-to-use, locally running, privacy-aware chatbot. No GPU or internet required + # fsearch # A fast file search utility for Unix-like systems based on GTK+3 + cherrytree # An hierarchical note taking application + # caffeine-ng # Status bar application to temporarily inhibit screensaver and sleep mode + doublecmd # Two-panel graphical file manager written in Pascal + freefilesync # Open Source File Synchronization & Backup Software + shutter # Screenshot and annotation tool + gparted # Graphical disk partitioning tool + ulauncher # A fast application launcher for Linux + tilda + # synapse # Semantic launcher to start applications and find relevant files + # pika-backup # Simple backups based on borg + owncloud-client # Synchronise your ownCloud + keepassxc # Offline password manager + # veracrypt # Free Open-Source filesystem on-the-fly encryption + + # --------------------------------------------------------------------- + # Andriod software + # --------------------------------------------------------------------- + # android-file-transfer # Reliable MTP client with minimalistic UI provides: aft-mtp-cli android-file-transfer aft-mtp-mount + # android-tools # Android SDK platform tools + # waydroid # Waydroid is a container-based approach to boot a full Android system on a regular GNU/Linux system + + # --------------------------------------------------------------------- + # Codec + # --------------------------------------------------------------------- + ffmpeg_6-full # A complete, cross-platform solution to record, convert and stream audio and video + ffmpegthumbnailer # A lightweight video thumbnailer + gst_all_1.gst-vaapi + gst_all_1.gst-libav + gst_all_1.gst-plugins-bad + gst_all_1.gst-plugins-ugly + gst_all_1.gst-plugins-good + gst_all_1.gst-plugins-base + lame # A high quality MPEG Audio Layer III (MP3) encoder + wavpack # Hybrid audio compression format + x264 # Library for encoding H264/AVC video streams + x265 # Library for encoding H.265/HEVC video streams + mpg123 # Fast console MPEG Audio Player and decoder library + + #----------------------------------------------------------------- + # DVD / Bluray + #----------------------------------------------------------------- + # asunder # A graphical Audio CD ripper and encoder for Linux + # libbluray # Library to access Blu-Ray disks for video playback + # libaacs # Library to access AACS protected Blu-Ray disks + # libdvdcss # A library for decrypting DVDs + # libisofs # A library to create an ISO-9660 filesystem with extensions like RockRidge or Joliet + # libburn # A library by which preformatted data get onto optical media: CD, DVD, BD (Blu-Ray) + # xfce.xfburn # Disc burner and project creator for Xfce + + #----------------------------------------------------------------- + # Emulatoren + #----------------------------------------------------------------- + # ppsspp-qt # Playstation Portable emulator + # pcsx2 # Playstation 2 emulator + # dolphin-emu # Gamecube/Wii/Triforce emulator for x86_64 and ARMv8 + + # --------------------------------------------------------------------- + # Graphics + # --------------------------------------------------------------------- + simple-scan # Simple scanning utility + gimp-with-plugins # The GNU Image Manipulation Program + pinta # Drawing/editing program modeled after Paint.NET + # shotwell # Popular photo organizer for the GNOME desktop + + #----------------------------------------------------------------- + # Gaming + #----------------------------------------------------------------- + # mangohud # A Vulkan and OpenGL overlay for monitoring FPS + # goverlay # Graphical UI to help manage Linux overlays + # heroic # A Native GOG, Epic, and Amazon Games Launcher + # protonup-ng # CLI program and API to automate the installation and update Proton-GE + # protonup-qt # manage Proton-GE and Luxtorpeda for Steam and Wine-GE + # xboxdrv # Xbox/Xbox360 gamepad driver + + #----------------------------------------------------------------- + # Tools + #----------------------------------------------------------------- + # gpu-viewer # A front-end to glxinfo, vulkaninfo, clinfo and es2_info + # cpu-x # Software that gathers information on CPU, motherboard and more + + #----------------------------------------------------------------- + # Internet + #----------------------------------------------------------------- + angryipscanner # fast and friendly network scanner + brave # Brave Browser + freetube # An Open Source YouTube app for privacy + filezilla # Graphical FTP, FTPS and SFTP client + # protonvpn-gui # Proton VPN GTK app + # signal-desktop # Private, simple, and secure messenger + tdesktop # Telegram Desktop + tor-browser # Tor Browser + # qtox # Qt Tox client + remmina # Remote desktop client written in GTK + mumble # Low-latency, high quality voice chat software + # liferea # A GTK-based news feed aggregator + uget # Download manager using GTK and libcurl + # vivaldi # Browser for our Friends, powerful and personal + # vivaldi-ffmpeg-codecs # Additional support for proprietary codecs for Vivaldi + + #----------------------------------------------------------------- + # Office + #----------------------------------------------------------------- + evolution # application that provides integrated mail, calendaring and address book + # gscan2pdf # GUI to produce PDFs or DjVus from scanned documents + foliate # A simple and modern GTK eBook reader + paperwork # personal document manager for scanned documents + pdfarranger # Merge or split pdf documents and rotate, crop and rearrange their pages + # onlyoffice-bin_latest # Office suite that combines text, spreadsheet and presentation editors allowing to create + libreoffice-fresh # Comprehensive, professional-quality productivity suite, a variant of openoffice.org + # qownnotes # Plain-text file notepad and todo-list manager with markdown support and Nextcloud/ownCloud integration + # joplin-desktop # An open source note taking and to-do application with synchronisation capabilities + # trilium-desktop # Hierarchical note taking application with focus on building large personal knowledge bases + # xournalpp # Xournal++ is a handwriting Notetaking software with PDF annotation support + + # --------------------------------------------------------------------- + # Programming + # --------------------------------------------------------------------- + # diffuse # Graphical tool for merging and comparing text files + meld # Visual diff and merge tool + vscodium # Open source source code editor developed by Microsoft + github-desktop # GUI for managing Git and GitHub + + # --------------------------------------------------------------------- + # Themes + # --------------------------------------------------------------------- + arc-theme # Flat theme with transparent elements for GTK 3, GTK 2 and Gnome Shell + papirus-icon-theme # Pixel perfect icon theme for Linux + numix-cursor-theme # Numix cursor theme + + #----------------------------------------------------------------- + # Multimedia + #----------------------------------------------------------------- + audacious # A lightweight and versatile audio player + audacious-plugins # Plugins for Audacious music player + easytag # View and edit tags for various audio files + mediainfo-gui # Supplies technical and tag information about a video or audio file + soundconverter # Leading audio file converter for the GNOME Desktop + # strawberry # Music player and music collection organizer + # obs-studio # Free and open source software for video recording and live streaming + # guvcview # A simple interface for devices supported by the linux UVC driver + # kazam # A screencasting program created with design in mind + video-trimmer # Trim videos quickly + radiotray-ng # An internet radio player + jellyfin-media-player # Jellyfin Desktop Client based on Plex Media Player + vlc # Cross-platform media player and streaming server + + # --------------------------------------------------------------------- + # Spell checker + # --------------------------------------------------------------------- + aspell # Spell checker for many languages + aspellDicts.de # Aspell dictionary for German + hunspell # Spell checker + hunspellDicts.de-de # Hunspell dictionary for German + hyphen # A text hyphenation library + # languagetool # A proofreading program for English, German ... + + # --------------------------------------------------------------------- + # Openvpn + # --------------------------------------------------------------------- + #openvpn # A robust and highly flexible tunneling application + #networkmanager-openvpn + #gnome.networkmanager-openvpn + + # --------------------------------------------------------------------- + # Library + # --------------------------------------------------------------------- + libwacom # Libraries, configuration, and diagnostic tools for Wacom tablets + ]; + +} diff --git a/nixos_24.11_cinnamon/config/printer.nix b/nixos_24.11_cinnamon/config/printer.nix new file mode 100644 index 0000000..c866dca --- /dev/null +++ b/nixos_24.11_cinnamon/config/printer.nix @@ -0,0 +1,44 @@ +{ config, pkgs, ... }: + +{ + + # Enable CUPS + services.printing = { + enable = true; + #openFirewall = true; + drivers = [ + pkgs.brlaser + pkgs.hplip + # pkgs.hplipWithPlugin + ]; + }; + + # Enable Cups-PDF + services.printing.cups-pdf = { + enable = true; + instances = { + pdf = { + settings = { + Out = "\${HOME}/Cups-pdf"; + UserUMask = "0033"; + }; + }; + }; + }; + + # Enable Sane + hardware.sane = { + enable = true; + extraBackends = [ pkgs.hplipWithPlugin ]; + }; + + users.users.zulumann.extraGroups = ["scanner" "lp"]; + + # programs.system-config-printer.enable = true; + + networking.firewall = { + allowedTCPPorts = [ 80 427 443 515 631 8080 9100 6566 ]; + allowedUDPPorts = [ 427 3702 5353 ]; + }; + +} diff --git a/nixos_24.11_cinnamon/config/samba-nas.nix b/nixos_24.11_cinnamon/config/samba-nas.nix new file mode 100644 index 0000000..6e09f36 --- /dev/null +++ b/nixos_24.11_cinnamon/config/samba-nas.nix @@ -0,0 +1,132 @@ +{ config, pkgs, ... }: + +{ + environment.systemPackages = [ pkgs.cifs-utils ]; + + fileSystems."/mnt/nas/Audio" = { + device = "//192.168.10.90/audio/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/config/home/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/Appz" = { + device = "//192.168.10.90/appz/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/config/home/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/Backup" = { + device = "//192.168.10.90/backup/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/config/home/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/Files" = { + device = "//192.168.10.90/files/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/config/home/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/Downloads" = { + device = "//192.168.10.90/downloads/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/config/home/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/Emulator" = { + device = "//192.168.10.90/emulator/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/config/home/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/Games" = { + device = "//192.168.10.90/games/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/config/home/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/ISO" = { + device = "//192.168.10.90/iso/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/config/home/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/Multimedia" = { + device = "//192.168.10.90/multimedia/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/config/home/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/Public" = { + device = "//192.168.10.90/public/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/config/home/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/Share" = { + device = "//192.168.10.90/share/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/config/home/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/Work" = { + device = "//192.168.10.90/work/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/config/home/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/XXX" = { + device = "//192.168.10.90/xxx/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/config/home/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/homes" = { + device = "//192.168.10.90/homes/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/config/home/samba-secrets,uid=1000,gid=100"]; + }; + +} \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/samba-srv.nix b/nixos_24.11_cinnamon/config/samba-srv.nix new file mode 100644 index 0000000..14cd910 --- /dev/null +++ b/nixos_24.11_cinnamon/config/samba-srv.nix @@ -0,0 +1,78 @@ +{ config, pkgs, ... }: + +{ + environment.systemPackages = [ pkgs.cifs-utils ]; + + fileSystems."/mnt/fileserver01/Appz" = { + device = "//192.168.10.52/appz/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/config/home/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/fileserver01/Backup" = { + device = "//192.168.10.52/backup/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/config/home/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/fileserver01/Dateien" = { + device = "//192.168.10.52/dateien/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/config/home/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/fileserver01/Downloads" = { + device = "//192.168.10.52/downloads/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/config/home/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/fileserver01/ISOs" = { + device = "//192.168.10.52/isos/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/config/home/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/fileserver01/Multimedia" = { + device = "//192.168.10.52/multimedia/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/config/home/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/fileserver01/Public" = { + device = "//192.168.10.52/public/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/config/home/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/fileserver01/Share" = { + device = "//192.168.10.52/share/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/config/home/samba-secrets,uid=1000,gid=100"]; + }; + +} \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/samba.nix b/nixos_24.11_cinnamon/config/samba.nix new file mode 100644 index 0000000..fd37e8f --- /dev/null +++ b/nixos_24.11_cinnamon/config/samba.nix @@ -0,0 +1,116 @@ +{ config, pkgs, ... }: + + +{ +services.samba = { + enable = true; +# securityType = "user"; + openFirewall = true; + settings = { + global = { + "workgroup" = "WORKGROUP"; + "server role" = "standalone server"; + "server string" = "wlin002-nixos"; + "netbios name" = "wlin002-nixos"; + "global.security" = "user"; + "min protocol" = "smb3_11"; + "max protocol" = "smb3_11"; + "wide links" = "no"; + "follow symlinks" = "no"; + + #### Networking #### + "bind interfaces only" = "yes"; + "interfaces" = "lo br-lan eth0"; + # note: localhost is the ipv6 localhost ::1 + "hosts allow" = "192.168.10.0/24 127.0.0.1 localhost"; + "hosts deny" = "0.0.0.0/0"; + + ### Browsing election options ### + "wins support" = "no"; + "name resolve order" = "host bcast lmhosts"; + "multicast dns register" = "yes"; + "dns proxy" = "yes"; + + ####### Authentication ####### + "guest account" = "zulumann"; + "map to guest" = "bad user"; + + ### Tuning ### + "socket options" = "TCP_NODELAY IPTOS_LOWDELAY IPTOS_THROUGHPUT SO_RCVBUF=131072 SO_SNDBUF=131072"; + "use sendfile" = "yes"; + "getwd cache" = "yes"; + "stat cache" = "yes"; + "min receivefile size" = "16384"; + "write raw" = "yes"; + "read raw" = "yes"; + "max xmit" = "32768"; + "deadtime" = "15"; + "keepalive" = "150"; + "sync always" = "no"; + "large readwrite" = "yes"; + "strict sync" = "no"; + "strict allocate" = "yes"; + "strict locking" = "auto"; + "server multi channel support" = "yes"; + "aio write size" = "1"; + "aio read size" = "1"; + "idmap cache time" = "604"; + + #### Debugging #### + "log level" = "1"; + "log file" = "/var/log/samba/log.%m"; + "max log size" = "1000"; + "logging" = "file"; + "panic action" = "/usr/share/samba/panic-action %d"; + }; + + + "Share" = { + "path" = "/home/zulumann/Share-SMB"; + "browseable" = "yes"; + "read only" = "no"; + "guest ok" = "yes"; + "public" = "yes"; + "writable" = "yes"; + "create mask" = "0644"; + "directory mask" = "0755"; + }; + + "Private" = { + "path" = "/home/zulumann/Share-Priv"; + "browseable" = "yes"; + "read only" = "no"; + "guest ok" = "no"; + "create mask" = "0644"; + "directory mask" = "0755"; + #"force user" = "zulumann"; + #"force group" = "zulumann"; + }; + + }; +}; + + services.samba-wsdd = { + enable = true; + openFirewall = true; + }; + + services.avahi.extraServiceFiles = { + smb = '' + + + + %h - SMB/CIFS + + _smb._tcp + 445 + + + ''; + }; + +} + +# User Authentication +# For a user called my_userto be authenticated on the samba server, you must add their password using +# sudo smbpasswd -a my_user \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/steam.nix b/nixos_24.11_cinnamon/config/steam.nix new file mode 100644 index 0000000..5d56afd --- /dev/null +++ b/nixos_24.11_cinnamon/config/steam.nix @@ -0,0 +1,19 @@ +{ config, pkgs, ... }: + +{ + + # Enable Steam and Gamemode + nixpkgs.config = { + allowUnfreePackages = [ "steam" "steam-original" "steam-runtime" "steam-run" ]; + }; + + programs.gamemode.enable = true; + hardware.steam-hardware.enable = true; + programs.steam = { + enable = true; + gamescopeSession.enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + }; + +} \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/syncthing.nix b/nixos_24.11_cinnamon/config/syncthing.nix new file mode 100644 index 0000000..e0eea9f --- /dev/null +++ b/nixos_24.11_cinnamon/config/syncthing.nix @@ -0,0 +1,36 @@ +{ config, pkgs, ... }: + +{ + # Enable Syncthing + services.syncthing = { + enable = true; + openDefaultPorts = true; + guiAddress = "127.0.0.1:8384"; + user = "zulumann"; + group = "users"; + configDir = "/home/zulumann/.config/syncthing"; + dataDir = "/home/zulumann"; + overrideDevices = false; + overrideFolders = false; + settings.devices = { + "Syncthing-Server" = { id = "2YNMVUC-HCUVYV4-C7ZJJ72-HQJSFBF-TOO6VPG-QYYIBZA-X3JC4MA-5WKEGA4"; }; + }; + + settings.versioning = { + type = "staggered"; + params = { + cleanInterval = "3600"; # 1 hour in seconds + maxAge = "15552000"; # 180 days in seconds + }; + }; + }; + + services.syncthing.settings.gui = { + user = "zulumann"; + password = "he_lu@1970"; + }; + + environment.systemPackages = with pkgs; [ + #qsyncthingtray + ]; +} \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/tweaks/16GB-SYSTEM.nix b/nixos_24.11_cinnamon/config/tweaks/16GB-SYSTEM.nix new file mode 100644 index 0000000..c71ba07 --- /dev/null +++ b/nixos_24.11_cinnamon/config/tweaks/16GB-SYSTEM.nix @@ -0,0 +1,40 @@ +{ config, ... }: + +# Control how and when data is written from memory to disk, which can have an impact on system performance and responsiveness. +# useful for optimizing memory usage, disk writeback behavior, network settings, and other low-level kernel behaviors. + +{ + boot.kernelModules = ["tcp_bbr"]; + + boot.kernel.sysctl = { + "net.ipv4.tcp_congestion_control" = "bbr"; + "net.core.default_qdisc" = "fq"; + "net.ipv4.tcp_fastopen" = "3"; + + #--------------------------------------------------------------------- + # Network and memory-related optimizationss for desktop 16GB + #--------------------------------------------------------------------- + "kernel.sysrq" = 1; # Enable SysRQ for rebooting the machine properly if it freezes. [Source](https://oglo.dev/tutorials/sysrq/index.html) + "net.core.netdev_max_backlog" = 30000; # Help prevent packet loss during high traffic periods. + "net.core.rmem_default" = 262144; # Default socket receive buffer size, improve network performance & applications that use sockets. Adjusted for 16GB RAM. + "net.core.rmem_max" = 33554432; # Maximum socket receive buffer size, determine the amount of data that can be buffered in memory for network operations. Adjusted for 16GB RAM. + "net.core.wmem_default" = 262144; # Default socket send buffer size, improve network performance & applications that use sockets. Adjusted for 16GB RAM. + "net.core.wmem_max" = 33554432; # Maximum socket send buffer size, determine the amount of data that can be buffered in memory for network operations. Adjusted for 16GB RAM. + "net.ipv4.ipfrag_high_threshold" = 5242880; # Reduce the chances of fragmentation. Adjusted for SSD. + "net.ipv4.tcp_keepalive_intvl" = 30; # TCP keepalive interval between probes to detect if a connection is still alive. + "net.ipv4.tcp_keepalive_probes" = 5; # TCP keepalive probes to detect if a connection is still alive. + "net.ipv4.tcp_keepalive_time" = 300; # TCP keepalive interval in seconds to detect if a connection is still alive. + "vm.dirty_background_bytes" = 134217728; # 128 MB + "vm.dirty_bytes" = 402653184; # 384 MB + "vm.min_free_kbytes" = 65536; # Minimum free memory for safety (in KB), helping prevent memory exhaustion situations. Adjusted for 16GB RAM. + "vm.swappiness" = 10; # Adjust how aggressively the kernel swaps data from RAM to disk. Lower values prioritize keeping data in RAM. Adjusted for 16GB RAM. + "vm.vfs_cache_pressure" = 90; # Adjust vfs_cache_pressure (0-1000) to manage memory used for caching filesystem objects. Adjusted for 16GB RAM. + + # Nobara Tweaks + "fs.aio-max-nr" = 1000000; # defines the maximum number of asynchronous I/O requests that can be in progress at a given time. 1048576 + "fs.inotify.max_user_watches" = 65536; # sets the maximum number of file system watches, enhancing file system monitoring capabilities. Default: 8192 TWEAKED: 524288 + "kernel.panic" = 5; # Reboot after 5 seconds on kernel panic Default: 0 + "kernel.pid_max" = 131072; # allows a large number of processes and threads to be managed Default: 32768 TWEAKED: 4194304 + }; + +} \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/tweaks/32GB-SYSTEM.nix b/nixos_24.11_cinnamon/config/tweaks/32GB-SYSTEM.nix new file mode 100644 index 0000000..b480388 --- /dev/null +++ b/nixos_24.11_cinnamon/config/tweaks/32GB-SYSTEM.nix @@ -0,0 +1,40 @@ +{ config, ... }: + +# Control how and when data is written from memory to disk, which can have an impact on system performance and responsiveness. +# useful for optimizing memory usage, disk writeback behavior, network settings, and other low-level kernel behaviors. + +{ + boot.kernelModules = ["tcp_bbr"]; + + boot.kernel.sysctl = { + "net.ipv4.tcp_congestion_control" = "bbr"; + "net.core.default_qdisc" = "fq"; + "net.ipv4.tcp_fastopen" = "3"; + + #--------------------------------------------------------------------- + # Network and memory-related optimizationss for 32GB + #--------------------------------------------------------------------- + "kernel.sysrq" = 1; # Enable SysRQ for rebooting the machine properly if it freezes. [Source](https://oglo.dev/tutorials/sysrq/index.html) + "net.core.netdev_max_backlog" = 30000; # Help prevent packet loss during high traffic periods. + "net.core.rmem_default" = 262144; # Default socket receive buffer size, improve network performance & applications that use sockets. Adjusted for 32GB RAM. + "net.core.rmem_max" = 67108864; # Maximum socket receive buffer size, determine the amount of data that can be buffered in memory for network operations. Adjusted for 32GB RAM. + "net.core.wmem_default" = 262144; # Default socket send buffer size, improve network performance & applications that use sockets. Adjusted for 32GB RAM. + "net.core.wmem_max" = 67108864; # Maximum socket send buffer size, determine the amount of data that can be buffered in memory for network operations. Adjusted for 32GB RAM. + "net.ipv4.ipfrag_high_threshold" = 5242880; # Reduce the chances of fragmentation. Adjusted for SSD. + "net.ipv4.tcp_keepalive_intvl" = 10; # TCP keepalive interval between probes to detect if a connection is still alive. + "net.ipv4.tcp_keepalive_probes" = 5; # TCP keepalive probes to detect if a connection is still alive. + "net.ipv4.tcp_keepalive_time" = 60; # TCP keepalive interval in seconds to detect if a connection is still alive. + "vm.dirty_background_bytes" = 134217728; # 128 MB + "vm.dirty_bytes" = 402653184; # 384 MB + "vm.min_free_kbytes" = 65536; # Minimum free memory for safety (in KB), helping prevent memory exhaustion situations. Adjusted for 32GB RAM. + "vm.swappiness" = 5; # Adjust how aggressively the kernel swaps data from RAM to disk. Lower values prioritize keeping data in RAM. Adjusted for 32GB RAM. + "vm.vfs_cache_pressure" = 90; # Adjust vfs_cache_pressure (0-1000) to manage memory used for caching filesystem objects. Adjusted for 32GB RAM. + + # Nobara Tweaks + "fs.aio-max-nr" = 1000000; # defines the maximum number of asynchronous I/O requests that can be in progress at a given time. 1048576 + "fs.inotify.max_user_watches" = 65536; # sets the maximum number of file system watches, enhancing file system monitoring capabilities. Default: 8192 TWEAKED: 524288 + "kernel.panic" = 5; # Reboot after 5 seconds on kernel panic Default: 0 + "kernel.pid_max" = 131072; # allows a large number of processes and threads to be managed Default: 32768 TWEAKED: 4194304 + + }; +} \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/tweaks/4GB-SYSTEM.nix b/nixos_24.11_cinnamon/config/tweaks/4GB-SYSTEM.nix new file mode 100644 index 0000000..3334884 --- /dev/null +++ b/nixos_24.11_cinnamon/config/tweaks/4GB-SYSTEM.nix @@ -0,0 +1,33 @@ +{ config, ... }: + +# Control how and when data is written from memory to disk, which can have an impact on system performance and responsiveness. +# useful for optimizing memory usage, disk writeback behavior, network settings, and other low-level kernel behaviors. + +{ + boot.kernelModules = ["tcp_bbr"]; + + boot.kernel.sysctl = { + "net.ipv4.tcp_congestion_control" = "bbr"; + "net.core.default_qdisc" = "fq"; + "net.ipv4.tcp_fastopen" = "3"; + + #--------------------------------------------------------------------- + # Network and memory-related optimizationss for 4GB + #--------------------------------------------------------------------- + "kernel.sysrq" = 1; # Enable SysRQ for rebooting the machine properly if it freezes. [Source](https://oglo.dev/tutorials/sysrq/index.html) + "net.core.netdev_max_backlog" = 30000; # Help prevent packet loss during high traffic periods. + "net.core.rmem_default" = 131072; # Default socket receive buffer size, improving network performance and applications that use sockets. + "net.core.rmem_max" = 16777216; # Maximum socket receive buffer size, determining the amount of data that can be buffered in memory for network operations. + "net.core.wmem_default" = 131072; # Default socket send buffer size, improving network performance and applications that use sockets. + "net.core.wmem_max" = 16777216; # Maximum socket send buffer size, determining the amount of data that can be buffered in memory for network operations. + "net.ipv4.ipfrag_high_threshold" = 8388608; # Reduce the chances of fragmentation. + "net.ipv4.tcp_keepalive_intvl" = 30; # TCP keepalive interval between probes to detect if a connection is still alive. + "net.ipv4.tcp_keepalive_probes" = 5; # TCP keepalive probes to detect if a connection is still alive. + "net.ipv4.tcp_keepalive_time" = 60; # TCP keepalive interval in seconds to detect if a connection is still alive. + "vm.dirty_background_bytes" = 8388608; # Data (8 MB) modified in memory and needs to be written to disk. (Adjusted for 4GB RAM) + "vm.dirty_bytes" = 25165824; # Data (24 MB) modified in memory and needs to be written to disk. (Adjusted for 4GB RAM) + "vm.min_free_kbytes" = 32768; # Minimum free memory for safety (in KB), helping prevent memory exhaustion situations. (Adjusted for 4GB RAM) + "vm.swappiness" = 20; # Adjust how aggressively the kernel swaps data from RAM to disk. Lower values prioritize keeping data in RAM. (Adjusted for 4GB RAM) + "vm.vfs_cache_pressure" = 100; # Adjust vfs_cache_pressure (0-1000) to manage memory used for caching filesystem objects. (Adjusted for 4GB RAM) + }; +} \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/tweaks/8GB-SYSTEM.nix b/nixos_24.11_cinnamon/config/tweaks/8GB-SYSTEM.nix new file mode 100644 index 0000000..3c94348 --- /dev/null +++ b/nixos_24.11_cinnamon/config/tweaks/8GB-SYSTEM.nix @@ -0,0 +1,130 @@ +{ config, ... }: + +# Control how and when data is written from memory to disk, which can have an impact on system performance and responsiveness. +# useful for optimizing memory usage, disk writeback behavior, network settings, and other low-level kernel behaviors. + +{ + boot.kernelModules = ["tcp_bbr"]; + + boot.kernel.sysctl = { + "net.ipv4.tcp_congestion_control" = "bbr"; + "net.core.default_qdisc" = "fq"; + "net.ipv4.tcp_fastopen" = "3"; + + #--------------------------------------------------------------------- + # Network and memory-related optimizationss for 8GB + #--------------------------------------------------------------------- + "kernel.sysrq" = 1; # Enable SysRQ for rebooting the machine properly if it freezes. [Source](https://oglo.dev/tutorials/sysrq/index.html) + "net.core.netdev_max_backlog" = 30000; # Help prevent packet loss during high traffic periods. + "net.core.rmem_default" = 262144; # Default socket receive buffer size, improve network performance & applications that use sockets. Adjusted for 8GB RAM. + "net.core.rmem_max" = 33554432; # Maximum socket receive buffer size, determine the amount of data that can be buffered in memory for network operations. Adjusted for 8GB RAM. + "net.core.wmem_default" = 262144; # Default socket send buffer size, improve network performance & applications that use sockets. Adjusted for 8GB RAM. + "net.core.wmem_max" = 33554432; # Maximum socket send buffer size, determine the amount of data that can be buffered in memory for network operations. Adjusted for 8GB RAM. + "net.ipv4.ipfrag_high_threshold" = 5242880; # Reduce the chances of fragmentation. Adjusted for SSD. + "net.ipv4.tcp_keepalive_intvl" = 30; # TCP keepalive interval between probes to detect if a connection is still alive. + "net.ipv4.tcp_keepalive_probes" = 5; # TCP keepalive probes to detect if a connection is still alive. + #"net.ipv4.tcp_keepalive_time" = 300; # TCP keepalive interval in seconds to detect if a connection is still alive. + "net.ipv4.tcp_keepalive_time" = "60"; # TCP keepalive interval in seconds to detect if a connection is still alive. + "vm.dirty_background_bytes" = 134217728; # 128 MB + "vm.dirty_bytes" = 402653184; # 384 MB + "vm.min_free_kbytes" = 131072; # Minimum free memory for safety (in KB), helping prevent memory exhaustion situations. Adjusted for 8GB RAM. + "vm.swappiness" = 10; # Adjust how aggressively the kernel swaps data from RAM to disk. Lower values prioritize keeping data in RAM. Adjusted for 8GB RAM. + "vm.vfs_cache_pressure" = 90; # Adjust vfs_cache_pressure (0-1000) to manage memory used for caching filesystem objects. Adjusted for 8GB RAM. + + # Nobara Tweaks + "fs.aio-max-nr" = 1000000; # defines the maximum number of asynchronous I/O requests that can be in progress at a given time. 1048576 + "fs.inotify.max_user_watches" = 65536; # sets the maximum number of file system watches, enhancing file system monitoring capabilities. Default: 8192 TWEAKED: 524288 + "kernel.panic" = 5; # Reboot after 5 seconds on kernel panic Default: 0 + "kernel.pid_max" = 131072; # allows a large number of processes and threads to be managed Default: 32768 TWEAKED: 4194304 + + }; + +} + +# ----------------------------------------------------------------- +# Summary of my configuration +# ----------------------------------------------------------------- + +# Network Performance Settings: +# ---------------------------------------------- +# "net.core.rmem_default" = 16 MB +# "net.core.rmem_max" = 16 MB +# "net.core.wmem_default" = 16 MB +# "net.core.wmem_max" = 16 MB +# These settings define the default and maximum socket buffer sizes for receiving and sending data, improving network performance and benefiting applications that use sockets. + +# TCP Keepalive Settings: +# ---------------------------------------------- +# "net.ipv4.tcp_keepalive_intvl" = 30 seconds +# "net.ipv4.tcp_keepalive_probes" = 5 probes +# "net.ipv4.tcp_keepalive_time" = 300 seconds +# These settings configure TCP keepalive parameters, which are used to detect if a network connection is still alive. + +# Disk Write Behavior Settings: +# ---------------------------------------------- +# "vm.dirty_background_bytes" = 16 MB +# "vm.dirty_bytes" = 48 MB +# These settings control how much modified data in memory needs to be written to disk. Lower values can lead to more frequent writes. + +# Memory Safety Setting: +# ---------------------------------------------- +# "vm.min_free_kbytes" = 65,536 KB +# This setting specifies the minimum amount of free memory in kilobytes, helping to prevent memory exhaustion situations. + +# Swappiness Setting: +# ---------------------------------------------- +# "vm.swappiness" = 1 +# This setting determines how aggressively the kernel swaps data from RAM to disk. Lower values prioritize keeping data in RAM, suitable for systems with ample memory. + +# Cache Pressure Setting: +# ---------------------------------------------- +# "vm.vfs_cache_pressure" = 50 +# This setting adjusts vfs_cache_pressure (0-1000), influencing how the kernel reclaims memory used for caching filesystem objects. + +# Customize these settings based on your system's requirements and performance goals, check below for extra info. + +# Values explained: +# "vm.vfs_cache_pressure" = 50; Adjust vfs_cache_pressure (0-1000) +# ----------------------------------------------------------------- +# 4GB RAM: 50 - 60 [ Lower values like 50 or 60 can be a good starting point for systems with 4GB of RAM to retain data in cache for improved file system access times ] +# 8GB RAM: 60 - 80 [ Values around 60 to 80 are reasonable for 8GB of RAM, as you can still afford to keep more data in cache for better performance ] +# 16GB RAM: 70 - 80 [ Lower values like 70 or 80 can be used to keep data in cache longer for systems with 16GB of RAM ] +# 32GB RAM: 80 - 90 [ Values around 80 or 90 are suitable for systems with 32GB of RAM, allowing more data to stay in cache ] +# 64GB RAM or More: 90 - 100 [ Lower values like 90 or 100 can minimize cache eviction for systems with very high memory, such as 64GB or more ] + +# Low Values (e.g., 10-100): +# Situations where you have a lot of available RAM. +# When you want to optimize filesystem access times by keeping more data in cache. +# Systems with large file datasets that can benefit from a larger cache. + +# High Values (e.g., 500-1000): +# Systems with limited RAM resources. +# Servers or virtual machines where memory availability is critical. +# When you want to ensure that cached memory is released more aggressively for other applications. + +# vm.swappiness = +# ---------------------------------------------- +# Adjusts how aggressively the kernel swaps data from RAM to disk. +# - For systems with 4GB RAM, consider a low value (1-10) to prioritize keeping data in RAM. +# - For systems with 8GB RAM, use a moderate value (10-30) for a balance between RAM usage and swapping. +# - For systems with 16GB to 28GB RAM, aim for a moderate value (10-30) to optimize performance. +# - For systems with 32GB or more RAM, a slightly higher value (30-60) may be suitable. +# Monitor system performance and adjust as needed based on your workload and available RAM. + +# CALCULATIONS: ( Schooling ) +# ---------------------------------------------- +# 1 MB (megabyte) = 1048576 bytes +# To convert bytes to megabytes, divide the number of bytes by 1048576. + +# Here's how the calculations work for the values provided: +# For "vm.dirty_background_bytes": +# 16777216 bytes ÷ 1048576 bytes/MB = 16 MB + +# For "vm.dirty_bytes": +# 50331648 bytes ÷ 1048576 bytes/MB = 48 MB + +# These calculations provide the approximate size in megabytes for the specified values. + +# The values "vm.dirty_background_bytes" and "vm.dirty_bytes" control how much dirty data (data that has been modified but not yet written to disk) +# can accumulate in the system's cache before it's flushed to disk. Lowering these values, as done here, results in more frequent disk writes, +# which can be useful when you need data to be quickly written to a USB drive. \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/tweaks/default.nix b/nixos_24.11_cinnamon/config/tweaks/default.nix new file mode 100644 index 0000000..323815c --- /dev/null +++ b/nixos_24.11_cinnamon/config/tweaks/default.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ... }: + +{ + imports = [ + #./4GB-SYSTEM.nix + #./8GB-SYSTEM.nix + #./16GB-SYSTEM.nix + ./32GB-SYSTEM.nix + ./ssd-tweaks.nix + ]; +} \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/tweaks/hdd-tweak.nix b/nixos_24.11_cinnamon/config/tweaks/hdd-tweak.nix new file mode 100644 index 0000000..6dc3ca8 --- /dev/null +++ b/nixos_24.11_cinnamon/config/tweaks/hdd-tweak.nix @@ -0,0 +1,19 @@ +{ config, ... }: + +# Control how and when data is written from memory to disk, which can have an impact on system performance and responsiveness. +# useful for optimizing memory usage, disk writeback behavior, network settings, and other low-level kernel behaviors. + +{ + boot.kernel.sysctl = { + + #--------------------------------------------------------------------- + # HDD tweaks: Adjust settings for an HDD to optimize performance. + #--------------------------------------------------------------------- + "vm.dirty_background_ratio" = "10"; # Set the ratio of dirty memory at which background writeback starts (10% for HDD). + "vm.dirty_expire_centisecs" = "6000"; # Set the time at which dirty data is old enough to be eligible for writeout (6000 centiseconds for HDD). + "vm.dirty_ratio" = "20"; # Set the ratio of dirty memory at which a process is forced to write out dirty data (20% for HDD). + "vm.dirty_time" = "0"; # Disable dirty time accounting. + "vm.dirty_writeback_centisecs" = "1000"; # Set the interval between two consecutive background writeback passes (1000 centiseconds for HDD). + + }; +} \ No newline at end of file diff --git a/nixos_24.11_cinnamon/config/tweaks/ssd-tweaks.nix b/nixos_24.11_cinnamon/config/tweaks/ssd-tweaks.nix new file mode 100644 index 0000000..6deb143 --- /dev/null +++ b/nixos_24.11_cinnamon/config/tweaks/ssd-tweaks.nix @@ -0,0 +1,18 @@ +{ config, ... }: + +{ + + boot.kernel.sysctl = { + #--------------------------------------------------------------------- + # SSD tweaks: Adjust settings for an SSD to optimize performance. + #--------------------------------------------------------------------- + "vm.dirty_background_ratio" = "40"; # Set the ratio of dirty memory at which background writeback starts (5%). Adjusted for SSD. + "vm.dirty_expire_centisecs" = "3000"; # Set the time at which dirty data is old enough to be eligible for writeout (6000 centiseconds). Adjusted for SSD. + "vm.dirty_ratio" = "80"; # Set the ratio of dirty memory at which a process is forced to write out dirty data (10%). Adjusted for SSD. + "vm.dirty_time" = "0"; # Disable dirty time accounting. + "vm.dirty_writeback_centisecs" = "300"; # Set the interval between two consecutive background writeback passes (500 centiseconds) + }; + + services.fstrim.enable = true; + +} \ No newline at end of file diff --git a/nixos_24.11_cinnamon/configuration.nix b/nixos_24.11_cinnamon/configuration.nix new file mode 100644 index 0000000..3c73f1d --- /dev/null +++ b/nixos_24.11_cinnamon/configuration.nix @@ -0,0 +1,202 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ./hardware-configuration.nix + ./config + ]; + + # Bootloader + boot = { + loader.systemd-boot.enable = true; + loader.efi.canTouchEfiVariables = true; + #loader.systemd-boot.consoleMode = "2"; + loader.systemd-boot.editor = false; + loader.systemd-boot.memtest86.enable = true; + + consoleLogLevel = 3; # silence ACPI "errors" (default is 4) + plymouth.enable = true; + tmp.useTmpfs = true; + tmp.tmpfsSize = "50%"; # set to auto to dynamically grow + tmp.cleanOnBoot = true; + + kernelPackages = pkgs.linuxPackages_latest; + #kernelPackages = pkgs.linuxKernel.kernels.linux_xanmod; + # initrd.network.openvpn.enable = true; + }; + + # Enable Kernel same-page merging + hardware.ksm.enable = true; + + # Enable networking + networking ={ + networkmanager.enable = true; + networkmanager.plugins = with pkgs; [ networkmanager-openvpn ]; + usePredictableInterfaceNames = false; + hostName = "wlin002-nixos"; + }; + + # Set your time zone + time.timeZone = "Europe/Berlin"; + + # Select internationalisation properties. + i18n.defaultLocale = "de_DE.UTF-8"; + i18n.extraLocaleSettings = { + LC_ADDRESS = "de_DE.UTF-8"; + LC_IDENTIFICATION = "de_DE.UTF-8"; + LC_MEASUREMENT = "de_DE.UTF-8"; + LC_MONETARY = "de_DE.UTF-8"; + LC_NAME = "de_DE.UTF-8"; + LC_NUMERIC = "de_DE.UTF-8"; + LC_PAPER = "de_DE.UTF-8"; + LC_TELEPHONE = "de_DE.UTF-8"; + LC_TIME = "de_DE.UTF-8"; + }; + + # Configure console keymap + console.keyMap = "de"; + + # Define a user account. Dont forget to set a password with passwd. + users.users.zulumann = { + isNormalUser = true; + description = "Henrik Lutzmann"; + extraGroups = [ "networkmanager" "wheel" "audio" "video" ]; + openssh.authorizedKeys.keyFiles = [ /etc/nixos/config/home/ssh/authorized_keys ]; + packages = with pkgs; [ ]; + }; + + # Enable Firmware + hardware = { + #enableAllFirmware = true; + enableRedistributableFirmware = true; + cpu.amd.updateMicrocode = true; + #cpu.intel.updateMicrocode = true; + }; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + programs.mtr.enable = true; + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + + # Enable ZramSwap + zramSwap = { + enable = true; + priority = 100; + memoryPercent = 25; + algorithm = "zstd"; + }; + + # Automatic Upgrades + system.autoUpgrade = { + enable = false; + allowReboot = false; + channel = "https://channels.nixos.org/nixos-24.11"; + }; + + # NixOS Settings + documentation.nixos.enable = true; + nix = { + gc.automatic = true; + gc.options = "--delete-older-than 7d"; + optimise.automatic = true; + optimise.dates = [ "weekly" ]; + settings.auto-optimise-store = true; + settings.cores = 4; # maximum number of concurrent tasks during one build + settings.max-jobs = 4; # maximum number of jobs that Nix will try to build in parallel + settings.sandbox = true; # perform builds in a sandboxed environment + }; + + # Filesystems + fileSystems."/run" = { + device = "tmpfs"; + fsType = "tmpfs"; + options = [ "size=6G" ]; # Adjust based on your preferences and needs + }; + + # Fixed : better to use Dynamic + fileSystems."/tmp" = { + device = "tmpfs"; + fsType = "tmpfs"; + options = [ "size=7G" ]; # Adjust based on your preferences and needs + }; + + # No access time and continuous TRIM for SSD + fileSystems."/".options = [ "noatime" "discard" ]; + fileSystems."/home".options = [ "noatime" "discard" ]; + + fileSystems."/home/zulumann/VM-Image" = { + device = "/dev/disk/by-uuid/3b47d34d-618a-4a33-9f65-cde6e0d6467e"; + fsType = "ext4"; + options = [ "discard" "noatime" "nofail" "x-systemd.device-timeout=3" ]; + }; + + # List services that you want to enable: + services = { + acpid.enable = true; + ananicy.enable = true; + #fwupd.enable = true; + gvfs.enable = true; + haveged.enable = true; + preload.enable = true; + udisks2.enable = true; + #tumbler.enable = true; + }; + + # Enable OpenSSH + services.openssh = { + enable = true; + openFirewall = true; + settings.PermitRootLogin = "no"; + settings.PasswordAuthentication = false; + }; + + # Enable sound with pipewire + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + #media-session.enable = true; + }; + + # Enable Avahi + services.avahi = { + enable = true; + openFirewall = true; + nssmdns4 = true; + publish = { + enable = true; + addresses = true; + domain = true; + hinfo = true; + userServices = true; + workstation = true; + }; + }; + + # Open ports in the firewall + # netstat -ntulp + networking.firewall = { + enable = false; + allowPing = true; + logRefusedConnections = true; + allowedTCPPorts = [ ]; + allowedUDPPorts = [ ]; + allowedTCPPortRanges = [ ]; + allowedUDPPortRanges = [ ]; + }; + + # Copy the NixOS configuration file and link it from the resulting system + # (/run/current-system/configuration.nix). This is useful in case you + # accidentally delete configuration.nix. + system.copySystemConfiguration = true; + + system.stateVersion = "24.11"; + +} diff --git a/nixos_24.11_cinnamon/home.nix b/nixos_24.11_cinnamon/home.nix new file mode 100644 index 0000000..57aa1ab --- /dev/null +++ b/nixos_24.11_cinnamon/home.nix @@ -0,0 +1,73 @@ +{ config, lib, pkgs, osConfig, ... }: +let + home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz"; +in +{ + + imports = [ + (import "${home-manager}/nixos") + ]; + + home-manager.backupFileExtension = "backup"; + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + + home-manager.users.zulumann = { + home.stateVersion = "24.11"; + home.homeDirectory = "/home/zulumann"; + home.packages = with pkgs; [ + neofetch + ]; + + imports = [ + ./../home + ]; + + # Set profile + home.file = { + ".profile" = { + text = '' + export GTK_THEME=Arc-Dark + ''; + }; + }; + + # Set script folder + home.file = { + ".local/bin" = { + executable = true; + recursive = true; + source = /etc/nixos/config/home/scripts; + }; + }; + + # Set Nemo script folder + home.file = { + ".local/share/nemo/scripts" = { + executable = true; + recursive = true; + source = /etc/nixos/config/home/nemo_scripts; + }; + }; + + # Set Nemo Action folder + home.file = { + ".local/share/nemo/actions" = { + executable = true; + recursive = true; + source = /etc/nixos/config/home/nemo_actions; + }; + }; + + # Enable GIT + programs.git = { + enable = true; + userName = "zulumann"; + userEmail = "zulumann_70@gmx.de"; + }; + + + programs.home-manager.enable = true; + }; + +} \ No newline at end of file diff --git a/nixos_24.11_wlin001/configuration.nix b/nixos_24.11_wlin001/configuration.nix new file mode 100644 index 0000000..f180a6d --- /dev/null +++ b/nixos_24.11_wlin001/configuration.nix @@ -0,0 +1,256 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ./hardware-configuration.nix + ./system + ./packages + ]; + + # Bootloader + boot = { + loader.systemd-boot.enable = true; + loader.efi.canTouchEfiVariables = true; + #loader.systemd-boot.consoleMode = "2"; + loader.systemd-boot.editor = false; + loader.systemd-boot.memtest86.enable = true; + + consoleLogLevel = 3; # silence ACPI "errors" (default is 4) + plymouth.enable = true; + tmp.useTmpfs = true; + tmp.tmpfsSize = "50%"; # set to auto to dynamically grow + tmp.cleanOnBoot = true; + + kernelPackages = pkgs.linuxPackages_latest; + #kernelPackages = pkgs.linuxKernel.kernels.linux_xanmod; + initrd.network.openvpn.enable = true; + }; + + # Enable Kernel same-page merging + hardware.ksm.enable = true; + + # Enable networking + networking ={ + networkmanager.enable = true; + networkmanager.plugins = with pkgs; [ networkmanager-openvpn ]; + usePredictableInterfaceNames = false; + hostName = "wlin001-nixos"; + }; + + #programs.nm-applet.enable = true; + + #users.extraGroups.networkmanager.members = [ "root" "zulumann" ]; + + # Set your time zone + time.timeZone = "Europe/Berlin"; + + # Select internationalisation properties. + i18n.defaultLocale = "de_DE.UTF-8"; + i18n.extraLocaleSettings = { + LC_ADDRESS = "de_DE.UTF-8"; + LC_IDENTIFICATION = "de_DE.UTF-8"; + LC_MEASUREMENT = "de_DE.UTF-8"; + LC_MONETARY = "de_DE.UTF-8"; + LC_NAME = "de_DE.UTF-8"; + LC_NUMERIC = "de_DE.UTF-8"; + LC_PAPER = "de_DE.UTF-8"; + LC_TELEPHONE = "de_DE.UTF-8"; + LC_TIME = "de_DE.UTF-8"; + }; + + # Configure console keymap + console.keyMap = "de"; + + # Define a user account. Dont forget to set a password with passwd. + users.users.zulumann = { + isNormalUser = true; + description = "Henrik Lutzmann"; + extraGroups = [ "networkmanager" "wheel" "audio" "video" ]; + openssh.authorizedKeys.keyFiles = [ /etc/nixos/secrets/authorized_keys ]; + packages = with pkgs; [ ]; + }; + + # Enable Firmware + hardware = { + #enableAllFirmware = true; + enableRedistributableFirmware = true; + cpu.amd.updateMicrocode = true; + #cpu.intel.updateMicrocode = true; + }; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + programs.mtr.enable = true; + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + + # Enable ZramSwap + zramSwap = { + enable = true; + priority = 100; + memoryPercent = 25; + algorithm = "zstd"; + }; + + # Automatic Upgrades + system.autoUpgrade = { + enable = false; + allowReboot = false; + channel = "https://channels.nixos.org/nixos-24.11"; + }; + + # NixOS Settings + documentation.nixos.enable = true; + nix = { + gc.automatic = true; + gc.options = "--delete-older-than 7d"; + optimise.automatic = true; + optimise.dates = [ "weekly" ]; + settings.auto-optimise-store = true; + settings.cores = 4; # maximum number of concurrent tasks during one build + settings.max-jobs = 4; # maximum number of jobs that Nix will try to build in parallel + settings.sandbox = true; # perform builds in a sandboxed environment + }; + + # Copy the NixOS configuration file and link it from the resulting system + # (/run/current-system/configuration.nix). This is useful in case you + # accidentally delete configuration.nix. + system.copySystemConfiguration = true; + + # Filesystems + fileSystems."/run" = { + device = "tmpfs"; + fsType = "tmpfs"; + options = [ "size=6G" ]; # Adjust based on your preferences and needs + }; + + # Fixed : better to use Dynamic + fileSystems."/tmp" = { + device = "tmpfs"; + fsType = "tmpfs"; + options = [ "size=7G" ]; # Adjust based on your preferences and needs + }; + + # No access time and continuous TRIM for SSD + fileSystems."/".options = [ "noatime" "discard" ]; + fileSystems."/home".options = [ "noatime" "discard" ]; + + fileSystems."/run/media/zulumann/HDD1.5TB" = { + device = "/dev/disk/by-uuid/58acb50a-9718-44fb-a7e6-199d7ef811d4"; + fsType = "ext4"; + options = [ "noatime" "nofail" "x-systemd.device-timeout=3" ]; + }; + + fileSystems."/run/media/zulumann/HDD01" = { + device = "/dev/disk/by-uuid/31838396-c72f-4681-af5d-a2976459e28b"; + fsType = "ext4"; + options = [ "noatime" "nofail" "x-systemd.device-timeout=3" ]; + }; + + fileSystems."/home/zulumann/VM-Image" = { + device = "/dev/disk/by-uuid/6a1bce14-88cb-4864-841e-2d384c8a853c"; + fsType = "ext4"; + options = [ "discard" "noatime" "nofail" "x-systemd.device-timeout=3" ]; + }; + + # List services that you want to enable: + services = { + acpid.enable = true; + ananicy.enable = true; + #fwupd.enable = true; + gvfs.enable = true; + haveged.enable = true; + preload.enable = true; + udisks2.enable = true; + #tumbler.enable = true; + }; + + # Enable cron service + services.cron = { + enable = true; + systemCronJobs = [ "@hourly zulumann /home/zulumann/.rsync-backup.sh" ]; + }; + + + # Enable OpenSSH + services.openssh = { + enable = true; + openFirewall = true; + settings.PermitRootLogin = "no"; + settings.PasswordAuthentication = false; + }; + + # Enable sound with pipewire + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + #media-session.enable = true; + }; + + # Enable Avahi + services.avahi = { + enable = true; + openFirewall = true; + nssmdns4 = true; + publish = { + enable = true; + addresses = true; + domain = true; + hinfo = true; + userServices = true; + workstation = true; + }; + }; + + # Enable tmux + programs.tmux.enable = true; + + programs.bash = { + completion.enable = true; + enableLsColors = true; + shellAliases = { + set-default-boot="sudo /run/current-system/bin/switch-to-configuration boot"; + full-system-clean="nix-collect-garbage -d && sudo nix-collect-garbage -d"; + full-system-upgrade="sudo nixos-rebuild switch --upgrade && flatpak update -y && nix-env -u '*'"; + list-system-configurations="ls -l /nix/var/nix/profiles/system-*-link"; + system-rebuild="sudo nixos-rebuild switch"; + system-repair="sudo nixos-rebuild switch --repair"; + full-system-repair="sudo nix-store --verify --check-contents --repair"; + system-upgrade-information="sudo nixos-rebuild switch --upgrade dry-build"; + local-upgrade="sudo nix-channel --update nixpkgs && nix-env -u '*'"; + pve01-update="ansible-playbook ~/Ansible/playbooks/apt-dist.yml -i ~/Ansible/hosts"; + }; + }; + + environment.systemPackages = with pkgs; [ + bash + bash-completion + bash-preexec + bashdb + bashSnippets + nix-bash-completions + tmux + ]; + + # Open ports in the firewall + # netstat -ntulp + networking.firewall = { + enable = false; + allowPing = true; + logRefusedConnections = true; + allowedTCPPorts = [ ]; + allowedUDPPorts = [ ]; + allowedTCPPortRanges = [ ]; + allowedUDPPortRanges = [ ]; + }; + + system.stateVersion = "24.11"; + +} diff --git a/nixos_24.11_wlin001/hardware-configuration.nix b/nixos_24.11_wlin001/hardware-configuration.nix new file mode 100644 index 0000000..55324d2 --- /dev/null +++ b/nixos_24.11_wlin001/hardware-configuration.nix @@ -0,0 +1,43 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "uas" "usbhid" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/e2446999-54e5-4b73-9825-6e746e2812ef"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/AFE2-5F35"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/b2cb0283-c6ef-49a4-9601-b5770b285945"; + fsType = "ext4"; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp7s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/nixos_24.11_wlin001/home/ansible.nix b/nixos_24.11_wlin001/home/ansible.nix new file mode 100644 index 0000000..1870f87 --- /dev/null +++ b/nixos_24.11_wlin001/home/ansible.nix @@ -0,0 +1,120 @@ +{ config, pkgs, ... }: + +{ + + home.file = { + "/home/zulumann/Ansible/ansible.cfg" = { + executable = true; + text = '' + [defaults] + inventory = /home/zulumann/Ansible/hosts + + # The directory containing the playbooks + playbook_dir = /home/zulumann/Ansible/playbooks + + # Timeout for the connection + timeout = 30 + + host_key_checking=False + ''; + }; + }; + + home.file = { + "/home/zulumann/Ansible/hosts" = { + executable = true; + text = '' + # Consolidation of all groups + [hosts:children] + pve01 + internet + + [pve01] + jdownloader ansible_host=192.168.10.51 + fileserver01 ansible_host=192.168.10.52 + checkmk ansible_host=192.168.10.53 + pbs01 ansible_host=192.168.10.54 + docker-lan ansible_host=192.168.10.55 + mail ansible_host=192.168.10.120 + vserver01 ansible_host=192.168.10.180 + seedbox ansible_host=192.168.20.10 + aptcache ansible_host=192.168.50.10 + rustdesk ansible_host=192.168.50.12 + radicale ansible_host=192.168.50.13 + mumble ansible_host=192.168.50.14 + meet ansible_host=192.168.50.15 + freshrss ansible_host=192.168.50.17 + owncloud ansible_host=192.168.50.18 + webserver01 ansible_host=192.168.50.19 + webserver02 ansible_host=192.168.50.20 + gitea ansible_host=192.168.50.21 + bookshelf ansible_host=192.168.50.22 + #crowdsec ansible_host=192.168.50.23 + syncthing ansible_host=192.168.50.24 + sftpgo ansible_host=192.168.50.25 + jellyfin ansible_host=192.168.60.20 + adgurd ansible_host=192.168.178.10 + + [internet] + strato ansible_host=85.215.43.109 + + [pve01:vars] + ansible_user=root + ansible_port=22 + ansible_python_interpreter=/usr/bin/python3 + #ansible_ssh_private_key_file = ~/.ssh/id_rsa + + [internet:vars] + ansible_user=root + ansible_port=63007 + ansible_python_interpreter=/usr/bin/python3 + #ansible_ssh_pass=password + ''; + }; + }; + + + home.file = { + "/home/zulumann/Ansible/playbooks/apt-dist.yml" = { + executable = true; + text = '' + - name: apt dist-upgrade Debian based servers + hosts: + - pve01 + - strato + tasks: + - name: Update package lists + apt: + update_cache: yes + + - name: Only run "update_cache=yes" if the last one is more than 3600 seconds ago + apt: + update_cache: yes + cache_valid_time: 3600 + + - name: Upgrade all Packages + apt: + upgrade: dist + + - name: Pass options to dpkg on run + apt: + upgrade: dist + update_cache: yes + dpkg_options: 'force-confold,force-confdef' + + - name: Autoremove unused packages + become: yes + command: apt -y autoremove + + - name: Removes all packages from the package cache + become: yes + command: apt -y clean + ''; + }; + }; + + home.shellAliases = { + lxc-update = "ansible-playbook ~/Ansible/playbooks/apt-dist.yml -i ~/Ansible/hosts"; + }; + +} diff --git a/nixos_24.11_wlin001/home/config-profile.nix b/nixos_24.11_wlin001/home/config-profile.nix new file mode 100644 index 0000000..5e026cf --- /dev/null +++ b/nixos_24.11_wlin001/home/config-profile.nix @@ -0,0 +1,12 @@ +{ config, pkgs, ... }: + +{ + + home.file = { + ".profile" = { + text = '' + export GTK_THEME=Arc-Dark + ''; + }; + }; +} diff --git a/nixos_24.11_wlin001/home/config-rsync.nix b/nixos_24.11_wlin001/home/config-rsync.nix new file mode 100644 index 0000000..3e945a5 --- /dev/null +++ b/nixos_24.11_wlin001/home/config-rsync.nix @@ -0,0 +1,80 @@ +{ config, pkgs, ... }: + +{ + + home.file = { + ".rsync-backup.sh" = { + executable = true; + text = '' + #!/bin/sh + # + ################################################################################ + # + # Push Home Zulumann to Fileserver01/Backup/$HOSTNAME/ + # + ################################################################################ + # -a (Kurzversion für --archive): gleiche Bedeutung wie -rlptgoD + # -r (Kurzversion für --recursive): Unterverzeichnisse kopieren + # -l (Kurzversion für --links): symbolische Links kopierenrsync + # -p (Kurzversion für --perms): Rechte der Quelldatei beibehalten + # -t (Kurzversion für --times): Zeiten der Quelldatei beibehalten + # -g (Kurzversion für --group): Gruppenrechte der Quelldatei beibehalten + # -o (Kurzversion für --owner): Besitzrechte der Quelldatei beibehalten (nur als root User möglich) + # -D (Kurzversion für --devices --specials): Gerätedateien der Quelldatei beibehalten (nur als root User möglich) + # -v (Kurzversion für --verbose): zeigt während der Ausführung an welche Dateien synchronisiert werden + # -z + # --delete: entfernt Dateien im Zielverzeichnis die mittelerweile im Quellverzeichnis nicht mehr vorhanden sind + # rsync --dry-run + ################################################################################ + # rsync -rdt rsync://192.168.10.52/ + # + rsync -a -v --exclude-from=/home/$USER/.rsync-exlude --delete --progress --partial /home/$USER/ rsync://192.168.10.52:873/Backup/$HOSTNAME/ -b --backup-dir=01rsync-trash/ 2>&1 | tee /home/$USER/.rsync-backup.log + ''; + }; + }; + + + home.file = { + ".rsync-exlude" = { + text = '' + - Downloads + - Games + - Share-Cloud + - Share-Priv + - Share-SMB + - Share-VM + - Sync + - VM-Image + - Code Cache + - cache* + - Cache* + - Cache_* + - *_cache + - *Cache + - DawnGraphiteCache + - log* + - logs + - tmp + - Trash + + .config + - .config/syncthing + - .config/unity3d + - .config/ownCloud + + .local + - .local/state + - .local/share/containers + - .local/share/flatpak + - .local/share/keyrings + - .local/share/nomic.ai + - .local/share/Steam + + .jd2 + + .conkyrc + - .* + - *.LOG + - LOG + - *.old + ''; + }; + }; + +} diff --git a/nixos_24.11_wlin001/home/config-ssh.nix b/nixos_24.11_wlin001/home/config-ssh.nix new file mode 100644 index 0000000..e335cef --- /dev/null +++ b/nixos_24.11_wlin001/home/config-ssh.nix @@ -0,0 +1,180 @@ +{ config, pkgs, ... }: + +{ + + programs.ssh = { + enable = true; + matchBlocks = { + + ### Network Hosts ### + htpc01 = { + hostname = "htpc01.local"; + user = "kodi"; + port = 22; + # identityFile = "~/.ssh/id_rsa.pub"; + }; + + nas = { + hostname = "192.168.20.90"; + user = "root"; + port = 22; + }; + + pve01 = { + hostname = "192.168.10.50"; + user = "root"; + port = 22; + }; + + ### Proxmox PVE01 LAN ### + pfsense = { + hostname = "192.168.10.1"; + user = "admin"; + port = 22; + }; + + opnsense = { + hostname = "192.168.10.1"; + user = "root"; + port = 22; + }; + + fileserver01 = { + hostname = "192.168.10.52"; + user = "root"; + port = 22; + }; + + checkmk = { + hostname = "192.168.50.53"; + user = "root"; + port = 22; + }; + + pbs01 = { + hostname = "192.168.10.54"; + user = "root"; + port = 22; + }; + + docker-lan = { + hostname = "192.168.10.55"; + user = "root"; + port = 22; + }; + + jdownloader = { + hostname = "192.168.10.57"; + user = "root"; + port = 22; + }; + + vserver01 = { + hostname = "192.168.10.180"; + user = "root"; + port = 22; + }; + + adgurd = { + hostname = "192.168.178.10"; + user = "root"; + port = 22; + }; + + ### Proxmox PVE01 DMZ ### + aptcache = { + hostname = "192.168.50.10"; + user = "root"; + port = 22; + }; + + docker-dmz = { + hostname = "192.168.50.11"; + user = "root"; + port = 22; + }; + + rustdesk = { + hostname = "192.168.50.12"; + user = "root"; + port = 22; + }; + + radicale = { + hostname = "192.168.50.13"; + user = "root"; + port = 22; + }; + + mumble = { + hostname = "192.168.50.14"; + user = "root"; + port = 22; + }; + + meet = { + hostname = "192.168.50.15"; + user = "root"; + port = 22; + }; + + mail = { + hostname = "192.168.50.16"; + user = "root"; + port = 22; + }; + + freshrss = { + hostname = "192.168.50.17"; + user = "root"; + port = 22; + }; + + owncloud = { + hostname = "192.168.50.18"; + user = "root"; + port = 22; + }; + + websrv01 = { + hostname = "192.168.50.19"; + user = "root"; + port = 22; + }; + + websrv02 = { + hostname = "192.168.50.20"; + user = "root"; + port = 22; + }; + + gitea = { + hostname = "192.168.50.21"; + user = "root"; + port = 22; + }; + + ### Proxmox PVE01 IOT ### + jellyfin = { + hostname = "192.168.60.20"; + user = "root"; + port = 22; + }; + + ### Proxmox PVE01 VPN ### + seedbox = { + hostname = "192.168.20.10"; + user = "root"; + port = 22; + }; + + ### Internet Hosts ### + strato = { + hostname = "85.215.43.109"; + user = "root"; + port = 63007; + }; + }; + }; + +} diff --git a/nixos_24.11_wlin001/home/default.nix b/nixos_24.11_wlin001/home/default.nix new file mode 100644 index 0000000..535e1ef --- /dev/null +++ b/nixos_24.11_wlin001/home/default.nix @@ -0,0 +1,16 @@ +{ pkgs, config, ... }: + +{ + imports = [ + # Enable &/ Configure Programs + ./ansible.nix + ./config-profile.nix + ./config-rsync.nix + ./config-ssh.nix + ./psd.nix + + # Place Home Files Like Pictures + #./files.nix + ]; + +} diff --git a/nixos_24.11_wlin001/home/profile b/nixos_24.11_wlin001/home/profile new file mode 100644 index 0000000..fcd2777 --- /dev/null +++ b/nixos_24.11_wlin001/home/profile @@ -0,0 +1 @@ +export GTK_THEME=Arc-Dark diff --git a/nixos_24.11_wlin001/home/psd.nix b/nixos_24.11_wlin001/home/psd.nix new file mode 100644 index 0000000..f29de0d --- /dev/null +++ b/nixos_24.11_wlin001/home/psd.nix @@ -0,0 +1,56 @@ +{ config, pkgs, ... }: + +{ + services.psd = { + enable = true; + resyncTimer = "30min"; + }; + + home.file = { + ".config/psd/psd.conf" = { + text = '' + # $XDG_CONFIG_HOME/psd/psd.conf + # + # For documentation, refer man 1 psd or to the wiki page + # https://wiki.archlinux.org/index.php/Profile-sync-daemon + + ## NOTE the following: + ## To protect data from corruption, in the event that you do make an edit while + ## psd is active, any changes made will be applied the next time you start psd. + + # Uncomment and set to "yes" to use overlayfs instead of a full copy to reduce + # the memory costs and to improve sync/unsync operations. Note that your kernel + # MUST have this module available in order to use this mode. + USE_OVERLAYFS="yes" + + # Uncomment and set to "yes" to resync on suspend to reduce potential data loss. + # Note that your system MUST have gdbus from glib2 installed to use this mode. + USE_SUSPSYNC="yes" + + # List any browsers in the array below to have managed by psd. Useful if you do + # not wish to have all possible browser profiles managed which is the default if + # this array is left commented. + # Possible values: + # chromium + # firefox + # firefox-trunk + # vivaldi + # vivaldi-snapshot + BROWSERS=(firefox) + # Uncomment and set to "no" to completely disable the crash recovery feature. + # + # The default is to create crash recovery backups if the system is ungracefully + # powered-down due to a kernel panic, hitting the reset switch, battery going + # dead, etc. Some users keep very diligent backups and don't care to have this + # feature enabled. + USE_BACKUPS="yes" + + # Uncomment and set to an integer that is the maximum number of crash recovery + # snapshots to keep (the oldest ones are deleted first). + # The default is to save the most recent 5 crash recovery snapshots. + BACKUP_LIMIT=5 + ''; + }; + }; + +} diff --git a/nixos_24.11_wlin001/home/wallpaper/5120x2880.jpg b/nixos_24.11_wlin001/home/wallpaper/5120x2880.jpg new file mode 100644 index 0000000..5201b05 Binary files /dev/null and b/nixos_24.11_wlin001/home/wallpaper/5120x2880.jpg differ diff --git a/nixos_24.11_wlin001/home/wallpaper/Coasto 3.jpg b/nixos_24.11_wlin001/home/wallpaper/Coasto 3.jpg new file mode 100644 index 0000000..afead77 Binary files /dev/null and b/nixos_24.11_wlin001/home/wallpaper/Coasto 3.jpg differ diff --git a/nixos_24.11_wlin001/home/wallpaper/DarkCyan.png b/nixos_24.11_wlin001/home/wallpaper/DarkCyan.png new file mode 100644 index 0000000..d30202d Binary files /dev/null and b/nixos_24.11_wlin001/home/wallpaper/DarkCyan.png differ diff --git a/nixos_24.11_wlin001/home/wallpaper/Mountain_04.jpg b/nixos_24.11_wlin001/home/wallpaper/Mountain_04.jpg new file mode 100644 index 0000000..4c4224a Binary files /dev/null and b/nixos_24.11_wlin001/home/wallpaper/Mountain_04.jpg differ diff --git a/nixos_24.11_wlin001/home/wallpaper/Textur_01.jpg b/nixos_24.11_wlin001/home/wallpaper/Textur_01.jpg new file mode 100644 index 0000000..6ff4c33 Binary files /dev/null and b/nixos_24.11_wlin001/home/wallpaper/Textur_01.jpg differ diff --git a/nixos_24.11_wlin001/home/wallpaper/adapta_backgrounds01.jpg b/nixos_24.11_wlin001/home/wallpaper/adapta_backgrounds01.jpg new file mode 100644 index 0000000..e1a5907 Binary files /dev/null and b/nixos_24.11_wlin001/home/wallpaper/adapta_backgrounds01.jpg differ diff --git a/nixos_24.11_wlin001/home/wallpaper/adapta_backgrounds03.jpg b/nixos_24.11_wlin001/home/wallpaper/adapta_backgrounds03.jpg new file mode 100644 index 0000000..0548530 Binary files /dev/null and b/nixos_24.11_wlin001/home/wallpaper/adapta_backgrounds03.jpg differ diff --git a/nixos_24.11_wlin001/home/wallpaper/adapta_backgrounds04.jpg b/nixos_24.11_wlin001/home/wallpaper/adapta_backgrounds04.jpg new file mode 100644 index 0000000..a993e56 Binary files /dev/null and b/nixos_24.11_wlin001/home/wallpaper/adapta_backgrounds04.jpg differ diff --git a/nixos_24.11_wlin001/home/wallpaper/cubes_1080.jpg b/nixos_24.11_wlin001/home/wallpaper/cubes_1080.jpg new file mode 100644 index 0000000..b65aff1 Binary files /dev/null and b/nixos_24.11_wlin001/home/wallpaper/cubes_1080.jpg differ diff --git a/nixos_24.11_wlin001/home/wallpaper/greenish.jpg b/nixos_24.11_wlin001/home/wallpaper/greenish.jpg new file mode 100644 index 0000000..b47e924 Binary files /dev/null and b/nixos_24.11_wlin001/home/wallpaper/greenish.jpg differ diff --git a/nixos_24.11_wlin001/packages/appimage.nix b/nixos_24.11_wlin001/packages/appimage.nix new file mode 100644 index 0000000..55fb741 --- /dev/null +++ b/nixos_24.11_wlin001/packages/appimage.nix @@ -0,0 +1,16 @@ +{ config, pkgs, ... }: + +{ + boot.binfmt = { + registrations.appimage = { + wrapInterpreterInShell = false; + interpreter = "${pkgs.appimage-run}/bin/appimage-run"; + recognitionType = "magic"; + offset = 0; + mask = "\\xff\\xff\\xff\\xff\\x00\\x00\\x00\\x00\\xff\\xff\\xff"; + magicOrExtension = "\\x7fELF....AI\\x02"; + }; + # run aarch64 binaries + emulatedSystems = [ "aarch64-linux" ]; + }; +} diff --git a/nixos_24.11_wlin001/packages/cinnamon.nix b/nixos_24.11_wlin001/packages/cinnamon.nix new file mode 100644 index 0000000..24e6ebd --- /dev/null +++ b/nixos_24.11_wlin001/packages/cinnamon.nix @@ -0,0 +1,106 @@ +{ config, pkgs, ... }: + +{ + + services = { + # Enable the X11 windowing system + xserver = { + enable = true; + xkb.layout = "de"; + xkb.variant = ""; + xkb.options = "eurosign:e"; + exportConfiguration = true; + enableCtrlAltBackspace = true; + #wacom.enable = false; + + # Enable Lightdm + displayManager = { + lightdm.enable = true; + lightdm.background = /etc/nixos/home/wallpaper/5120x2880.jpg; + lightdm.greeters.slick.theme.name = "Arc-Dark"; + lightdm.greeters.slick.iconTheme.name = "Papirus-Dark"; + lightdm.greeters.slick.cursorTheme.name = "Numix-Cursor"; + lightdm.greeters.slick.extraConfig = "activate-numlock=true"; + }; + + # Enable the Cinnamon Desktop Environment + desktopManager = { + xterm.enable = false; + cinnamon.enable = true; + }; + }; + + displayManager.defaultSession = "cinnamon"; + bamf.enable = true; + libinput.enable = false; + }; + + # Enable Programs + programs = { + dconf.enable = true; + geary.enable = false; + system-config-printer.enable = true; + }; + + # Enable xdg portal + xdg.portal = { + enable = true; + extraPortals = [ pkgs.xdg-desktop-portal-xapp ]; + }; + + # Environment variables + environment.variables = { + EDITOR = "nano"; + BROWSER = "firefox"; + QT_QPA_PLATFORM = "xcb"; + #QT_QPA_PLATFORMTHEME = lib.mkForce "qt5ct"; + }; + + environment.sessionVariables = rec { + XDG_CACHE_HOME = "$HOME/.cache"; + XDG_CONFIG_HOME = "$HOME/.config"; + XDG_DATA_HOME = "$HOME/.local/share"; + XDG_STATE_HOME = "$HOME/.local/state"; + XDG_BIN_HOME = "$HOME/.local/bin"; + PATH = [ + "${XDG_BIN_HOME}" + ]; + }; + + environment.systemPackages = with pkgs; [ + conky + clipit + nemo-emblems + nemo-with-extensions + nemo-fileroller + nemo-python + bulky + file-roller + gnome-system-monitor + gnome-disk-utility + tilda + system-config-printer + plank + numlockx + ]; + + environment.cinnamon.excludePackages = with pkgs; [ + #nemo + onboard + hexchat + xterm + ]; + + networking.firewall = { + allowedTCPPorts = [ + 42000 # Warpinator used for transfer + 42001 # Warpinator authentication port + ]; + + allowedUDPPorts = [ + 42000 # Warpinator used for transfer + 42001 # Warpinator authentication port + ]; + }; + +} diff --git a/nixos_24.11_wlin001/packages/default.nix b/nixos_24.11_wlin001/packages/default.nix new file mode 100644 index 0000000..d100a1c --- /dev/null +++ b/nixos_24.11_wlin001/packages/default.nix @@ -0,0 +1,17 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ./appimage.nix + ./cinnamon.nix + ./distrobox.nix + ./firefox.nix + ./flatpak.nix + #./mpd.nix + ./nix-ld.nix + ./steam.nix + ./syncthing.nix + ./packages.nix + ./home-manager.nix + ]; +} diff --git a/nixos_24.11_wlin001/packages/distrobox.nix b/nixos_24.11_wlin001/packages/distrobox.nix new file mode 100644 index 0000000..f7022b3 --- /dev/null +++ b/nixos_24.11_wlin001/packages/distrobox.nix @@ -0,0 +1,13 @@ +{ config, pkgs, ... }: + +{ + + virtualisation.docker.enable = true; + users.users.zulumann.extraGroups = [ "docker" ]; + + environment.systemPackages = with pkgs; [ + distrobox # Wrapper around podman or docker to create and start containers + boxbuddy # An unofficial GUI for managing your Distroboxes + ]; + +} diff --git a/nixos_24.11_wlin001/packages/firefox.nix b/nixos_24.11_wlin001/packages/firefox.nix new file mode 100644 index 0000000..c7bc126 --- /dev/null +++ b/nixos_24.11_wlin001/packages/firefox.nix @@ -0,0 +1,196 @@ +{ config, pkgs, ... }: + +{ + programs.firefox = { + enable = true; + languagePacks = [ "de" ]; + preferences = { + "extensions.pocket.enabled" = false; + "extensions.screenshots.disabled" = false; + "browser.topsites.contile.enabled" = false; + "browser.formfill.enable" = false; + "browser.search.suggest.enabled" = false; + "browser.search.suggest.enabled.private" = false; + "browser.urlbar.suggest.searches" = false; + "browser.urlbar.showSearchSuggestionsFirst" = false; + "browser.newtabpage.activity-stream.feeds.section.topstories" = false; + "browser.newtabpage.activity-stream.feeds.snippets" = false; + "browser.newtabpage.activity-stream.section.highlights.includePocket" = false; + "browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = false; + "browser.newtabpage.activity-stream.section.highlights.includeDownloads" = false; + "browser.newtabpage.activity-stream.section.highlights.includeVisited" = false; + "browser.newtabpage.activity-stream.showSponsored" = false; + "browser.newtabpage.activity-stream.system.showSponsored" = false; + "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; + }; + + policies = { + CaptivePortal = false; + DisableFirefoxAccounts = false; + DisableAccounts = false; + DisableFirefoxScreenshots = true; + DisableTelemetry = true; + DisableFirefoxStudies = true; + DisablePocket = true; + DontCheckDefaultBrowser = true; + PasswordManagerEnabled = false; + OverrideFirstRunPage = ""; + OverridePostUpdatePage = ""; + DisplayBookmarksToolbar = "always"; # alternatives: "always" or "newtab" + DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on" + SearchBar = "separate"; # alternative: "unified" + + EnableTrackingProtection = { + Value= true; + Locked = true; + Cryptomining = true; + Fingerprinting = true; + }; + + FirefoxHome = { + Highlights = false; + Pocket = false; + Search = true; + Snippets = false; + TopSites = false; + }; + + settings = { + "browser.download.panel.shown" = true; + "dom.security.https_only_mode" = true; + "general.smoothScroll" = true; + "gfx.webrender.enabled" = true; + "layout.css.backdrop-filter.enabled" = true; + "media.videocontrols.picture-in-picture.video-toggle.enabled" = false; + "signon.rememberSignons" = false; + "svg.context-properties.content.enabled" = true; + + # We handle this elsewhere + "browser.shell.checkDefaultBrowser" = false; + + # Don't allow websites to prevent use of right-click, or otherwise + # messing with the context menu. + "dom.event.contextmenu.enabled" = true; + + # Don't allow websites to prevent copy and paste. Disable + # notifications of copy, paste, or cut functions. Stop webpage + # knowing which part of the page had been selected. + "dom.event.clipboardevents.enabled" = true; + + # Do not track from battery status. + "dom.battery.enabled" = false; + + # Show punycode. Help protect from character 'spoofing'. + "network.IDN_show_punycode" = true; + + # Disable site reading installed plugins. + "plugins.enumerable_names" = ""; + + # Use Mozilla instead of Google here. + "geo.provider.network.url" = + "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"; + + # Safe browsing + "browser.safebrowsing.enabled" = false; + "browser.safebrowsing.phishing.enabled" = false; + "browser.safebrowsing.malware.enabled" = false; + "browser.safebrowsing.downloads.enabled" = false; + "browser.safebrowsing.provider.google4.updateURL" = ""; + "browser.safebrowsing.provider.google4.reportURL" = ""; + "browser.safebrowsing.provider.google4.reportPhishMistakeURL" = ""; + "browser.safebrowsing.provider.google4.reportMalwareMistakeURL" = ""; + "browser.safebrowsing.provider.google4.lists" = ""; + "browser.safebrowsing.provider.google4.gethashURL" = ""; + "browser.safebrowsing.provider.google4.dataSharingURL" = ""; + "browser.safebrowsing.provider.google4.dataSharing.enabled" = false; + "browser.safebrowsing.provider.google4.advisoryURL" = ""; + "browser.safebrowsing.provider.google4.advisoryName" = ""; + "browser.safebrowsing.provider.google.updateURL" = ""; + "browser.safebrowsing.provider.google.reportURL" = ""; + "browser.safebrowsing.provider.google.reportPhishMistakeURL" = ""; + "browser.safebrowsing.provider.google.reportMalwareMistakeURL" = ""; + "browser.safebrowsing.provider.google.pver" = ""; + "browser.safebrowsing.provider.google.lists" = ""; + "browser.safebrowsing.provider.google.gethashURL" = ""; + "browser.safebrowsing.provider.google.advisoryURL" = ""; + "browser.safebrowsing.downloads.remote.url" = ""; + + # Don't call home on new tabs + "browser.selfsupport.url" = ""; + "browser.aboutHomeSnippets.updateUrL" = ""; + "browser.startup.homepage_override.mstone" = "ignore"; + "browser.startup.homepage_override.buildID" = ""; + "startup.homepage_welcome_url" = ""; + "startup.homepage_welcome_url.additional" = ""; + "startup.homepage_override_url" = ""; + + # Firefox experiments... + "experiments.activeExperiment" = false; + "experiments.enabled" = false; + "experiments.supported" = false; + "extensions.pocket.enabled" = false; + "identity.fxaccounts.enabled" = false; + + # Privacy + "privacy.donottrackheader.enabled" = true; + "privacy.donottrackheader.value" = 1; + "privacy.trackingprotection.enabled" = true; + "privacy.trackingprotection.socialtracking.enabled" = true; + "privacy.firstparty.isolate" = true; + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + "toolkit.telemetry.enabled" = false; + "toolkit.telemetry.unified" = false; + "toolkit.telemetry.archive.enabled" = false; + "browser.toolbars.bookmarks.visibility" = "never"; + + # Cookies + "network.cookie.cookieBehavior" = 1; + + # Perf + "gfx.webrender.all" = true; + "media.ffmpeg.vaapi.enabled" = true; + "media.ffvpx.enabled" = false; + "media.rdd-vpx.enabled" = false; + "gfx.webrender.compositor.force-enabled" = true; + "media.navigator.mediadatadecoder_vpx_enabled" = true; + "webgl.force-enabled" = true; + "layers.acceleration.force-enabled" = true; + "layers.offmainthreadcomposition.enabled" = true; + "layers.offmainthreadcomposition.async-animations" = true; + "layers.async-video.enabled" = true; + "html5.offmainthread" = true; + }; + }; + }; + + programs.firefox.policies = { + ExtensionSettings = with builtins; + let extension = shortId: uuid: { + name = uuid; + value = { + install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi"; + installation_mode = "normal_installed"; + }; + }; + in listToAttrs [ + (extension "torrent-to-web" "torrent-to-web@dasprids.de") + (extension "Cookie-AutoDelete" "CookieAutoDelete@kennydo.com") + (extension "ublock-origin" "uBlock0@raymondhill.net") + (extension "bitwarden-password-manager" "{446900e4-71c2-419f-a6a7-df9c091e268b}") + (extension "no-gender" "{f0bb47a1-a5b1-4a4c-80fb-556d6a60e45c}") + (extension "get-rss-feed-url" "{15bdb1ce-fa9d-4a00-b859-66c214263ac0}") + (extension "freshrss-watcher" "{8276b2b6-a974-4254-8647-79c691694b10}") + (extension "bookmarked-speed-dial" "{83a9ecbd-0360-4fee-8822-233ed92cf930}") + (extension "i-still-don't-care-about-cookies" "idcac-pub@guus.ninja") + #(extension "joplin-web-clipper" "{8419486a-54e9-11e8-9401-ac9e17909436}") + #(extension "umatrix" "uMatrix@raymondhill.net") + #(extension "libredirect" "7esoorv3@alefvanoon.anonaddy.me") + #(extension "clearurls" "{74145f27-f039-47ce-a470-a662b129930a}") + ]; + # To add additional extensions, find it on addons.mozilla.org, find + # the short ID in the url (like https://addons.mozilla.org/en-US/firefox/addon/!SHORT_ID!/) + # Then, download the XPI by filling it in to the install_url template, unzip it, + # run `jq .browser_specific_settings.gecko.id manifest.json` or + # `jq .applications.gecko.id manifest.json` to get the UUID + }; +} diff --git a/nixos_24.11_wlin001/packages/flatpak.nix b/nixos_24.11_wlin001/packages/flatpak.nix new file mode 100644 index 0000000..66f7e0b --- /dev/null +++ b/nixos_24.11_wlin001/packages/flatpak.nix @@ -0,0 +1,14 @@ +{ config, pkgs, ... }: + +{ + + services.flatpak.enable = true; + + systemd.services.flatpak-repo = { + wantedBy = [ "multi-user.target" ]; + path = [ pkgs.flatpak ]; + script = '' + flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo + ''; + }; +} diff --git a/nixos_24.11_wlin001/packages/home-manager.nix b/nixos_24.11_wlin001/packages/home-manager.nix new file mode 100644 index 0000000..b33ed7b --- /dev/null +++ b/nixos_24.11_wlin001/packages/home-manager.nix @@ -0,0 +1,30 @@ +{ config, lib, pkgs, osConfig, ... }: +let + home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz"; +in +{ + + imports = [ + (import "${home-manager}/nixos") + ]; + + home-manager.backupFileExtension = "backup"; + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + + home-manager.users.zulumann = { + home.stateVersion = "24.11"; + home.homeDirectory = "/home/zulumann"; + home.packages = with pkgs; [ + neofetch + ]; + + + imports = [ + ./../home + ]; + + programs.home-manager.enable = true; + }; + +} diff --git a/nixos_24.11_wlin001/packages/mpd.nix b/nixos_24.11_wlin001/packages/mpd.nix new file mode 100644 index 0000000..3cebc83 --- /dev/null +++ b/nixos_24.11_wlin001/packages/mpd.nix @@ -0,0 +1,44 @@ +{ config, pkgs, ... }: + +# aplay -l +# aplay --list-pcm +# pacmd list-modules +# pacmd list-cards + +{ + services.mpd = { + enable = true; + user = "zulumann"; + musicDirectory = "/run/media/zulumann/HDD1.5TB/Audio/Musik"; + playlistDirectory = "/run/media/zulumann/HDD1.5TB/Audio/Playlists"; + network.listenAddress = "any"; + startWhenNeeded = true; # systemd feature: only start MPD service upon connection to its socket + extraConfig = '' + audio_output { + type "alsa" + name "My ALSA" + device "hw:0,0" # optional + format "44100:16:2" # optional + mixer_type "hardware" + mixer_device "default" + mixer_control "PCM" + } + + audio_output { + type "pipewire" + name "My PipeWire Output" + } + ''; + }; + + systemd.services.mpd.environment = { + # https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/609 + XDG_RUNTIME_DIR = + "/run/user/1000"; # User-id 1000 must match above user. MPD will look inside this directory for the PipeWire socket. + }; + + environment.systemPackages = with pkgs; [ + #gmpc # Gnome Music Player Client + cantata + ]; +} diff --git a/nixos_24.11_wlin001/packages/nix-ld.nix b/nixos_24.11_wlin001/packages/nix-ld.nix new file mode 100644 index 0000000..28ab595 --- /dev/null +++ b/nixos_24.11_wlin001/packages/nix-ld.nix @@ -0,0 +1,63 @@ +{ config, pkgs, ... }: + +{ + + # Enable LD Fix + programs.nix-ld.enable = true; + programs.nix-ld.libraries = with pkgs; [ + # Add any missing dynamic libraries for unpackaged + # programs here, NOT in environment.systemPackages + alsa-lib + at-spi2-atk + at-spi2-core + atk + cairo + cups + curl + dbus + expat + fontconfig + freetype + fuse3 + gdk-pixbuf + glib + gtk3 + icu + libGL + libappindicator-gtk3 + libdrm + libglvnd + libnotify + libpulseaudio + libunwind + libusb1 + libuuid + libxkbcommon + libxml2 + mesa + nspr + nss + openssl + pango + pipewire + stdenv.cc.cc + systemd + vulkan-loader + xorg.libX11 + xorg.libXScrnSaver + xorg.libXcomposite + xorg.libXcursor + xorg.libXdamage + xorg.libXext + xorg.libXfixes + xorg.libXi + xorg.libXrandr + xorg.libXrender + xorg.libXtst + xorg.libxcb + xorg.libxkbfile + xorg.libxshmfence + zlib + ]; + +} diff --git a/nixos_24.11_wlin001/packages/packages.nix b/nixos_24.11_wlin001/packages/packages.nix new file mode 100644 index 0000000..40f93c4 --- /dev/null +++ b/nixos_24.11_wlin001/packages/packages.nix @@ -0,0 +1,262 @@ +{ config, pkgs, ... }: + +let + unstableTarball = + fetchTarball + https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz; +in +{ + imports = + [ # Include the results of the hardware scan. + /etc/nixos/hardware-configuration.nix + ]; + + nixpkgs.config = { + packageOverrides = pkgs: { + unstable = import unstableTarball { + config = config.nixpkgs.config; + }; + }; + }; + + # Allow unfree packages + nixpkgs.config = { + allowUnfree = true; + permittedInsecurePackages = [ + ]; + }; + + # Enable Fonts + fonts = { + fontDir.enable = true; + enableGhostscriptFonts = true; + packages = with pkgs; [ + corefonts + terminus_font + ubuntu_font_family + liberation_ttf + dejavu_fonts + ]; + }; + + # Enable Java + programs.java = { + enable = true; + package = pkgs.jdk11; + }; + + environment.systemPackages = with pkgs; [ + # --------------------------------------------------------------------- + # Core Pakages + # --------------------------------------------------------------------- + ansible # Radically simple IT automation + curl # A command line tool for transferring files with URL syntax + dnsutils # Domain name server + diffutils # Commands for showing the differences between files (diff, cmp, etc.) + mc # File Manager and User Shell for the GNU Project + htop # An interactive process viewer + rsync # Fast incremental file transfer utility + wget # Tool for retrieving files using HTTP, HTTPS, and FTP + nettools # A set of tools for controlling the network subsystem + ncdu # Disk usage analyzer with an ncurses interface + # nfs-utils # Linux user-space NFS utilities + pciutils # inspecting and manipulating configuration of PCI devices + pwgen # Password generator + # pwgen-secure # Secure password generation library to replace pwgen + renameutils # A set of programs to make renaming of files faster + rename # Rename files according to a Perl rewrite expression + smartmontools # Tools for monitoring the health of hard drives + imagemagick # A software suite to create, edit, compose, or convert bitmap images + lshw # Provide detailed information on the hardware configuration + lsof # A tool to list open files + unrar # Utility for RAR archives + unzip # An extraction utility for archives compressed + zip # Compressor/archiver for creating and modifying zipfiles + p7zip # A new p7zip fork with additional codecs + + # --------------------------------------------------------------------- + # Accessories + # --------------------------------------------------------------------- + authenticator # Two-factor authentication code generator for GNOME + bleachbit # A program to clean your computer + # czkawka # A simple, fast and easy to use app to remove unnecessary files + bitwarden # bitwarden-desktop + # deja-dup # A simple backup tool + gnome-decoder # Scan and Generate QR Codes + gnome-obfuscate # Censor private information + gnome-maps # A map application for GNOME 3 + # gpt4all # A free-to-use, locally running, privacy-aware chatbot. No GPU or internet required + # fsearch # A fast file search utility for Unix-like systems based on GTK+3 + cherrytree # An hierarchical note taking application + # caffeine-ng # Status bar application to temporarily inhibit screensaver and sleep mode + doublecmd # Two-panel graphical file manager written in Pascal + freefilesync # Open Source File Synchronization & Backup Software + shutter # Screenshot and annotation tool + gparted # Graphical disk partitioning tool + ulauncher # A fast application launcher for Linux + # synapse # Semantic launcher to start applications and find relevant files + # pika-backup # Simple backups based on borg + owncloud-client # Synchronise your ownCloud + keepassxc # Offline password manager + # veracrypt # Free Open-Source filesystem on-the-fly encryption + + # --------------------------------------------------------------------- + # Andriod software + # --------------------------------------------------------------------- + # android-file-transfer # Reliable MTP client with minimalistic UI provides: aft-mtp-cli android-file-transfer aft-mtp-mount + # android-tools # Android SDK platform tools + # waydroid # Waydroid is a container-based approach to boot a full Android system on a regular GNU/Linux system + + # --------------------------------------------------------------------- + # Codec + # --------------------------------------------------------------------- + ffmpeg # A complete, cross-platform solution to record, convert and stream audio and video + ffmpegthumbnailer # A lightweight video thumbnailer + gst_all_1.gst-vaapi + gst_all_1.gst-libav + gst_all_1.gst-plugins-bad + gst_all_1.gst-plugins-ugly + gst_all_1.gst-plugins-good + gst_all_1.gst-plugins-base + lame # A high quality MPEG Audio Layer III (MP3) encoder + wavpack # Hybrid audio compression format + x264 # Library for encoding H264/AVC video streams + x265 # Library for encoding H.265/HEVC video streams + mpg123 # Fast console MPEG Audio Player and decoder library + + #----------------------------------------------------------------- + # DVD / Bluray + #----------------------------------------------------------------- + asunder # A graphical Audio CD ripper and encoder for Linux + libbluray # Library to access Blu-Ray disks for video playback + libaacs # Library to access AACS protected Blu-Ray disks + libdvdcss # A library for decrypting DVDs + libisofs # A library to create an ISO-9660 filesystem with extensions like RockRidge or Joliet + libburn # A library by which preformatted data get onto optical media: CD, DVD, BD (Blu-Ray) + xfce.xfburn # Disc burner and project creator for Xfce + + #----------------------------------------------------------------- + # Emulatoren + #----------------------------------------------------------------- + # ppsspp-qt # Playstation Portable emulator + # pcsx2 # Playstation 2 emulator + + # --------------------------------------------------------------------- + # Graphics + # --------------------------------------------------------------------- + simple-scan # Simple scanning utility + gimp-with-plugins # The GNU Image Manipulation Program + pinta # Drawing/editing program modeled after Paint.NET + # shotwell # Popular photo organizer for the GNOME desktop + + #----------------------------------------------------------------- + # Gaming + #----------------------------------------------------------------- + # bottles # An easy-to-use wineprefix manager + # mangohud # A Vulkan and OpenGL overlay for monitoring FPS + # goverlay # Graphical UI to help manage Linux overlays + # heroic # A Native GOG, Epic, and Amazon Games Launcher + # protonup-ng # CLI program and API to automate the installation and update Proton-GE + # protonup-qt # manage Proton-GE and Luxtorpeda for Steam and Wine-GE + xboxdrv # Xbox/Xbox360 gamepad driver + + #----------------------------------------------------------------- + # Tools + #----------------------------------------------------------------- + # gpu-viewer # A front-end to glxinfo, vulkaninfo, clinfo and es2_info + # cpu-x # Software that gathers information on CPU, motherboard and more + + #----------------------------------------------------------------- + # Internet + #----------------------------------------------------------------- + angryipscanner # fast and friendly network scanner + brave # Brave Browser + freetube # An Open Source YouTube app for privacy + filezilla # Graphical FTP, FTPS and SFTP client + # protonvpn-gui # Proton VPN GTK app + # signal-desktop # Private, simple, and secure messenger + tdesktop # Telegram Desktop + # deltachat-desktop # Email-based instant messaging for Desktop + tor-browser # Tor Browser + remmina # Remote desktop client written in GTK + # newsflash # Modern feed reader designed for the GNOME desktop + mumble # Low-latency, high quality voice chat software + liferea # A GTK-based news feed aggregator + uget # Download manager using GTK and libcurl + # vivaldi # Browser for our Friends, powerful and personal + # vivaldi-ffmpeg-codecs # Additional support for proprietary codecs for Vivaldi + + #----------------------------------------------------------------- + # Office + #----------------------------------------------------------------- + evolution # application that provides integrated mail, calendaring and address book + # gscan2pdf # GUI to produce PDFs or DjVus from scanned documents + foliate # A simple and modern GTK eBook reader + paperwork # personal document manager for scanned documents + pdfarranger # Merge or split pdf documents and rotate, crop and rearrange their pages + # onlyoffice-bin_latest # Office suite that combines text, spreadsheet and presentation editors allowing to create + libreoffice-fresh # Comprehensive, professional-quality productivity suite, a variant of openoffice.org + obsidian # Powerful knowledge base that works on top of a local folder of plain text Markdown files + # xournalpp # Xournal++ is a handwriting Notetaking software with PDF annotation support + + # --------------------------------------------------------------------- + # Programming + # --------------------------------------------------------------------- + git # Distributed version control system + # diffuse # Graphical tool for merging and comparing text files + meld # Visual diff and merge tool + vscodium # Open source source code editor developed by Microsoft + github-desktop # GUI for managing Git and GitHub + + # --------------------------------------------------------------------- + # Themes + # --------------------------------------------------------------------- + arc-theme # Flat theme with transparent elements for GTK 3, GTK 2 and Gnome Shell + papirus-icon-theme # Pixel perfect icon theme for Linux + numix-cursor-theme # Numix cursor theme + + #----------------------------------------------------------------- + # Multimedia + #----------------------------------------------------------------- + audacious # A lightweight and versatile audio player + audacious-plugins # Plugins for Audacious music player + easytag # View and edit tags for various audio files + mediainfo-gui # Supplies technical and tag information about a video or audio file + soundconverter # Leading audio file converter for the GNOME Desktop + strawberry # Music player and music collection organizer + # obs-studio # Free and open source software for video recording and live streaming + # guvcview # A simple interface for devices supported by the linux UVC driver + # kazam # A screencasting program created with design in mind + video-trimmer # Trim videos quickly + radiotray-ng # An internet radio player + jellyfin-media-player # Jellyfin Desktop Client based on Plex Media Player + vlc # Cross-platform media player and streaming server + + # --------------------------------------------------------------------- + # NIX-Tools + # --------------------------------------------------------------------- + niv # Nix dependency management + nix-bash-completions # Bash completions for Nix, NixOS, and NixOps + nix-index # A files database for nixpkgs + nix-prefetch-git # nix-prefetch-git + # nixos-generators # Collection of image builders + + # --------------------------------------------------------------------- + # Spell checker + # --------------------------------------------------------------------- + aspell # Spell checker for many languages + aspellDicts.de # Aspell dictionary for German + hunspell # Spell checker + hunspellDicts.de-de # Hunspell dictionary for German + hyphen # A text hyphenation library + # languagetool # A proofreading program for English, German ... + + # --------------------------------------------------------------------- + # Openvpn + # --------------------------------------------------------------------- + #openvpn # A robust and highly flexible tunneling application + #networkmanager-openvpn + #gnome.networkmanager-openvpn + ]; + +} diff --git a/nixos_24.11_wlin001/packages/steam.nix b/nixos_24.11_wlin001/packages/steam.nix new file mode 100644 index 0000000..89c5b51 --- /dev/null +++ b/nixos_24.11_wlin001/packages/steam.nix @@ -0,0 +1,19 @@ +{ config, pkgs, ... }: + +{ + + # Enable Steam and Gamemode + nixpkgs.config = { + allowUnfreePackages = [ "steam" "steam-original" "steam-runtime" "steam-run" ]; + }; + + programs.gamemode.enable = true; + hardware.steam-hardware.enable = true; + programs.steam = { + enable = true; + gamescopeSession.enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + }; + +} diff --git a/nixos_24.11_wlin001/packages/syncthing.nix b/nixos_24.11_wlin001/packages/syncthing.nix new file mode 100644 index 0000000..489f915 --- /dev/null +++ b/nixos_24.11_wlin001/packages/syncthing.nix @@ -0,0 +1,36 @@ +{ config, pkgs, ... }: + +{ + # Enable Syncthing + services.syncthing = { + enable = true; + openDefaultPorts = true; + guiAddress = "127.0.0.1:8384"; + user = "zulumann"; + group = "users"; + configDir = "/home/zulumann/.config/syncthing"; + dataDir = "/home/zulumann"; + overrideDevices = false; + overrideFolders = false; + settings.devices = { + "Syncthing-Server" = { id = "2YNMVUC-HCUVYV4-C7ZJJ72-HQJSFBF-TOO6VPG-QYYIBZA-X3JC4MA-5WKEGA4"; }; + }; + + settings.versioning = { + type = "staggered"; + params = { + cleanInterval = "3600"; # 1 hour in seconds + maxAge = "15552000"; # 180 days in seconds + }; + }; + }; + + services.syncthing.settings.gui = { + user = "zulumann"; + password = "he_lu@1970"; + }; + + environment.systemPackages = with pkgs; [ + #qsyncthingtray + ]; +} diff --git a/nixos_24.11_wlin001/script/flatpak_theme.sh b/nixos_24.11_wlin001/script/flatpak_theme.sh new file mode 100644 index 0000000..75c4b95 --- /dev/null +++ b/nixos_24.11_wlin001/script/flatpak_theme.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# +mkdir ~/.themes +cp -R /run/current-system/sw/share/themes/Arc-Dark ~/.themes/ +cp -R /run/current-system/sw/share/icons/Papirus-Dark ~/.icons +sudo flatpak override --filesystem=$HOME/.themes +sudo flatpak override --env=GTK_THEME=Arc-Dark \ No newline at end of file diff --git a/nixos_24.11_wlin001/secrets/authorized_keys b/nixos_24.11_wlin001/secrets/authorized_keys new file mode 100644 index 0000000..0513668 --- /dev/null +++ b/nixos_24.11_wlin001/secrets/authorized_keys @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDRdiYgMyVjyXbbk2/lzFVRIK23JTICCmla0T0NNdP7LyAOiisV5lTg7PgFLFxaJ5QWSOUPcXwdhkkwT3yCGgzbWSS4sPGcon6hhFmaw54VITzkGK96e6/C/1X+L2BivYeaSSMBsezEScm8Ahl+uW7d2UmBzqTCg07dBWz1oyrgp9CKG5OuhdcKDdQ7w6t/YJNurYMr4nWHq7LKW9YwrRtmMPBoomoF01/4xO2YTWV6nrvEjui2JQMZJ0S3yigxVeP5TtWV26MY9IXIp8go7zrqEX34oVCHyRUtHMIIfWXR43pHOsLmzcpA5UnnuNQh4SO1BUjlEvFdQPLETfjmPxVk4GMBPfL0O81sgLck6drVKg2gsnTMUm/aSkn3Y845dKCaJes8s089RGVOIl5cnufB/HJ04im++2P/rmY1H1kxHu1jTHnxx78fvcHZ93Gco7X3j9pFrMsBxzG0wDkZGGRiNIeWjjGihQScMe7G/1aIWgHxZYmLVfdNPiDMYyBjvD6I2HxbAhWOdiYPXEjyKZAGa6IXGh9BEURlxFI1k7fKcs2AncL6Q2fXJQKzqfHD6dqndmVIzfj3gBLSSDTnfkOSCM2fBmHbgBuoUuIL6E7eFKxRpmw0Dh568VXQI0lBsmbDwiut4fTAuh/JF1yCCVW3qFMUT27RA6Z+15k0dQEFLw== zulumann@wlin001-lmde4 diff --git a/nixos_24.11_wlin001/secrets/samba-secrets b/nixos_24.11_wlin001/secrets/samba-secrets new file mode 100644 index 0000000..0f1aa78 --- /dev/null +++ b/nixos_24.11_wlin001/secrets/samba-secrets @@ -0,0 +1,3 @@ +username=zulumann +domain=WORKGROUP +password= diff --git a/nixos_24.11_wlin001/system/default.nix b/nixos_24.11_wlin001/system/default.nix new file mode 100644 index 0000000..a60f83b --- /dev/null +++ b/nixos_24.11_wlin001/system/default.nix @@ -0,0 +1,14 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ./tweaks + ./gpu-amd.nix + ./kvm.nix + ./printer.nix + ./samba.nix + ./smb-mount-fsrv.nix + ./smb-mount-nas.nix + #./wacom.nix + ]; +} diff --git a/nixos_24.11_wlin001/system/gpu-amd.nix b/nixos_24.11_wlin001/system/gpu-amd.nix new file mode 100644 index 0000000..e3cfe42 --- /dev/null +++ b/nixos_24.11_wlin001/system/gpu-amd.nix @@ -0,0 +1,39 @@ +{ config, pkgs, ... }: + +{ + boot.initrd.kernelModules = [ "amdgpu" ]; + + # Enable amdgpu + services.xserver = { + videoDrivers = [ "amdgpu" ]; + deviceSection = ''Option "TearFree" "true"''; + }; + + hardware.graphics = { + enable = true; + enable32Bit = true; + }; + + # Enable AMDVLK and OpenCL + hardware.graphics.extraPackages = with pkgs; [ + amdvlk + rocmPackages.clr.icd + ]; + + hardware.graphics.extraPackages32 = with pkgs; [ + driversi686Linux.amdvlk + ]; + + environment.systemPackages = with pkgs; [ + #lact # Linux AMDGPU Controller + libdrm + vulkan-loader + vulkan-tools + vkbasalt + radeontop + xorg.xf86videoamdgpu + ]; + + #systemd.packages = with pkgs; [ lact ]; + #systemd.services.lactd.wantedBy = ["multi-user.target"]; +} diff --git a/nixos_24.11_wlin001/system/kvm.nix b/nixos_24.11_wlin001/system/kvm.nix new file mode 100644 index 0000000..2447093 --- /dev/null +++ b/nixos_24.11_wlin001/system/kvm.nix @@ -0,0 +1,59 @@ +{ config, pkgs, ... }: + +{ + + boot.kernelParams = [ "amd_iommu=on" "pcie_aspm=off" ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModprobeConfig = "options kvm_amd nested=1"; + + # Enable dconf (System Management Tool) + # programs.dconf.enable = true; + + # Add user to libvirtd group + users.users.zulumann.extraGroups = [ "libvirtd" "kvm" ]; + + # Install necessary packages + environment.systemPackages = with pkgs; [ + libvirt + qemu + qemu_kvm + OVMFFull + virt-manager + virt-viewer + spice spice-gtk + spice-protocol + adwaita-icon-theme + python3 + iproute2 + bridge-utils + ]; + + # Manage the virtualisation services + virtualisation = { + libvirtd = { + enable = true; + qemu = { + swtpm.enable = true; + ovmf.enable = true; + ovmf.packages = [ pkgs.OVMFFull.fd ]; + }; + }; + spiceUSBRedirection.enable = true; + }; + + # Enable VirtioFS + virtualisation.libvirtd.qemu.vhostUserPackages = [ pkgs.virtiofsd ]; + + environment.sessionVariables.LIBVIRT_DEFAULT_URI = [ "qemu:///system" ]; + services.spice-vdagentd.enable = true; + + # Enable Bridge-Network + networking.firewall.checkReversePath = false; + networking.interfaces.eth0.useDHCP = true; + networking.interfaces.br-lan.useDHCP = true; + networking.bridges = { + "br-lan" = { + interfaces = [ "eth0" ]; + }; + }; +} diff --git a/nixos_24.11_wlin001/system/printer.nix b/nixos_24.11_wlin001/system/printer.nix new file mode 100644 index 0000000..6364ebe --- /dev/null +++ b/nixos_24.11_wlin001/system/printer.nix @@ -0,0 +1,40 @@ +{ config, pkgs, ... }: + +{ + + # Enable CUPS + services.printing = { + enable = true; + #openFirewall = true; + drivers = [ + pkgs.brlaser + pkgs.hplipWithPlugin + ]; + }; + + services.printing.cups-pdf = { + enable = true; + instances = { + pdf = { + settings = { + Out = "\${HOME}/Cups-pdf"; + UserUMask = "0033"; + }; + }; + }; + }; + + # Enable Sane + hardware.sane = { + enable = true; + extraBackends = [ pkgs.hplipWithPlugin ]; + }; + + users.users.zulumann.extraGroups = ["scanner" "lp"]; + + networking.firewall = { + allowedTCPPorts = [ 80 427 443 515 631 8080 9100 6566 ]; + allowedUDPPorts = [ 427 3702 5353 ]; + }; + +} diff --git a/nixos_24.11_wlin001/system/samba.nix b/nixos_24.11_wlin001/system/samba.nix new file mode 100644 index 0000000..a774bdf --- /dev/null +++ b/nixos_24.11_wlin001/system/samba.nix @@ -0,0 +1,116 @@ +{ config, pkgs, ... }: + + +{ +services.samba = { + enable = true; +# securityType = "user"; + openFirewall = true; + settings = { + global = { + "workgroup" = "WORKGROUP"; + "server role" = "standalone server"; + "server string" = "wlin001-nixos"; + "netbios name" = "wlin001-nixos"; + "global.security" = "user"; + "min protocol" = "smb3_11"; + "max protocol" = "smb3_11"; + "wide links" = "no"; + "follow symlinks" = "no"; + + #### Networking #### + "bind interfaces only" = "yes"; + "interfaces" = "lo br-lan eth0"; + # note: localhost is the ipv6 localhost ::1 + "hosts allow" = "192.168.10.0/24 127.0.0.1 localhost"; + "hosts deny" = "0.0.0.0/0"; + + ### Browsing election options ### + "wins support" = "no"; + "name resolve order" = "host bcast lmhosts"; + "multicast dns register" = "yes"; + "dns proxy" = "yes"; + + ####### Authentication ####### + "guest account" = "zulumann"; + "map to guest" = "bad user"; + + ### Tuning ### + "socket options" = "TCP_NODELAY IPTOS_LOWDELAY IPTOS_THROUGHPUT SO_RCVBUF=131072 SO_SNDBUF=131072"; + "use sendfile" = "yes"; + "getwd cache" = "yes"; + "stat cache" = "yes"; + "min receivefile size" = "16384"; + "write raw" = "yes"; + "read raw" = "yes"; + "max xmit" = "32768"; + "deadtime" = "15"; + "keepalive" = "150"; + "sync always" = "no"; + "large readwrite" = "yes"; + "strict sync" = "no"; + "strict allocate" = "yes"; + "strict locking" = "auto"; + "server multi channel support" = "yes"; + "aio write size" = "1"; + "aio read size" = "1"; + "idmap cache time" = "604"; + + #### Debugging #### + "log level" = "1"; + "log file" = "/var/log/samba/log.%m"; + "max log size" = "1000"; + "logging" = "file"; + "panic action" = "/usr/share/samba/panic-action %d"; + }; + + + "Share" = { + "path" = "/home/zulumann/Share-SMB"; + "browseable" = "yes"; + "read only" = "no"; + "guest ok" = "yes"; + "public" = "yes"; + "writable" = "yes"; + "create mask" = "0644"; + "directory mask" = "0755"; + }; + + "Private" = { + "path" = "/home/zulumann/Share-Priv"; + "browseable" = "yes"; + "read only" = "no"; + "guest ok" = "no"; + "create mask" = "0644"; + "directory mask" = "0755"; + #"force user" = "zulumann"; + #"force group" = "zulumann"; + }; + + }; +}; + + services.samba-wsdd = { + enable = true; + openFirewall = true; + }; + + services.avahi.extraServiceFiles = { + smb = '' + + + + %h - SMB/CIFS + + _smb._tcp + 445 + + + ''; + }; + +} + +# User Authentication +# For a user called my_userto be authenticated on the samba server, you must add their password using +# sudo smbpasswd -a my_user diff --git a/nixos_24.11_wlin001/system/smb-mount-fsrv.nix b/nixos_24.11_wlin001/system/smb-mount-fsrv.nix new file mode 100644 index 0000000..dfa2327 --- /dev/null +++ b/nixos_24.11_wlin001/system/smb-mount-fsrv.nix @@ -0,0 +1,78 @@ +{ config, pkgs, ... }: + +{ + environment.systemPackages = [ pkgs.cifs-utils ]; + + fileSystems."/mnt/fileserver01/Appz" = { + device = "//192.168.10.52/appz/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/fileserver01/Backup" = { + device = "//192.168.10.52/backup/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/fileserver01/Dateien" = { + device = "//192.168.10.52/dateien/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/fileserver01/Downloads" = { + device = "//192.168.10.52/downloads/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/fileserver01/ISOs" = { + device = "//192.168.10.52/isos/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/fileserver01/Multimedia" = { + device = "//192.168.10.52/multimedia/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/fileserver01/Public" = { + device = "//192.168.10.52/public/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/fileserver01/Share" = { + device = "//192.168.10.52/share/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; + }; + +} diff --git a/nixos_24.11_wlin001/system/smb-mount-nas.nix b/nixos_24.11_wlin001/system/smb-mount-nas.nix new file mode 100644 index 0000000..b3d13a1 --- /dev/null +++ b/nixos_24.11_wlin001/system/smb-mount-nas.nix @@ -0,0 +1,132 @@ +{ config, pkgs, ... }: + +{ + environment.systemPackages = [ pkgs.cifs-utils ]; + + fileSystems."/mnt/nas/Audio" = { + device = "//192.168.10.90/audio/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/Appz" = { + device = "//192.168.10.90/appz/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/Backup" = { + device = "//192.168.10.90/backup/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/Files" = { + device = "//192.168.10.90/files/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/Downloads" = { + device = "//192.168.10.90/downloads/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/Emulator" = { + device = "//192.168.10.90/emulator/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/Games" = { + device = "//192.168.10.90/games/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/ISO" = { + device = "//192.168.10.90/iso/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/Multimedia" = { + device = "//192.168.10.90/multimedia/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/Public" = { + device = "//192.168.10.90/public/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/Share" = { + device = "//192.168.10.90/share/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/Work" = { + device = "//192.168.10.90/work/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/XXX" = { + device = "//192.168.10.90/xxx/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; + }; + + fileSystems."/mnt/nas/homes" = { + device = "//192.168.10.90/homes/"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,user,users"; + in ["${automount_opts},credentials=/etc/nixos/secrets/samba-secrets,uid=1000,gid=100"]; + }; + +} diff --git a/nixos_24.11_wlin001/system/tweaks/16GB-SYSTEM.nix b/nixos_24.11_wlin001/system/tweaks/16GB-SYSTEM.nix new file mode 100644 index 0000000..3ce87c7 --- /dev/null +++ b/nixos_24.11_wlin001/system/tweaks/16GB-SYSTEM.nix @@ -0,0 +1,40 @@ +{ config, ... }: + +# Control how and when data is written from memory to disk, which can have an impact on system performance and responsiveness. +# useful for optimizing memory usage, disk writeback behavior, network settings, and other low-level kernel behaviors. + +{ + boot.kernelModules = ["tcp_bbr"]; + + boot.kernel.sysctl = { + "net.ipv4.tcp_congestion_control" = "bbr"; + "net.core.default_qdisc" = "fq"; + "net.ipv4.tcp_fastopen" = "3"; + + #--------------------------------------------------------------------- + # Network and memory-related optimizationss for desktop 16GB + #--------------------------------------------------------------------- + "kernel.sysrq" = 1; # Enable SysRQ for rebooting the machine properly if it freezes. [Source](https://oglo.dev/tutorials/sysrq/index.html) + "net.core.netdev_max_backlog" = 30000; # Help prevent packet loss during high traffic periods. + "net.core.rmem_default" = 262144; # Default socket receive buffer size, improve network performance & applications that use sockets. Adjusted for 16GB RAM. + "net.core.rmem_max" = 33554432; # Maximum socket receive buffer size, determine the amount of data that can be buffered in memory for network operations. Adjusted for 16GB RAM. + "net.core.wmem_default" = 262144; # Default socket send buffer size, improve network performance & applications that use sockets. Adjusted for 16GB RAM. + "net.core.wmem_max" = 33554432; # Maximum socket send buffer size, determine the amount of data that can be buffered in memory for network operations. Adjusted for 16GB RAM. + "net.ipv4.ipfrag_high_threshold" = 5242880; # Reduce the chances of fragmentation. Adjusted for SSD. + "net.ipv4.tcp_keepalive_intvl" = 30; # TCP keepalive interval between probes to detect if a connection is still alive. + "net.ipv4.tcp_keepalive_probes" = 5; # TCP keepalive probes to detect if a connection is still alive. + "net.ipv4.tcp_keepalive_time" = 300; # TCP keepalive interval in seconds to detect if a connection is still alive. + "vm.dirty_background_bytes" = 134217728; # 128 MB + "vm.dirty_bytes" = 402653184; # 384 MB + "vm.min_free_kbytes" = 65536; # Minimum free memory for safety (in KB), helping prevent memory exhaustion situations. Adjusted for 16GB RAM. + "vm.swappiness" = 10; # Adjust how aggressively the kernel swaps data from RAM to disk. Lower values prioritize keeping data in RAM. Adjusted for 16GB RAM. + "vm.vfs_cache_pressure" = 90; # Adjust vfs_cache_pressure (0-1000) to manage memory used for caching filesystem objects. Adjusted for 16GB RAM. + + # Nobara Tweaks + "fs.aio-max-nr" = 1000000; # defines the maximum number of asynchronous I/O requests that can be in progress at a given time. 1048576 + "fs.inotify.max_user_watches" = 65536; # sets the maximum number of file system watches, enhancing file system monitoring capabilities. Default: 8192 TWEAKED: 524288 + "kernel.panic" = 5; # Reboot after 5 seconds on kernel panic Default: 0 + "kernel.pid_max" = 131072; # allows a large number of processes and threads to be managed Default: 32768 TWEAKED: 4194304 + }; + +} diff --git a/nixos_24.11_wlin001/system/tweaks/32GB-SYSTEM.nix b/nixos_24.11_wlin001/system/tweaks/32GB-SYSTEM.nix new file mode 100644 index 0000000..0b8d181 --- /dev/null +++ b/nixos_24.11_wlin001/system/tweaks/32GB-SYSTEM.nix @@ -0,0 +1,40 @@ +{ config, ... }: + +# Control how and when data is written from memory to disk, which can have an impact on system performance and responsiveness. +# useful for optimizing memory usage, disk writeback behavior, network settings, and other low-level kernel behaviors. + +{ + boot.kernelModules = ["tcp_bbr"]; + + boot.kernel.sysctl = { + "net.ipv4.tcp_congestion_control" = "bbr"; + "net.core.default_qdisc" = "fq"; + "net.ipv4.tcp_fastopen" = "3"; + + #--------------------------------------------------------------------- + # Network and memory-related optimizationss for 32GB + #--------------------------------------------------------------------- + "kernel.sysrq" = 1; # Enable SysRQ for rebooting the machine properly if it freezes. [Source](https://oglo.dev/tutorials/sysrq/index.html) + "net.core.netdev_max_backlog" = 30000; # Help prevent packet loss during high traffic periods. + "net.core.rmem_default" = 262144; # Default socket receive buffer size, improve network performance & applications that use sockets. Adjusted for 32GB RAM. + "net.core.rmem_max" = 67108864; # Maximum socket receive buffer size, determine the amount of data that can be buffered in memory for network operations. Adjusted for 32GB RAM. + "net.core.wmem_default" = 262144; # Default socket send buffer size, improve network performance & applications that use sockets. Adjusted for 32GB RAM. + "net.core.wmem_max" = 67108864; # Maximum socket send buffer size, determine the amount of data that can be buffered in memory for network operations. Adjusted for 32GB RAM. + "net.ipv4.ipfrag_high_threshold" = 5242880; # Reduce the chances of fragmentation. Adjusted for SSD. + "net.ipv4.tcp_keepalive_intvl" = 10; # TCP keepalive interval between probes to detect if a connection is still alive. + "net.ipv4.tcp_keepalive_probes" = 5; # TCP keepalive probes to detect if a connection is still alive. + "net.ipv4.tcp_keepalive_time" = 60; # TCP keepalive interval in seconds to detect if a connection is still alive. + "vm.dirty_background_bytes" = 134217728; # 128 MB + "vm.dirty_bytes" = 402653184; # 384 MB + "vm.min_free_kbytes" = 65536; # Minimum free memory for safety (in KB), helping prevent memory exhaustion situations. Adjusted for 32GB RAM. + "vm.swappiness" = 5; # Adjust how aggressively the kernel swaps data from RAM to disk. Lower values prioritize keeping data in RAM. Adjusted for 32GB RAM. + "vm.vfs_cache_pressure" = 90; # Adjust vfs_cache_pressure (0-1000) to manage memory used for caching filesystem objects. Adjusted for 32GB RAM. + + # Nobara Tweaks + "fs.aio-max-nr" = 1000000; # defines the maximum number of asynchronous I/O requests that can be in progress at a given time. 1048576 + "fs.inotify.max_user_watches" = 65536; # sets the maximum number of file system watches, enhancing file system monitoring capabilities. Default: 8192 TWEAKED: 524288 + "kernel.panic" = 5; # Reboot after 5 seconds on kernel panic Default: 0 + "kernel.pid_max" = 131072; # allows a large number of processes and threads to be managed Default: 32768 TWEAKED: 4194304 + + }; +} diff --git a/nixos_24.11_wlin001/system/tweaks/4GB-SYSTEM.nix b/nixos_24.11_wlin001/system/tweaks/4GB-SYSTEM.nix new file mode 100644 index 0000000..09ca96d --- /dev/null +++ b/nixos_24.11_wlin001/system/tweaks/4GB-SYSTEM.nix @@ -0,0 +1,33 @@ +{ config, ... }: + +# Control how and when data is written from memory to disk, which can have an impact on system performance and responsiveness. +# useful for optimizing memory usage, disk writeback behavior, network settings, and other low-level kernel behaviors. + +{ + boot.kernelModules = ["tcp_bbr"]; + + boot.kernel.sysctl = { + "net.ipv4.tcp_congestion_control" = "bbr"; + "net.core.default_qdisc" = "fq"; + "net.ipv4.tcp_fastopen" = "3"; + + #--------------------------------------------------------------------- + # Network and memory-related optimizationss for 4GB + #--------------------------------------------------------------------- + "kernel.sysrq" = 1; # Enable SysRQ for rebooting the machine properly if it freezes. [Source](https://oglo.dev/tutorials/sysrq/index.html) + "net.core.netdev_max_backlog" = 30000; # Help prevent packet loss during high traffic periods. + "net.core.rmem_default" = 131072; # Default socket receive buffer size, improving network performance and applications that use sockets. + "net.core.rmem_max" = 16777216; # Maximum socket receive buffer size, determining the amount of data that can be buffered in memory for network operations. + "net.core.wmem_default" = 131072; # Default socket send buffer size, improving network performance and applications that use sockets. + "net.core.wmem_max" = 16777216; # Maximum socket send buffer size, determining the amount of data that can be buffered in memory for network operations. + "net.ipv4.ipfrag_high_threshold" = 8388608; # Reduce the chances of fragmentation. + "net.ipv4.tcp_keepalive_intvl" = 30; # TCP keepalive interval between probes to detect if a connection is still alive. + "net.ipv4.tcp_keepalive_probes" = 5; # TCP keepalive probes to detect if a connection is still alive. + "net.ipv4.tcp_keepalive_time" = 60; # TCP keepalive interval in seconds to detect if a connection is still alive. + "vm.dirty_background_bytes" = 8388608; # Data (8 MB) modified in memory and needs to be written to disk. (Adjusted for 4GB RAM) + "vm.dirty_bytes" = 25165824; # Data (24 MB) modified in memory and needs to be written to disk. (Adjusted for 4GB RAM) + "vm.min_free_kbytes" = 32768; # Minimum free memory for safety (in KB), helping prevent memory exhaustion situations. (Adjusted for 4GB RAM) + "vm.swappiness" = 20; # Adjust how aggressively the kernel swaps data from RAM to disk. Lower values prioritize keeping data in RAM. (Adjusted for 4GB RAM) + "vm.vfs_cache_pressure" = 100; # Adjust vfs_cache_pressure (0-1000) to manage memory used for caching filesystem objects. (Adjusted for 4GB RAM) + }; +} diff --git a/nixos_24.11_wlin001/system/tweaks/8GB-SYSTEM.nix b/nixos_24.11_wlin001/system/tweaks/8GB-SYSTEM.nix new file mode 100644 index 0000000..873ade1 --- /dev/null +++ b/nixos_24.11_wlin001/system/tweaks/8GB-SYSTEM.nix @@ -0,0 +1,131 @@ +{ config, ... }: + +# Control how and when data is written from memory to disk, which can have an impact on system performance and responsiveness. +# useful for optimizing memory usage, disk writeback behavior, network settings, and other low-level kernel behaviors. + +{ + boot.kernelModules = ["tcp_bbr"]; + + boot.kernel.sysctl = { + "net.ipv4.tcp_congestion_control" = "bbr"; + "net.core.default_qdisc" = "fq"; + "net.ipv4.tcp_fastopen" = "3"; + + #--------------------------------------------------------------------- + # Network and memory-related optimizationss for 8GB + #--------------------------------------------------------------------- + "kernel.sysrq" = 1; # Enable SysRQ for rebooting the machine properly if it freezes. [Source](https://oglo.dev/tutorials/sysrq/index.html) + "net.core.netdev_max_backlog" = 30000; # Help prevent packet loss during high traffic periods. + "net.core.rmem_default" = 262144; # Default socket receive buffer size, improve network performance & applications that use sockets. Adjusted for 8GB RAM. + "net.core.rmem_max" = 33554432; # Maximum socket receive buffer size, determine the amount of data that can be buffered in memory for network operations. Adjusted for 8GB RAM. + "net.core.wmem_default" = 262144; # Default socket send buffer size, improve network performance & applications that use sockets. Adjusted for 8GB RAM. + "net.core.wmem_max" = 33554432; # Maximum socket send buffer size, determine the amount of data that can be buffered in memory for network operations. Adjusted for 8GB RAM. + "net.ipv4.ipfrag_high_threshold" = 5242880; # Reduce the chances of fragmentation. Adjusted for SSD. + "net.ipv4.tcp_keepalive_intvl" = 30; # TCP keepalive interval between probes to detect if a connection is still alive. + "net.ipv4.tcp_keepalive_probes" = 5; # TCP keepalive probes to detect if a connection is still alive. + #"net.ipv4.tcp_keepalive_time" = 300; # TCP keepalive interval in seconds to detect if a connection is still alive. + "net.ipv4.tcp_keepalive_time" = "60"; # TCP keepalive interval in seconds to detect if a connection is still alive. + "vm.dirty_background_bytes" = 134217728; # 128 MB + "vm.dirty_bytes" = 402653184; # 384 MB + "vm.min_free_kbytes" = 131072; # Minimum free memory for safety (in KB), helping prevent memory exhaustion situations. Adjusted for 8GB RAM. + "vm.swappiness" = 10; # Adjust how aggressively the kernel swaps data from RAM to disk. Lower values prioritize keeping data in RAM. Adjusted for 8GB RAM. + "vm.vfs_cache_pressure" = 90; # Adjust vfs_cache_pressure (0-1000) to manage memory used for caching filesystem objects. Adjusted for 8GB RAM. + + # Nobara Tweaks + "fs.aio-max-nr" = 1000000; # defines the maximum number of asynchronous I/O requests that can be in progress at a given time. 1048576 + "fs.inotify.max_user_watches" = 65536; # sets the maximum number of file system watches, enhancing file system monitoring capabilities. Default: 8192 TWEAKED: 524288 + "kernel.panic" = 5; # Reboot after 5 seconds on kernel panic Default: 0 + "kernel.pid_max" = 131072; # allows a large number of processes and threads to be managed Default: 32768 TWEAKED: 4194304 + + }; + +} + +# ----------------------------------------------------------------- +# Summary of my configuration +# ----------------------------------------------------------------- + +# Network Performance Settings: +# ---------------------------------------------- +# "net.core.rmem_default" = 16 MB +# "net.core.rmem_max" = 16 MB +# "net.core.wmem_default" = 16 MB +# "net.core.wmem_max" = 16 MB +# These settings define the default and maximum socket buffer sizes for receiving and sending data, improving network performance and benefiting applications that use sockets. + +# TCP Keepalive Settings: +# ---------------------------------------------- +# "net.ipv4.tcp_keepalive_intvl" = 30 seconds +# "net.ipv4.tcp_keepalive_probes" = 5 probes +# "net.ipv4.tcp_keepalive_time" = 300 seconds +# These settings configure TCP keepalive parameters, which are used to detect if a network connection is still alive. + +# Disk Write Behavior Settings: +# ---------------------------------------------- +# "vm.dirty_background_bytes" = 16 MB +# "vm.dirty_bytes" = 48 MB +# These settings control how much modified data in memory needs to be written to disk. Lower values can lead to more frequent writes. + +# Memory Safety Setting: +# ---------------------------------------------- +# "vm.min_free_kbytes" = 65,536 KB +# This setting specifies the minimum amount of free memory in kilobytes, helping to prevent memory exhaustion situations. + +# Swappiness Setting: +# ---------------------------------------------- +# "vm.swappiness" = 1 +# This setting determines how aggressively the kernel swaps data from RAM to disk. Lower values prioritize keeping data in RAM, suitable for systems with ample memory. + +# Cache Pressure Setting: +# ---------------------------------------------- +# "vm.vfs_cache_pressure" = 50 +# This setting adjusts vfs_cache_pressure (0-1000), influencing how the kernel reclaims memory used for caching filesystem objects. + +# Customize these settings based on your system's requirements and performance goals, check below for extra info. + +# Values explained: +# "vm.vfs_cache_pressure" = 50; Adjust vfs_cache_pressure (0-1000) +# ----------------------------------------------------------------- +# 4GB RAM: 50 - 60 [ Lower values like 50 or 60 can be a good starting point for systems with 4GB of RAM to retain data in cache for improved file system access times ] +# 8GB RAM: 60 - 80 [ Values around 60 to 80 are reasonable for 8GB of RAM, as you can still afford to keep more data in cache for better performance ] +# 16GB RAM: 70 - 80 [ Lower values like 70 or 80 can be used to keep data in cache longer for systems with 16GB of RAM ] +# 32GB RAM: 80 - 90 [ Values around 80 or 90 are suitable for systems with 32GB of RAM, allowing more data to stay in cache ] +# 64GB RAM or More: 90 - 100 [ Lower values like 90 or 100 can minimize cache eviction for systems with very high memory, such as 64GB or more ] + +# Low Values (e.g., 10-100): +# Situations where you have a lot of available RAM. +# When you want to optimize filesystem access times by keeping more data in cache. +# Systems with large file datasets that can benefit from a larger cache. + +# High Values (e.g., 500-1000): +# Systems with limited RAM resources. +# Servers or virtual machines where memory availability is critical. +# When you want to ensure that cached memory is released more aggressively for other applications. + +# vm.swappiness = +# ---------------------------------------------- +# Adjusts how aggressively the kernel swaps data from RAM to disk. +# - For systems with 4GB RAM, consider a low value (1-10) to prioritize keeping data in RAM. +# - For systems with 8GB RAM, use a moderate value (10-30) for a balance between RAM usage and swapping. +# - For systems with 16GB to 28GB RAM, aim for a moderate value (10-30) to optimize performance. +# - For systems with 32GB or more RAM, a slightly higher value (30-60) may be suitable. +# Monitor system performance and adjust as needed based on your workload and available RAM. + +# CALCULATIONS: ( Schooling ) +# ---------------------------------------------- +# 1 MB (megabyte) = 1048576 bytes +# To convert bytes to megabytes, divide the number of bytes by 1048576. + +# Here's how the calculations work for the values provided: +# For "vm.dirty_background_bytes": +# 16777216 bytes ÷ 1048576 bytes/MB = 16 MB + +# For "vm.dirty_bytes": +# 50331648 bytes ÷ 1048576 bytes/MB = 48 MB + +# These calculations provide the approximate size in megabytes for the specified values. + +# The values "vm.dirty_background_bytes" and "vm.dirty_bytes" control how much dirty data (data that has been modified but not yet written to disk) +# can accumulate in the system's cache before it's flushed to disk. Lowering these values, as done here, results in more frequent disk writes, +# which can be useful when you need data to be quickly written to a USB drive. + diff --git a/nixos_24.11_wlin001/system/tweaks/default.nix b/nixos_24.11_wlin001/system/tweaks/default.nix new file mode 100644 index 0000000..ec30f71 --- /dev/null +++ b/nixos_24.11_wlin001/system/tweaks/default.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ... }: + +{ + imports = [ + #./4GB-SYSTEM.nix + #./8GB-SYSTEM.nix + #./16GB-SYSTEM.nix + ./32GB-SYSTEM.nix + ./ssd-tweaks.nix + ]; +} diff --git a/nixos_24.11_wlin001/system/tweaks/hdd-tweak.nix b/nixos_24.11_wlin001/system/tweaks/hdd-tweak.nix new file mode 100644 index 0000000..55dcaa3 --- /dev/null +++ b/nixos_24.11_wlin001/system/tweaks/hdd-tweak.nix @@ -0,0 +1,19 @@ +{ config, ... }: + +# Control how and when data is written from memory to disk, which can have an impact on system performance and responsiveness. +# useful for optimizing memory usage, disk writeback behavior, network settings, and other low-level kernel behaviors. + +{ + boot.kernel.sysctl = { + + #--------------------------------------------------------------------- + # HDD tweaks: Adjust settings for an HDD to optimize performance. + #--------------------------------------------------------------------- + "vm.dirty_background_ratio" = "10"; # Set the ratio of dirty memory at which background writeback starts (10% for HDD). + "vm.dirty_expire_centisecs" = "6000"; # Set the time at which dirty data is old enough to be eligible for writeout (6000 centiseconds for HDD). + "vm.dirty_ratio" = "20"; # Set the ratio of dirty memory at which a process is forced to write out dirty data (20% for HDD). + "vm.dirty_time" = "0"; # Disable dirty time accounting. + "vm.dirty_writeback_centisecs" = "1000"; # Set the interval between two consecutive background writeback passes (1000 centiseconds for HDD). + + }; +} diff --git a/nixos_24.11_wlin001/system/tweaks/ssd-tweaks.nix b/nixos_24.11_wlin001/system/tweaks/ssd-tweaks.nix new file mode 100644 index 0000000..e137590 --- /dev/null +++ b/nixos_24.11_wlin001/system/tweaks/ssd-tweaks.nix @@ -0,0 +1,18 @@ +{ config, ... }: + +{ + + boot.kernel.sysctl = { + #--------------------------------------------------------------------- + # SSD tweaks: Adjust settings for an SSD to optimize performance. + #--------------------------------------------------------------------- + "vm.dirty_background_ratio" = "40"; # Set the ratio of dirty memory at which background writeback starts (5%). Adjusted for SSD. + "vm.dirty_expire_centisecs" = "3000"; # Set the time at which dirty data is old enough to be eligible for writeout (6000 centiseconds). Adjusted for SSD. + "vm.dirty_ratio" = "80"; # Set the ratio of dirty memory at which a process is forced to write out dirty data (10%). Adjusted for SSD. + "vm.dirty_time" = "0"; # Disable dirty time accounting. + "vm.dirty_writeback_centisecs" = "300"; # Set the interval between two consecutive background writeback passes (500 centiseconds) + }; + + services.fstrim.enable = true; + +} diff --git a/nixos_24.11_wlin001/system/wacom.nix b/nixos_24.11_wlin001/system/wacom.nix new file mode 100644 index 0000000..5556f18 --- /dev/null +++ b/nixos_24.11_wlin001/system/wacom.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ... }: + +{ + + services.xserver.wacom.enable = true; + + environment.systemPackages = with pkgs; [ + libwacom # Libraries, configuration, and diagnostic tools for Wacom tablets + ]; + +}