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: #Access Internet using:
#nmcli device wifi list #nmcli device wifi list
#nmcli device wifi connect <ssid> password <password> #nmcli device wifi connect <ssid> password <password>
# or if no password (open wifi) # or if no password (open wifi)
#nmcli device wifi connect <ssid> #nmcli device wifi connect <ssid>
#Nix flake file limit: ulimit -n 500000
{ inputs, config, pkgs, lib, username, project, host, version, system, ... }: { inputs, config, pkgs, lib, username, project, host, version, system, ... }:
{ {
# in configuration.nix
#Assign Swap to the PC #Assign Swap to the PC
#swapDevices = [{ #swapDevices = [{
# device = "/swapfile"; # device = "/swapfile";
@ -31,7 +24,6 @@
./zsh.nix ./zsh.nix
./neovim.nix ./neovim.nix
./packages ./packages
#./portainer.nix
]; ];
# Bootloader. # Bootloader.
@ -50,15 +42,8 @@
efiSupport = true; efiSupport = true;
useOSProber = true; useOSProber = true;
configurationLimit = 5; configurationLimit = 5;
#splashImage =
# extraConfig = ''
# menuentry "NixOS - Default" {
# set hidden=1
# }
# '';
}; };
grub2-theme = { grub2-theme = {
enable = true; enable = true;
theme = "whitesur"; theme = "whitesur";
@ -74,13 +59,29 @@
#Apply #Apply
#Manage flags -> Add bios_grub #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. # 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 # Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/"; # proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # 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 = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
@ -91,13 +92,6 @@
sharedModules = [ inputs.plasma-manager.homeModules.plasma-manager ]; 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. # Set your time zone.
time.timeZone = "Europe/Berlin"; 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. #Enable CUPS to print documents.
printing.enable = true; 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 #In order for dynamically linked executables to work
programs.nix-ld.enable = true; nix-ld.enable = true;
};
programs.ssh.askPassword = lib.mkForce "${pkgs.kdePackages.ksshaskpass}/bin/ksshaskpass";
programs.steam.enable = true;
# Configure console keymap # Configure console keymap
console.keyMap = "de"; console.keyMap = "de";
hardware.enableRedistributableFirmware = true; hardware = {
#Enables proprietary, redistributable firmware so hardware devices function properly #Enables proprietary, redistributable firmware so hardware devices function properly
enableRedistributableFirmware = true;
hardware.graphics = { graphics = {
enable = true; enable = true;
# Mesa should be enabled by default for Vulkan, but you can be explicit # Mesa should be enabled by default for Vulkan, but you can be explicit
enable32Bit = true; # For 32-bit applications enable32Bit = true; # For 32-bit applications
extraPackages = with pkgs; [ rocmPackages.clr.icd ]; extraPackages = with pkgs; [ rocmPackages.clr.icd ];
}; };
hardware.cpu.amd.updateMicrocode = true; cpu.amd.updateMicrocode = true;
hardware.bluetooth = { amdgpu.opencl.enable = true;
bluetooth = {
enable = true; enable = true;
powerOnBoot = true; powerOnBoot = true;
settings = { 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. # Define a user account. Don't forget to set a password with passwd.
users.users.${username} = { users.users.${username} = {
isNormalUser = true; 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] [init]
defaultBranch = main 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 #So no user in the group Wheel has to input the password in order to use sudo
security.sudo.wheelNeedsPassword = false; security.sudo.wheelNeedsPassword = false;
@ -273,31 +284,6 @@
# Allow unfree packages # Allow unfree packages
nixpkgs.config.allowUnfree = true; 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 # This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions # settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave # on your system were taken. Its perfectly fine and recommended to leave

View File

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

View File

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

View File

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

View File

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

View File

@ -1,18 +1,16 @@
{config, pkgs, libs, inputs, nix-flatpak, ...}: {config, pkgs, libs, inputs, nix-flatpak, ...}:
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
#Essentials (CLI Only) #Essentials (CLI Only)
wget #A tool for quickly downloading things from the Web 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 25
javaPackages.compiler.openjdk25 #Java Development Kit 23
python312 #Python 3.12 python312 #Python 3.12
python312Packages.pip #Pip for Python 3.12 python312Packages.pip #Pip for Python 3.12
python312Packages.cmake #The CMake tool to manage project build configurations python312Packages.cmake #The CMake tool to manage project build configurations
fastfetch #A utility to see information about your machine fastfetch #A utility to see information about your machine
btop #A replacement for htop to see your machines resources btop #A replacement for htop to see your machines resources
git #Git ... no need to explain git #Git ... no need to explain
efibootmgr efibootmgr #A tool to manage UEFI boot entries
zip #A utility for ZIP archives zip #A utility for ZIP archives
unzip #A utility for ZIP archives unzip #A utility for ZIP archives
rar #A utility for RAR archives rar #A utility for RAR archives
@ -21,23 +19,24 @@
tmux #A tool to let command windows contiune to run in the background 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 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 konsave #A package to transfer the look and feel of KDE Plasma to other machines
ocs-url
kdePackages.plasma-workspace
kdePackages.kdialog
openssh #SSH openssh #SSH
zoxide #Alternatice to cd, browse files zoxide #Alternatice to cd, browse files
fzf-zsh #Search for file names fzf-zsh #Search for file names
coreutils-full coreutils-full #Full set of coreutils, including some missing ones
multipath-tools multipath-tools
docker docker #Docker ... no need to explain
docker-compose docker-compose #Docker Compose for docker
plymouth plymouth #Boot Splash screen
mesa mesa #Graphics drivers
fprintd fprintd #Fingerprint reader support
nh nh
whois whois #To find out domain information
networkmanagerapplet networkmanagerapplet #For managing network manager connections
zoxide zoxide #Alternative to cd, browse files
pocl 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 = { stylix = {
enable = true; enable = true;
autoEnable = false; #So I can choose my programs it targets myself! 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 #autoEnable = true; #Auto generate theme based on wallpaper
base16Scheme = "${pkgs.base16-schemes}/share/themes/dracula.yaml"; base16Scheme = "${pkgs.base16-schemes}/share/themes/dracula.yaml";
opacity = { opacity = {

View File

@ -9,7 +9,7 @@
#after = [ "plasma-desktop.service" ]; #after = [ "plasma-desktop.service" ];
wantedBy = [ "graphical-session.target" ]; wantedBy = [ "graphical-session.target" ];
serviceConfig = { 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"; Type = "oneshot";
Restart = "on-failure"; Restart = "on-failure";

View File

@ -3,7 +3,7 @@ let
# Define the custom background package with the correct relative path # Define the custom background package with the correct relative path
background-package = pkgs.stdenvNoCC.mkDerivation { background-package = pkgs.stdenvNoCC.mkDerivation {
name = "background-image"; 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; dontUnpack = true;
installPhase = '' installPhase = ''
cp $src $out cp $src $out
@ -56,47 +56,35 @@ in
wayland.enable = true; 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 = '' system.activationScripts.script.text = ''
source /home/${username}/${project}/other/colors.sh source /home/${username}/${project}/other/colors.sh
source /home/${username}/${project}/other/pfp.sh source /home/${username}/${project}/other/pfp.sh
''; '';
#services.displayManager.sddm = { environment = {
# enable = true;
# theme = "breeze";
# wayland.enable = true;
#};
# Enable the KDE Plasma Desktop Environment. plasma6.excludePackages = with pkgs; [
services.desktopManager.plasma6.enable = true;
environment.plasma6.excludePackages = with pkgs; [
# kdePackages.konsole #Using Kitty instead
kdePackages.elisa kdePackages.elisa
]; ];
environment.systemPackages = with pkgs; [ systemPackages = with pkgs; [
kdePackages.plymouth-kcm
(pkgs.writeTextDir "share/sddm/themes/breeze/theme.conf.user" '' (pkgs.writeTextDir "share/sddm/themes/breeze/theme.conf.user" ''
[General] [General]
background = "${background-package}" background = "${background-package}"
'') '') #Custom SDDM theme with background image
kdePackages.plymouth-kcm
xdg-desktop-portal xdg-desktop-portal
kdePackages.xdg-desktop-portal-kde kdePackages.xdg-desktop-portal-kde
pipewire kdePackages.plasma-workspace
kdePackages.kdialog
kdePackages.yakuake #Drop down Terminal
kdePackages.bluez-qt #Bluetooth management for KDE Plasma
]; ];
};
} }