Restructured nixos code for better structure. Commented what each package is for.

This commit is contained in:
2025-12-18 14:20:16 +01:00
parent aed49644e9
commit feb65868cc
9 changed files with 199 additions and 232 deletions

View File

@ -1,18 +1,11 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
#Access Internet using:
#nmcli device wifi list
#nmcli device wifi connect <ssid> password <password>
# or if no password (open wifi)
#nmcli device wifi connect <ssid>
#Nix flake file limit: ulimit -n 500000
{ inputs, config, pkgs, lib, username, project, host, version, system, ... }:
{
# in configuration.nix
#Assign Swap to the PC
#swapDevices = [{
# device = "/swapfile";
@ -31,7 +24,6 @@
./zsh.nix
./neovim.nix
./packages
#./portainer.nix
];
# Bootloader.
@ -50,15 +42,8 @@
efiSupport = true;
useOSProber = true;
configurationLimit = 5;
#splashImage =
# extraConfig = ''
# menuentry "NixOS - Default" {
# set hidden=1
# }
# '';
};
grub2-theme = {
enable = true;
theme = "whitesur";
@ -74,13 +59,29 @@
#Apply
#Manage flags -> Add bios_grub
networking.hostName = host;
networking = {
# Enable networking
networkmanager.enable = true;
extraHosts = ''
100.89.141.79 tail-rpi
'';
hostName = host;
# Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# proxy.default = "http://user:password@proxy:port/";
# proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Open ports in the firewall.
# firewall.allowedTCPPorts = [ ... ];
# firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# firewall.enable = false;
};
home-manager = {
useGlobalPkgs = true;
@ -91,13 +92,6 @@
sharedModules = [ inputs.plasma-manager.homeModules.plasma-manager ];
};
# Enable networking
networking.networkmanager.enable = true;
networking.extraHosts = ''
100.89.141.79 tail-rpi
'';
# Set your time zone.
time.timeZone = "Europe/Berlin";
@ -144,6 +138,31 @@
];
};
# security.rtkit.enable = true;
pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
#jack.enable = true;
};
pipewire.wireplumber = {
enable = true;
extraConfig = {
"10-bluez-monitor.properties" = {
"bluez5.msbc-support" = false;
"bluez5.hfphsp-support" = false;
"bluez5.hfphsp-backend" = "none"; # Key addition: no backend
"bluez5.roles" = [ "a2dp_sink" ];
};
"11-bluetooth-policy" = {
"wireplumber.settings" = {
"bluetooth.autoswitch-to-headset-profile" = false;
};
};
};
};
#Enable CUPS to print documents.
printing.enable = true;
@ -173,30 +192,34 @@
};
};
programs = {
steam.enable = true;
ssh.askPassword = lib.mkForce "${pkgs.kdePackages.ksshaskpass}/bin/ksshaskpass";
#In order for dynamically linked executables to work
programs.nix-ld.enable = true;
programs.ssh.askPassword = lib.mkForce "${pkgs.kdePackages.ksshaskpass}/bin/ksshaskpass";
programs.steam.enable = true;
nix-ld.enable = true;
};
# Configure console keymap
console.keyMap = "de";
hardware.enableRedistributableFirmware = true;
hardware = {
#Enables proprietary, redistributable firmware so hardware devices function properly
enableRedistributableFirmware = true;
hardware.graphics = {
graphics = {
enable = true;
# Mesa should be enabled by default for Vulkan, but you can be explicit
enable32Bit = true; # For 32-bit applications
extraPackages = with pkgs; [ rocmPackages.clr.icd ];
};
hardware.cpu.amd.updateMicrocode = true;
cpu.amd.updateMicrocode = true;
hardware.bluetooth = {
amdgpu.opencl.enable = true;
bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
@ -217,36 +240,8 @@
};
};
};
# security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
#jack.enable = true;
};
services.pipewire.wireplumber = {
enable = true;
extraConfig = {
"10-bluez-monitor.properties" = {
"bluez5.msbc-support" = false;
"bluez5.hfphsp-support" = false;
"bluez5.hfphsp-backend" = "none"; # Key addition: no backend
"bluez5.roles" = [ "a2dp_sink" ];
};
"11-bluetooth-policy" = {
"wireplumber.settings" = {
"bluetooth.autoswitch-to-headset-profile" = false;
};
};
};
};
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.${username} = {
isNormalUser = true;
@ -257,13 +252,29 @@
];
};
virtualisation.docker.enable = true;
virtualisation = {
docker.enable = true;
environment.etc."gitconfig".text = ''
waydroid.enable = true;
};
environment = {
etc."gitconfig".text = ''
[init]
defaultBranch = main
'';
variables = {
EDITOR = "nvim";
# XKB_DEFAULT_LAYOUT = "de";
};
sessionVariables = {
NIXOS_OZONE_WL = "1"; #For chromium to work under wayland and with virtual Keyboards (Only really needed for virtual keyboards, but doest hurt ...)
TERMINAL = "kitty";
};
};
#So no user in the group Wheel has to input the password in order to use sudo
security.sudo.wheelNeedsPassword = false;
@ -273,31 +284,6 @@
# Allow unfree packages
nixpkgs.config.allowUnfree = 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;
# };
environment.variables = {
EDITOR = "nvim";
# XKB_DEFAULT_LAYOUT = "de";
};
environment.sessionVariables = {
NIXOS_OZONE_WL = "1"; #For chromium to work under wayland and with virtual Keyboards (Only really needed for virtual keyboards, but doest hurt ...)
TERMINAL = "kitty";
};
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave

