Compare commits

...

10 Commits

Author SHA1 Message Date
7109f83083 update to nixos 25.11 2025-12-14 18:12:48 +01:00
90bc596b0d use unstable stuff 2025-11-29 21:44:47 +01:00
17b0ee58a8 update unstable, add Cosmic desktop 2025-11-04 11:01:19 +01:00
46c61bd1e1 add cursor-cli 2025-09-12 15:58:17 +02:00
30888639c2 add SPORE firewall config and some tools 2025-09-04 12:27:00 +02:00
Patrick Balsiger
b7b0322ae1 Merge pull request #1 from 0x1d/feature/hyper-rice
feature/hyper-rice
2025-08-19 10:31:17 +02:00
902147aedd update KDE 2025-08-18 21:12:45 +02:00
267da09f7a add nerd fonts 2025-08-18 20:34:40 +02:00
0x1d
abec2cad65 add waybar style 2025-08-18 16:58:50 +02:00
0x1d
b05509b3a9 configure waybar 2025-08-18 16:41:55 +02:00
10 changed files with 351 additions and 170 deletions

View File

@@ -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

35
os/flake.lock generated
View File

@@ -7,32 +7,48 @@
]
},
"locked": {
"lastModified": 1750792728,
"narHash": "sha256-Lh3dopA8DdY+ZoaAJPrtkZOZaFEJGSYjOdAYYgOPgE4=",
"lastModified": 1765605144,
"narHash": "sha256-RM2xs+1HdHxesjOelxoA3eSvXShC8pmBvtyTke4Ango=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "366f00797b1efb70f2882d3da485e3c10fd3d557",
"rev": "90b62096f099b73043a747348c11dbfcfbdea949",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.05",
"ref": "release-25.11",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1751211869,
"narHash": "sha256-1Cu92i1KSPbhPCKxoiVG5qnoRiKTgR5CcGSRyLpOd7Y=",
"lastModified": 1765608474,
"narHash": "sha256-9Wx53UK0z8Di5iesJID0tS1dRKwGxI4i7tsSanOHhF0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "b43c397f6c213918d6cfe6e3550abfe79b5d1c51",
"rev": "28bb483c11a1214a73f9fd2d9928a6e2ea86ec71",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.05",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1761656231,
"narHash": "sha256-EiED5k6gXTWoAIS8yQqi5mAX6ojnzpHwAQTS3ykeYMg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e99366c665bdd53b7b500ccdc5226675cfc51f45",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
@@ -40,7 +56,8 @@
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
}
}
},

View File

@@ -2,14 +2,15 @@
description = "flake for nixos";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
home-manager.url = "github:nix-community/home-manager/release-25.05";
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
home-manager.url = "github:nix-community/home-manager/release-25.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
outputs = { self, nixpkgs, home-manager }: {
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager }: {
nixosConfigurations = {
nixos = nixpkgs.lib.nixosSystem {
gnome = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
home-manager.nixosModules.home-manager
@@ -21,6 +22,21 @@
./users/demo.nix
./users/master.nix
];
specialArgs = { inherit nixpkgs-unstable; };
};
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
];
specialArgs = { inherit nixpkgs-unstable; };
};
hyprland = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
@@ -34,6 +50,7 @@
./users/demo.nix
./users/master.nix
];
specialArgs = { inherit nixpkgs-unstable; };
};
};
};

View File

@@ -0,0 +1,3 @@
{ pkgs, ... }: {
services.desktopManager.cosmic.enable = true;
}

View File

@@ -3,7 +3,8 @@
enable = true;
xkb.layout = "ch";
xkb.variant = "";
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
};
services.displayManager.gdm.enable = true;
services.desktopManager.gnome.enable = true;
services.desktopManager.cosmic.enable = true;
}

View File

@@ -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": "<span style=\"italic\">{}</span>"
},
"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": "<span color=\"#f53c3c\"></span> ",
"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": "<big>{:%Y %B}</big>\\n<tt><small>{calendar}</small></tt>",
"format": " {:%H:%M}",
"format-alt": " {:%Y-%m-%d %H:%M}"
// "timezone": "America/New_York",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"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

View File

@@ -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
];
}

View File

@@ -11,9 +11,11 @@
enable = true;
allowedTCPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
{ from = 3000; to = 3001; } # SPORE
];
allowedUDPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
{ from = 4210; to = 4210; } # SPORE
];
};
};

View File

@@ -1,14 +1,10 @@
{ config, pkgs, ... }:
{ config, pkgs, nixpkgs-unstable, ... }:
let
unstable = import
(builtins.fetchTarball {
url = "https://github.com/nixos/nixpkgs/tarball/nixpkgs-unstable";
sha256 = "sha256:19wkjfhyidvkp4wjrr7idx83iiql6bskp1x1wrp52y0lc3xx847y";
})
# reuse the current configuration
{ config = config.nixpkgs.config; };
in
{
unstable = import nixpkgs-unstable {
system = pkgs.stdenv.hostPlatform.system;
config = config.nixpkgs.config;
};
in {
nixpkgs.config = {
allowUnfree = true;
@@ -37,8 +33,10 @@ in
ripgrep
jq
git
ranger
highlight
gnumake
pinentry
pinentry-gnome3
direnv
dnsutils
netcat
@@ -56,12 +54,11 @@ in
ledger-live-desktop
ledger-udev-rules
android-tools
android-udev-rules
ghostty
alacritty
brave
#unstable.gsconnect
code-cursor
unstable.code-cursor
go
gnomeExtensions.forge
platformio
@@ -74,6 +71,17 @@ in
uv
portaudio
python312Packages.pyaudio
hwinfo
usbutils
unstable.cursor-cli
ffmpeg
unstable.golangci-lint
unstable.terraform
];
fonts.packages = with pkgs; [
nerd-fonts._0xproto
nerd-fonts.droid-sans-mono
];
programs.nix-ld.enable = true;
@@ -90,9 +98,11 @@ in
pkgs.platformio-core.udev
pkgs.openocd
];
services.logind.extraConfig = ''
RuntimeDirectorySize=20G
'';
services.logind.settings = {
Login = {
RuntimeDirectorySize = "20G";
};
};
systemd.sleep.extraConfig = ''
AllowSuspend=yes
AllowHibernation=yes

View File

@@ -12,6 +12,9 @@
home.stateVersion = "23.05";
home.username = "master";
home.homeDirectory = "/home/master";
home.sessionVariables = {
EDITOR = "vim";
};
home.packages = with pkgs; [
#plasma5Packages.bismuth
#kdeconnect
@@ -26,7 +29,6 @@
ranger
vscode
nodejs
terraform
consul
nomad
packer