nixos/hosts/FredOS-Macbook.nix
rope 2156ce4138 hyprland: migrate to Lua config (Hyprland 0.55+)
Switch Gaming and Macbook to home-manager unstable which has
configType = "lua" support. Converts the full Hyprland config from
deprecated hyprlang to native Lua:

- flake: add home-manager unstable input for Gaming/Macbook
- hyprland.nix: configType = "lua", settings.config for static sections,
  extraConfig for env/startup/animations/binds/window-rules
- hosts: monitor config updated to hl.monitor({}) table format

Eliminates the windowrulev2 deprecation banner.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 20:38:30 +01:00

78 lines
2.3 KiB
Nix

{ config, pkgs, lib, inputs, ... }:
{
config = lib.mkIf (config.networking.hostName == "FredOS-Macbook") {
environment.systemPackages = with pkgs; [
tlp
vesktop
adwaita-icon-theme
mission-center
vlc
geary
protonvpn-gui
onlyoffice-desktopeditors
woeusb
vscodium
];
nix.settings.max-jobs = 0;
services.tlp.enable = false;
programs.nix-ld.enable = true;
services.power-profiles-daemon.enable = true;
boot.loader.systemd-boot.configurationLimit = 5;
boot.initrd.systemd.enable = true;
# Allow video group (fred) to write to /sys/class/backlight and /sys/class/leds
# (screen brightness and keyboard backlight)
hardware.acpilight.enable = true;
services.logind.settings.Login = {
HandleLidSwitch = "suspend";
HandleLidSwitchExternalPower = "suspend";
};
home-manager.users.fred = { pkgs, ... }: {
wayland.windowManager.hyprland.settings.monitor = [{
output = "";
mode = "preferred";
position = "auto";
scale = "auto";
}];
# wob reads 0-100 integers from a FIFO and shows a progress bar overlay
systemd.user.services.wob = {
Unit = {
Description = "Wayland OSD Bar";
After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
Type = "simple";
ExecStart = "${pkgs.writeShellScript "wob-start" ''
rm -f "%t/wob.fifo"
mkfifo "%t/wob.fifo"
tail -f "%t/wob.fifo" | ${pkgs.wob}/bin/wob
''}";
ExecStopPost = "${pkgs.coreutils}/bin/rm -f %t/wob.fifo";
Restart = "on-failure";
};
Install.WantedBy = [ "graphical-session.target" ];
};
systemd.user.services.kbd-backlight-init = {
Unit = {
Description = "Set keyboard backlight to 10% on login";
After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
Type = "oneshot";
ExecStart = "${pkgs.brightnessctl}/bin/brightnessctl -d smc::kbd_backlight set 10%";
};
Install.WantedBy = [ "graphical-session.target" ];
};
};
};
}