View File

@ -74,6 +74,7 @@
#(extension "react-devtools" "@react-devtools")
(extension "keepa" "amptra@keepa.com")
(extension "redditUntranslate" "reddit-url-redirector@kichkoupi.com")
(extension "darkreader" "addon@darkreader.org")
];
/* ---- PREFERENCES ---- */

View File

@ -70,7 +70,7 @@
};
zen-browser = {
enable = true;
enable = false;
#package = inputs.zen-browser.packages.${pkgs.system}.default;
profiles = {
${username} = {

View File

@ -2,18 +2,19 @@
{
environment.systemPackages = with pkgs; [
#CLI tools
pdftk
yt-dlp
tailscale
speedtest-cli
pdftk #PDF toolkit
yt-dlp #YouTube and others video downloader
tailscale #VPN
speedtest-cli #Internet speed tester
#duplicati
#ollama
cloudflare-warp
ddrescue
texliveFull #LaTeX PDF maker
lazygit
gtypist
powertop
file
lazygit #Git CLI tool with TUI
gtypist #Typing tutor
powertop #Power consumption monitor and optimizer
file #File type identifier
hashcat #Password recovery/cracking tool
];
}

View File

@ -3,61 +3,53 @@
environment.systemPackages = with pkgs; [
#Programming
#jetbrains.pycharm-community #The PyCharm IDE to edit Python code
#jetbrains.idea-community #The IntelliJ IDE to edit Java code
#jetbrains.clion #The CLion IDE to edit and compile c/c++ code
jetbrains-toolbox
jetbrains.pycharm-community #The PyCharm IDE to edit Python code
jetbrains.idea-community #The IntelliJ IDE to edit Java code
jetbrains.clion #The CLion IDE to edit and compile c/c++ code
jetbrains.datagrip #The DataGrip IDE to manage Databases
#racket #The racket Programming language, with DrRacket IDE, for University (*Not* because it's my favourite)
rustup #Rust Programming Toolchain
#go #Go Programming Language
gcc
gcc #C/C++ Compiler
pkg-config
vscode #Editor for all kinds of programms
nodejs_22
nodejs_22 #NodeJS for JavaScript programming
#Hochschule
postgresql
dbeaver-bin
sqlite
postgresql #Database system
dbeaver-bin #Database Management Tool
sqlite #Lightweight Database system
#Desktop Applications
drawio
#jetbrains.datagrip
ryubing
vlc
#steam
#heroic
lutris
#putty Need to find alternative as it sucks on linux
mission-center
trayscale
spotify
rpi-imager
kdePackages.yakuake
atlauncher
ryubing #Nintendo Switch Emulator
vlc #VLC Media Player
lutris #Gaming Platform
mission-center #For a Task Manager like GUI
trayscale #Tailscale unofficial GUI
spotify #Spotify Music Client
rpi-imager #Raspberry Pi Imager
atlauncher #Minecraft Launcher
#discord
vesktop
vesktop #Aternative for discord on Wayland
wineWowPackages.stagingFull
winetricks
wasistlos #Whatsapp
#obs-studio
#i2p
#obs-studio #Screen Recorder
gparted #Disk partition Manager
#rustdesk
realvnc-vnc-viewer
#rustdesk #Remote Desktop Client
realvnc-vnc-viewer #VNC Remote Desktop Client
eddie #AirVPN desktop client
chromium #For Youtube app to work
kdePackages.bluez-qt
moonlight-qt
kitty
chromium #Chromium browser for Youtube app to work
moonlight-qt #Game Streaming Client
kitty #Kitty Terminal Emulator
wmctrl #To Force windows into fullscreen
kdePackages.dolphin
persepolis #Download Manager
libreoffice-still
kdePackages.dolphin #KDE File Browser
libreoffice-still #Office Suite
kdePackages.kservice
qbittorrent
waydroid #Android
grim
gimp2-with-plugins
qbittorrent #Torrent Client
waydroid #Android emulator on Linux
gimp2-with-plugins #Image Editor
kdePackages.filelight #Disk Usage Analyzer
];
}

View File

@ -1,18 +1,16 @@
{config, pkgs, libs, inputs, nix-flatpak, ...}:
{
environment.systemPackages = with pkgs; [
#Essentials (CLI Only)
wget #A tool for quickly downloading things from the Web
micro-with-xclip #Micro text editor with xclip for clipboard
javaPackages.compiler.openjdk25 #Java Development Kit 23
javaPackages.compiler.openjdk25 #Java Development Kit 25
python312 #Python 3.12
python312Packages.pip #Pip for Python 3.12
python312Packages.cmake #The CMake tool to manage project build configurations
fastfetch #A utility to see information about your machine
btop #A replacement for htop to see your machines resources
git #Git ... no need to explain
efibootmgr
efibootmgr #A tool to manage UEFI boot entries
zip #A utility for ZIP archives
unzip #A utility for ZIP archives
rar #A utility for RAR archives
@ -21,23 +19,24 @@
tmux #A tool to let command windows contiune to run in the background
home-manager #A package to also edit the user Configuration, like with nix
konsave #A package to transfer the look and feel of KDE Plasma to other machines
ocs-url
kdePackages.plasma-workspace
kdePackages.kdialog
openssh #SSH
zoxide #Alternatice to cd, browse files
fzf-zsh #Search for file names
coreutils-full
coreutils-full #Full set of coreutils, including some missing ones
multipath-tools
docker
docker-compose
plymouth
mesa
fprintd
docker #Docker ... no need to explain
docker-compose #Docker Compose for docker
plymouth #Boot Splash screen
mesa #Graphics drivers
fprintd #Fingerprint reader support
nh
whois
networkmanagerapplet
zoxide
pocl
whois #To find out domain information
networkmanagerapplet #For managing network manager connections
zoxide #Alternative to cd, browse files
pocl #Portable OpenCL implementation
clinfo #OpenCL info tool
rocmPackages.rocm-runtime #AMD ROCm runtime
ripgrep #Alternative to grep search for text in files
pipewire #Multimedia handling
];
}

View File

@ -13,7 +13,7 @@
stylix = {
enable = true;
autoEnable = false; #So I can choose my programs it targets myself!
image = ../../other/wallpaper2.png;
#image = ../../other/wallpaper2.png;
#autoEnable = true; #Auto generate theme based on wallpaper
base16Scheme = "${pkgs.base16-schemes}/share/themes/dracula.yaml";
opacity = {

View File

@ -9,7 +9,7 @@
#after = [ "plasma-desktop.service" ];
wantedBy = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = [ "/run/current-system/sw/bin/plasma-apply-wallpaperimage /home/${username}/${project}/other/wallpaper2.png" ];
ExecStart = [ "/run/current-system/sw/bin/plasma-apply-wallpaperimage /home/${username}/${project}/other/wallpaper3.png" ];
Type = "oneshot";
Restart = "on-failure";

View File

@ -3,7 +3,7 @@ let
# Define the custom background package with the correct relative path
background-package = pkgs.stdenvNoCC.mkDerivation {
name = "background-image";
src = ../other/wallpaper2.png; # Place wallpaper.jpg in the same directory as this config file
src = ../other/wallpaper4.png; # Place wallpaper.jpg in the same directory as this config file
dontUnpack = true;
installPhase = ''
cp $src $out
@ -56,47 +56,35 @@ in
wayland.enable = true;
};
};
# Enable the KDE Plasma Desktop Environment.
desktopManager.plasma6.enable = true;
};
virtualisation.waydroid.enable = true;
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
#services.xserver.enable = true;
# Configure keymap in X11
#services.xserver.xkb = {
# layout = "de";
# variant = "";
#};
system.activationScripts.script.text = ''
source /home/${username}/${project}/other/colors.sh
source /home/${username}/${project}/other/pfp.sh
'';
#services.displayManager.sddm = {
# enable = true;
# theme = "breeze";
# wayland.enable = true;
#};
environment = {
# Enable the KDE Plasma Desktop Environment.
services.desktopManager.plasma6.enable = true;
environment.plasma6.excludePackages = with pkgs; [
# kdePackages.konsole #Using Kitty instead
plasma6.excludePackages = with pkgs; [
kdePackages.elisa
];
environment.systemPackages = with pkgs; [
kdePackages.plymouth-kcm
systemPackages = with pkgs; [
(pkgs.writeTextDir "share/sddm/themes/breeze/theme.conf.user" ''
[General]
background = "${background-package}"
'')
'') #Custom SDDM theme with background image
kdePackages.plymouth-kcm
xdg-desktop-portal
kdePackages.xdg-desktop-portal-kde
pipewire
kdePackages.plasma-workspace
kdePackages.kdialog
kdePackages.yakuake #Drop down Terminal
kdePackages.bluez-qt #Bluetooth management for KDE Plasma
];
};
}