diff --git a/README.md b/README.md
index 11f4499..9248ea6 100644
--- a/README.md
+++ b/README.md
@@ -5,8 +5,9 @@ This repo contains my personal NixOS configuration with multiple desktop environ
## Quick Start
### Available Configurations
-- **`nixos`** - GNOME desktop environment
-- **`hyprland`** - Hyprland window manager
+- **`gnome`** - GNOME desktop environment
+- **`kde`** - KDE Plasma desktop environment
+- **`hyprland`** - Hyprland window manager
### Quick Commands
```bash
diff --git a/os/flake.nix b/os/flake.nix
index 7ba0eb4..dcef9d4 100644
--- a/os/flake.nix
+++ b/os/flake.nix
@@ -9,7 +9,7 @@
outputs = { self, nixpkgs, home-manager }: {
nixosConfigurations = {
- nixos = nixpkgs.lib.nixosSystem {
+ gnome = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
home-manager.nixosModules.home-manager
@@ -22,6 +22,19 @@
./users/master.nix
];
};
+ kde = nixpkgs.lib.nixosSystem {
+ system = "x86_64-linux";
+ modules = [
+ home-manager.nixosModules.home-manager
+ ./configuration.nix
+ ./hardware/lenovo-thinkpad-e14.nix
+ ./system/base.nix
+ ./system/packages.nix
+ ./system/desktop/plasma.nix
+ ./users/demo.nix
+ ./users/master.nix
+ ];
+ };
hyprland = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
diff --git a/os/system/desktop/hyprland-config.nix b/os/system/desktop/hyprland-config.nix
index 707ab47..ac6e6ab 100644
--- a/os/system/desktop/hyprland-config.nix
+++ b/os/system/desktop/hyprland-config.nix
@@ -195,83 +195,171 @@
# Create Waybar configuration
environment.etc."xdg/waybar/config".text = ''
{
- "layer": "top",
- "position": "top",
- "height": 30,
- "spacing": 4,
- "modules-left": ["hyprland/workspaces"],
- "modules-center": ["hyprland/window"],
- "modules-right": ["battery", "pulseaudio", "network", "cpu", "memory", "clock", "tray"],
- "hyprland/workspaces": {
- "disable-scroll": true,
- "all-outputs": true,
- "format": "{name}",
+ // "layer": "top", // Waybar at top layer
+ // "position": "bottom", // Waybar position (top|bottom|left|right)
+ "height": 30, // Waybar height (to be removed for auto height)
+ // "width": 1280, // Waybar width
+ "spacing": 4, // Gaps between modules (4px)
+ // Choose the order of the modules
+ "modules-left": ["hyprland/workspaces","hyprland/window", "hyprland/mode", "hyprland/scratchpad", "custom/media"],
+ //"modules-center": ["hyprland/window"],
+ "modules-right": ["pulseaudio", "network", "cpu", "memory", "temperature", "backlight", "battery", "battery#bat2", "clock", "tray"],
+ // Modules configuration
+ // "hyprland/workspaces": {
+ // "disable-scroll": true,
+ // "all-outputs": true,
+ // "warp-on-scroll": false,
+ // "format": "{icon}",
+ // //"format": "{name}: {icon}",
+ // "format-icons": {
+ // "1": "",
+ // "2": "",
+ // "3": "",
+ // "4": "",
+ // "5": "",
+ // "urgent": "",
+ // "focused": "",
+ // "default": ""
+ // }
+ // },
+ "keyboard-state": {
+ "numlock": true,
+ "capslock": true,
+ "format": "{name} {icon}",
"format-icons": {
- "1": "1",
- "2": "2",
- "3": "3",
- "4": "4",
- "5": "5",
- "urgent": "urgent"
+ "locked": "",
+ "unlocked": ""
}
},
- "hyprland/window": {
- "format": "{}",
- "max-length": 50
+
+ "hyprland/mode": {
+ "format": "{}"
},
- "battery": {
- "states": {
- "warning": 20,
- "critical": 10
+ "hyprland/scratchpad": {
+ "format": "{icon} {count}",
+ "show-empty": false,
+ "format-icons": ["", ""],
+ "tooltip": true,
+ "tooltip-format": "{app}: {title}"
+ },
+ "mpd": {
+ "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ",
+ "format-disconnected": "Disconnected ",
+ "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ",
+ "unknown-tag": "N/A",
+ "interval": 2,
+ "consume-icons": {
+ "on": " "
},
- "format": "{icon} {capacity}%",
- "format-charging": " {capacity}%",
- "format-plugged": " {capacity}%",
- "format-alt": "{icon} {time}",
- "format-icons": ["", "", "", "", ""],
- "on-click": "powerprofilesctl"
+ "random-icons": {
+ "off": " ",
+ "on": " "
+ },
+ "repeat-icons": {
+ "on": " "
+ },
+ "single-icons": {
+ "on": "1 "
+ },
+ "state-icons": {
+ "paused": "",
+ "playing": ""
+ },
+ "tooltip-format": "MPD (connected)",
+ "tooltip-format-disconnected": "MPD (disconnected)"
+ },
+ "idle_inhibitor": {
+ "format": "{icon}",
+ "format-icons": {
+ "activated": "",
+ "deactivated": ""
+ }
+ },
+ "tray": {
+ // "icon-size": 21,
+ "spacing": 10
},
"clock": {
- "tooltip-format": "{:%Y %B}\\n{calendar}",
- "format": " {:%H:%M}",
- "format-alt": " {:%Y-%m-%d %H:%M}"
+ // "timezone": "America/New_York",
+ "tooltip-format": "{:%Y %B}\n{calendar}",
+ "format-alt": "{:%Y-%m-%d}"
},
"cpu": {
- "format": " {usage}%",
- "format-icons": ["", "", "", "", ""],
+ "format": "{usage}% ",
"tooltip": false
},
"memory": {
- "format": " {percentage}%",
- "format-icons": ["", "", "", "", ""],
- "tooltip": false
+ "format": "{}% "
+ },
+ "temperature": {
+ // "thermal-zone": 2,
+ // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
+ "critical-threshold": 80,
+ // "format-critical": "{temperatureC}°C {icon}",
+ "format": "{temperatureC}°C {icon}",
+ "format-icons": ["", "", ""]
+ },
+ "backlight": {
+ // "device": "acpi_video1",
+ "format": "{percent}% {icon}",
+ "format-icons": ["", "", "", "", "", "", "", "", ""]
+ },
+ "battery": {
+ "states": {
+ // "good": 95,
+ "warning": 30,
+ "critical": 15
+ },
+ "format": "{capacity}% {icon}",
+ "format-charging": "{capacity}% ",
+ "format-plugged": "{capacity}% ",
+ "format-alt": "{time} {icon}",
+ // "format-good": "", // An empty format will hide the module
+ // "format-full": "",
+ "format-icons": ["", "", "", "", ""]
+ },
+ "battery#bat2": {
+ "bat": "BAT2"
},
"network": {
- "format-wifi": " {essid}",
- "format-ethernet": " {ipaddr}",
- "format-disconnected": " Disconnected",
- "format-icons": ["", "", "", "", ""],
- "tooltip-format": "{ifname} via {gwaddr}",
- "max-length": 50
+ // "interface": "wlp2*", // (Optional) To force the use of this interface
+ "format-wifi": "{essid} ({signalStrength}%) ",
+ "format-ethernet": "{ipaddr}/{cidr} ",
+ "tooltip-format": "{ifname} via {gwaddr} ",
+ "format-linked": "{ifname} (No IP) ",
+ "format-disconnected": "Disconnected ⚠",
+ "format-alt": "{ifname}: {ipaddr}/{cidr}"
},
"pulseaudio": {
- "format": " {volume}%",
- "format-bluetooth": " {volume}% ",
- "format-bluetooth-muted": " ",
- "format-muted": " ",
+ // "scroll-step": 1, // %, can be a float
+ "format": "{volume}% {icon} {format_source}",
+ "format-bluetooth": "{volume}% {icon} {format_source}",
+ "format-bluetooth-muted": " {icon} {format_source}",
+ "format-muted": " {format_source}",
+ "format-source": "{volume}% ",
+ "format-source-muted": "",
"format-icons": {
- "headphone": "",
- "hands-free": "",
- "headset": "",
- "phone": "",
- "portable": "",
- "car": "",
- "default": ["", "", "", ""]
+ "headphone": "",
+ "hands-free": "",
+ "headset": "",
+ "phone": "",
+ "portable": "",
+ "car": "",
+ "default": ["", "", ""]
},
"on-click": "pavucontrol"
},
- "tray": {
- "spacing": 10
+ "custom/media": {
+ "format": "{icon} {}",
+ "return-type": "json",
+ "max-length": 40,
+ "format-icons": {
+ "spotify": "",
+ "default": "🎜"
+ },
+ "escape": true,
+ "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
+ // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
}
}
'';
@@ -281,105 +369,80 @@
* {
border: none;
border-radius: 0;
- font-family: "JetBrainsMono Nerd Font", Roboto, Helvetica, Arial, sans-serif;
- font-size: 13px;
+ /*font-family: "Hack", "Noto Color Emoji", sans-serif;*/
+ font-size: 12px;
+ /*font-weight: bold;*/
min-height: 0;
+
}
window#waybar {
- background-color: rgba(43, 48, 59, 0.5);
- border-bottom: 3px solid rgba(100, 149, 237, 0.5);
- color: #ffffff;
- transition-property: background-color;
- transition-duration: .5s;
- }
-
- window#waybar.hidden {
- opacity: 0.2;
+ /*background: rgba(0,0,0,.2);*/
+ background: transparent;
+ /*border-bottom: 1px solid rgba(100, 114, 125, 0.5);*/
+ color: #e5e9f0;
+ margin-bottom: 0px;
+ padding-bottom:0px;
}
+ /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
#workspaces button {
- padding: 0 5px;
- background-color: transparent;
+ padding: 5px 5px;
+ background: transparent;
color: #ffffff;
- border-bottom: 3px solid transparent;
- }
-
- #workspaces button:hover {
- background: rgba(0, 0, 0, 0.2);
- box-shadow: inherit;
- border-bottom: 3px solid #ffffff;
+ /*border-bottom: 3px solid transparent;*/
+ border-radius: 10px;
}
#workspaces button.active {
- background-color: #285577;
- border-bottom: 3px solid #ffffff;
+ /*background: #4c566a;*/
+ background: rgba(0,0,0,.5);
+ padding: 5px;
+ margin: 5px;
+ /*border-bottom: 3px solid #e5e9f0;*/
}
#workspaces button.urgent {
- background-color: #eb4d4b;
+ background-color: #bf616a;
}
#mode {
- background-color: #64727d;
+ background: #64727D;
border-bottom: 3px solid #ffffff;
}
- #clock,
- #battery,
- #cpu,
- #memory,
- #disk,
- #temperature,
- #backlight,
- #network,
- #pulseaudio,
- #custom-media,
- #tray,
- #mode,
- #idle_inhibitor,
- #mpd {
- padding: 0 10px;
- margin: 0 4px;
- color: #ffffff;
- }
-
- #window,
- #workspaces {
- margin: 0 4px;
- }
-
- .modules-left > widget:first-child > #workspaces {
- margin-left: 0;
- }
-
- .modules-right > widget:last-child > #workspaces {
- margin-right: 0;
+ #clock, #battery, #cpu, #memory, #temperature, #backlight, #network, #pulseaudio, #custom-media, #tray, #mode, #idle_inhibitor {
+ padding: 5px 8px;
+ margin: 5px;
+ border-radius: 10px;
+ background: rgba(0,0,0,.5);
}
#clock {
- background-color: #64727d;
+ /*background-color: #64727D;*/
+ color: #e5e9f0;
+ font-weight: bold;
}
#battery {
- background-color: #ffffff;
- color: #000000;
+ /*background-color: #000000;*/
+ color: #e5e9f0;
}
- #battery.charging, #battery.plugged {
- color: #ffffff;
- background-color: #26a65b;
+ #battery.charging {
+ /*background-color: #000000;*/
+ color: #e5e9f0;
}
@keyframes blink {
to {
- background-color: #ffffff;
+ /*background-color: #ffffff;*/
color: #000000;
}
}
#battery.critical:not(.charging) {
- background-color: #f53c3c;
+ background: #f53c3c;
color: #ffffff;
animation-name: blink;
animation-duration: 0.5s;
@@ -388,34 +451,76 @@
animation-direction: alternate;
}
- #battery.warning {
- background-color: #f39c12;
- color: #ffffff;
+ #cpu {
+ /*background: #2ecc71;*/
+ color: #e5e9f0;
}
- label:focus {
- background-color: #000000;
+ #memory {
+ /*background: #9b59b6;*/
+ color: #e5e9f0;
+ }
+
+ #backlight {
+ /*background: #90b1b1;*/
+ color: #e5e9f0;
+ }
+
+ #network {
+ /*background: #2980b9;*/
+ color: #e5e9f0;
}
#network.disconnected {
- background-color: #53a2ba;
+ /*background: #f53c3c;*/
+ color: #e5e9f0;
+ }
+
+ #pulseaudio {
+ /*background: #000000;*/
+ color: #e5e9f0;
}
#pulseaudio.muted {
- background-color: #90b1b1;
+ /*background: #000000;*/
+ color: #e5e9f0;
+ }
+
+ #custom-media {
+ background: #66cc99;
+ color: #2a5c45;
+ }
+
+ .custom-spotify {
+ background: #66cc99;
+ }
+
+ .custom-vlc {
+ background: #ffa000;
+ }
+
+ #temperature {
+ /*background: #f0932b;*/
}
#temperature.critical {
- background-color: #eb4d4b;
+ background: #eb4d4b;
}
- #tray > .passive {
- -gtk-icon-effect: dim;
+ #tray {
+ /*background-color: #2980b9;*/
+ color: #e5e9f0;
}
- #tray > .needs-attention {
- -gtk-icon-effect: highlight;
+ #idle_inhibitor {
+ background-color: #2d3436;
}
+
+ #idle_inhibitor.activated {
+ background-color: #ecf0f1;
+ color: #2d3436;
+ }
+
'';
# Create Dunst configuration
diff --git a/os/system/desktop/plasma.nix b/os/system/desktop/plasma.nix
index b155101..add1b3c 100644
--- a/os/system/desktop/plasma.nix
+++ b/os/system/desktop/plasma.nix
@@ -1,9 +1,32 @@
{ pkgs, ... }: {
- services.xserver = {
- enable = true;
- layout = "ch";
- xkbVariant = "";
+ #services.xserver = {
+ # enable = true;
+ # layout = "ch";
+ # xkbVariant = "";
+ # displayManager.sddm.enable = true;
+ # desktopManager.plasma6.enable = true;
+ #};
+ services = {
+ desktopManager.plasma6.enable = true;
displayManager.sddm.enable = true;
- desktopManager.plasma5.enable = true;
+ displayManager.sddm.wayland.enable = true;
};
+
+ environment.systemPackages = with pkgs;
+ [
+ kdePackages.discover # Optional: Install if you use Flatpak or fwupd firmware update sevice
+ kdePackages.kcalc # Calculator
+ kdePackages.kcharselect # Tool to select and copy special characters from all installed fonts
+ kdePackages.kcolorchooser # A small utility to select a color
+ kdePackages.kolourpaint # Easy-to-use paint program
+ kdePackages.ksystemlog # KDE SystemLog Application
+ kdePackages.sddm-kcm # Configuration module for SDDM
+ kdiff3 # Compares and merges 2 or 3 files or directories
+ kdePackages.isoimagewriter # Optional: Program to write hybrid ISO files onto USB disks
+ kdePackages.partitionmanager # Optional Manage the disk devices, partitions and file systems on your computer
+ hardinfo2 # System information and benchmarks for Linux systems
+ haruna # Open source video player built with Qt/QML and libmpv
+ wayland-utils # Wayland utilities
+ wl-clipboard # Command-line copy/paste utilities for Wayland
+ ];
}
diff --git a/os/system/packages.nix b/os/system/packages.nix
index 1ed31ab..b93e1f6 100644
--- a/os/system/packages.nix
+++ b/os/system/packages.nix
@@ -76,6 +76,11 @@ in
python312Packages.pyaudio
];
+ fonts.packages = with pkgs; [
+ nerd-fonts._0xproto
+ nerd-fonts.droid-sans-mono
+ ];
+
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [