From 3bc1d1e246b8d90b491382f799250306979e4d84 Mon Sep 17 00:00:00 2001 From: Cookiez Date: Fri, 21 Nov 2025 16:32:49 +0100 Subject: [PATCH 1/5] Moved modules into a new Modules subdirectory. Started config of install.sh script. Moved home manager config out of flake. --- boot-splash.nix | 22 - flake.nix | 17 +- hosts/default/default.nix | 19 + hosts/default/hardware.nix | 55 ++ hosts/default/host-packages.nix | 6 + hosts/default/variables.nix | 113 ++++ install.sh | 504 ++++++++++++++++++ modules/boot-splash.nix | 22 + .../configuration.nix | 33 +- modules/default.nix | 11 + .../desktop-entries.nix | 0 firefox.nix => modules/firefox.nix | 0 .../hardware-configuration.nix | 0 home.nix => modules/home.nix | 0 minimal.nix => modules/minimal.nix | 0 neovim-home.nix => modules/neovim-home.nix | 0 neovim.nix => modules/neovim.nix | 0 packages.nix => modules/packages.nix | 0 zsh.nix => modules/zsh.nix | 13 +- 19 files changed, 759 insertions(+), 56 deletions(-) delete mode 100644 boot-splash.nix create mode 100644 hosts/default/default.nix create mode 100644 hosts/default/hardware.nix create mode 100644 hosts/default/host-packages.nix create mode 100644 hosts/default/variables.nix create mode 100755 install.sh create mode 100644 modules/boot-splash.nix rename configuration.nix => modules/configuration.nix (91%) create mode 100644 modules/default.nix rename desktop-entries.nix => modules/desktop-entries.nix (100%) rename firefox.nix => modules/firefox.nix (100%) rename hardware-configuration.nix => modules/hardware-configuration.nix (100%) rename home.nix => modules/home.nix (100%) rename minimal.nix => modules/minimal.nix (100%) rename neovim-home.nix => modules/neovim-home.nix (100%) rename neovim.nix => modules/neovim.nix (100%) rename packages.nix => modules/packages.nix (100%) rename zsh.nix => modules/zsh.nix (67%) diff --git a/boot-splash.nix b/boot-splash.nix deleted file mode 100644 index fe93aaa..0000000 --- a/boot-splash.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config, lib, pkgs, ... }: -{ -boot = { - # silence first boot output - consoleLogLevel = 3; - initrd.verbose = false; - initrd.systemd.enable = true; - kernelParams = [ - "quiet" - "splash" - "intremap=on" - "boot.shell_on_fail" - "udev.log_priority=3" - "rd.systemd.show_status=auto" - ]; - - # plymouth, showing after LUKS unlock - plymouth.enable = true; - plymouth.font = "${pkgs.hack-font}/share/fonts/truetype/Hack-Regular.ttf"; - plymouth.logo = "${pkgs.nixos-icons}/share/icons/hicolor/128x128/apps/nix-snowflake.png"; -}; -} diff --git a/flake.nix b/flake.nix index 9ebf705..5d4a8c4 100644 --- a/flake.nix +++ b/flake.nix @@ -49,26 +49,13 @@ nixos = nixpkgs.lib.nixosSystem { inherit system; specialArgs = { - inherit inputs username version; + inherit inputs username version system; }; modules = [ - ./configuration.nix - ./firefox.nix - ./boot-splash.nix - ./zsh.nix - ./neovim.nix - ./packages.nix + ./modules grub2-themes.nixosModules.default nix-flatpak.nixosModules.nix-flatpak stylix.nixosModules.stylix - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.${username} = ./home.nix; - home-manager.backupFileExtension = "backup"; # Automatically backs up conflicting files during activation - home-manager.extraSpecialArgs = { inherit inputs username version; system = "x86_64-linux"; }; - } #Conditional Modules! ] ++ (if hyprlandEnabled then [ ./hyprland/hyprland.nix ] else [ ]) ++ [ ] ++ (if plasmaEnabled then [ ./plasma/plasma.nix ] else [ ]) ++ [ diff --git a/hosts/default/default.nix b/hosts/default/default.nix new file mode 100644 index 0000000..bbd8853 --- /dev/null +++ b/hosts/default/default.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: +{ + imports = [ + ./hardware.nix + ./host-packages.nix + ]; + + # Enable sddm display manager + services.displayManager.sddm.enable = true; + + # Sysc-greet display manager + services.sysc-greet.enable = false; + + # Keep niri available at system level for ly display manager to detect it + programs.niri.package = pkgs.niri; + + # Ensure niri session is available to display manager + services.displayManager.sessionPackages = [ pkgs.niri ]; +} diff --git a/hosts/default/hardware.nix b/hosts/default/hardware.nix new file mode 100644 index 0000000..28c77e4 --- /dev/null +++ b/hosts/default/hardware.nix @@ -0,0 +1,55 @@ +# 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" + "usbhid" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/0000-0000"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000"; } + ]; + + # 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.enp4s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/default/host-packages.nix b/hosts/default/host-packages.nix new file mode 100644 index 0000000..8030e23 --- /dev/null +++ b/hosts/default/host-packages.nix @@ -0,0 +1,6 @@ +{ pkgs, ... }: +{ + environment.systemPackages = with pkgs; [ + # Add host-specific packages here + ]; +} diff --git a/hosts/default/variables.nix b/hosts/default/variables.nix new file mode 100644 index 0000000..1b9bc8f --- /dev/null +++ b/hosts/default/variables.nix @@ -0,0 +1,113 @@ +{ + # Git Configuration ( For Pulling Software Repos ) + gitUsername = "user"; + gitEmail = "user@example.com"; + + # System Configuration + timeZone = "America/New_York"; + + # Hyprland Settings + # ex "monitor=HDMI-A-1, 1920x1080@60,auto,1" + # Configure your monitors here - this is host-specific + extraMonitorSettings = '' + monitor=,preferred,auto,1 + ''; + + # Waybar Settings + clock24h = false; + + # Program Options + browser = "zen"; # Set Default Browser (google-chrome-stable for google-chrome) + terminal = "kitty"; # Set Default System Terminal + keyboardLayout = "us"; + consoleKeyMap = "us"; + + # For Nvidia Prime support + # Run 'lspci | grep VGA' to find your actual GPU IDs + intelID = "PCI:0:2:0"; # Update with your integrated GPU ID + nvidiaID = "PCI:1:0:0"; # Update with your NVIDIA GPU ID + + # Enable Nvidia cudaSupport for specific applications (obs-studio) + useNvidia = false; + + # Enable NFS + enableNFS = true; + + # Enable Printing Support + printEnable = false; + + # Enable Thunar GUI File Manager + thunarEnable = true; + + # Enable Gaming Support (controllers, gamescope, protonup-qt) + gamingSupportEnable = false; + + # Enable Flutter Development Environment + flutterdevEnable = false; + + # Enable Stylix System Theming + stylixEnable = true; + + # Enable Syncthing File Synchronization + syncthingEnable = false; + + # Enable Communication Apps (Teams, Zoom, Telegram, Discord) + enableCommunicationApps = false; + + # Enable Extra Browsers (Chromium, Google Chrome) + enableExtraBrowsers = false; + + # Enable Productivity Apps (Obsidian, GNOME Boxes, QuickEmu) + enableProductivityApps = false; + + # Enable AI Code Editors (cursor, claude-code, gemini-cli) + aiCodeEditorsEnable = false; + + # Enable Hyprlock (Hyprland lock screen) + # Set to false if using DMS or Noctalia lock screens + enableHyprlock = false; + + # Bar/Shell Choice + barChoice = "noctalia"; # Options: "dms" or "noctalia" + # NOTE: If you change barChoice to "dms", you must run 'dms-install' after rebuilding + + # Shell Choice + defaultShell = "zsh"; # Options: "fish" or "zsh" + + # Set Stylix Image + #stylixImage = ../../wallpapers/AnimeGirlNightSky.jpg; + #stylixImage = ../../wallpapers/nix-wallpaper-stripes-logo.png; + #stylixImage = ../../wallpapers/beautifulmountainscape.png; + #stylixImage = ../../wallpapers/mountainscapedark.jpg; + #stylixImage = ../../wallpapers/Rainnight.jpg; + #stylixImage = ../../wallpapers/zaney-wallpaper.jpg; + stylixImage = ../../wallpapers/55.png; + + # Set Waybar (temporarily disabled - use DMS or Noctalia) + # Includes alternates such as: + # Just uncomment the one you want and comment out the others + + #waybarChoice = ../../modules/home/waybar/Jerry-waybars.nix; + #waybarChoice = ../../modules/home/waybar/waybar-simple.nix; + #waybarChoice = ../../modules/home/waybar/waybar-curved.nix; + #waybarChoice = ../../modules/home/waybar/waybar-nekodyke.nix; + #waybarChoice = ../../modules/home/waybar/waybar-jerry.nix; + #waybarChoice = ../../modules/home/waybar/waybar-ddubs.nix; + + # Set Animation style + # Available options are: + # animations-def.nix (standard) + # animations-end4.nix (end-4 project) + # animations-dynamic.nix (ml4w project) + # animations-moving.nix (ml4w project) + # Just change the name after the - and rebuild + animChoice = ../../modules/home/hyprland/animations-end4.nix; + #animChoice = ../../modules/home/hyprland/animations-def.nix; + #animChoice = ../../modules/home/hyprland/animations-dynamix.nix; + # Note: Moving changes window resizing it shrinks then pops back + #animChoice = ../../modules/home/hyprland/animations-moving.nix; + + # Startup Applications + startupApps = [ + ]; +} diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..2192e8f --- /dev/null +++ b/install.sh @@ -0,0 +1,504 @@ +#!/usr/bin/env bash + +###################################### +# Black Don OS - Simplified Installer (Modified) +# A NixOS configuration for everyone +###################################### + +set -e # Exit on error + +# Colors +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' + +# Print functions +print_header() { + echo -e "${GREEN}╔═══════════════════════════════════════════════════════════════╗${NC}" + echo -e "${GREEN}║ ${1}${NC}" + echo -e "${GREEN}╚═══════════════════════════════════════════════════════════════╝${NC}" +} + +print_error() { + echo -e "${RED}✗ Error: ${1}${NC}" +} + +print_success() { + echo -e "${GREEN}✓ ${1}${NC}" +} + +print_info() { + echo -e "${BLUE}ℹ ${1}${NC}" +} + +# Welcome +clear +print_header "Cookiez NixOS - Simplified Installation" +echo "" +echo -e "${BLUE}Welcome! This installer will set up NixOS with sensible defaults.${NC}" +echo -e "${BLUE}You can customize everything later by editing your variables.nix file.${NC}" +echo "" +sleep 2 + +# Verify NixOS +print_header "System Verification" +if [ -n "$(grep -i nixos < /etc/os-release)" ]; then + print_success "Running on NixOS" +else + print_error "This installer requires NixOS" + exit 1 +fi + +# Check dependencies +if ! command -v git &> /dev/null || ! command -v lspci &> /dev/null; then + print_error "Missing dependencies. Please run:" + echo -e " ${GREEN}nix-shell -p git pciutils${NC}" + exit 1 +fi +print_success "All dependencies found" +echo "" + +# Get hostname +print_header "Hostname Configuration" +echo -e "${YELLOW}⚠️ Do NOT use 'default' as your hostname!${NC}" +echo -e "Suggested names: my-desktop, nixos-laptop, gaming-rig" +echo "" + +while true; do + read -p "Enter hostname [nixos]: " hostname + hostname=${hostname:-nixos} + + if [ "$hostname" = "default" ]; then + print_error "Cannot use 'default' as hostname. Choose something else." + continue + fi + + if [[ ! "$hostname" =~ ^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$ ]]; then + print_error "Invalid hostname. Use only letters, numbers, and hyphens." + continue + fi + + break +done + +print_success "Hostname: $hostname" +echo "" + +# Get username +print_header "User Configuration" +current_user=$(echo $USER) +read -p "Enter username [$current_user]: " username +username=${username:-$current_user} +print_success "Username: $username" +echo "" + +# Get timezone +print_header "Timezone Configuration" +echo -e "${BLUE}Common timezones:${NC}" +echo -e " America/New_York (Eastern)" +echo -e " America/Chicago (Central)" +echo -e " America/Denver (Mountain)" +echo -e " America/Los_Angeles (Pacific)" +echo -e " Europe/London" +echo -e " Europe/Berlin" +echo -e " Asia/Tokyo" +echo -e " Australia/Sydney" +echo "" +echo -e "${YELLOW}Tip: Find your timezone at: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones${NC}" +echo "" +read -p "Enter timezone [Europe/Berlin]: " timezone +timezone=${timezone:-Europe/Berlin} +print_success "Timezone: $timezone" +echo "" + +# Get keyboard layout +print_header "Keyboard Configuration" +echo -e "${BLUE}Common keyboard layouts:${NC}" +echo -e " us (US English)" +echo -e " uk (UK English)" +echo -e " de (German)" +echo -e " fr (French)" +echo -e " es (Spanish)" +echo -e " it (Italian)" +echo -e " jp (Japanese)" +echo -e " ru (Russian)" +echo "" +read -p "Enter keyboard layout [de]: " keyboard +keyboard=${keyboard:-de} +print_success "Keyboard layout: $keyboard" +echo "" + +# Detect GPU +print_header "Hardware Detection" +DETECTED_PROFILE="" + +has_nvidia=false +has_intel=false +has_amd=false +has_vm=false + +if lspci | grep -qi 'vga\|3d'; then + while read -r line; do + if echo "$line" | grep -qi 'nvidia'; then + has_nvidia=true + elif echo "$line" | grep -qi 'amd'; then + has_amd=true + elif echo "$line" | grep -qi 'intel'; then + has_intel=true + elif echo "$line" | grep -qi 'virtio\|vmware'; then + has_vm=true + fi + done < <(lspci | grep -i 'vga\|3d') + + if $has_vm; then + DETECTED_PROFILE="vm" + elif $has_nvidia && $has_intel; then + DETECTED_PROFILE="nvidia-laptop" + elif $has_nvidia; then + DETECTED_PROFILE="nvidia" + elif $has_amd; then + DETECTED_PROFILE="amd" + elif $has_intel; then + DETECTED_PROFILE="intel" + fi +fi + +if [ -z "$DETECTED_PROFILE" ]; then + echo -e "${YELLOW}Could not detect GPU automatically${NC}" + echo "Available profiles: nvidia, nvidia-laptop, amd, intel, vm" + read -p "Enter GPU profile [amd]: " profile + profile=${profile:-amd} +else + echo -e "Detected GPU: ${GREEN}$DETECTED_PROFILE${NC}" + read -p "Is this correct? [Y/n]: " confirm + if [[ $confirm =~ ^[Nn]$ ]]; then + echo "Available profiles: nvidia, nvidia-laptop, amd, intel, vm" + read -p "Enter GPU profile: " profile + else + profile=$DETECTED_PROFILE + fi +fi + +print_success "GPU Profile: $profile" +echo "" + +# Configuration summary +print_header "Configuration Summary" +echo -e " Hostname: ${GREEN}$hostname${NC}" +echo -e " Username: ${GREEN}$username${NC}" +echo -e " Timezone: ${GREEN}$timezone${NC}" +echo -e " Keyboard: ${GREEN}$keyboard${NC}" +echo -e " GPU Profile: ${GREEN}$profile${NC}" +echo "" +# echo -e "${BLUE}Default Settings (you can change these later):${NC}" +# echo -e " Browser: firefox" +# echo -e " Terminal: kitty" +# echo -e " Shell: zsh" +# echo -e " Bar: noctalia" +# echo -e " Window Mgrs: Both Hyprland and Niri (choose at login)" +# echo "" + +read -p "Continue with installation? [Y/n]: " proceed +if [[ $proceed =~ ^[Nn]$ ]]; then + echo "Installation cancelled" + exit 0 +fi + +# Generate hardware config +print_header "Generating Hardware Configuration" +sudo nixos-generate-config --show-hardware-config > /tmp/hardware.nix +print_success "Hardware configuration generated" +echo "" + +# Create host directory +print_header "Creating Host Configuration" +mkdir -p "hosts/$hostname" + +# Copy default template +cp hosts/default/*.nix "hosts/$hostname/" 2>/dev/null || true + +# Copy hardware config +mv /tmp/hardware.nix "hosts/$hostname/hardware.nix" + +# Create variables.nix +cat > "hosts/$hostname/variables.nix" << EOF +{ + # Git Configuration + gitUsername = "$username"; + gitEmail = "$username@$hostname"; + + # System Configuration + timeZone = "$timezone"; + +# # Monitor Settings (update after installation for your displays) +# extraMonitorSettings = '' +# monitor=,preferred,auto,1 +# ''; + +# # Waybar Settings +# clock24h = false; + + # Default Applications + browser = "firefox"; + terminal = "kitty"; + keyboardLayout = "$keyboard"; + consoleKeyMap = "$keyboard"; + +# # For Nvidia Prime support (update if using nvidia-laptop profile) +# # Run 'lspci | grep VGA' to find your actual GPU IDs +# intelID = "PCI:0:2:0"; +# nvidiaID = "PCI:1:0:0"; + +# # Core Features +# enableNFS = false; +# printEnable = false; +# thunarEnable = true; +# stylixEnable = true; + +# # Optional Features (disabled for faster initial install) +# # You can enable these later by setting to true and rebuilding +# gamingSupportEnable = false; # Gaming controllers, gamescope, protonup-qt +# flutterdevEnable = false; # Flutter development environment +# syncthingEnable = false; # Syncthing file synchronization +# enableCommunicationApps = false; # Discord, Teams, Zoom, Telegram +# enableExtraBrowsers = false; # Vivaldi, Brave, Firefox, Chromium, Helium +# enableProductivityApps = false; # Obsidian, GNOME Boxes, QuickEmu +# aiCodeEditorsEnable = false; # Claude-code, gemini-cli, cursor + +# # Desktop Environment +# enableHyprlock = false; # Set to false if using DMS/Noctalia lock screens + +# # Bar/Shell Choice +# barChoice = "noctalia"; # Options: "dms" or "noctalia" +# # NOTE: If you change barChoice to "dms", you must run 'dms-install' after rebuilding + + # Shell Choice + defaultShell = "zsh"; # Options: "fish" or "zsh" + + # Theming + stylixImage = ../../other/wallpaper2.png; +# #waybarChoice = ../../modules/home/waybar/waybar-ddubs.nix; # Waybar temporarily disabled +# animChoice = ../../modules/home/hyprland/animations-end4.nix; + +# # Startup Applications +# startupApps = []; +} +EOF + +print_success "Host configuration created" +echo "" + +# # Create Hyprland host-specific configuration files +# print_header "Creating Window Manager Host Configurations" +# mkdir -p "modules/home/hyprland/hosts/$hostname" +# +# # Create binds.nix for Hyprland +# cat > "modules/home/hyprland/hosts/$hostname/binds.nix" << 'EOF' +# {host, ...}: let +# inherit +# (import ../../../../hosts/${host}/variables.nix) +# browser +# terminal +# ; +# in { +# # Host-specific binds for $HOSTNAME +# # These will be merged with the default binds +# bind = [ +# # Add host-specific keybinds here +# ]; +# +# bindm = [ +# # Add host-specific mouse binds here +# ]; +# } +# EOF +# +# # Replace $HOSTNAME placeholder with actual hostname +# sed -i "s/\$HOSTNAME/$hostname/g" "modules/home/hyprland/hosts/$hostname/binds.nix" +# +# # Create windowrules.nix for Hyprland +# cat > "modules/home/hyprland/hosts/$hostname/windowrules.nix" << 'EOF' +# {host, ...}: let +# inherit +# (import ../../../../hosts/${host}/variables.nix) +# extraMonitorSettings +# ; +# in { +# # Host-specific window rules for $HOSTNAME +# # These will be merged with the default window rules +# windowrule = [ +# # Add host-specific window rules here +# ]; +# } +# EOF +# +# # Replace $HOSTNAME placeholder with actual hostname +# sed -i "s/\$HOSTNAME/$hostname/g" "modules/home/hyprland/hosts/$hostname/windowrules.nix" +# +# print_success "Hyprland configurations created" + +# # Create Niri host-specific configuration files +# mkdir -p "modules/home/niri/hosts/$hostname" +# +# # Create keybinds.nix for Niri +# cat > "modules/home/niri/hosts/$hostname/keybinds.nix" << 'EOF' +# { host, ... }: +# '' +# // Host-specific keybinds for $HOSTNAME +# // Add your custom keybinds here +# +# // Example: +# // binds { +# // Mod+Shift+B { spawn "zen"; } +# // } +# '' +# EOF +# +# sed -i "s/\$HOSTNAME/$hostname/g" "modules/home/niri/hosts/$hostname/keybinds.nix" +# +# # Create outputs.nix for Niri +# cat > "modules/home/niri/hosts/$hostname/outputs.nix" << 'EOF' +# { host, ... }: +# '' +# // Host-specific output configuration for $HOSTNAME +# // Configure your monitors here +# +# output "eDP-1" { +# mode "1920x1080@60.000" +# scale 1.0 +# position x=0 y=0 +# } +# +# // Add more outputs as needed +# // output "HDMI-A-1" { +# // mode "2560x1440@144.000" +# // scale 1.0 +# // position x=1920 y=0 +# // } +# '' +# EOF +# +# sed -i "s/\$HOSTNAME/$hostname/g" "modules/home/niri/hosts/$hostname/outputs.nix" +# +# # Create windowrules.nix for Niri +# cat > "modules/home/niri/hosts/$hostname/windowrules.nix" << 'EOF' +# { host, ... }: +# '' +# // Host-specific window rules for $HOSTNAME +# // Add your custom window rules here +# +# // Example: +# // window-rule { +# // match app-id="^firefox$" +# // default-column-width { proportion 0.5; } +# // } +# '' +# EOF +# +# sed -i "s/\$HOSTNAME/$hostname/g" "modules/home/niri/hosts/$hostname/windowrules.nix" +# +# print_success "Niri configurations created" +# echo "" + +# # Add new host files to git so flake can see them +# git add hosts/"$hostname"/ modules/home/hyprland/hosts/"$hostname"/ modules/home/niri/hosts/"$hostname"/ 2>/dev/null || true +git add hosts/"$hostname"/ 2>/dev/null || true + +# Update flake.nix +print_header "Updating Flake Configuration" + +if grep -q "\"$hostname\"" flake.nix; then + print_info "Host already exists in flake.nix" +else + # Add host to flake.nix right after the default host + # Use awk to insert at the right location (after default host closing brace, before nixosConfigurations closing brace) + awk -v hostname="$hostname" -v profile="$profile" -v username="$username" ' + /username = "user";/ { in_default = 1 } + in_default && /^ };$/ { + print + print "" + print " " hostname " = mkHost {" + print " hostname = \"" hostname "\";" + print " profile = \"" profile "\";" + print " username = \"" username "\";" + print " };" + in_default = 0 + next + } + { print } + ' flake.nix > flake.nix.tmp && mv flake.nix.tmp flake.nix + + print_success "Added $hostname to flake.nix" + + # Add updated flake.nix to git + git add flake.nix 2>/dev/null || true +fi +echo "" + +# Validate flake +print_header "Validating Configuration" +export NIX_CONFIG="experimental-features = nix-command flakes" +if nix flake metadata --no-write-lock-file . >/dev/null 2>&1; then + print_success "Flake syntax is valid" +else + print_error "Flake validation failed - please check configuration" + exit 1 +fi +echo "" + +# Build configuration +print_header "Building Black Don OS" +echo -e "${YELLOW}This will take 10-20 minutes depending on your hardware...${NC}" +echo "" + +read -p "Ready to build? [Y/n]: " build_confirm +if [[ $build_confirm =~ ^[Nn]$ ]]; then + echo "" + print_info "You can build manually later with:" + echo -e " ${GREEN}sudo nixos-rebuild switch --flake ~/black-don-os#$hostname${NC}" + exit 0 +fi + +export NIX_CONFIG="experimental-features = nix-command flakes" + +if sudo nixos-rebuild switch --flake .#"$hostname"; then + echo "" + print_header "Installation Successful!" + echo "" + print_success "Black Don OS has been installed!" + echo "" +# echo -e "${BLUE}What's next:${NC}" +# echo -e " 1. Your configuration is in: ${GREEN}~/black-don-os/hosts/$hostname/${NC}" +# echo -e " 2. Both Hyprland and Niri are available - select at login screen" +# echo -e " 3. Customize: ${GREEN}~/black-don-os/hosts/$hostname/variables.nix${NC}" +# echo -e " 4. Rebuild: ${GREEN}sudo nixos-rebuild switch --flake ~/black-don-os#$hostname${NC}" +# echo "" +# echo -e "${YELLOW}Tip: Update your monitor settings in variables.nix for optimal display${NC}" +# echo "" + echo -e "${GREEN}╔═══════════════════════════════════════════════════════════════╗${NC}" + echo -e "${GREEN}║${NC} ${YELLOW}IMPORTANT: A system restart is required to complete setup${NC} ${GREEN}║${NC}" + echo -e "${GREEN}╚═══════════════════════════════════════════════════════════════╝${NC}" + echo "" + read -p "Would you like to restart now? [Y/n]: " restart_confirm + if [[ ! $restart_confirm =~ ^[Nn]$ ]]; then + echo "" + print_info "Restarting system in 5 seconds... (Ctrl+C to cancel)" + sleep 5 + sudo reboot + else + echo "" + print_info "Please restart your system when ready to complete the installation" + echo -e " Run: ${GREEN}sudo reboot${NC}" + fi + echo "" +else + echo "" + print_error "Build failed" + echo "" + echo -e "${YELLOW}To retry manually:${NC}" + echo -e " ${GREEN}cd ~/black-don-os${NC}" + echo -e " ${GREEN}sudo nixos-rebuild switch --flake .#$hostname${NC}" + exit 1 +fi diff --git a/modules/boot-splash.nix b/modules/boot-splash.nix new file mode 100644 index 0000000..b112014 --- /dev/null +++ b/modules/boot-splash.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, ... }: +{ + boot = { + # silence first boot output + consoleLogLevel = 3; + initrd.verbose = false; + initrd.systemd.enable = true; + kernelParams = [ + "quiet" + "splash" + "intremap=on" + "boot.shell_on_fail" + "udev.log_priority=3" + "rd.systemd.show_status=auto" + ]; + + # plymouth, showing after LUKS unlock + plymouth.enable = true; + plymouth.font = "${pkgs.hack-font}/share/fonts/truetype/Hack-Regular.ttf"; + plymouth.logo = "${pkgs.nixos-icons}/share/icons/hicolor/128x128/apps/nix-snowflake.png"; + }; +} diff --git a/configuration.nix b/modules/configuration.nix similarity index 91% rename from configuration.nix rename to modules/configuration.nix index 619467a..c71444f 100644 --- a/configuration.nix +++ b/modules/configuration.nix @@ -10,7 +10,7 @@ #Nix flake file limit: ulimit -n 500000 -{ config, pkgs, lib, username, version, ... }: +{ inputs, config, pkgs, lib, username, version, system, ... }: { # stylix.enable = true; # stylix.image = /etc/nixos/other/wallpaper.png; @@ -23,6 +23,7 @@ imports = [ + inputs.home-manager.nixosModules.home-manager ./hardware-configuration.nix ]; @@ -30,7 +31,7 @@ "plasma" = { configuration = { imports = [ - ./plasma/plasma.nix + ../plasma/plasma.nix ]; programs.gamemode.enable = true; @@ -40,19 +41,19 @@ "hyprland" = { configuration = { imports = [ - ./hyprland/hyprland.nix + ../hyprland/hyprland.nix ]; }; }; - "minimal" = { - inheritParentConfig = false; - configuration = { - imports = [ - ./minimal.nix - ]; - }; - }; + #"minimal" = { + # inheritParentConfig = false; + # configuration = { + # imports = [ + # ./minimal.nix + # ]; + # }; + #}; }; @@ -92,6 +93,14 @@ # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.${username} = ./home.nix; + backupFileExtension = "backup"; # Automatically backs up conflicting files during activation + extraSpecialArgs = { inherit inputs username version system; }; + }; + # Enable networking networking.networkmanager.enable = true; @@ -219,7 +228,7 @@ # services.xserver.libinput.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.cookiez = { + users.users."{$username}" = { isNormalUser = true; description = "Cookiez"; extraGroups = [ "networkmanager" "wheel" "docker" ]; diff --git a/modules/default.nix b/modules/default.nix new file mode 100644 index 0000000..2bcb401 --- /dev/null +++ b/modules/default.nix @@ -0,0 +1,11 @@ +{ ... }: +{ + imports = [ + ./configuration.nix + ./firefox.nix + ./boot-splash.nix + ./zsh.nix + ./neovim.nix + ./packages.nix + ]; +} diff --git a/desktop-entries.nix b/modules/desktop-entries.nix similarity index 100% rename from desktop-entries.nix rename to modules/desktop-entries.nix diff --git a/firefox.nix b/modules/firefox.nix similarity index 100% rename from firefox.nix rename to modules/firefox.nix diff --git a/hardware-configuration.nix b/modules/hardware-configuration.nix similarity index 100% rename from hardware-configuration.nix rename to modules/hardware-configuration.nix diff --git a/home.nix b/modules/home.nix similarity index 100% rename from home.nix rename to modules/home.nix diff --git a/minimal.nix b/modules/minimal.nix similarity index 100% rename from minimal.nix rename to modules/minimal.nix diff --git a/neovim-home.nix b/modules/neovim-home.nix similarity index 100% rename from neovim-home.nix rename to modules/neovim-home.nix diff --git a/neovim.nix b/modules/neovim.nix similarity index 100% rename from neovim.nix rename to modules/neovim.nix diff --git a/packages.nix b/modules/packages.nix similarity index 100% rename from packages.nix rename to modules/packages.nix diff --git a/zsh.nix b/modules/zsh.nix similarity index 67% rename from zsh.nix rename to modules/zsh.nix index e6c0dd2..f682b7c 100644 --- a/zsh.nix +++ b/modules/zsh.nix @@ -3,19 +3,18 @@ enable = true; ohMyZsh = { - enable = true; - plugins = [ "git" ]; + enable = true; + plugins = [ "git" ]; }; shellInit = '' - source /etc/nixos/other/aliases - ''; - + source /etc/nixos/other/aliases + ''; #To reset powerlevel10k, write 'p10k configure' in shell! promptInit = '' - source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme - ''; + source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme + ''; }; users.users.cookiez.shell = pkgs.zsh; From c42feb3c4274b206f3f4d74f6cf6b0d5b64b805f Mon Sep 17 00:00:00 2001 From: Cookiez Date: Fri, 21 Nov 2025 16:44:17 +0100 Subject: [PATCH 2/5] Fixed wrong username variable insersion in configuration.nix --- modules/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/configuration.nix b/modules/configuration.nix index c71444f..153804c 100644 --- a/modules/configuration.nix +++ b/modules/configuration.nix @@ -228,7 +228,7 @@ # services.xserver.libinput.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. - users.users."{$username}" = { + users.users.${username} = { isNormalUser = true; description = "Cookiez"; extraGroups = [ "networkmanager" "wheel" "docker" ]; From 9dd27350e236b8dfa629d7d509b17a80e4bb378c Mon Sep 17 00:00:00 2001 From: Cookiez Date: Fri, 21 Nov 2025 17:16:01 +0100 Subject: [PATCH 3/5] Made hostname variable (set in flake). Added ncli as a tool for fast nix specific commands (ncli.nix). --- flake.nix | 10 +- modules/configuration.nix | 6 +- modules/home.nix | 5 +- modules/ncli.nix | 320 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 334 insertions(+), 7 deletions(-) create mode 100644 modules/ncli.nix diff --git a/flake.nix b/flake.nix index 5d4a8c4..5b30917 100644 --- a/flake.nix +++ b/flake.nix @@ -34,6 +34,7 @@ outputs = inputs@{ nixpkgs, home-manager, nixos-hardware ,stylix, zen-browser, grub2-themes, nix-flatpak, ... }: let username = "cookiez"; + hostname = "nixos"; version = "25.05"; system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; }; @@ -45,11 +46,14 @@ in { nixosConfigurations = { - #Replace the below with your hostname!!! Like: {hostname} = nixpkgs.lib.nixosSystem { - nixos = nixpkgs.lib.nixosSystem { + ${hostname} = nixpkgs.lib.nixosSystem { inherit system; specialArgs = { - inherit inputs username version system; + inherit inputs; + inherit username; + inherit version; + inherit system; + host = hostname; }; modules = [ ./modules diff --git a/modules/configuration.nix b/modules/configuration.nix index 153804c..5da5be1 100644 --- a/modules/configuration.nix +++ b/modules/configuration.nix @@ -10,7 +10,7 @@ #Nix flake file limit: ulimit -n 500000 -{ inputs, config, pkgs, lib, username, version, system, ... }: +{ inputs, config, pkgs, lib, username, host, version, system, ... }: { # stylix.enable = true; # stylix.image = /etc/nixos/other/wallpaper.png; @@ -85,7 +85,7 @@ #Apply #Manage flags -> Add bios_grub - networking.hostName = "nixos"; + networking.hostName = host; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. @@ -98,7 +98,7 @@ useUserPackages = true; users.${username} = ./home.nix; backupFileExtension = "backup"; # Automatically backs up conflicting files during activation - extraSpecialArgs = { inherit inputs username version system; }; + extraSpecialArgs = { inherit inputs username version system host; }; }; # Enable networking diff --git a/modules/home.nix b/modules/home.nix index a843b7a..289d993 100644 --- a/modules/home.nix +++ b/modules/home.nix @@ -1,9 +1,12 @@ -{ lib, inputs, config, pkgs, username, version, ... }: +{ lib, inputs, config, pkgs, username, host, version, ... }: { # Home Manager needs a bit of information about you and the # paths it should manage. home.username = username; home.homeDirectory = "/home/${username}"; + home.packages = [ + (import ./ncli.nix { inherit pkgs host; backupFiles = [ ".config/mimeapps.list.backup" ]; }) + ]; imports = [ inputs.zen-browser.homeModules.beta diff --git a/modules/ncli.nix b/modules/ncli.nix new file mode 100644 index 0000000..6e51a3b --- /dev/null +++ b/modules/ncli.nix @@ -0,0 +1,320 @@ +{ + pkgs, + host, + backupFiles ? [".config/mimeapps.list.backup"], + ... +}: let + backupFilesString = pkgs.lib.strings.concatStringsSep " " backupFiles; +in + pkgs.writeShellScriptBin "ncli" '' + #!${pkgs.bash}/bin/bash + set -euo pipefail + + # --- Configuration --- + PROJECT="NixOS" + HOST="${host}" + BACKUP_FILES_STR="${backupFilesString}" + VERSION="2.0.0" + FLAKE_NIX_PATH="$HOME/$PROJECT/flake.nix" + + read -r -a BACKUP_FILES <<< "$BACKUP_FILES_STR" + + # --- Helper Functions --- + print_help() { + echo "NixOS CLI Utility -- version $VERSION" + echo "" + echo "Usage: ncli [command]" + echo "" + echo "System Commands:" + echo " rebuild - Rebuild the NixOS system configuration for current host ($HOST)." + echo " rebuild-boot - Rebuild and set as boot default (activates on next restart)." + echo " update - Update the flake and rebuild the system for current host." + echo " switch-host - Interactive host switcher (same as ./switch-host.sh)." + echo "" + echo "Multi-Host Commands:" + echo " build [HOST] - Build configuration for specific host (no activation)." + echo " deploy [HOST] - Build and switch to specific host configuration." + echo " list-hosts - List all available host configurations." + echo "" + echo "Maintenance Commands:" + echo " cleanup - Clean up old system generations. Can specify a number to keep." + echo " diag - Create a system diagnostic report (saves to ~/diag.txt)." + echo " list-gens - List user and system generations." + echo " trim - Trim filesystems to improve SSD performance." + echo "" + echo "Git Commands:" + echo " commit [msg] - Add all changes and commit with message." + echo " push - Push changes to origin." + echo " pull - Pull latest changes from origin." + echo " status - Show git status." + echo "" + echo " help - Show this help message." + echo "" + echo "Current Host: $HOST" + } + + handle_backups() { + if [ ''${#BACKUP_FILES[@]} -eq 0 ]; then + echo "No backup files configured to check." + return + fi + + echo "Checking for backup files to remove..." + for file_path in "''${BACKUP_FILES[@]}"; do + full_path="$HOME/$file_path" + if [ -f "$full_path" ]; then + echo "Removing stale backup file: $full_path" + rm "$full_path" + fi + done + } + + list_available_hosts() { + if [ ! -d "$HOME/$PROJECT/hosts" ]; then + echo "Error: Hosts directory not found at $HOME/$PROJECT/hosts" >&2 + return 1 + fi + + echo "Available hosts:" + for host_dir in "$HOME/$PROJECT/hosts"/*; do + if [ -d "$host_dir" ]; then + hostname=$(basename "$host_dir") + if [ "$hostname" != "default" ]; then + if [ "$hostname" = "$HOST" ]; then + echo " • $hostname (current)" + else + echo " • $hostname" + fi + fi + fi + done + } + + validate_host() { + local target_host="$1" + if [ ! -d "$HOME/$PROJECT/hosts/$target_host" ]; then + echo "Error: Host '$target_host' not found in $HOME/$PROJECT/hosts/" >&2 + echo "Available hosts:" >&2 + list_available_hosts >&2 + return 1 + fi + return 0 + } + + build_host() { + local target_host="$1" + validate_host "$target_host" || return 1 + + echo "Building configuration for host: $target_host" + cd "$HOME/$PROJECT" || { echo "Error: Could not change to $HOME/$PROJECT"; return 1; } + + if nixos-rebuild build --flake ".#$target_host"; then + echo "✓ Build successful for $target_host" + return 0 + else + echo "✗ Build failed for $target_host" >&2 + return 1 + fi + } + + deploy_host() { + local target_host="$1" + validate_host "$target_host" || return 1 + + echo "Deploying configuration for host: $target_host" + cd "$HOME/$PROJECT" || { echo "Error: Could not change to $HOME/$PROJECT"; return 1; } + + if sudo nixos-rebuild switch --flake ".#$target_host"; then + echo "✓ Successfully deployed $target_host configuration" + echo "System is now running $target_host configuration." + return 0 + else + echo "✗ Deployment failed for $target_host" >&2 + return 1 + fi + } + + # --- Main Logic --- + if [ "$#" -eq 0 ]; then + echo "Error: No command provided." >&2 + print_help + exit 1 + fi + + case "$1" in + cleanup) + echo "Warning! This will remove old generations of your system." + read -p "How many generations to keep (default: all)? " keep_count + + if [ -z "$keep_count" ]; then + read -p "This will remove all but the current generation. Continue (y/N)? " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + nh clean all -v + else + echo "Cleanup cancelled." + fi + else + read -p "This will keep the last $keep_count generations. Continue (y/N)? " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + nh clean all -k "$keep_count" -v + else + echo "Cleanup cancelled." + fi + fi + + LOG_DIR="$HOME/ncli-cleanup-logs" + mkdir -p "$LOG_DIR" + LOG_FILE="$LOG_DIR/ncli-cleanup-$(date +%Y-%m-%d_%H-%M-%S).log" + echo "Cleaning up old log files..." >> "$LOG_FILE" + find "$LOG_DIR" -type f -mtime +3 -name "*.log" -delete >> "$LOG_FILE" 2>&1 + echo "Cleanup process logged to $LOG_FILE" + ;; + diag) + echo "Generating system diagnostic report..." + { + echo "=== NixOS System Diagnostic Report ===" + echo "Generated: $(date)" + echo "Host: $HOST" + echo "Hostname: $(hostname)" + echo "" + echo "=== System Information ===" + inxi --full 2>/dev/null || echo "inxi not available" + echo "" + echo "=== Git Status ===" + cd "$HOME/$PROJECT" 2>/dev/null && git status 2>/dev/null || echo "Git status not available" + echo "" + echo "=== Available Hosts ===" + list_available_hosts 2>/dev/null || echo "Could not list hosts" + } > "$HOME/diag.txt" + echo "Diagnostic report saved to $HOME/diag.txt" + ;; + help) + print_help + ;; + list-gens) + echo "--- User Generations ---" + nix-env --list-generations | cat || echo "Could not list user generations." + echo "" + echo "--- System Generations ---" + nix profile history --profile /nix/var/nix/profiles/system | cat || echo "Could not list system generations." + ;; + list-hosts) + list_available_hosts + ;; + rebuild) + handle_backups + echo "Starting NixOS rebuild for current host: $HOST" + cd "$HOME/$PROJECT" || { echo "Error: Could not change to $HOME/$PROJECT"; exit 1; } + if sudo nixos-rebuild switch --flake ".#$HOST"; then + echo "✓ Rebuild finished successfully for $HOST" + else + echo "✗ Rebuild failed for $HOST" >&2 + exit 1 + fi + ;; + rebuild-boot) + handle_backups + echo "Starting NixOS rebuild with boot option for current host: $HOST" + cd "$HOME/$PROJECT" || { echo "Error: Could not change to $HOME/$PROJECT"; exit 1; } + if sudo nixos-rebuild boot --flake ".#$HOST"; then + echo "✓ Rebuild with boot option finished successfully for $HOST" + echo "Changes will activate on next restart" + else + echo "✗ Rebuild with boot option failed for $HOST" >&2 + exit 1 + fi + ;; + update) + handle_backups + echo "Updating flake and rebuilding system for current host: $HOST" + cd "$HOME/$PROJECT" || { echo "Error: Could not change to $HOME/$PROJECT"; exit 1; } + + echo "Updating flake..." + if nix flake update; then + echo "✓ Flake updated successfully" + else + echo "✗ Flake update failed" >&2 + exit 1 + fi + + echo "Rebuilding system..." + if sudo nixos-rebuild switch --flake ".#$HOST"; then + echo "✓ Update and rebuild finished successfully for $HOST" + else + echo "✗ Update and rebuild failed for $HOST" >&2 + exit 1 + fi + ;; + build) + if [ "$#" -lt 2 ]; then + echo "Usage: ncli build " >&2 + list_available_hosts + exit 1 + fi + build_host "$2" + ;; + deploy) + if [ "$#" -lt 2 ]; then + echo "Usage: ncli deploy " >&2 + list_available_hosts + exit 1 + fi + deploy_host "$2" + ;; + switch-host) + if [ -f "$HOME/$PROJECT/switch-host.sh" ]; then + cd "$HOME/$PROJECT" && ./switch-host.sh + else + echo "Error: switch-host.sh not found in $HOME/$PROJECT" >&2 + exit 1 + fi + ;; + commit) + cd "$HOME/$PROJECT" || { echo "Error: Could not change to $HOME/$PROJECT"; exit 1; } + if [ "$#" -lt 2 ]; then + read -p "Enter commit message: " commit_msg + else + shift + commit_msg="$*" + fi + + if [ -z "$commit_msg" ]; then + echo "Error: Commit message cannot be empty" >&2 + exit 1 + fi + + git add -A && git commit -m "$commit_msg" + ;; + push) + cd "$HOME/$PROJECT" || { echo "Error: Could not change to $HOME/$PROJECT"; exit 1; } + git push origin $(git branch --show-current) + ;; + pull) + cd "$HOME/$PROJECT" || { echo "Error: Could not change to $HOME/$PROJECT"; exit 1; } + git pull origin $(git branch --show-current) + ;; + status) + cd "$HOME/$PROJECT" || { echo "Error: Could not change to $HOME/$PROJECT"; exit 1; } + git status + ;; + trim) + echo "Running 'sudo fstrim -v /' may take a few minutes and impact system performance." + read -p "Enter (y/Y) to run now or enter to exit (y/N): " -n 1 -r + echo # move to a new line + if [[ $REPLY =~ ^[Yy]$ ]]; then + echo "Running fstrim..." + sudo fstrim -v / + echo "fstrim complete." + else + echo "Trim operation cancelled." + fi + ;; + *) + echo "Error: Invalid command '$1'" >&2 + print_help + exit 1 + ;; + esac + '' From 949ef79e1c0b5cd2de6de649013a399ebc7ac6b4 Mon Sep 17 00:00:00 2001 From: Cookiez Date: Fri, 21 Nov 2025 17:23:36 +0100 Subject: [PATCH 4/5] Removed Install.sh and hosts folder as they arent needed. -> All options can be configured in flake.nix --- hosts/default/default.nix | 19 -- hosts/default/hardware.nix | 55 ---- hosts/default/host-packages.nix | 6 - hosts/default/variables.nix | 113 ------- install.sh | 504 -------------------------------- 5 files changed, 697 deletions(-) delete mode 100644 hosts/default/default.nix delete mode 100644 hosts/default/hardware.nix delete mode 100644 hosts/default/host-packages.nix delete mode 100644 hosts/default/variables.nix delete mode 100755 install.sh diff --git a/hosts/default/default.nix b/hosts/default/default.nix deleted file mode 100644 index bbd8853..0000000 --- a/hosts/default/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ pkgs, ... }: -{ - imports = [ - ./hardware.nix - ./host-packages.nix - ]; - - # Enable sddm display manager - services.displayManager.sddm.enable = true; - - # Sysc-greet display manager - services.sysc-greet.enable = false; - - # Keep niri available at system level for ly display manager to detect it - programs.niri.package = pkgs.niri; - - # Ensure niri session is available to display manager - services.displayManager.sessionPackages = [ pkgs.niri ]; -} diff --git a/hosts/default/hardware.nix b/hosts/default/hardware.nix deleted file mode 100644 index 28c77e4..0000000 --- a/hosts/default/hardware.nix +++ /dev/null @@ -1,55 +0,0 @@ -# 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" - "usbhid" - ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000"; - fsType = "ext4"; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/0000-0000"; - fsType = "vfat"; - options = [ - "fmask=0077" - "dmask=0077" - ]; - }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000"; } - ]; - - # 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.enp4s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/hosts/default/host-packages.nix b/hosts/default/host-packages.nix deleted file mode 100644 index 8030e23..0000000 --- a/hosts/default/host-packages.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ pkgs, ... }: -{ - environment.systemPackages = with pkgs; [ - # Add host-specific packages here - ]; -} diff --git a/hosts/default/variables.nix b/hosts/default/variables.nix deleted file mode 100644 index 1b9bc8f..0000000 --- a/hosts/default/variables.nix +++ /dev/null @@ -1,113 +0,0 @@ -{ - # Git Configuration ( For Pulling Software Repos ) - gitUsername = "user"; - gitEmail = "user@example.com"; - - # System Configuration - timeZone = "America/New_York"; - - # Hyprland Settings - # ex "monitor=HDMI-A-1, 1920x1080@60,auto,1" - # Configure your monitors here - this is host-specific - extraMonitorSettings = '' - monitor=,preferred,auto,1 - ''; - - # Waybar Settings - clock24h = false; - - # Program Options - browser = "zen"; # Set Default Browser (google-chrome-stable for google-chrome) - terminal = "kitty"; # Set Default System Terminal - keyboardLayout = "us"; - consoleKeyMap = "us"; - - # For Nvidia Prime support - # Run 'lspci | grep VGA' to find your actual GPU IDs - intelID = "PCI:0:2:0"; # Update with your integrated GPU ID - nvidiaID = "PCI:1:0:0"; # Update with your NVIDIA GPU ID - - # Enable Nvidia cudaSupport for specific applications (obs-studio) - useNvidia = false; - - # Enable NFS - enableNFS = true; - - # Enable Printing Support - printEnable = false; - - # Enable Thunar GUI File Manager - thunarEnable = true; - - # Enable Gaming Support (controllers, gamescope, protonup-qt) - gamingSupportEnable = false; - - # Enable Flutter Development Environment - flutterdevEnable = false; - - # Enable Stylix System Theming - stylixEnable = true; - - # Enable Syncthing File Synchronization - syncthingEnable = false; - - # Enable Communication Apps (Teams, Zoom, Telegram, Discord) - enableCommunicationApps = false; - - # Enable Extra Browsers (Chromium, Google Chrome) - enableExtraBrowsers = false; - - # Enable Productivity Apps (Obsidian, GNOME Boxes, QuickEmu) - enableProductivityApps = false; - - # Enable AI Code Editors (cursor, claude-code, gemini-cli) - aiCodeEditorsEnable = false; - - # Enable Hyprlock (Hyprland lock screen) - # Set to false if using DMS or Noctalia lock screens - enableHyprlock = false; - - # Bar/Shell Choice - barChoice = "noctalia"; # Options: "dms" or "noctalia" - # NOTE: If you change barChoice to "dms", you must run 'dms-install' after rebuilding - - # Shell Choice - defaultShell = "zsh"; # Options: "fish" or "zsh" - - # Set Stylix Image - #stylixImage = ../../wallpapers/AnimeGirlNightSky.jpg; - #stylixImage = ../../wallpapers/nix-wallpaper-stripes-logo.png; - #stylixImage = ../../wallpapers/beautifulmountainscape.png; - #stylixImage = ../../wallpapers/mountainscapedark.jpg; - #stylixImage = ../../wallpapers/Rainnight.jpg; - #stylixImage = ../../wallpapers/zaney-wallpaper.jpg; - stylixImage = ../../wallpapers/55.png; - - # Set Waybar (temporarily disabled - use DMS or Noctalia) - # Includes alternates such as: - # Just uncomment the one you want and comment out the others - - #waybarChoice = ../../modules/home/waybar/Jerry-waybars.nix; - #waybarChoice = ../../modules/home/waybar/waybar-simple.nix; - #waybarChoice = ../../modules/home/waybar/waybar-curved.nix; - #waybarChoice = ../../modules/home/waybar/waybar-nekodyke.nix; - #waybarChoice = ../../modules/home/waybar/waybar-jerry.nix; - #waybarChoice = ../../modules/home/waybar/waybar-ddubs.nix; - - # Set Animation style - # Available options are: - # animations-def.nix (standard) - # animations-end4.nix (end-4 project) - # animations-dynamic.nix (ml4w project) - # animations-moving.nix (ml4w project) - # Just change the name after the - and rebuild - animChoice = ../../modules/home/hyprland/animations-end4.nix; - #animChoice = ../../modules/home/hyprland/animations-def.nix; - #animChoice = ../../modules/home/hyprland/animations-dynamix.nix; - # Note: Moving changes window resizing it shrinks then pops back - #animChoice = ../../modules/home/hyprland/animations-moving.nix; - - # Startup Applications - startupApps = [ - ]; -} diff --git a/install.sh b/install.sh deleted file mode 100755 index 2192e8f..0000000 --- a/install.sh +++ /dev/null @@ -1,504 +0,0 @@ -#!/usr/bin/env bash - -###################################### -# Black Don OS - Simplified Installer (Modified) -# A NixOS configuration for everyone -###################################### - -set -e # Exit on error - -# Colors -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[1;33m' -BLUE='\033[0;34m' -NC='\033[0m' - -# Print functions -print_header() { - echo -e "${GREEN}╔═══════════════════════════════════════════════════════════════╗${NC}" - echo -e "${GREEN}║ ${1}${NC}" - echo -e "${GREEN}╚═══════════════════════════════════════════════════════════════╝${NC}" -} - -print_error() { - echo -e "${RED}✗ Error: ${1}${NC}" -} - -print_success() { - echo -e "${GREEN}✓ ${1}${NC}" -} - -print_info() { - echo -e "${BLUE}ℹ ${1}${NC}" -} - -# Welcome -clear -print_header "Cookiez NixOS - Simplified Installation" -echo "" -echo -e "${BLUE}Welcome! This installer will set up NixOS with sensible defaults.${NC}" -echo -e "${BLUE}You can customize everything later by editing your variables.nix file.${NC}" -echo "" -sleep 2 - -# Verify NixOS -print_header "System Verification" -if [ -n "$(grep -i nixos < /etc/os-release)" ]; then - print_success "Running on NixOS" -else - print_error "This installer requires NixOS" - exit 1 -fi - -# Check dependencies -if ! command -v git &> /dev/null || ! command -v lspci &> /dev/null; then - print_error "Missing dependencies. Please run:" - echo -e " ${GREEN}nix-shell -p git pciutils${NC}" - exit 1 -fi -print_success "All dependencies found" -echo "" - -# Get hostname -print_header "Hostname Configuration" -echo -e "${YELLOW}⚠️ Do NOT use 'default' as your hostname!${NC}" -echo -e "Suggested names: my-desktop, nixos-laptop, gaming-rig" -echo "" - -while true; do - read -p "Enter hostname [nixos]: " hostname - hostname=${hostname:-nixos} - - if [ "$hostname" = "default" ]; then - print_error "Cannot use 'default' as hostname. Choose something else." - continue - fi - - if [[ ! "$hostname" =~ ^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$ ]]; then - print_error "Invalid hostname. Use only letters, numbers, and hyphens." - continue - fi - - break -done - -print_success "Hostname: $hostname" -echo "" - -# Get username -print_header "User Configuration" -current_user=$(echo $USER) -read -p "Enter username [$current_user]: " username -username=${username:-$current_user} -print_success "Username: $username" -echo "" - -# Get timezone -print_header "Timezone Configuration" -echo -e "${BLUE}Common timezones:${NC}" -echo -e " America/New_York (Eastern)" -echo -e " America/Chicago (Central)" -echo -e " America/Denver (Mountain)" -echo -e " America/Los_Angeles (Pacific)" -echo -e " Europe/London" -echo -e " Europe/Berlin" -echo -e " Asia/Tokyo" -echo -e " Australia/Sydney" -echo "" -echo -e "${YELLOW}Tip: Find your timezone at: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones${NC}" -echo "" -read -p "Enter timezone [Europe/Berlin]: " timezone -timezone=${timezone:-Europe/Berlin} -print_success "Timezone: $timezone" -echo "" - -# Get keyboard layout -print_header "Keyboard Configuration" -echo -e "${BLUE}Common keyboard layouts:${NC}" -echo -e " us (US English)" -echo -e " uk (UK English)" -echo -e " de (German)" -echo -e " fr (French)" -echo -e " es (Spanish)" -echo -e " it (Italian)" -echo -e " jp (Japanese)" -echo -e " ru (Russian)" -echo "" -read -p "Enter keyboard layout [de]: " keyboard -keyboard=${keyboard:-de} -print_success "Keyboard layout: $keyboard" -echo "" - -# Detect GPU -print_header "Hardware Detection" -DETECTED_PROFILE="" - -has_nvidia=false -has_intel=false -has_amd=false -has_vm=false - -if lspci | grep -qi 'vga\|3d'; then - while read -r line; do - if echo "$line" | grep -qi 'nvidia'; then - has_nvidia=true - elif echo "$line" | grep -qi 'amd'; then - has_amd=true - elif echo "$line" | grep -qi 'intel'; then - has_intel=true - elif echo "$line" | grep -qi 'virtio\|vmware'; then - has_vm=true - fi - done < <(lspci | grep -i 'vga\|3d') - - if $has_vm; then - DETECTED_PROFILE="vm" - elif $has_nvidia && $has_intel; then - DETECTED_PROFILE="nvidia-laptop" - elif $has_nvidia; then - DETECTED_PROFILE="nvidia" - elif $has_amd; then - DETECTED_PROFILE="amd" - elif $has_intel; then - DETECTED_PROFILE="intel" - fi -fi - -if [ -z "$DETECTED_PROFILE" ]; then - echo -e "${YELLOW}Could not detect GPU automatically${NC}" - echo "Available profiles: nvidia, nvidia-laptop, amd, intel, vm" - read -p "Enter GPU profile [amd]: " profile - profile=${profile:-amd} -else - echo -e "Detected GPU: ${GREEN}$DETECTED_PROFILE${NC}" - read -p "Is this correct? [Y/n]: " confirm - if [[ $confirm =~ ^[Nn]$ ]]; then - echo "Available profiles: nvidia, nvidia-laptop, amd, intel, vm" - read -p "Enter GPU profile: " profile - else - profile=$DETECTED_PROFILE - fi -fi - -print_success "GPU Profile: $profile" -echo "" - -# Configuration summary -print_header "Configuration Summary" -echo -e " Hostname: ${GREEN}$hostname${NC}" -echo -e " Username: ${GREEN}$username${NC}" -echo -e " Timezone: ${GREEN}$timezone${NC}" -echo -e " Keyboard: ${GREEN}$keyboard${NC}" -echo -e " GPU Profile: ${GREEN}$profile${NC}" -echo "" -# echo -e "${BLUE}Default Settings (you can change these later):${NC}" -# echo -e " Browser: firefox" -# echo -e " Terminal: kitty" -# echo -e " Shell: zsh" -# echo -e " Bar: noctalia" -# echo -e " Window Mgrs: Both Hyprland and Niri (choose at login)" -# echo "" - -read -p "Continue with installation? [Y/n]: " proceed -if [[ $proceed =~ ^[Nn]$ ]]; then - echo "Installation cancelled" - exit 0 -fi - -# Generate hardware config -print_header "Generating Hardware Configuration" -sudo nixos-generate-config --show-hardware-config > /tmp/hardware.nix -print_success "Hardware configuration generated" -echo "" - -# Create host directory -print_header "Creating Host Configuration" -mkdir -p "hosts/$hostname" - -# Copy default template -cp hosts/default/*.nix "hosts/$hostname/" 2>/dev/null || true - -# Copy hardware config -mv /tmp/hardware.nix "hosts/$hostname/hardware.nix" - -# Create variables.nix -cat > "hosts/$hostname/variables.nix" << EOF -{ - # Git Configuration - gitUsername = "$username"; - gitEmail = "$username@$hostname"; - - # System Configuration - timeZone = "$timezone"; - -# # Monitor Settings (update after installation for your displays) -# extraMonitorSettings = '' -# monitor=,preferred,auto,1 -# ''; - -# # Waybar Settings -# clock24h = false; - - # Default Applications - browser = "firefox"; - terminal = "kitty"; - keyboardLayout = "$keyboard"; - consoleKeyMap = "$keyboard"; - -# # For Nvidia Prime support (update if using nvidia-laptop profile) -# # Run 'lspci | grep VGA' to find your actual GPU IDs -# intelID = "PCI:0:2:0"; -# nvidiaID = "PCI:1:0:0"; - -# # Core Features -# enableNFS = false; -# printEnable = false; -# thunarEnable = true; -# stylixEnable = true; - -# # Optional Features (disabled for faster initial install) -# # You can enable these later by setting to true and rebuilding -# gamingSupportEnable = false; # Gaming controllers, gamescope, protonup-qt -# flutterdevEnable = false; # Flutter development environment -# syncthingEnable = false; # Syncthing file synchronization -# enableCommunicationApps = false; # Discord, Teams, Zoom, Telegram -# enableExtraBrowsers = false; # Vivaldi, Brave, Firefox, Chromium, Helium -# enableProductivityApps = false; # Obsidian, GNOME Boxes, QuickEmu -# aiCodeEditorsEnable = false; # Claude-code, gemini-cli, cursor - -# # Desktop Environment -# enableHyprlock = false; # Set to false if using DMS/Noctalia lock screens - -# # Bar/Shell Choice -# barChoice = "noctalia"; # Options: "dms" or "noctalia" -# # NOTE: If you change barChoice to "dms", you must run 'dms-install' after rebuilding - - # Shell Choice - defaultShell = "zsh"; # Options: "fish" or "zsh" - - # Theming - stylixImage = ../../other/wallpaper2.png; -# #waybarChoice = ../../modules/home/waybar/waybar-ddubs.nix; # Waybar temporarily disabled -# animChoice = ../../modules/home/hyprland/animations-end4.nix; - -# # Startup Applications -# startupApps = []; -} -EOF - -print_success "Host configuration created" -echo "" - -# # Create Hyprland host-specific configuration files -# print_header "Creating Window Manager Host Configurations" -# mkdir -p "modules/home/hyprland/hosts/$hostname" -# -# # Create binds.nix for Hyprland -# cat > "modules/home/hyprland/hosts/$hostname/binds.nix" << 'EOF' -# {host, ...}: let -# inherit -# (import ../../../../hosts/${host}/variables.nix) -# browser -# terminal -# ; -# in { -# # Host-specific binds for $HOSTNAME -# # These will be merged with the default binds -# bind = [ -# # Add host-specific keybinds here -# ]; -# -# bindm = [ -# # Add host-specific mouse binds here -# ]; -# } -# EOF -# -# # Replace $HOSTNAME placeholder with actual hostname -# sed -i "s/\$HOSTNAME/$hostname/g" "modules/home/hyprland/hosts/$hostname/binds.nix" -# -# # Create windowrules.nix for Hyprland -# cat > "modules/home/hyprland/hosts/$hostname/windowrules.nix" << 'EOF' -# {host, ...}: let -# inherit -# (import ../../../../hosts/${host}/variables.nix) -# extraMonitorSettings -# ; -# in { -# # Host-specific window rules for $HOSTNAME -# # These will be merged with the default window rules -# windowrule = [ -# # Add host-specific window rules here -# ]; -# } -# EOF -# -# # Replace $HOSTNAME placeholder with actual hostname -# sed -i "s/\$HOSTNAME/$hostname/g" "modules/home/hyprland/hosts/$hostname/windowrules.nix" -# -# print_success "Hyprland configurations created" - -# # Create Niri host-specific configuration files -# mkdir -p "modules/home/niri/hosts/$hostname" -# -# # Create keybinds.nix for Niri -# cat > "modules/home/niri/hosts/$hostname/keybinds.nix" << 'EOF' -# { host, ... }: -# '' -# // Host-specific keybinds for $HOSTNAME -# // Add your custom keybinds here -# -# // Example: -# // binds { -# // Mod+Shift+B { spawn "zen"; } -# // } -# '' -# EOF -# -# sed -i "s/\$HOSTNAME/$hostname/g" "modules/home/niri/hosts/$hostname/keybinds.nix" -# -# # Create outputs.nix for Niri -# cat > "modules/home/niri/hosts/$hostname/outputs.nix" << 'EOF' -# { host, ... }: -# '' -# // Host-specific output configuration for $HOSTNAME -# // Configure your monitors here -# -# output "eDP-1" { -# mode "1920x1080@60.000" -# scale 1.0 -# position x=0 y=0 -# } -# -# // Add more outputs as needed -# // output "HDMI-A-1" { -# // mode "2560x1440@144.000" -# // scale 1.0 -# // position x=1920 y=0 -# // } -# '' -# EOF -# -# sed -i "s/\$HOSTNAME/$hostname/g" "modules/home/niri/hosts/$hostname/outputs.nix" -# -# # Create windowrules.nix for Niri -# cat > "modules/home/niri/hosts/$hostname/windowrules.nix" << 'EOF' -# { host, ... }: -# '' -# // Host-specific window rules for $HOSTNAME -# // Add your custom window rules here -# -# // Example: -# // window-rule { -# // match app-id="^firefox$" -# // default-column-width { proportion 0.5; } -# // } -# '' -# EOF -# -# sed -i "s/\$HOSTNAME/$hostname/g" "modules/home/niri/hosts/$hostname/windowrules.nix" -# -# print_success "Niri configurations created" -# echo "" - -# # Add new host files to git so flake can see them -# git add hosts/"$hostname"/ modules/home/hyprland/hosts/"$hostname"/ modules/home/niri/hosts/"$hostname"/ 2>/dev/null || true -git add hosts/"$hostname"/ 2>/dev/null || true - -# Update flake.nix -print_header "Updating Flake Configuration" - -if grep -q "\"$hostname\"" flake.nix; then - print_info "Host already exists in flake.nix" -else - # Add host to flake.nix right after the default host - # Use awk to insert at the right location (after default host closing brace, before nixosConfigurations closing brace) - awk -v hostname="$hostname" -v profile="$profile" -v username="$username" ' - /username = "user";/ { in_default = 1 } - in_default && /^ };$/ { - print - print "" - print " " hostname " = mkHost {" - print " hostname = \"" hostname "\";" - print " profile = \"" profile "\";" - print " username = \"" username "\";" - print " };" - in_default = 0 - next - } - { print } - ' flake.nix > flake.nix.tmp && mv flake.nix.tmp flake.nix - - print_success "Added $hostname to flake.nix" - - # Add updated flake.nix to git - git add flake.nix 2>/dev/null || true -fi -echo "" - -# Validate flake -print_header "Validating Configuration" -export NIX_CONFIG="experimental-features = nix-command flakes" -if nix flake metadata --no-write-lock-file . >/dev/null 2>&1; then - print_success "Flake syntax is valid" -else - print_error "Flake validation failed - please check configuration" - exit 1 -fi -echo "" - -# Build configuration -print_header "Building Black Don OS" -echo -e "${YELLOW}This will take 10-20 minutes depending on your hardware...${NC}" -echo "" - -read -p "Ready to build? [Y/n]: " build_confirm -if [[ $build_confirm =~ ^[Nn]$ ]]; then - echo "" - print_info "You can build manually later with:" - echo -e " ${GREEN}sudo nixos-rebuild switch --flake ~/black-don-os#$hostname${NC}" - exit 0 -fi - -export NIX_CONFIG="experimental-features = nix-command flakes" - -if sudo nixos-rebuild switch --flake .#"$hostname"; then - echo "" - print_header "Installation Successful!" - echo "" - print_success "Black Don OS has been installed!" - echo "" -# echo -e "${BLUE}What's next:${NC}" -# echo -e " 1. Your configuration is in: ${GREEN}~/black-don-os/hosts/$hostname/${NC}" -# echo -e " 2. Both Hyprland and Niri are available - select at login screen" -# echo -e " 3. Customize: ${GREEN}~/black-don-os/hosts/$hostname/variables.nix${NC}" -# echo -e " 4. Rebuild: ${GREEN}sudo nixos-rebuild switch --flake ~/black-don-os#$hostname${NC}" -# echo "" -# echo -e "${YELLOW}Tip: Update your monitor settings in variables.nix for optimal display${NC}" -# echo "" - echo -e "${GREEN}╔═══════════════════════════════════════════════════════════════╗${NC}" - echo -e "${GREEN}║${NC} ${YELLOW}IMPORTANT: A system restart is required to complete setup${NC} ${GREEN}║${NC}" - echo -e "${GREEN}╚═══════════════════════════════════════════════════════════════╝${NC}" - echo "" - read -p "Would you like to restart now? [Y/n]: " restart_confirm - if [[ ! $restart_confirm =~ ^[Nn]$ ]]; then - echo "" - print_info "Restarting system in 5 seconds... (Ctrl+C to cancel)" - sleep 5 - sudo reboot - else - echo "" - print_info "Please restart your system when ready to complete the installation" - echo -e " Run: ${GREEN}sudo reboot${NC}" - fi - echo "" -else - echo "" - print_error "Build failed" - echo "" - echo -e "${YELLOW}To retry manually:${NC}" - echo -e " ${GREEN}cd ~/black-don-os${NC}" - echo -e " ${GREEN}sudo nixos-rebuild switch --flake .#$hostname${NC}" - exit 1 -fi From d345c5e20788f5e9df6b3c0de450122576c07774 Mon Sep 17 00:00:00 2001 From: Cookiez Date: Sat, 22 Nov 2025 14:17:08 +0100 Subject: [PATCH 5/5] Configured Stylix (Disabled for now). Added plasma manager to configure kde plasma deterministically. --- flake.lock | 39 +++- flake.nix | 11 +- modules/configuration.nix | 49 ++++- modules/home.nix | 1 + modules/ncli.nix | 120 +---------- plasma/autostart.nix | 2 +- plasma/plasma-home.nix | 434 +++++++++++++++++++++++++++++++++++++- 7 files changed, 517 insertions(+), 139 deletions(-) diff --git a/flake.lock b/flake.lock index 979f6fd..376eebc 100644 --- a/flake.lock +++ b/flake.lock @@ -124,16 +124,16 @@ "gnome-shell": { "flake": false, "locked": { - "lastModified": 1748186689, - "narHash": "sha256-UaD7Y9f8iuLBMGHXeJlRu6U1Ggw5B9JnkFs3enZlap0=", + "lastModified": 1744584021, + "narHash": "sha256-0RJ4mJzf+klKF4Fuoc8VN8dpQQtZnKksFmR2jhWE1Ew=", "owner": "GNOME", "repo": "gnome-shell", - "rev": "8c88f917db0f1f0d80fa55206c863d3746fa18d0", + "rev": "52c517c8f6c199a1d6f5118fae500ef69ea845ae", "type": "github" }, "original": { "owner": "GNOME", - "ref": "48.2", + "ref": "48.1", "repo": "gnome-shell", "type": "github" } @@ -309,6 +309,29 @@ "type": "github" } }, + "plasma-manager": { + "inputs": { + "home-manager": [ + "home-manager" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1762784320, + "narHash": "sha256-odsk96Erywk5hs0dhArF38zb7Oe0q6LZ70gXbxAPKno=", + "owner": "nix-community", + "repo": "plasma-manager", + "rev": "7911a0f8a44c7e8b29d031be3149ee8943144321", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "plasma-manager", + "type": "github" + } + }, "quickshell": { "inputs": { "nixpkgs": [ @@ -337,6 +360,7 @@ "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2", "noctalia": "noctalia", + "plasma-manager": "plasma-manager", "quickshell": "quickshell", "stylix": "stylix", "zen-browser": "zen-browser" @@ -363,15 +387,16 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1760472212, - "narHash": "sha256-4C3I/ssFsq8EgaUmZP0xv5V7RV0oCHgL/Rx+MUkuE+E=", + "lastModified": 1763740035, + "narHash": "sha256-h33/8bTP5ww1oKwrXgK2fuJPsNlWPzdG4jsvUlr6qqM=", "owner": "nix-community", "repo": "stylix", - "rev": "8d008296a1b3be9b57ad570f7acea00dd2fc92db", + "rev": "206e6ee4d11adcc80d8cbe612e14e08641474fc8", "type": "github" }, "original": { "owner": "nix-community", + "ref": "release-25.05", "repo": "stylix", "type": "github" } diff --git a/flake.nix b/flake.nix index 5b30917..a9f7e4c 100644 --- a/flake.nix +++ b/flake.nix @@ -8,11 +8,18 @@ home-manager.url = "github:nix-community/home-manager/release-25.05"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; + + plasma-manager = { + url = "github:nix-community/plasma-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager"; + }; zen-browser.url = "github:0xc000022070/zen-browser-flake"; zen-browser.inputs.nixpkgs.follows = "nixpkgs"; - stylix.url = "github:nix-community/stylix"; + #stylix.url = "github:nix-community/stylix/"; + stylix.url = "github:nix-community/stylix/release-25.05"; #Had to use branch or it would not build corrently stylix.inputs.nixpkgs.follows = "nixpkgs"; quickshell = { @@ -31,7 +38,7 @@ grub2-themes.url = "github:vinceliuice/grub2-themes"; }; - outputs = inputs@{ nixpkgs, home-manager, nixos-hardware ,stylix, zen-browser, grub2-themes, nix-flatpak, ... }: + outputs = inputs@{ nixpkgs, home-manager, plasma-manager, nixos-hardware ,stylix, zen-browser, grub2-themes, nix-flatpak, ... }: let username = "cookiez"; hostname = "nixos"; diff --git a/modules/configuration.nix b/modules/configuration.nix index 5da5be1..de54715 100644 --- a/modules/configuration.nix +++ b/modules/configuration.nix @@ -12,8 +12,34 @@ { inputs, config, pkgs, lib, username, host, version, system, ... }: { -# stylix.enable = true; -# stylix.image = /etc/nixos/other/wallpaper.png; + stylix = { + enable = false; + image = ../other/wallpaper2.png; + #autoEnable = true; #Auto generate theme based on wallpaper + base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-moon.yaml"; + opacity = { + desktop = 0.5; + terminal = 0.9; + }; + fonts = { + monospace = { + package = pkgs.nerd-fonts.jetbrains-mono; + name = "JetBrainsMono Nerd Font"; + }; + + sansSerif = { + package = pkgs.inter; + name = "Inter"; + }; + + serif = { + package = pkgs.noto-fonts; + name = "Noto Serif"; + }; + }; + targets.grub.enable = false; + }; + # in configuration.nix #Assign Swap to the PC #swapDevices = [{ @@ -46,14 +72,14 @@ }; }; - #"minimal" = { - # inheritParentConfig = false; - # configuration = { - # imports = [ - # ./minimal.nix - # ]; - # }; - #}; + "minimal" = { + inheritParentConfig = false; + configuration = { + imports = [ + ./minimal.nix + ]; + }; + }; }; @@ -69,8 +95,10 @@ #devices = [ "nodev" ]; efiSupport = true; useOSProber = true; + #splashImage = }; + grub2-theme = { enable = true; theme = "whitesur"; @@ -99,6 +127,7 @@ users.${username} = ./home.nix; backupFileExtension = "backup"; # Automatically backs up conflicting files during activation extraSpecialArgs = { inherit inputs username version system host; }; + sharedModules = [ inputs.plasma-manager.homeModules.plasma-manager ]; }; # Enable networking diff --git a/modules/home.nix b/modules/home.nix index 289d993..fd5d968 100644 --- a/modules/home.nix +++ b/modules/home.nix @@ -34,6 +34,7 @@ kitty = { enable = true; settings = { + #Disabled Because of stylix background_opacity = "0.2"; #The higher the value, the darker the console background_blur = 10; diff --git a/modules/ncli.nix b/modules/ncli.nix index 6e51a3b..a4ec7af 100644 --- a/modules/ncli.nix +++ b/modules/ncli.nix @@ -26,15 +26,8 @@ in echo "Usage: ncli [command]" echo "" echo "System Commands:" - echo " rebuild - Rebuild the NixOS system configuration for current host ($HOST)." - echo " rebuild-boot - Rebuild and set as boot default (activates on next restart)." - echo " update - Update the flake and rebuild the system for current host." - echo " switch-host - Interactive host switcher (same as ./switch-host.sh)." - echo "" - echo "Multi-Host Commands:" - echo " build [HOST] - Build configuration for specific host (no activation)." - echo " deploy [HOST] - Build and switch to specific host configuration." - echo " list-hosts - List all available host configurations." + echo " rebuild - Rebuild the NixOS system configuration." + echo " update - Update the flake and rebuild the system." echo "" echo "Maintenance Commands:" echo " cleanup - Clean up old system generations. Can specify a number to keep." @@ -50,7 +43,6 @@ in echo "" echo " help - Show this help message." echo "" - echo "Current Host: $HOST" } handle_backups() { @@ -69,71 +61,6 @@ in done } - list_available_hosts() { - if [ ! -d "$HOME/$PROJECT/hosts" ]; then - echo "Error: Hosts directory not found at $HOME/$PROJECT/hosts" >&2 - return 1 - fi - - echo "Available hosts:" - for host_dir in "$HOME/$PROJECT/hosts"/*; do - if [ -d "$host_dir" ]; then - hostname=$(basename "$host_dir") - if [ "$hostname" != "default" ]; then - if [ "$hostname" = "$HOST" ]; then - echo " • $hostname (current)" - else - echo " • $hostname" - fi - fi - fi - done - } - - validate_host() { - local target_host="$1" - if [ ! -d "$HOME/$PROJECT/hosts/$target_host" ]; then - echo "Error: Host '$target_host' not found in $HOME/$PROJECT/hosts/" >&2 - echo "Available hosts:" >&2 - list_available_hosts >&2 - return 1 - fi - return 0 - } - - build_host() { - local target_host="$1" - validate_host "$target_host" || return 1 - - echo "Building configuration for host: $target_host" - cd "$HOME/$PROJECT" || { echo "Error: Could not change to $HOME/$PROJECT"; return 1; } - - if nixos-rebuild build --flake ".#$target_host"; then - echo "✓ Build successful for $target_host" - return 0 - else - echo "✗ Build failed for $target_host" >&2 - return 1 - fi - } - - deploy_host() { - local target_host="$1" - validate_host "$target_host" || return 1 - - echo "Deploying configuration for host: $target_host" - cd "$HOME/$PROJECT" || { echo "Error: Could not change to $HOME/$PROJECT"; return 1; } - - if sudo nixos-rebuild switch --flake ".#$target_host"; then - echo "✓ Successfully deployed $target_host configuration" - echo "System is now running $target_host configuration." - return 0 - else - echo "✗ Deployment failed for $target_host" >&2 - return 1 - fi - } - # --- Main Logic --- if [ "$#" -eq 0 ]; then echo "Error: No command provided." >&2 @@ -176,8 +103,6 @@ in { echo "=== NixOS System Diagnostic Report ===" echo "Generated: $(date)" - echo "Host: $HOST" - echo "Hostname: $(hostname)" echo "" echo "=== System Information ===" inxi --full 2>/dev/null || echo "inxi not available" @@ -185,8 +110,6 @@ in echo "=== Git Status ===" cd "$HOME/$PROJECT" 2>/dev/null && git status 2>/dev/null || echo "Git status not available" echo "" - echo "=== Available Hosts ===" - list_available_hosts 2>/dev/null || echo "Could not list hosts" } > "$HOME/diag.txt" echo "Diagnostic report saved to $HOME/diag.txt" ;; @@ -200,9 +123,6 @@ in echo "--- System Generations ---" nix profile history --profile /nix/var/nix/profiles/system | cat || echo "Could not list system generations." ;; - list-hosts) - list_available_hosts - ;; rebuild) handle_backups echo "Starting NixOS rebuild for current host: $HOST" @@ -214,18 +134,6 @@ in exit 1 fi ;; - rebuild-boot) - handle_backups - echo "Starting NixOS rebuild with boot option for current host: $HOST" - cd "$HOME/$PROJECT" || { echo "Error: Could not change to $HOME/$PROJECT"; exit 1; } - if sudo nixos-rebuild boot --flake ".#$HOST"; then - echo "✓ Rebuild with boot option finished successfully for $HOST" - echo "Changes will activate on next restart" - else - echo "✗ Rebuild with boot option failed for $HOST" >&2 - exit 1 - fi - ;; update) handle_backups echo "Updating flake and rebuilding system for current host: $HOST" @@ -247,30 +155,6 @@ in exit 1 fi ;; - build) - if [ "$#" -lt 2 ]; then - echo "Usage: ncli build " >&2 - list_available_hosts - exit 1 - fi - build_host "$2" - ;; - deploy) - if [ "$#" -lt 2 ]; then - echo "Usage: ncli deploy " >&2 - list_available_hosts - exit 1 - fi - deploy_host "$2" - ;; - switch-host) - if [ -f "$HOME/$PROJECT/switch-host.sh" ]; then - cd "$HOME/$PROJECT" && ./switch-host.sh - else - echo "Error: switch-host.sh not found in $HOME/$PROJECT" >&2 - exit 1 - fi - ;; commit) cd "$HOME/$PROJECT" || { echo "Error: Could not change to $HOME/$PROJECT"; exit 1; } if [ "$#" -lt 2 ]; then diff --git a/plasma/autostart.nix b/plasma/autostart.nix index 5f0e54a..06ae83e 100644 --- a/plasma/autostart.nix +++ b/plasma/autostart.nix @@ -4,7 +4,7 @@ #To show logs of services run: journalctl --user-unit={service-name} --user systemd.user.services.set-wallpaper = { - enable = true; + enable = false; description = "Set KDE Plasma wallpaper"; #after = [ "plasma-desktop.service" ]; wantedBy = [ "graphical-session.target" ]; diff --git a/plasma/plasma-home.nix b/plasma/plasma-home.nix index 017da13..949e815 100644 --- a/plasma/plasma-home.nix +++ b/plasma/plasma-home.nix @@ -1,9 +1,441 @@ -{pkgs, inputs, ...}: +{pkgs, inputs, username, ...}: { imports = [ ]; programs = { + plasma = { + enable = true; + overrideConfig = true; + + panels = [ + { + height = 38; + location = "top"; + alignment = "center"; + floating = true; + opacity = "translucent"; + widgets = [ + "org.kde.plasma.kickoff" + "org.kde.plasma.panelspacer" + "org.kde.plasma.systemmonitor.cpu" + "org.kde.plasma.digitalclock" + ]; + } + { + height = 65; + location = "bottom"; + alignment = "center"; + lengthMode = "fit"; + floating = true; + opacity = "translucent"; + hiding = "dodgewindows"; + widgets = [ + { + name = "org.kde.plasma.icontasks"; + config = { + General = { + launchers = [ + # optional pinned apps + "kitty.desktop" + "firefox.desktop" + "org.kde.dolphin.desktop" + ]; + }; + }; + } + ]; + } + ]; + + shortcuts = { +# ActivityManager.switch-to-activity-0f8d8349-5b1b-4b77-bfa5-22829bfaf459 = [ ]; +# ActivityManager.switch-to-activity-7dbb43d7-7e06-4b20-907c-a1dbf4afe6c7 = [ ]; +# ActivityManager.switch-to-activity-e85f493f-046d-4dca-9e07-987ecd4ca4bc = [ ]; +# "KDE Keyboard Layout Switcher"."Switch keyboard layout to English (US)" = [ ]; +# "KDE Keyboard Layout Switcher"."Switch keyboard layout to German" = [ ]; +# "KDE Keyboard Layout Switcher"."Switch to Last-Used Keyboard Layout" = [ ]; +# "KDE Keyboard Layout Switcher"."Switch to Next Keyboard Layout" = [ ]; +# kaccess."Toggle Screen Reader On and Off" = "Meta+Alt+S"; +# kcm_touchpad."Disable Touchpad" = "Touchpad Off"; +# kcm_touchpad."Enable Touchpad" = "Touchpad On"; +# kcm_touchpad."Toggle Touchpad" = ["Touchpad Toggle" "Meta+Ctrl+Zenkaku Hankaku"]; +# kmix.decrease_microphone_volume = "Microphone Volume Down"; +# kmix.decrease_volume = "Volume Down"; +# kmix.decrease_volume_small = "Shift+Volume Down"; +# kmix.increase_microphone_volume = "Microphone Volume Up"; +# kmix.increase_volume = "Volume Up"; +# kmix.increase_volume_small = "Shift+Volume Up"; +# kmix.mic_mute = ["Microphone Mute" "Meta+Volume Mute"]; +# kmix.mute = "Volume Mute"; +# ksmserver."Halt Without Confirmation" = [ ]; +# ksmserver."Lock Session" = ["Meta+L" "Screensaver"]; +# ksmserver."Log Out" = "Ctrl+Alt+Del"; +# ksmserver."Log Out Without Confirmation" = [ ]; +# ksmserver.LogOut = [ ]; +# ksmserver.Reboot = [ ]; +# ksmserver."Reboot Without Confirmation" = [ ]; +# ksmserver."Shut Down" = [ ]; +# kwin."Activate Window Demanding Attention" = "Meta+Ctrl+A"; + kwin.Cube = "Meta+C"; +# kwin."Cycle Overview" = [ ]; +# kwin."Cycle Overview Opposite" = [ ]; +# kwin."Decrease Opacity" = [ ]; +# kwin."Edit Tiles" = "Meta+T"; +# kwin.Expose = "Ctrl+F9"; +# kwin.ExposeAll = ["Ctrl+F10" "Launch (C)"]; +# kwin.ExposeClass = "Ctrl+F7"; +# kwin.ExposeClassCurrentDesktop = [ ]; + kwin."Grid View" = "Meta+G"; +# kwin."Increase Opacity" = [ ]; +# kwin."Kill Window" = "Meta+Ctrl+Esc"; +# kwin."Move Tablet to Next Output" = [ ]; +# kwin.MoveMouseToCenter = "Meta+F6"; +# kwin.MoveMouseToFocus = "Meta+F5"; +# kwin.MoveZoomDown = [ ]; +# kwin.MoveZoomLeft = [ ]; +# kwin.MoveZoomRight = [ ]; +# kwin.MoveZoomUp = [ ]; +# kwin.Overview = "Meta+W"; +# kwin."Setup Window Shortcut" = [ ]; +# kwin."Show Desktop" = "Meta+D"; +# kwin."Suspend Compositing" = "Alt+Shift+F12"; + kwin."Switch One Desktop Down" = "Meta+Ctrl+Down"; + kwin."Switch One Desktop Up" = "Meta+Ctrl+Up"; + kwin."Switch One Desktop to the Left" = "Meta+Ctrl+Left"; + kwin."Switch One Desktop to the Right" = "Meta+Ctrl+Right"; +# kwin."Switch Window Down" = "Meta+Alt+Down"; +# kwin."Switch Window Left" = "Meta+Alt+Left"; +# kwin."Switch Window Right" = "Meta+Alt+Right"; +# kwin."Switch Window Up" = "Meta+Alt+Up"; +# kwin."Switch to Desktop 1" = "Ctrl+F1"; +# kwin."Switch to Desktop 10" = [ ]; +# kwin."Switch to Desktop 11" = [ ]; +# kwin."Switch to Desktop 12" = [ ]; +# kwin."Switch to Desktop 13" = [ ]; +# kwin."Switch to Desktop 14" = [ ]; +# kwin."Switch to Desktop 15" = [ ]; +# kwin."Switch to Desktop 16" = [ ]; +# kwin."Switch to Desktop 17" = [ ]; +# kwin."Switch to Desktop 18" = [ ]; +# kwin."Switch to Desktop 19" = [ ]; +# kwin."Switch to Desktop 2" = "Ctrl+F2"; +# kwin."Switch to Desktop 20" = [ ]; +# kwin."Switch to Desktop 3" = "Ctrl+F3"; +# kwin."Switch to Desktop 4" = "Ctrl+F4"; +# kwin."Switch to Desktop 5" = [ ]; +# kwin."Switch to Desktop 6" = [ ]; +# kwin."Switch to Desktop 7" = [ ]; +# kwin."Switch to Desktop 8" = [ ]; +# kwin."Switch to Desktop 9" = [ ]; +# kwin."Switch to Next Desktop" = [ ]; +# kwin."Switch to Next Screen" = [ ]; +# kwin."Switch to Previous Desktop" = [ ]; +# kwin."Switch to Previous Screen" = [ ]; +# kwin."Switch to Screen 0" = [ ]; +# kwin."Switch to Screen 1" = [ ]; +# kwin."Switch to Screen 2" = [ ]; +# kwin."Switch to Screen 3" = [ ]; +# kwin."Switch to Screen 4" = [ ]; +# kwin."Switch to Screen 5" = [ ]; +# kwin."Switch to Screen 6" = [ ]; +# kwin."Switch to Screen 7" = [ ]; +# kwin."Switch to Screen Above" = [ ]; +# kwin."Switch to Screen Below" = [ ]; +# kwin."Switch to Screen to the Left" = [ ]; +# kwin."Switch to Screen to the Right" = [ ]; +# kwin."Toggle Night Color" = [ ]; +# kwin."Toggle Window Raise/Lower" = [ ]; +# kwin."Walk Through Windows" = "Alt+Tab"; +# kwin."Walk Through Windows (Reverse)" = "Alt+Shift+Tab"; +# kwin."Walk Through Windows Alternative" = [ ]; +# kwin."Walk Through Windows Alternative (Reverse)" = [ ]; +# kwin."Walk Through Windows of Current Application" = "Alt+`"; +# kwin."Walk Through Windows of Current Application (Reverse)" = "Alt+~"; +# kwin."Walk Through Windows of Current Application Alternative" = [ ]; +# kwin."Walk Through Windows of Current Application Alternative (Reverse)" = [ ]; +# kwin."Window Above Other Windows" = [ ]; +# kwin."Window Below Other Windows" = [ ]; + kwin."Window Close" = "Alt+F4"; +# kwin."Window Custom Quick Tile Bottom" = [ ]; +# kwin."Window Custom Quick Tile Left" = [ ]; +# kwin."Window Custom Quick Tile Right" = [ ]; +# kwin."Window Custom Quick Tile Top" = [ ]; + kwin."Window Fullscreen" = "Meta+Shift+F"; +# kwin."Window Grow Horizontal" = [ ]; +# kwin."Window Grow Vertical" = [ ]; +# kwin."Window Lower" = [ ]; + kwin."Window Maximize" = ["Meta+F" "Meta+PgUp"]; +# kwin."Window Maximize Horizontal" = [ ]; +# kwin."Window Maximize Vertical" = [ ]; +# kwin."Window Minimize" = "Meta+PgDown"; +# kwin."Window Move" = [ ]; +# kwin."Window Move Center" = [ ]; +# kwin."Window No Border" = [ ]; +# kwin."Window On All Desktops" = [ ]; + kwin."Window One Desktop Down" = "Meta+Ctrl+Shift+Down"; + kwin."Window One Desktop Up" = "Meta+Ctrl+Shift+Up"; + kwin."Window One Desktop to the Left" = "Meta+Ctrl+Shift+Left"; + kwin."Window One Desktop to the Right" = "Meta+Ctrl+Shift+Right"; +# kwin."Window One Screen Down" = [ ]; +# kwin."Window One Screen Up" = [ ]; +# kwin."Window One Screen to the Left" = [ ]; +# kwin."Window One Screen to the Right" = [ ]; +# kwin."Window Operations Menu" = "Alt+F3"; +# kwin."Window Pack Down" = [ ]; +# kwin."Window Pack Left" = [ ]; +# kwin."Window Pack Right" = [ ]; +# kwin."Window Pack Up" = [ ]; +# kwin."Window Quick Tile Bottom" = "Meta+Down"; +# kwin."Window Quick Tile Bottom Left" = [ ]; +# kwin."Window Quick Tile Bottom Right" = [ ]; +# kwin."Window Quick Tile Left" = "Meta+Left"; +# kwin."Window Quick Tile Right" = "Meta+Right"; +# kwin."Window Quick Tile Top" = "Meta+Up"; +# kwin."Window Quick Tile Top Left" = [ ]; +# kwin."Window Quick Tile Top Right" = [ ]; +# kwin."Window Raise" = [ ]; +# kwin."Window Resize" = [ ]; +# kwin."Window Shade" = [ ]; +# kwin."Window Shrink Horizontal" = [ ]; +# kwin."Window Shrink Vertical" = [ ]; +# kwin."Window to Desktop 1" = [ ]; +# kwin."Window to Desktop 10" = [ ]; +# kwin."Window to Desktop 11" = [ ]; +# kwin."Window to Desktop 12" = [ ]; +# kwin."Window to Desktop 13" = [ ]; +# kwin."Window to Desktop 14" = [ ]; +# kwin."Window to Desktop 15" = [ ]; +# kwin."Window to Desktop 16" = [ ]; +# kwin."Window to Desktop 17" = [ ]; +# kwin."Window to Desktop 18" = [ ]; +# kwin."Window to Desktop 19" = [ ]; +# kwin."Window to Desktop 2" = [ ]; +# kwin."Window to Desktop 20" = [ ]; +# kwin."Window to Desktop 3" = [ ]; +# kwin."Window to Desktop 4" = [ ]; +# kwin."Window to Desktop 5" = [ ]; +# kwin."Window to Desktop 6" = [ ]; +# kwin."Window to Desktop 7" = [ ]; +# kwin."Window to Desktop 8" = [ ]; +# kwin."Window to Desktop 9" = [ ]; +# kwin."Window to Next Desktop" = [ ]; +# kwin."Window to Next Screen" = "Meta+Shift+Right"; +# kwin."Window to Previous Desktop" = [ ]; +# kwin."Window to Previous Screen" = "Meta+Shift+Left"; +# kwin."Window to Screen 0" = [ ]; +# kwin."Window to Screen 1" = [ ]; +# kwin."Window to Screen 2" = [ ]; +# kwin."Window to Screen 3" = [ ]; +# kwin."Window to Screen 4" = [ ]; +# kwin."Window to Screen 5" = [ ]; +# kwin."Window to Screen 6" = [ ]; +# kwin."Window to Screen 7" = [ ]; +# kwin.disableInputCapture = "Meta+Shift+Esc"; +# kwin.view_actual_size = "Meta+0"; +# kwin.view_zoom_in = ["Meta++" "Meta+="]; +# kwin.view_zoom_out = "Meta+-"; +# mediacontrol.mediavolumedown = [ ]; +# mediacontrol.mediavolumeup = [ ]; +# mediacontrol.nextmedia = "Media Next"; +# mediacontrol.pausemedia = "Media Pause"; +# mediacontrol.playmedia = [ ]; +# mediacontrol.playpausemedia = "Media Play"; +# mediacontrol.previousmedia = "Media Previous"; +# mediacontrol.stopmedia = "Media Stop"; +# org_kde_powerdevil."Decrease Keyboard Brightness" = "Keyboard Brightness Down"; +# org_kde_powerdevil."Decrease Screen Brightness" = "Monitor Brightness Down"; +# org_kde_powerdevil."Decrease Screen Brightness Small" = "Shift+Monitor Brightness Down"; +# org_kde_powerdevil.Hibernate = "Hibernate"; +# org_kde_powerdevil."Increase Keyboard Brightness" = "Keyboard Brightness Up"; +# org_kde_powerdevil."Increase Screen Brightness" = "Monitor Brightness Up"; +# org_kde_powerdevil."Increase Screen Brightness Small" = "Shift+Monitor Brightness Up"; +# org_kde_powerdevil.PowerDown = "Power Down"; +# org_kde_powerdevil.PowerOff = "Power Off"; +# org_kde_powerdevil.Sleep = "Sleep"; +# org_kde_powerdevil."Toggle Keyboard Backlight" = "Keyboard Light On/Off"; +# org_kde_powerdevil."Turn Off Screen" = [ ]; + org_kde_powerdevil.powerProfile = ["Battery" "Meta+B"]; + plasmashell."activate application launcher" = "Meta"; +# plasmashell."activate task manager entry 1" = "Meta+1"; +# plasmashell."activate task manager entry 10" = [ ]; +# plasmashell."activate task manager entry 2" = "Meta+2"; +# plasmashell."activate task manager entry 3" = "Meta+3"; +# plasmashell."activate task manager entry 4" = "Meta+4"; +# plasmashell."activate task manager entry 5" = "Meta+5"; +# plasmashell."activate task manager entry 6" = "Meta+6"; +# plasmashell."activate task manager entry 7" = "Meta+7"; +# plasmashell."activate task manager entry 8" = "Meta+8"; +# plasmashell."activate task manager entry 9" = "Meta+9"; +# plasmashell.clear-history = [ ]; +# plasmashell.clipboard_action = "Meta+Ctrl+X"; +# plasmashell.cycle-panels = "Meta+Alt+P"; +# plasmashell.cycleNextAction = [ ]; +# plasmashell.cyclePrevAction = [ ]; +# plasmashell."manage activities" = "Meta+Q"; +# plasmashell."next activity" = "Meta+A"; +# plasmashell."previous activity" = "Meta+Shift+A"; +# plasmashell.repeat_action = "Meta+Ctrl+R"; +# plasmashell."show dashboard" = "Ctrl+F12"; +# plasmashell.show-barcode = [ ]; +# plasmashell.show-on-mouse-pos = "Meta+V"; +# plasmashell."stop current activity" = "Meta+S"; +# plasmashell."switch to next activity" = [ ]; +# plasmashell."switch to previous activity" = [ ]; +# plasmashell."toggle do not disturb" = [ ]; +# "services/org.kde.plasma-systemmonitor.desktop"._launch = [ ]; +# "services/org.kde.spectacle.desktop".RecordWindow = [ ]; +# "services/org.kde.spectacle.desktop".RectangularRegionScreenShot = ["Meta+Shift+Print" "Meta+Shift+S"]; +# "services/org.kde.spectacle.desktop"._launch = "Print"; +# wacomtablet."Map to fullscreen" = "Meta+Ctrl+F"; +# wacomtablet."Map to screen 1" = "Meta+Ctrl+1"; +# wacomtablet."Map to screen 2" = "Meta+Ctrl+2"; +# wacomtablet."Next Profile" = "Meta+Ctrl+N"; +# wacomtablet."Previous Profile" = "Meta+Ctrl+P"; +# wacomtablet."Toggle screen map selection" = "Meta+Ctrl+M"; +# wacomtablet."Toggle stylus mode" = "Meta+Ctrl+S"; +# wacomtablet."Toggle touch tool" = "Meta+Ctrl+T"; + yakuake.toggle-window-state = "Meta+F12"; + }; + workspace = { + theme = "WhiteSur-dark"; + colorScheme = "BreezeDark"; + cursor = { + theme = "Breeze_Light"; + size = 24; + }; + wallpaper = /home/${username}/NixOS/other/wallpaper2.png; + soundTheme = "freedesktop"; + iconTheme = "Breeze-LaCapitaine-apps"; + splashScreen = { + theme = "a2n.kuro"; + }; + windowDecorations = { + library = "org.kde.kwin.aurorae"; + theme = "__aurorae__svg__Nordic"; + }; + }; + configFile = { +# baloofilerc.General.dbVersion = 2; +# baloofilerc.General."exclude filters" = "*~,*.part,*.o,*.la,*.lo,*.loT,*.moc,moc_*.cpp,qrc_*.cpp,ui_*.h,cmake_install.cmake,CMakeCache.txt,CTestTestfile.cmake,libtool,config.status,confdefs.h,autom4te,conftest,confstat,Makefile.am,*.gcode,.ninja_deps,.ninja_log,build.ninja,*.csproj,*.m4,*.rej,*.gmo,*.pc,*.omf,*.aux,*.tmp,*.po,*.vm*,*.nvram,*.rcore,*.swp,*.swap,lzo,litmain.sh,*.orig,.histfile.*,.xsession-errors*,*.map,*.so,*.a,*.db,*.qrc,*.ini,*.init,*.img,*.vdi,*.vbox*,vbox.log,*.qcow2,*.vmdk,*.vhd,*.vhdx,*.sql,*.sql.gz,*.ytdl,*.tfstate*,*.class,*.pyc,*.pyo,*.elc,*.qmlc,*.jsc,*.fastq,*.fq,*.gb,*.fasta,*.fna,*.gbff,*.faa,po,CVS,.svn,.git,_darcs,.bzr,.hg,CMakeFiles,CMakeTmp,CMakeTmpQmake,.moc,.obj,.pch,.uic,.npm,.yarn,.yarn-cache,__pycache__,node_modules,node_packages,nbproject,.terraform,.venv,venv,core-dumps,lost+found"; +# baloofilerc.General."exclude filters version" = 9; + dolphinrc.General.RememberOpenedTabs = false; +# dolphinrc.General.ViewPropsTimestamp = "2024,8,12,15,7,43.15"; +# dolphinrc.IconsMode.PreviewSize = 80; +# dolphinrc."KFileDialog Settings"."Places Icons Auto-resize" = false; +# dolphinrc."KFileDialog Settings"."Places Icons Static Size" = 22; +# dolphinrc.PreviewSettings.Plugins = "appimagethumbnail,audiothumbnail,avif,comicbookthumbnail,cursorthumbnail,djvuthumbnail,ebookthumbnail,exrthumbnail,directorythumbnail,fontthumbnail,imagethumbnail,jpegthumbnail,jxl,kraorathumbnail,windowsexethumbnail,windowsimagethumbnail,opendocumentthumbnail,gdk-pixbuf-thumbnailer,svgthumbnail"; +# kactivitymanagerdrc.activities.e85f493f-046d-4dca-9e07-987ecd4ca4bc = "Default"; +# kactivitymanagerdrc.main.currentActivity = "e85f493f-046d-4dca-9e07-987ecd4ca4bc"; +# katerc.General."Days Meta Infos" = 30; +# katerc.General."Save Meta Infos" = true; +# katerc.General."Show Full Path in Title" = false; +# katerc.General."Show Menu Bar" = true; +# katerc.General."Show Status Bar" = true; +# katerc.General."Show Tab Bar" = true; +# katerc.General."Show Url Nav Bar" = true; +# katerc."KTextEditor Renderer"."Animate Bracket Matching" = false; +# katerc."KTextEditor Renderer"."Auto Color Theme Selection" = true; +# katerc."KTextEditor Renderer"."Color Theme" = "Breeze Dark"; +# katerc."KTextEditor Renderer"."Line Height Multiplier" = 1; +# katerc."KTextEditor Renderer"."Show Indentation Lines" = false; +# katerc."KTextEditor Renderer"."Show Whole Bracket Expression" = false; +# katerc."KTextEditor Renderer"."Text Font" = "Hack,10,-1,7,400,0,0,0,0,0,0,0,0,0,0,1"; +# katerc."KTextEditor Renderer"."Text Font Features" = ""; +# katerc."KTextEditor Renderer"."Word Wrap Marker" = false; +# katerc."KTextEditor::Search"."Search History" = "availabilityDomain,subnetId"; +# katerc.filetree.editShade = "31,81,106"; +# katerc.filetree.listMode = false; +# katerc.filetree.middleClickToClose = false; +# katerc.filetree.shadingEnabled = true; +# katerc.filetree.showCloseButton = false; +# katerc.filetree.showFullPathOnRoots = false; +# katerc.filetree.showToolbar = true; +# katerc.filetree.sortRole = 0; +# katerc.filetree.viewShade = "81,49,95"; + kcminputrc."Libinput/1133/16529/Logitech Wireless Mouse".PointerAcceleration = "0"; + kcminputrc.Mouse.X11LibInputXAccelProfileFlat = true; + kcminputrc.Mouse.XLbInptPointerAcceleration = 0; +# kcminputrc.Mouse.cursorTheme = "Breeze_Light"; +# kded5rc.Module-browserintegrationreminder.autoload = false; +# kded5rc.Module-device_automounter.autoload = false; +# kdeglobals."DirSelect Dialog"."DirSelectDialog Size" = "960,540"; +# kdeglobals.Icons.Theme = "Breeze-LaCapitaine-apps"; +# kdeglobals.KDE.ShowDeleteCommand = false; +# kdeglobals.KDE.widgetStyle = "Breeze"; +# kdeglobals."KFileDialog Settings"."Allow Expansion" = false; +# kdeglobals."KFileDialog Settings"."Automatically select filename extension" = true; +# kdeglobals."KFileDialog Settings"."Breadcrumb Navigation" = false; +# kdeglobals."KFileDialog Settings"."Decoration position" = 2; +# kdeglobals."KFileDialog Settings"."LocationCombo Completionmode" = 5; +# kdeglobals."KFileDialog Settings"."PathCombo Completionmode" = 5; +# kdeglobals."KFileDialog Settings"."Show Bookmarks" = false; +# kdeglobals."KFileDialog Settings"."Show Full Path" = false; +# kdeglobals."KFileDialog Settings"."Show Inline Previews" = true; +# kdeglobals."KFileDialog Settings"."Show Preview" = false; +# kdeglobals."KFileDialog Settings"."Show Speedbar" = true; +# kdeglobals."KFileDialog Settings"."Show hidden files" = false; +# kdeglobals."KFileDialog Settings"."Sort by" = "Name"; +# kdeglobals."KFileDialog Settings"."Sort directories first" = true; +# kdeglobals."KFileDialog Settings"."Sort hidden files last" = false; +# kdeglobals."KFileDialog Settings"."Sort reversed" = true; +# kdeglobals."KFileDialog Settings"."Speedbar Width" = 147; +# kdeglobals."KFileDialog Settings"."View Style" = "DetailTree"; +# kdeglobals."KShortcutsDialog Settings"."Dialog Size" = "600,480"; +# kdeglobals.PreviewSettings.EnableRemoteFolderThumbnail = false; +# kdeglobals.PreviewSettings.MaximumRemoteSize = 0; +# kdeglobals.Sounds.Theme = "freedesktop"; +# kdeglobals.WM.activeBackground = "49,54,59"; +# kdeglobals.WM.activeBlend = "252,252,252"; +# kdeglobals.WM.activeForeground = "252,252,252"; +# kdeglobals.WM.inactiveBackground = "42,46,50"; +# kdeglobals.WM.inactiveBlend = "161,169,177"; +# kdeglobals.WM.inactiveForeground = "161,169,177"; +# kiorc.Confirmations.ConfirmDelete = true; + kscreenlockerrc.Daemon.Autolock = false; + kscreenlockerrc.Daemon.Timeout = 0; +# kscreenlockerrc."Greeter/Wallpaper/org.kde.image/General".Image = "/usr/share/wallpapers/ScarletTree/"; +# kscreenlockerrc."Greeter/Wallpaper/org.kde.image/General".PreviewImage = "/usr/share/wallpapers/ScarletTree/"; +# ksmserverrc.General.loginMode = "emptySession"; +# ksplashrc.KSplash.Theme = "a2n.kuro"; +# kwalletrc.Wallet."First Use" = false; +# kwinrc."Activities/LastVirtualDesktop"."0f8d8349-5b1b-4b77-bfa5-22829bfaf459" = "4a2f44cc-dfe7-45dc-8439-fe34a6866d37"; +# kwinrc."Activities/LastVirtualDesktop".e85f493f-046d-4dca-9e07-987ecd4ca4bc = "4a2f44cc-dfe7-45dc-8439-fe34a6866d37"; +# kwinrc.Desktops.Id_1 = "4a2f44cc-dfe7-45dc-8439-fe34a6866d37"; +# kwinrc.Desktops.Id_2 = "fc5cf4ff-2e08-4059-ac1f-7c5540efa4fc"; +# kwinrc.Desktops.Id_3 = "375e6952-2ebc-473c-bd50-58090b95b184"; +# kwinrc.Desktops.Id_4 = "6cf07176-c30b-401a-b7f4-cf63067a7191"; + kwinrc.Desktops.Number = 4; + kwinrc.Desktops.Rows = 2; +# kwinrc.Effect-overview.BorderActivate = 9; + kwinrc.Effect-wobblywindows.AdvancedMode = true; + kwinrc.Effect-wobblywindows.Stiffness = 25; + kwinrc.NightColor.Active = true; +# kwinrc.NightColor.LatitudeAuto = 49.49; +# kwinrc.NightColor.LongitudeAuto = 8.46; + kwinrc.NightColor.NightTemperature = 2400; + kwinrc.Plugins.cubeEnabled = true; + kwinrc.Plugins.sheetEnabled = true; + kwinrc.Plugins.translucencyEnabled = true; + kwinrc.Plugins.wobblywindowsEnabled = true; + kwinrc.Tiling.padding = 4; +# kwinrc."Tiling/01df8341-b6c7-5a80-b8b8-9d45585f515f".tiles = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.25},{\"width\":0.5},{\"width\":0.25}]}"; +# kwinrc."Tiling/1c624b6b-fbd3-5af5-93a9-4a7d55ba7893".tiles = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.25},{\"width\":0.5},{\"width\":0.25}]}"; +# kwinrc."Tiling/f18ce12b-2106-508f-9542-e4e6c6fbf75f".tiles = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.25},{\"width\":0.5},{\"width\":0.25}]}"; +# kwinrc.Xwayland.Scale = 2; + kwinrc."org.kde.kdecoration2".BorderSize = "Tiny"; +# kwinrc."org.kde.kdecoration2".BorderSizeAuto = false; +# kwinrc."org.kde.kdecoration2".ButtonsOnLeft = ""; +# kwinrc."org.kde.kdecoration2".theme = "__aurorae__svg__Nordic"; +# plasma-localerc.Formats.LANG = "en_US.UTF-8"; + #plasmanotifyrc."Applications/dev.deedles.Trayscale".Seen = true; +# plasmarc.Theme.name = "WhiteSur-dark"; +# plasmarc.Wallpapers.usersWallpapers = "/home/cookiez/NixOS/other/wallpaper2.png"; + #spectaclerc.ImageSave.lastImageSaveLocation = "file:///home/cookiez/Pictures/Screenshots/Screenshot_20251030_101914.png"; + #spectaclerc.ImageSave.translatedScreenshotsFolder = "Screenshots"; + #spectaclerc.VideoSave.translatedScreencastsFolder = "Screencasts"; + }; + }; }; }