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";
@ -20,19 +13,18 @@
#}];
imports =
[
inputs.home-manager.nixosModules.home-manager
inputs.grub2-themes.nixosModules.default
inputs.nix-flatpak.nixosModules.nix-flatpak
./hardware-configuration.nix
[
inputs.home-manager.nixosModules.home-manager
inputs.grub2-themes.nixosModules.default
inputs.nix-flatpak.nixosModules.nix-flatpak
./hardware-configuration.nix
./firefox.nix
./boot-splash.nix
./zsh.nix
./neovim.nix
./packages
#./portainer.nix
];
./firefox.nix
./boot-splash.nix
./zsh.nix
./neovim.nix
./packages
];
# Bootloader.
boot = {
@ -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;
# Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking = {
# Enable networking
networkmanager.enable = true;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
extraHosts = ''
100.89.141.79 tail-rpi
'';
hostName = host;
# Define your hostname.
# wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# 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";
@ -143,6 +137,31 @@
"--accept-routes"
];
};
# 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,80 +192,56 @@
};
};
#In order for dynamically linked executables to work
programs.nix-ld.enable = true;
programs = {
steam.enable = true;
programs.ssh.askPassword = lib.mkForce "${pkgs.kdePackages.ksshaskpass}/bin/ksshaskpass";
ssh.askPassword = lib.mkForce "${pkgs.kdePackages.ksshaskpass}/bin/ksshaskpass";
programs.steam.enable = true;
#In order for dynamically linked executables to work
nix-ld.enable = true;
};
# Configure console keymap
console.keyMap = "de";
hardware.enableRedistributableFirmware = true;
#Enables proprietary, redistributable firmware so hardware devices function properly
hardware = {
#Enables proprietary, redistributable firmware so hardware devices function properly
enableRedistributableFirmware = true;
hardware.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;
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
# Shows battery charge of connected devices on supported
# Bluetooth adapters. Defaults to 'false'.
Experimental = true;
# When enabled other devices can connect faster to us, however
# the tradeoff is increased power consumption. Defaults to
# 'false'.
FastConnectable = true;
};
Policy = {
# Enable all controllers when they are found. This includes
# adapters present on start as well as adapters that are plugged
# in later on. Defaults to 'true'.
AutoEnable = true;
};
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 ];
};
};
# security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
#jack.enable = true;
};
cpu.amd.updateMicrocode = 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;
amdgpu.opencl.enable = true;
bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
# Shows battery charge of connected devices on supported
# Bluetooth adapters. Defaults to 'false'.
Experimental = true;
# When enabled other devices can connect faster to us, however
# the tradeoff is increased power consumption. Defaults to
# 'false'.
FastConnectable = true;
};
Policy = {
# Enable all controllers when they are found. This includes
# adapters present on start as well as adapters that are plugged
# in later on. Defaults to 'true'.
AutoEnable = true;
};
};
};
};
# 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,12 +252,28 @@
];
};
virtualisation.docker.enable = true;
virtualisation = {
docker.enable = true;
environment.etc."gitconfig".text = ''
[init]
defaultBranch = main
'';
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
wasistlos #Whatsapp
#obs-studio #Screen Recorder
gparted #Disk partition Manager
#rustdesk
realvnc-vnc-viewer
eddie #AirVPN desktop client
chromium #For Youtube app to work
kdePackages.bluez-qt
moonlight-qt
kitty
#rustdesk #Remote Desktop Client
realvnc-vnc-viewer #VNC Remote Desktop Client
eddie #AirVPN desktop client
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
nh
whois
networkmanagerapplet
zoxide
pocl
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 #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 = {