Compare commits

...

12 commits

9 changed files with 188 additions and 148 deletions

20
flake.lock generated
View file

@ -101,11 +101,11 @@
]
},
"locked": {
"lastModified": 1716327911,
"narHash": "sha256-PI+wygItS/TKzi4gEAROvKTUzTx9GT+PGBttS/IOA/Q=",
"lastModified": 1716576411,
"narHash": "sha256-FIN1wMoyePBTtibCbaeJaoKNLuAYIGwLCWAYC1DJanw=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "27ca640abeef2d425b5dbecf804f5eb622cef56d",
"rev": "57298fc4f13c807e50ada2c986a3114b7fc2e621",
"type": "github"
},
"original": {
@ -144,11 +144,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1716417827,
"narHash": "sha256-TYHpA/i9+Ns01+RzknJ5eYskQXL9GTTA7JX9Lo4JKVg=",
"lastModified": 1717447622,
"narHash": "sha256-yT+e+NxXDes75AXaoxr41uStjXQgwK1SR5ZQEl27XlU=",
"ref": "refs/heads/main",
"rev": "7ad9116de8d0b7dac27eaf080bd92998a8fb40e5",
"revCount": 4728,
"rev": "d0a224a4915b5a90555818ed3f9e49e1a61b7cdb",
"revCount": 4761,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
@ -236,11 +236,11 @@
]
},
"locked": {
"lastModified": 1715791527,
"narHash": "sha256-HhQ4zvGHrRjR63ltySSeg+x+0jb0lepiutWdnFhLRoo=",
"lastModified": 1716473782,
"narHash": "sha256-+qLn4lsHU6iL3+HTo1gTQ1tWzet8K9h+IfVemzEQZj8=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "969cb076e5b76f2e823aeca1937a3e1f159812ee",
"rev": "87d5d984109c839482b88b4795db073eb9ed446f",
"type": "github"
},
"original": {

View file

@ -0,0 +1,66 @@
{ pkgs, ... }:
{
# support power features such as suspend to ram
powerManagement.enable = true;
# tune power saving options on boot
powerManagement.powertop.enable = true;
# thermald proactively prevents overheating on intel CPUs and works well with other tools
services.thermald.enable = true;
# power-profile-daemon for power management
services.power-profiles-daemon.enable = true;
# manage fans for macbook devices
services.mbpfan.enable = true;
# better performance than the actual intel driver
services.xserver.videoDrivers = [ "modesetting" ];
# needed for our broadcom/brcm 4377b chip to work
hardware.firmware = with pkgs; [
my.apple-firmware
];
# handle suspend issues (fuck you broadcom!)
powerManagement.powerDownCommands = ''
${pkgs.kmod}/bin/modprobe -r brcmfmac_wcc
${pkgs.kmod}/bin/modprobe -r brcmfmac
${pkgs.kmod}/bin/modprobe -r hci_bcm4377
'';
powerManagement.resumeCommands = ''
${pkgs.kmod}/bin/modprobe hci_bcm4377
${pkgs.kmod}/bin/modprobe brcmfmac
${pkgs.kmod}/bin/modprobe brcmfmac_wcc
'';
# VA-API
hardware.opengl = {
extraPackages = with pkgs; [
intel-media-driver
intel-vaapi-driver
libvdpau-va-gl
];
extraPackages32 = with pkgs.pkgsi686Linux; [
intel-media-driver
intel-vaapi-driver
libvdpau-va-gl
];
};
environment.variables = {
LIBVA_DRIVER_NAME= "iHD";
VDPAU_DRIVER = "va_gl";
# VA-API on firefox
MOZ_DISABLE_RDD_SANDBOX = "1";
};
environment.systemPackages = with pkgs; [ intel-gpu-tools ];
boot.kernelParams = [
# enable the i915 sandybridge framebuffer compression (475mw savings)
"i915.i915_enable_fbc=1"
"i915.fastboot=1"
"i915.enable_gvt=1"
# makes waking up from suspend much more bareable
"mem_sleep_default=s2idle"
];
}

View file

@ -21,7 +21,7 @@
# compatibility
wineWowPackages.waylandFull winetricks
# misc
bat file which tree prismlauncher yt-dlp wl-screenrec
bat file which prismlauncher yt-dlp wl-screenrec
] ++ (with pkgs.my; [
# none yet
]) ++ (with pkgs.gnome; [
@ -75,10 +75,12 @@
distractions.discord.vesktop = true;
distractions.steam.enable = true;
# tools
tools.mpv.enable = true;
tools.eza.enable = true;
tools.gpg.enable = true;
tools.mpv.enable = true;
};
};
networking.networkmanager.enable = true;
systemd.services.NetworkManager-wait-online.enable = false;
}

