{"id":19767315,"url":"https://github.com/tolgaerok/nixos-kde","last_synced_at":"2025-04-10T01:13:14.364Z","repository":{"id":178581346,"uuid":"662080414","full_name":"tolgaerok/nixos-kde","owner":"tolgaerok","description":"My personal nixos 23.-5 KDE \u0026 Nvidia configuration","archived":false,"fork":false,"pushed_at":"2025-02-21T04:04:38.000Z","size":94518,"stargazers_count":76,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-10T01:13:05.649Z","etag":null,"topics":["9470m","folio","hp","intel","nixos","nixos-config","nixos-configuration","nixos-kde","nvidia","sff-g800"],"latest_commit_sha":null,"homepage":"","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tolgaerok.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-04T10:06:24.000Z","updated_at":"2025-04-02T06:01:01.000Z","dependencies_parsed_at":"2023-09-11T11:55:22.075Z","dependency_job_id":"916c8532-bcd3-409c-b079-a9c576df39b0","html_url":"https://github.com/tolgaerok/nixos-kde","commit_stats":null,"previous_names":["tolgaerok/nixos-tolga","tolgaerok/nixos","tolgaerok/nixos-kde"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tolgaerok%2Fnixos-kde","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tolgaerok%2Fnixos-kde/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tolgaerok%2Fnixos-kde/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tolgaerok%2Fnixos-kde/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tolgaerok","download_url":"https://codeload.github.com/tolgaerok/nixos-kde/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137891,"owners_count":21053775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["9470m","folio","hp","intel","nixos","nixos-config","nixos-configuration","nixos-kde","nvidia","sff-g800"],"created_at":"2024-11-12T04:29:01.392Z","updated_at":"2025-04-10T01:13:14.158Z","avatar_url":"https://github.com/tolgaerok.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1 style=\"font-size: 24px; color: blue;\"\u003eMy NixOs 23.05 environment, KDE \u0026 Nvidia, AMD \u0026\u0026 Intel\u003c/h1\u003e\n\u003c/div\u003e\n\n ##### My NixOS GNOME 24.05 available\n ```bash\n https://github.com/tolgaerok/nixos-2405-gnome\n ```\n#\n\n```bash\nsudo nix-channel --add https://channels.nixos.org/nixos-23.11 nixos\nsudo nixos-rebuild boot --upgrade\n```\n* You probably get some errors and warnings here that you need to take care off\n* Do so and repeat until the above command succeeds\n```bash\nsudo shutdown -r now\n```\n\n\n\u003cdiv align=\"center\"\u003e\n  \u003ctable style=\"border-collapse: collapse; width: 100%; border: none;\"\u003e\n    \u003ctr\u003e\n     \u003ctd align=\"center\" style=\"border: none;\"\u003e\n        \u003ca href=\"https://nixos.org/\"\u003e\n          \u003cimg src=\"https://flathub.org/img/distro/nixos.svg\" alt=\"NixOS\" style=\"width: 250%;\"\u003e\n          \u003cbr\u003eNixOS\n          \u003ctd align=\"center\"\u003e\n          \u003cimg src=\"https://github.com/tolgaerok/Linux-Tweaks-And-Scripts/assets/110285959/af6b682f-0ddd-45bc-babc-0584b0e70884\" alt=\"Screenshot\"\u003e\n        \u003c/td\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e     \n    \u003c/tr\u003e\n  \u003c/table\u003e\n\u003c/div\u003e\n\n![desktop](https://github.com/tolgaerok/nixos-kde/assets/110285959/c36fc2d7-0885-461b-b2ed-2333e2634a36)\n\u003ctable style=\"border-collapse: collapse; width: 100%;\"\u003e\n  \u003ctr\u003e\n    \u003ctd style=\"border: none; width: 30%;\" valign=\"top\"\u003e\n      \u003cdiv align=\"center\"\u003e  \n          \u003cimg src=\"https://github.com/tolgaerok/nixos/assets/110285959/fa785dec-f839-43f2-9e03-58adb73d12c3\" alt=\"HP\" style=\"width: 80%;\"\u003e\n          \u003cbr\u003e          \n        \u003c/a\u003e\n      \u003c/div\u003e\n    \u003c/td\u003e\n    \u003ctd style=\"border: none; width: 70%;\"\u003e\n      \u003ctable\u003e\n        \u003ctr\u003e\n          \u003cth align=\"left\"\u003eDevice\u003c/th\u003e\n          \u003cth align=\"left\"\u003eSpecification\u003c/th\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003eBLUE-TOOTH\u003c/td\u003e\n          \u003ctd\u003eREALTEK 5G\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003eCPU\u003c/td\u003e\n          \u003ctd\u003eIntel(R) Core(TM) i7-4770 CPU @ 3.40GHz x 8 (Haswell)\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003eGPU\u003c/td\u003e\n          \u003ctd\u003eNVIDIA GeForce GT 1030/PCIe/SSE2\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003eMODEL\u003c/td\u003e\n          \u003ctd\u003eHP EliteDesk 800 G1 SFF\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003eMOTHERBOARD\u003c/td\u003e\n          \u003ctd\u003eIntel® Q87\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003eNETWORK\u003c/td\u003e\n          \u003ctd\u003eIntel Corporation Wi-Fi 6 AX210/AX211/AX411 160MHz\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003eRAM\u003c/td\u003e\n          \u003ctd\u003e28 GB DDR3\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003eSATA\u003c/td\u003e\n          \u003ctd\u003eSAMSUNG SSD 870 EVO 500GB\u003c/td\u003e\n        \u003c/tr\u003e\n      \u003c/table\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n# system upgrades\n* Add this into the configuration file if you have issues with Nvidia\n```bash  \nsystem.autoUpgrade.enable = true;\nsystem.autoUpgrade.allowReboot = false;\nboot.kernelPackages = pkgs.linuxPackages_6_5; # Use pkgs.linuxPackages_6_5 if nvidia drivers fail, use pkgs.linuxPackages_latest if nvidia drivers work on \"latest\"!\nsystem.autoUpgrade.channel = \"https://channels.nixos.org/nixos-23.11\";\n```\n\n### 1. Clone\n```bash\n# Tolga Erok\n# 14/7/2023\n# Post Nixos setup!\n# ¯\\_(ツ)_/¯\n\ncd $HOME\nnix-env -iA nixos.git\ngit clone https://github.com/tolgaerok/nixos-kde.git\ncd nixos-kde\nsudo cp /etc/nixos/configuration.nix /etc/nixos/configuration.nix.bak\nsudo rsync -av --exclude='.git' ./* /etc/nixos\nsudo chown -R $(whoami):$(id -gn) /etc/nixos\nsudo chmod -R 777 /etc/nixos\nsudo chmod +x /etc/nixos/*\nexport NIXPKGS_ALLOW_INSECURE=1\n```\n\n### 2. Create symlink for this host or the machine you prefer\n```bash\nsudo ln -s nixos /etc/nixos\nln -s nixos/machines/HP-i7-EliteDesk-800-G1-SFF/EliteDesk-800-G1-configuration.nix\nsudo nixos-rebuild switch --upgrade\n```\n\n```bash\nThere’s no need to symlink - /etc/nixos/configuration.nix \nis just the default location, and you can change it. \nWhen you run nixos-rebuild, it looks up the value of “nixos-config” in the\nNIX_PATH environment variable, so you can point that wherever you want. \nExample (as root):\n\nexport NIX_PATH=\"nixos-config=/path/to/configuration.nix\"\nnixos-rebuild switch\n```\n\n### nixpkgs\nhome-manager\n```bash\n# Clone repo into source dir\nmkdir -p ~/s\ncd ~/s\ngit clone https://github.com/tolgaerok/nixos-kde.git\nmkdir -p ~/.config\nln -s ~/s/nixos-kde/home-manager ~/.config/home-manager\n\nnix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager\nnix-channel --update\n\nnix-shell '\u003chome-manager\u003e' -A install\n```\n\n#\n\n# Table of Contents\n\n**Custom configuration**\n:------------------- |\n*[[ ✔ ]  Kernel Optimization](#kernel-optimization)* |\n*[[ ✔ ]  Custom nixos configuration](#Custom-nixos-configuration)* |\n     \n**Enabled / Disabled services**\n:------------------- |\n*[[ ✔ ]  Hardware](#hardware)* |\n*[[ ✔ ]  Programs](#programs)* |\n*[[ ✔ ]  Services](#services)* |\n*[[ ✔ ]  System](#System)* |\n*[[ ✔ ]  Virtualisation](#Virtualisation)* |\n  \n**How to section:**\n:------------------- |\n*[[ ✔ ]  Clone NixOS \u0026 edit (custom) configuration.nix](#Clone-NixOS)* |\n  \n**Configuring GPU Drivers in my NixOS**\n:------------------- |\n*[[ ✔ ]  Configuring GPU ](#GPU)* |\n\n**Enhancing User Profile Permissions**\n:------------------- |\n*[[ ✔ ]  Configuring Profile Permissions](#tweak-profile)* |\n\n**Enhancing System settings** \n:------------------- |\n*[[ ✔ ]  Configuring core System settings](#system-enchance)* |\n\n**Final step**\n:------------------- |\n*[[ ✔ ]  Execute nixos-rebuild switch](#rebuild)* |\n\n    \n\n# *`Pre-production release !!`*\n\n\n\nGreetings fellow **NixOS** users! If you're a proud owner of a system equipped desktop with a Nvidia or a laptop with Intel GPU drivers, and your heart beats for the sleekness of KDE Plasma, then this custom configuration has been meticulously crafted with you in mind. My ongoing commitment to updates and fixes ensures that your experience remains top-notch.\n\nIt's important to note that, for the time being, I've chosen to disable Wayland in favor of prioritizing Plasma 5 and X11 integration. This emphasis guarantees a seamless and stable experience within the KDE Plasma ecosystem.\n\nNow, let's dive into the exciting lineup I have prepared for you. With just a single command – `sudo nixos-rebuild switch` – you'll unlock a treasure trove of meticulously chosen packages that will transform your NixOS journey.\n\nWhat exactly does this collection encompass, you ask? Well, it's a finely curated selection of essential software, spanning a diverse array of categories. I've got you covered with:\n```javascript\n- Archive utilities to effortlessly handle compression and decompression tasks.\n- Multimedia tools that pave the way for a vibrant and immersive audio-visual experience.\n- Programming languages to fuel your coding endeavors and innovation.\n- Office suites that facilitate productivity, organization, and creativity.\n- System utilities that provide essential maintenance and management capabilities.\n```  \nYou'll find my selection of handpicked packages available right [here](https://github.com/tolgaerok/nixos/blob/main/packages/ReadMe.md). All of them will be conveniently installed on your NixOS.\n\nThese handpicked packages aren't just a random assortment; they're designed to amplify your NixOS adventure, making your system feel complete and your activities seamless. Whether you're crafting code, crafting content, or simply navigating daily tasks, this selection equips you with a versatile toolkit ready for immediate utilization.\n\nSo, why the wait? Execute the command, and watch as these packages weave their magic into your NixOS environment. My dedication to providing you with an enriched and functional experience shines through each and every package choice.\n\nEmbrace this pre-production release as a sneak peek into the exciting journey ahead. I'm thrilled to have you on board as we explore the NixOS realm together, enhancing and refining the KDE Plasma experience with every step.\n\nStay tuned for ongoing updates, improvements, and further customization that will ensure your NixOS setup remains at the forefront of innovation and performance. Your adventure with NixOS and KDE Plasma starts here – with a configuration built from an enthusiast, for enthusiasts.\n\n\n\n\n\u003ca name=\"kernel-optimization\"\u003e\u003c/a\u003e\n\n## *`Enhancing User Experience through Kernel Optimization`*\nIn the pursuit of an even smoother computing journey, I've delved into the realm of kernel optimization. By fine-tuning how data flows from memory to disk, we can wield significant influence over the performance and responsiveness of our systems. These adjustments aren't just about technical tweaks; they're about crafting an environment that elevates our user experience.\n\nImagine having the ability to optimize memory usage, fine-tune disk writeback behavior, and even tailor network settings. These kernel tweaks transcend the mundane, offering a deeper level of control over the low-level aspects of our system's behavior. Through this journey of exploration and customization, we're not just configuring a machine; we're sculpting an environment that responds to our needs and aspirations.\n\n```nix\n{\n  boot.kernel.sysctl = {\n    \"kernel.sysrq\" = 1;                       # SysRQ for is rebooting their machine properly if it freezes: SOURCE: https://oglo.dev/tutorials/sysrq/index.html\n    \"net.core.rmem_default\" = 16777216;       # Default socket receive buffer size, improve network performance \u0026 applications that use sockets\n    \"net.core.rmem_max\" = 16777216;           # Maximum socket receive buffer size, determin the amount of data that can be buffered in memory for network operations\n    \"net.core.wmem_default\" = 16777216;       # Default socket send buffer size, improve network performance \u0026 applications that use sockets\n    \"net.core.wmem_max\" = 16777216;           # Maximum socket send buffer size, determin the amount of data that can be buffered in memory for network operations\n    \"net.ipv4.tcp_keepalive_intvl\" = 30;      # TCP keepalive interval between probes, TCP keepalive probes, which are used to detect if a connection is still alive.\n    \"net.ipv4.tcp_keepalive_probes\" = 5;      # TCP keepalive probes, TCP keepalive probes, which are used to detect if a connection is still alive.\n    \"net.ipv4.tcp_keepalive_time\" = 300;      # TCP keepalive interval (seconds), TCP keepalive probes, which are used to detect if a connection is still alive.\n    \"vm.dirty_background_bytes\" = 268435456;  # 256 MB in bytes, data that has been modified in memory and needs to be written to disk\n    \"vm.dirty_bytes\" = 1073741824;            # 1 GB in bytes, data that has been modified in memory and needs to be written to disk\n    \"vm.min_free_kbytes\" = 65536;             # Minimum free memory for safety (in KB), can help prevent memory exhaustion situations\n    \"vm.swappiness\" = 1;                      # how aggressively the kernel swaps data from RAM to disk. Lower values prioritize keeping data in RAM,\n    \"vm.vfs_cache_pressure\" = 50;             # Adjust vfs_cache_pressure (0-1000), how the kernel reclaims memory used for caching filesystem objects\n  };\n```\n\nDetailed information ─\u003e\u003e [here](https://raw.githubusercontent.com/tolgaerok/nixos/main/system/kernel-sysctl/default.nix).\n\n\n[Back to Top](#)\n\n## Syncing User Home Folder to a Specified Destination\n\nOne of the key scripts I've developed is a custom synchronization script. This script allows me to effortlessly sync my user home folder to a specified destination. By running this script, I can ensure that all my important files and configurations are backed up and accessible from any location. This is particularly helpful when I switch machines or need to restore my settings after a fresh installation.\n\n## Assisting with Mounting, Unmounting, and Suspending\n\nTo streamline my workflow, I've also developed a set of personal scripts that assist me with mounting, unmounting, and suspending operations. These scripts automate common tasks, saving me time and effort in managing external drives or suspending my system when I step away. By executing these scripts, I can perform these operations with just a single command, making my workflow more efficient.\n\n\n## Calling Common NixOS Commands with a Custom Script\n\nTo further simplify my interactions with NixOS, I've developed a custom script that encapsulates the most frequently used commands. With this script, I can quickly execute common tasks such as updating the system, installing packages, or configuring services. This saves me the hassle of remembering or typing out lengthy commands each time I need to perform these operations.\n\n![1](https://github.com/tolgaerok/Linux-Tweaks-And-Scripts/assets/110285959/ae14cea8-dae9-4ea9-842d-7232e62ca9ff)\n\n\u003ca name=\"Custom-nixos-configuration\"\u003e\u003c/a\u003e\n# **Custom nixos configuration:**\n\n\u003ca name=\"hardware\"\u003e\u003c/a\u003e\n### Hardware\n\nHardware | Enable | Description\n:------------ | :---------- | :----------\n`driSupport` | `true` | Enable accelerated OpenGL rendering through the Direct Rendering Interface (DRI).\n`driSupport32Bit` | `true` | On 64-bit systems, whether to support Direct Rendering for 32-bit applications.\n`plymouth` | `false` | Enable Plymouth boot splash screen.\n`sane` | `false` | Enable support for SANE scanners.\n`brscan4` | `false` | Automatically register the \"brscan4\" sane backend and bring configuration files to their expected location.\n\n[Back to Top](#)\n\n\u003ca name=\"programs\"\u003e\u003c/a\u003e\n### Programs\n\nPrograms | Enable | Description\n:------------ | :---------- | :----------\n`adb` | `true` | Whether to configure system to use Android Debug Bridge (adb).\n`command-not-found` | `true` | Whether interactive shells should show which Nix package (if any) provides a missing command.\n`dconf` | `true` | Enable dconf.\n`firefox` | `true` | Enable the Firefox web browser.\n`fish` | `true` | Whether to configure fish as an interactive shell.\n`git` | `true` | Enable git.\n`gnupg.agent` | `true` | Enables GnuPG agent with socket-activation for every user session.\n`java` | `true` | Install and setup the Java development kit.\n`kdeconnect` | `true` | Enable kdeconnect.\n`mtr` | `true` | Whether to add mtr to the global environment and configure a setcap wrapper for it.\n`partition-manager` | `true` | Enable KDE Partition Manager.\n`corectrl` | `false` | Enable A tool to overclock amd graphics cards and processors.\n`htop` | `false` | Enable htop process monitor.\n`steam` | `false` | Enable steam.\n\n[Back to Top](#)\n\n\u003ca name=\"services\"\u003e\u003c/a\u003e\n### Services\n\nService | Enable | Description\n:------------ | :---------- | :----------\n`fstrim` | `true` | Enable periodic SSD TRIM of mounted partitions in background.\n`mysql` | `true` | Enable MySQL server (MariaDB).\n`pipewire` | `true` | Enable pipewire service.\n`postgresql` | `true` | Enable PostgreSQL Server.\n`power-profiles-daemon` | `false` | DBus daemon that allows changing system behavior based upon user-selected power profiles.\n`printing` | `true` | Enable printing support through the CUPS daemon.\n`redis` | `true` | An open source, advanced key-value store.\n`sddm` | `true` | Enable sddm as the display manager.\n`udev` | `true` | Enable udev.\n`udisks2` | `true` | DBus service that allows applications to query and manipulate storage devices.\n`xserver` | `true` | Enable the X server.\n`avahi` | `false` | Allows Avahi clients to use Avahi's service discovery facilities.\n`mongodb` | `false` | Enable MongoDB Server.\n`metabase` | `false` | Enable Metabase service.\n`openssh` | `false` | OpenSSH secure shell daemon, which allows secure remote logins.\n`thermald` | `false` | Enable thermald, the temperature management daemon.\n`tlp` | `false` | Enable the TLP power management daemon.\n\n[Back to Top](#)\n\n\u003ca name=\"System\"\u003e\u003c/a\u003e\n### System\n\nSystem | Enable | Description\n:------------ | :---------- | :----------\n`allowUnfree` | `true` | The configuration of the Nix Packages collection to allow unfree packages.\n`auto-optimise-store` | `true` | Replaces files in the store that have identical contents with hard links to a single copy.\n`bluetooth` | `true` | Enable support for Bluetooth.\n`doas` | `true` | Enable the doas command, which allows non-root users to execute commands as root.\n`firewall` | `false` | This is a simple stateful firewall that blocks connection attempts to unauthorised TCP or UDP ports on this machine.\n`networkmanager` | `true` | Obtain an IP address and other configuration for all network interfaces that are not manually configured.\n`nix.gc.automatic` | `true` | Automatically run the garbage collector at a specific time.\n`nix.optimise` | `true` | Automatically run the nix store optimiser at a specific time.\n`powerManagement` | `false` | Enable power management. This includes support for suspend-to-RAM and powersave features on laptops.\n`rtkit` | `true` | Enable the RealtimeKit system service, which hands out realtime scheduling priority to user processes on demand.\n`useTmpfs` | `true` | Whether to mount a tmpfs on /tmp during boot.\n`zramSwap` | `true` | Enable in-memory compressed devices and swap space provided by the zram kernel module.\n`allowReboot` | `false` | Reboot the system into the new generation instead of a switch.\n`autoUpgrade` | `false` | Whether to periodically upgrade NixOS to the latest version.\n`documentation.doc` | `false` | Whether to install documentation distributed in packages' /share/doc.\n`documentation.info` | `false` | Whether to install info pages and the info command. This also includes \"info\" outputs.\n`documentation.nixos` | `false` | Whether to install NixOS's own documentation.\n`iwd` | `false` | Enable iwd.\n`oomd` | `false` | Whether to disable the systemd-oomd OOM killer.\n`pulseaudio` | `false` | Enable the PulseAudio sound server.\n`useOSProber` | `true` | If set to true, append entries for other OSs detected by os-prober.\n`xdg.portal.lxqt` | `false` | Enable the desktop portal for the LXQt desktop environment.\n`xdg.portal.wlr` | `false` | Enable desktop portal for wlroots-based desktops.\n\n[Back to Top](#)\n\n\u003ca name=\"Virtualisation\"\u003e\u003c/a\u003e\n### Virtualisation\n\nVirtualisation | Enable | Description\n:------------ | :---------- | :----------\n`docker` | `false` | This option enables docker, a daemon that manages linux containers.\n\n[Back to Top](#)\n\n\u003ca name=\"Clone-NixOs\"\u003e\u003c/a\u003e\n\n# *`How to section`*\n#\n# Clone NixOS Configuration Repository and Apply Permissions\n\n*Open Dolphin and go to your:*\n```\n  - home directory\n  - press F4 \n```\n*Advanced users:*\nIf your confident with the use of the termnal, you can simply copy and paste the following and hit return. Or if you want to learn\nand get a feel for some manaul steps, skip this and go to *Step 1*:\n\n```bash\n# Tolga Erok\n# 14/7/2023\n# Post Nixos setup!\n# ¯\\_(ツ)_/¯\n\ncd $HOME\nnix-env -iA nixos.git\ngit clone https://github.com/tolgaerok/nixos.git\ncd nixos\nsudo rsync -av --exclude='.git' ./* /etc/nixos\nsudo chown -R $(whoami):$(id -gn) /etc/nixos\nsudo chmod -R 777 /etc/nixos\nsudo cp /etc/nixos/configuration.nix /etc/nixos/configuration.nix.bak\nkate /etc/nixos/configuration.nix\nexport NIXPKGS_ALLOW_INSECURE=1\n```\n## Step 1: \n*Install basic git, download my NixOS.zip repository, unzip, open nixos-main folder*\n\nStep 1: Install git\n```nix\nnix-env -iA nixos.git\n```\nStep 2: Clone my repository  \n```bash\ngit clone https://github.com/tolgaerok/nixos.git\n```\nStep 3: Unzip the downloaded file\n```bash\n  cd nixos\n```\n## Step 2: \n*Copy the contents of the cloned \"nixos\" folder to /etc/nixos*\n*Note: This will exclude the hidden .git folder*\n```bash\nsudo rsync -av --exclude='.git' ./* /etc/nixos\n```\n## Step 3: \n*Set appropriate ownership and permissions*\n\nStep 1:\n```bash\nsudo chown -R $(whoami):$(id -gn) /etc/nixos\n```\nStep 2:\n```bash\nsudo chmod -R 777 /etc/nixos\n```\n## Backup your original configuration.nix file\n```bash\nsudo cp /etc/nixos/configuration.nix /etc/nixos/configuration.nix.bak\n```\n## Step 4: \n**If you're using the command line or terminal, you can open the `configuration.nix` file using a text editor called `nano`. Here's how:**\n\n  - **Open a terminal on your NixOS system.**\n\n  - **To open the `configuration.nix` file using the `nano` text editor, type the following command:**\n\n   ```bash\n   nano /etc/nixos/configuration.nix\n   ```\n\n  - **This will open the `configuration.nix` file in the `nano` editor, allowing you to make changes. Navigate to the appropriate location and add or modify the lines as needed.**\n\n  - **After making your changes, press `Ctrl` + `O` to save the changes, then press `Enter`. To exit `nano`, press `Ctrl` + `X`.**\n\nIf you prefer to use the graphical text editor `Kate`, you can follow these steps:\n\n  - **Open a terminal on your NixOS system.**\n\n  - **To open the `configuration.nix` file using `Kate`, type the following command:**\n\n   ```bash\n   kate /etc/nixos/configuration.nix\n   ```\n\n  - **This will open the `configuration.nix` file in the `Kate` editor. You can navigate to the desired location and make changes directly in the graphical interface.**\n    \n### Locate the imports section in the file. It will look like this: ###\n\n*This is the default layout on new install*\n ```nix\n  imports =\n  [ # Include the results of the hardware scan.\n    ./hardware-configuration.nix\n  ];\n```\n### Add the desired lines just before the closing square bracket ]. Make sure to maintain the indentation. Here's how it should look after adding the lines: ###\n```nix\nimports = [ \n   # ./hardware/gpu/intel/intel-laptop                     # INTEL GPU with (Open-GL), tlp and auto-cpufreq\n   # ./hardware/gpu/nvidia/nvidia-stable/nvidia-stable.nix  # NVIDIA stable for GT-710--\n   # ./hardware/gpu/nvidia/nvidia-opengl/nvidia-opengl.nix  # NVIDIA with hardware acceleration (Open-GL) for GT-1030++\n    ./hardware-configuration.nix\n    ./nix\n    ./packages\n    ./programs\n    ./services\n    ./system\n  ];\n\n# Including this\nnixpkgs.config.permittedInsecurePackages = [ \"openssl-1.1.1v\" ];\n\n```\n\n  - **After making your changes, save the file using the appropriate option in the `Kate` menu.**\n\nKeep in mind that `nano` is a terminal-based text editor, while `Kate` is a graphical text editor. You can choose the one that you're more comfortable with. Additionally, when using graphical editors like `Kate`, be sure to launch them with `sudo` to have the necessary permissions to edit system files.\n\n[Back to Top](#)\n\n#\n\u003ca name=\"GPU\"\u003e\u003c/a\u003e\n# Configuring GPU Drivers in NixOS\n\nIf you're looking to configure GPU drivers on your NixOS system, follow these steps to choose the appropriate driver based on your hardware:\n\n1. **Open `configuration.nix` File:**\n\n   Open a terminal and navigate to your NixOS configuration directory. Use either of the following methods to open the `configuration.nix` file:\n\n   - **Using nano:**\n     ```bash\n     sudo nano /etc/nixos/configuration.nix\n     ```\n   - **Using Kate Text Editor:**\n     ```bash\n     kate /etc/nixos/configuration.nix\n     ```\n\n2. **Locate GPU Driver Options:**\n\n   After successfully adding the required lines from **Step 4**, in the `configuration.nix` file, scroll down until you find the `imports = [` section. This section is usually located near the beginning of the file and should looks like this now:\n   \n```nix\nimports = [ \n   # ./hardware/gpu/intel/intel-laptop                      # INTEL GPU with (Open-GL), tlp and auto-cpufreq\n   # ./hardware/gpu/nvidia/nvidia-stable/nvidia-stable.nix  # NVIDIA stable for GT-710--\n   # ./hardware/gpu/nvidia/nvidia-opengl/nvidia-opengl.nix  # NVIDIA with hardware acceleration (Open-GL) for GT-1030++\n    ./hardware-configuration.nix\n    ./nix\n    ./packages\n    ./programs\n    ./services\n    ./system\n  ];\n\n# Including this\nnixpkgs.config.permittedInsecurePackages = [ \"openssl-1.1.1v\" ];\n```\n\n   The top few lines in the `imports = [ ... ]` line, you will find the GPU driver options section. It will look like this:\n   \n   ```nix\n   # ./hardware/gpu/intel/intel-laptop                      # INTEL GPU with (Open-GL), tlp and auto-cpufreq\n   # ./hardware/gpu/nvidia/nvidia-stable/nvidia-stable.nix  # NVIDIA stable for GT-710--\n   # ./hardware/gpu/nvidia/nvidia-opengl/nvidia-opengl.nix  # NVIDIA with hardware acceleration (Open-GL) for GT-1030++\n   ```\n\n3. **Choose Your GPU Driver:**\n\n   Depending on your hardware, you can choose the appropriate GPU driver option. Each option is followed by a brief description of its use case. Comment out (add `#` at the beginning of the line) the lines for GPU drivers you don't need. For   example, if you have an Intel GPU, comment out the lines related to NVIDIA drivers.\n   \n    *For example, if you have an Intel GPU and want to use the Intel driver, it should look like:*\n```nix\n   imports = [ \n   ./hardware/gpu/intel/intel-laptop                      # INTEL GPU with (Open-GL), tlp and auto-cpufreq\n   # ./hardware/gpu/nvidia/nvidia-stable/nvidia-stable.nix  # NVIDIA stable for GT-710--\n   # ./hardware/gpu/nvidia/nvidia-opengl/nvidia-opengl.nix  # NVIDIA with hardware acceleration (Open-GL) for GT-1030++\n    ./hardware-configuration.nix\n    ./nix\n    ./packages\n    ./programs\n    ./services\n    ./system\n  ];\n\n# Including this\nnixpkgs.config.permittedInsecurePackages = [ \"openssl-1.1.1v\" ];\n```\n\n5. **Save and Apply Changes:**\n\n   After making your choice, save the changes to the `configuration.nix` file. If you used *nano*, press `Ctrl + O` to write the changes and then `Ctrl + X` to exit. If you used *Kate*, simply close the editor.\n   \nBy following these steps, you can easily configure GPU drivers on your NixOS system according to your hardware setup. Remember to regularly check for updates and changes in the driver options based on your hardware requirements.\n\n[Back to Top](#)\n\n#\n\u003ca name=\"tweak-profile\"\u003e\u003c/a\u003e\n# Elevating Your NixOS Experience: Enhancing User Profile Permissions\n\nWelcome to the realm of NixOS customization! As you navigate the intricacies of your NixOS system, you might find the need to empower your user profile with enhanced permissions, allowing you to seamlessly interact with various components of the platform. By following these steps, you'll empower your user-profile with an enriched profile that includes extended permissions and group memberships. \n\n*Here's how you can achieve just that:*\n\n1. **Open `configuration.nix` File:**\n\n   Open a terminal and navigate to your NixOS configuration directory. Use either of the following methods to open the `configuration.nix` file:\n\n   - **Using nano:**\n     ```bash\n     sudo nano /etc/nixos/configuration.nix\n     ```\n   - **Using Kate Text Editor:**\n     ```bash\n     kate /etc/nixos/configuration.nix\n     ```\n\n2. **Locate Your User Profile Section**\n\nWithin the `configuration.nix` file, you'll discover a section dedicated to your user profile. This portion, often resembling the following structure, encapsulates your user-specific settings:\n\n```nix\nusers.users.username = {\n  isNormalUser = true;\n  description = \"User's Full Name\";\n  extraGroups = [ \"wheel\" \"networkmanager\" ];\n};\n```\n\n3. **Enhance Your Profile's Capabilities**\n\nIt's here that the magic unfolds. After the `description` line in your user profile section, you'll introduce a set of configurations designed to amplify your permissions and enrich your interactions within NixOS. \nSimply copy \u0026 paste where the indicators are:\n\n```nix\nusers.users.username = {\n  isNormalUser = true;\n  description = \"User's Full Name\";\n\n  homeMode = \"0755\";        # \u003c-----  Copy from here\n  uid = 1000;  # Replace with your specific UID\n  extraGroups = [\n    \"adbusers\"\n    \"audio\"\n    \"corectrl\"\n    \"disk\"\n    \"input\"\n    \"lp\"\n    \"mongodb\"\n    \"mysql\"\n    \"network\"\n    \"networkmanager\"\n    \"postgres\"\n    \"power\"\n    \"scanner\"\n    \"sound\"\n    \"systemd-journal\"\n    \"users\"\n    \"video\"\n    \"wheel\"      \n  ];\n  packages = [ pkgs.home-manager ];   # \u003c-----  To here\n\n};\n\n```\n\nThese lines of code not only bestow you with enhanced permissions, but they also extend your access to specific groups that define various aspects of NixOS functionality. With the inclusion of `pkgs.home-manager`, your configuration takes a step towards seamless management of your user settings.\n\n[Back to Top](#)\n\n\u003ca name=\"system-enchance\"\u003e\u003c/a\u003e \n#\n**System Enhancements**\n\nTo effortlessly amplify your NixOS system, consider integrating this snippet below the audio configuration. It’s a quick process that will bring a host of automatic upgrades and system enhancements into play:\n\n*Note: Do not over write or leave out `system.stateVersion = \"23.05\";`*\n\n```nix\n# --------------------------------------------------------------------\n# Automated System Enhancements\n# --------------------------------------------------------------------\n\n# Enable automatic system upgrades and reboots if necessary\nsystem.autoUpgrade.enable = true;\n# system.autoUpgrade.allowReboot = true;\nsystem.copySystemConfiguration = true;\nsystemd.extraConfig = \"DefaultTimeoutStopSec=10s\";\n```\n\nThis simple snippet wields great power. It introduces automatic system upgrades and, if required, seamless reboots. By enabling `system.autoUpgrade`, you let your NixOS stay up to date effortlessly. With `system.copySystemConfiguration`, system enhancements become a part of your experience. The `systemd.extraConfig` adds a touch of efficiency to stop sequences.\n\n1. **Swift Copy-Paste**\n\nIntegrating the above snippet is as swift as its enhancements. Just copy the snippet beneath your audio configuration in your `configuration.nix` file. \n\n[Back to Top](#)\n\n#\n\u003ca name=\"rebuild\"\u003e\u003c/a\u003e\n# nixos-rebuild switch\n\nAfter adding all the configurations above, save the `configuration.nix` file. To apply the changes, execute the following command in your terminal:\n\n   ```nix\n   export NIXPKGS_ALLOW_INSECURE=1\n   sudo nixos-rebuild switch --upgrade\n   ```\n\nThis command will update your system with the new GPU driver, audio, system and user profile configurations. If this is your first rebuild from this repository, the required files and services will now start to install.\n\n*If this is your first rebuild along with the GPU driver selection, the overall process WILL take some time, so, grab a cuppa and enjoy the ride!*\n\n[Back to Top](#)\n\n#\n## Conclusion\n\nIn this blog post, I've highlighted some of the key components of my GitHub environment. From syncing my user home folder to developing scripts for mounting, unmounting, and suspending, to customizing my NixOS configuration file with Bluetooth variables and creating a script for common NixOS commands, these tools greatly enhance my productivity and simplify my workflow.\n\nIf you're interested in exploring these scripts or incorporating them into your own environment, feel free to check out my GitHub repository. I hope you find them useful and they inspire you to create your own custom solutions to enhance your development experience!\n\nHappy coding! 😄\n\n[Back to Top](#)\n#\n\n\n## *Other repositories in my git hub:*\n\n\u003cdiv align=\"center\"\u003e\n  \u003ctable style=\"border-collapse: collapse; width: 100%; border: none;\"\u003e\n    \u003ctr\u003e\n     \u003ctd align=\"center\" style=\"border: none;\"\u003e\n        \u003ca href=\"https://github.com/tolgaerok/fedora-tolga\"\u003e\n          \u003cimg src=\"https://flathub.org/img/distro/fedora.svg\" alt=\"Fedora\" style=\"width: 100%;\"\u003e\n          \u003cbr\u003eFedora\n        \u003c/a\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" style=\"border: none;\"\u003e\n        \u003ca href=\"https://github.com/tolgaerok/Debian-tolga\"\u003e\n          \u003cimg src=\"https://flathub.org/img/distro/debian.svg\" alt=\"Debian\" style=\"width: 100%;\"\u003e\n          \u003cbr\u003eDebian\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/table\u003e\n\u003c/div\u003e\n\n## *My Stats:*\n\n\u003cdiv align=\"center\"\u003e\n\n\u003cdiv style=\"text-align: center;\"\u003e\n  \u003ca href=\"https://git.io/streak-stats\" target=\"_blank\"\u003e\n    \u003cimg src=\"http://github-readme-streak-stats.herokuapp.com?user=tolgaerok\u0026theme=dark\u0026background=000000\" alt=\"GitHub Streak\" style=\"display: block; margin: 0 auto;\"\u003e\n  \u003c/a\u003e\n  \u003cdiv style=\"text-align: center;\"\u003e\n    \u003ca href=\"https://github.com/anuraghazra/github-readme-stats\" target=\"_blank\"\u003e\n      \u003cimg src=\"https://github-readme-stats.vercel.app/api/top-langs/?username=tolgaerok\u0026layout=compact\u0026theme=vision-friendly-dark\" alt=\"Top Languages\" style=\"display: block; margin: 0 auto;\"\u003e\n    \u003c/a\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\nBack to [Index](#index)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftolgaerok%2Fnixos-kde","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftolgaerok%2Fnixos-kde","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftolgaerok%2Fnixos-kde/lists"}