mirror of
https://github.com/celesrenata/end-4-flakes.git
synced 2026-06-11 12:39:26 -05:00
fix: add wayland dev headers and scanner for pywayland build on NixOS
This commit is contained in:
@@ -0,0 +1,245 @@
|
||||
{
|
||||
description = "NixOS adaptation of end-4's dots-hyprland - self-contained installer replication";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nvmd/nixpkgs";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... }:
|
||||
let
|
||||
systems = [ "x86_64-linux" "aarch64-linux" ];
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
|
||||
pkgsFor = system: import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ self.overlays.default ];
|
||||
};
|
||||
in
|
||||
{
|
||||
overlays.default = final: prev: {
|
||||
quickshell = prev.quickshell.overrideAttrs (old: {
|
||||
buildInputs = (old.buildInputs or []) ++ [ final.qt6.qt5compat final.qt6.qtpositioning ];
|
||||
qtWrapperArgs = (old.qtWrapperArgs or []) ++ [
|
||||
"--prefix" "NIXPKGS_QT6_QML_IMPORT_PATH" ":" "${final.qt6.qt5compat}/lib/qt-6/qml"
|
||||
"--prefix" "NIXPKGS_QT6_QML_IMPORT_PATH" ":" "${final.qt6.qtpositioning}/lib/qt-6/qml"
|
||||
];
|
||||
});
|
||||
|
||||
# Patch kde-material-you-colors for non-Plasma systems
|
||||
kde-material-you-colors = (prev.python312Packages.kde-material-you-colors.overrideAttrs (old: {
|
||||
pname = "kde-material-you-colors-patched";
|
||||
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ prev.makeWrapper ];
|
||||
|
||||
postInstall = (old.postInstall or "") + ''
|
||||
# Patch konsole_utils.py to use exist_ok=True
|
||||
substituteInPlace $out/lib/python*/site-packages/kde_material_you_colors/utils/konsole_utils.py \
|
||||
--replace-fail 'os.makedirs(settings.KONSOLE_DIR)' 'os.makedirs(settings.KONSOLE_DIR, exist_ok=True)'
|
||||
|
||||
# Patch kwin_utils.py to skip KWin reload (crashes on non-KDE systems)
|
||||
substituteInPlace $out/lib/python*/site-packages/kde_material_you_colors/utils/kwin_utils.py \
|
||||
--replace-fail 'def reload():' $'def reload():\n return # Skip on non-KDE'
|
||||
|
||||
# Create stub plasma-apply-colorscheme
|
||||
cat > $out/bin/plasma-apply-colorscheme << 'EOF'
|
||||
#!/bin/sh
|
||||
exit 0
|
||||
EOF
|
||||
chmod +x $out/bin/plasma-apply-colorscheme
|
||||
|
||||
# Wrap to use our stub
|
||||
wrapProgram $out/bin/kde-material-you-colors \
|
||||
--prefix PATH : $out/bin
|
||||
'';
|
||||
}));
|
||||
};
|
||||
|
||||
packages = forAllSystems (system:
|
||||
let
|
||||
pkgs = pkgsFor system;
|
||||
utilityPackages = import ./packages { inherit pkgs; };
|
||||
in utilityPackages // {
|
||||
default = utilityPackages.update-flake;
|
||||
}
|
||||
);
|
||||
|
||||
devShells = forAllSystems (system:
|
||||
let
|
||||
pkgs = pkgsFor system;
|
||||
utilityPackages = import ./packages { inherit pkgs; };
|
||||
in {
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
nixpkgs-fmt
|
||||
nil
|
||||
git
|
||||
jq
|
||||
] ++ (with utilityPackages; [
|
||||
update-flake
|
||||
test-python-env
|
||||
test-quickshell
|
||||
compare-modes
|
||||
]);
|
||||
|
||||
shellHook = builtins.readFile ./packages/scripts/dev-shell-hook.sh;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
homeManagerModules.default = import ./modules/home-manager.nix;
|
||||
homeManagerModules.dots-hyprland = self.homeManagerModules.default;
|
||||
|
||||
nixosModules.default = import ./modules/components/system-services.nix;
|
||||
nixosModules.dots-hyprland = self.nixosModules.default;
|
||||
|
||||
homeConfigurations = {
|
||||
declarative = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = pkgsFor "x86_64-linux";
|
||||
modules = [
|
||||
self.homeManagerModules.default
|
||||
{
|
||||
home.username = "celes";
|
||||
home.homeDirectory = "/home/celes";
|
||||
home.stateVersion = "24.05";
|
||||
|
||||
programs.dots-hyprland = {
|
||||
enable = true;
|
||||
source = ./configs; # Use local configs
|
||||
packageSet = "essential";
|
||||
mode = "hybrid";
|
||||
|
||||
# 🎨 Quickshell Configuration
|
||||
quickshell = {
|
||||
appearance = {
|
||||
extraBackgroundTint = true;
|
||||
fakeScreenRounding = 2; # When not fullscreen
|
||||
transparency = false;
|
||||
};
|
||||
|
||||
bar = {
|
||||
bottom = false; # Top bar
|
||||
cornerStyle = 0; # Hug style
|
||||
topLeftIcon = "spark";
|
||||
showBackground = true;
|
||||
verbose = true;
|
||||
|
||||
utilButtons = {
|
||||
showScreenSnip = true;
|
||||
showColorPicker = true; # 🎯 Enable color picker!
|
||||
showMicToggle = false;
|
||||
showKeyboardToggle = true;
|
||||
showDarkModeToggle = true;
|
||||
showPerformanceProfileToggle = false;
|
||||
};
|
||||
|
||||
workspaces = {
|
||||
monochromeIcons = true;
|
||||
shown = 10;
|
||||
showAppIcons = true;
|
||||
alwaysShowNumbers = false;
|
||||
showNumberDelay = 300;
|
||||
};
|
||||
};
|
||||
|
||||
battery = {
|
||||
low = 20;
|
||||
critical = 5;
|
||||
automaticSuspend = true;
|
||||
suspend = 3;
|
||||
};
|
||||
|
||||
apps = {
|
||||
terminal = "foot";
|
||||
bluetooth = "kcmshell6 kcm_bluetooth";
|
||||
network = "plasmawindowed org.kde.plasma.networkmanagement";
|
||||
taskManager = "plasma-systemmonitor --page-name Processes";
|
||||
};
|
||||
|
||||
time = {
|
||||
format = "hh:mm";
|
||||
dateFormat = "ddd, dd/MM";
|
||||
};
|
||||
};
|
||||
|
||||
# 🖥️ Hyprland Configuration
|
||||
hyprland = {
|
||||
general = {
|
||||
gapsIn = 4;
|
||||
gapsOut = 7;
|
||||
borderSize = 2;
|
||||
allowTearing = false;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 16;
|
||||
blurEnabled = true;
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspaceSwipe = true;
|
||||
};
|
||||
|
||||
monitors = [
|
||||
# Add your monitor config here, e.g.:
|
||||
# "eDP-1,1920x1080@60,0x0,1"
|
||||
];
|
||||
};
|
||||
|
||||
# 🖥️ Terminal Configuration
|
||||
terminal = {
|
||||
scrollback = {
|
||||
lines = 1000;
|
||||
multiplier = 3.0;
|
||||
};
|
||||
|
||||
cursor = {
|
||||
style = "beam";
|
||||
blink = false;
|
||||
beamThickness = 1.5;
|
||||
};
|
||||
|
||||
colors = {
|
||||
alpha = 0.95;
|
||||
};
|
||||
|
||||
mouse = {
|
||||
hideWhenTyping = false;
|
||||
alternateScrollMode = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
writable = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = pkgsFor "x86_64-linux";
|
||||
modules = [
|
||||
self.homeManagerModules.default
|
||||
{
|
||||
home.username = "celes";
|
||||
home.homeDirectory = "/home/celes";
|
||||
home.stateVersion = "24.05";
|
||||
|
||||
programs.dots-hyprland = {
|
||||
enable = true;
|
||||
source = ./configs; # Use local configs
|
||||
packageSet = "essential";
|
||||
mode = "writable";
|
||||
writable = {
|
||||
stagingDir = ".configstaging";
|
||||
setupScript = "initialSetup.sh";
|
||||
backupExisting = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
example = self.homeConfigurations.declarative;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user