View file

@ -12,6 +12,8 @@
inputs.hardware.nixosModules.apple-t2
(modulesPath + "/installer/scan/not-detected.nix")
./apple-macbook-air-9-1.nix
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
@ -26,54 +28,6 @@
efi.canTouchEfiVariables = true;
};
# support power features such as suspend to ram
powerManagement.enable = true;
# tune power saving options on boot
powerManagement.powertop.enable = true;
# thermald proactively prevents overheating on intel CPUs and works well with other tools
services.thermald.enable = true;
# power-profile-daemon for power management
services.power-profiles-daemon.enable = true;
# manage fans for macbook devices
services.mbpfan.enable = true;
# better performance than the actual intel driver
services.xserver.videoDrivers = [ "modesetting" ];
# needed for our broadcom/brcm 4377b chip to work
hardware.firmware = with pkgs; [
my.apple-firmware
];
# VA-API
hardware.opengl = {
extraPackages = with pkgs; [
intel-media-driver
intel-vaapi-driver
libvdpau-va-gl
];
extraPackages32 = with pkgs.pkgsi686Linux; [
intel-media-driver
intel-vaapi-driver
libvdpau-va-gl
];
};
environment.variables = {
LIBVA_DRIVER_NAME= "iHD";
VDPAU_DRIVER = "va_gl";
# VA-API on firefox
MOZ_DISABLE_RDD_SANDBOX = "1";
};
boot.kernelParams = [
# enable the i915 sandybridge framebuffer compression (475mw savings)
"i915.i915_enable_fbc=1"
"i915.fastboot=1"
"enable_gvt=1"
];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/0f09afdc-88e4-4764-818b-77828931278f";
fsType = "ext4";

View file

@ -21,6 +21,7 @@ in {
config = mkIf cfg.enable {
services.displayManager.sessionPackages = [ cfg.package ];
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk cfg.portalPackage ];
@ -30,6 +31,15 @@ in {
};
};
};
# fixes a few things, most notibly, xwayland
programs.hyprland = {
enable = true;
xwayland.enable = true;
package = cfg.package;
portalPackage = cfg.portalPackage;
};
hm.wayland.windowManager.hyprland = {
enable = true;
xwayland.enable = true;
@ -84,6 +94,9 @@ in {
# scroll through workspaces with mod + scroll
"$mod, mouse_down, workspace, e+1"
"$mod, mouse_up, workspace, e-1"
# alternatively, scroll through workspaces with mod + brackets
"$mod, bracketleft, workspace, e-1"
"$mod, bracketright, workspace, e+1"
] ++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
@ -137,33 +150,21 @@ in {
windowrulev2 = [
# common popups
"float, class:org.gnome.FileRoller"
"center, class:org.gnome.FileRoller"
"size 1100 650, class:org.gnome.FileRoller"
"float, class:org.gnome.Loupe"
"center, class:org.gnome.Loupe"
"size 1100 650, class:org.gnome.Loupe"
"float, initialTitle:^Open Folder$"
"center, initialTitle:^Open Folder$"
"size 1100 650, initialTitle:^Open Folder$"
"float, initialTitle:^Open File$"
"center, initialTitle:^Open File$"
"size 1100 650, initialTitle:^Open File$"
"float, initialTitle:^Open Files$"
"center, initialTitle:^Open Files$"
"size 1100 650, initialTitle:^Open Files$"
"float, initialTitle:^Save As$"
"center, initialTitle:^Save As$"
"size 1100 650, initialTitle:^Save As$"
"float, initialTitle:^Select a file to open$"
"center, initialTitle:^Select a file to open$"
"size 1100 650, initialTitle:^Select a file to open$"
"float, initialTitle:^File Upload$"
"center, initialTitle:^File Upload$"
"size 1100 650, initialTitle:^File Upload$"
# https://github.com/hyprwm/Hyprland/issues/6154
"center, class:^gcr-prompter"
"center, class:^pinentry-"
"center, class:^polkit-"
"float, class:\.exe$"

View file

@ -24,6 +24,7 @@ in {
hide_cursor = false;
no_fade_in = true;
no_fade_out = true;
text_trim = false;
};
background = [

View file

@ -17,6 +17,7 @@ in {
usernamehw.errorlens
editorconfig.editorconfig
ms-vsliveshare.vsliveshare
ms-vscode-remote.remote-ssh
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "discord-vscode";

View file

@ -0,0 +1,15 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.modules.software.tools.eza;
in {
options.modules.software.tools.eza = {
enable = mkEnableOption "Enable eza, a modern replacement for ls";
};
config = mkIf cfg.enable {
hm.programs.eza.enable = true;
hm.programs.eza.git = true;
};
}