122 lines
2.7 KiB
Nix
122 lines
2.7 KiB
Nix
{
|
|
description = "Hyprland test wrapper from nixpkgs only";
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
|
|
|
|
outputs =
|
|
{ self, nixpkgs, ... }:
|
|
let
|
|
system = "x86_64-linux";
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
config.allowUnfree = false;
|
|
};
|
|
|
|
hypr = pkgs.hyprland;
|
|
|
|
configDir = pkgs.lib.cleanSource ./.;
|
|
configFile = "${configDir}/hyprland.lua";
|
|
|
|
runtimePackages = with pkgs; [
|
|
swaybg
|
|
quickshell
|
|
waybar
|
|
networkmanagerapplet
|
|
blueman
|
|
|
|
# aus deiner Home-Manager-Konfiguration
|
|
wofi
|
|
grim
|
|
swaynotificationcenter
|
|
swaylock
|
|
hyprpaper
|
|
lxsession
|
|
hyprshot
|
|
wayvnc
|
|
pamixer
|
|
pavucontrol
|
|
brightnessctl
|
|
python313Packages.requests
|
|
];
|
|
|
|
runtimePath = pkgs.lib.makeBinPath runtimePackages;
|
|
|
|
verifyScript = pkgs.writeShellScript "hyprland-verify" ''
|
|
export PATH=${runtimePath}:$PATH
|
|
exec ${hypr}/bin/Hyprland --config ${configFile} --verify-config
|
|
'';
|
|
|
|
runScript = pkgs.writeShellScript "hyprland-run" ''
|
|
export PATH=${runtimePath}:$PATH
|
|
exec ${hypr}/bin/Hyprland --config ${configFile}
|
|
'';
|
|
|
|
startScript = pkgs.writeShellScript "start-hyprland" ''
|
|
export PATH=${runtimePath}:$PATH
|
|
|
|
export XDG_CONFIG_HOME=${configDir}
|
|
|
|
exec ${hypr}/bin/start-hyprland --config ${configFile}
|
|
'';
|
|
in
|
|
{
|
|
|
|
homeManagerModules.default =
|
|
{ pkgs, ... }:
|
|
{
|
|
|
|
home.packages = with pkgs; [
|
|
wofi
|
|
grim
|
|
swaynotificationcenter
|
|
swaylock
|
|
hyprpaper
|
|
lxsession
|
|
hyprshot
|
|
wayvnc
|
|
pamixer
|
|
pavucontrol
|
|
brightnessctl
|
|
python313Packages.requests
|
|
networkmanagerapplet
|
|
];
|
|
|
|
wayland.windowManager.hyprland = {
|
|
enable = true;
|
|
xwayland.enable = true;
|
|
configType = "lua";
|
|
extraConfig = "";
|
|
};
|
|
|
|
programs.waybar.enable = true;
|
|
|
|
xdg.configFile."hypr" = {
|
|
source = configDir;
|
|
recursive = true;
|
|
};
|
|
};
|
|
|
|
apps.${system} = {
|
|
default = {
|
|
type = "app";
|
|
program = "${verifyScript}";
|
|
};
|
|
|
|
run = {
|
|
type = "app";
|
|
program = "${runScript}";
|
|
};
|
|
|
|
start-hyprland = {
|
|
type = "app";
|
|
program = "${startScript}";
|
|
};
|
|
};
|
|
|
|
packages.${system}.default = pkgs.runCommand "hyprland-config-check" { } ''
|
|
${verifyScript}
|
|
touch $out
|
|
'';
|
|
};
|
|
}
|