nix-system/home/allegro.nix
Antoine Vaure 1a0086f941
All checks were successful
/ build-all (push) Successful in 1m18s
replace variant argument with modules
2025-09-03 16:11:05 +02:00

115 lines
4.2 KiB
Nix

{ config, lib, pkgs, ... }: {
programs.fish = {
loginShellInit = ''
source ${pkgs.nix}/etc/profile.d/nix.fish
if test $(tty) = /dev/tty2
nixGLIntel Hyprland
end
'';
};
xdg = {
configFile."systemd/user/dbus-broker.service".source =
"${pkgs.dbus-broker}/share/systemd/user/dbus-broker.service";
configFile."systemd/user/at-spi-dbus-bus.service".source =
"${pkgs.at-spi2-core}/lib/systemd/user/at-spi-dbus-bus.service";
dataFile."dbus-1/services/org.a11y.Bus.service".source =
"${pkgs.at-spi2-core}/share/dbus-1/services/org.a11y.Bus.service";
dataFile."dbus-1/accessibility-services/org.a11y.atspi.Registry.service".source =
"${pkgs.at-spi2-core}/share/dbus-1/accessibility-services/org.a11y.atspi.Registry.service";
configFile."systemd/user/xdg-desktop-portal.service".source =
"${pkgs.xdg-desktop-portal}/lib/systemd/user/xdg-desktop-portal.service";
configFile."systemd/user/xdg-desktop-portal-gtk.service".source =
"${pkgs.xdg-desktop-portal-gtk}/lib/systemd/user/xdg-desktop-portal-gtk.service";
configFile."systemd/user/xdg-desktop-portal-hyprland.service".source =
"${pkgs.xdg-desktop-portal-hyprland}/lib/systemd/user/xdg-desktop-portal-hyprland.service";
dataFile."share/dbus-1/services/org.freedesktop.impl.portal.desktop.hyprland.service".source =
"${pkgs.xdg-desktop-portal-hyprland}share/dbus-1/services/org.freedesktop.impl.portal.desktop.hyprland.service";
dataFile."systemd/user/pipewire.service".source =
"${pkgs.pipewire}/share/systemd/user/pipewire.service";
dataFile."systemd/user/pipewire-pulse.service".source =
"${pkgs.pipewire}/share/systemd/user/pipewire-pulse.service";
dataFile."systemd/user/filter-chain.service".source =
"${pkgs.pipewire}/share/systemd/user/filter-chain.service";
dataFile."systemd/user/pipewire.socket".source =
"${pkgs.pipewire}/share/systemd/user/pipewire.socket";
dataFile."systemd/user/pipewire-pulse.socket".source =
"${pkgs.pipewire}/share/systemd/user/pipewire-pulse.socket";
portal = {
enable = true;
# xdgOpenUsePortal = true;
extraPortals =
[ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-hyprland ];
configPackages =
[ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-hyprland ];
# config.common.default = "*";
config = {
hyprland = { default = [ "gtk,hyprland" ]; };
common = { default = [ "gtk,hyprland" ]; };
};
};
};
wayland.windowManager.hyprland = {
extraConfig = ''
monitor= DP-4, 1920x1200@75, 3840x0, 1
monitor= DP-3, 1920x1200@75, 1920x0, 1
monitor=eDP-1, 1920x1080, 0x0, 1
monitor=HDMI-1, 3440x1440, auto, 1
monitor=HDMI-A-1, 3440x1440, auto, 1
# monitor=HDMI-1, 1920x1080, auto, 1, mirror, eDP-1
# monitor=HDMI-A-1, 1920x1080, auto, 1, mirror, eDP-1
env = WLR_DRM_DEVICES,/dev/dri/card0
env = AQ_WLR_DEVICES,/dev/dri/card0
env = AQ_DRM_DEVICES,/dev/dri/card0
env = TERMINAL,st
env = NIXOS_OZONE_WL,1
env = GDK_BACKEND,wayland,x11
env = QT_QPA_PLATFORM,wayland;xcb
env = CLUTTER_BACKEND,wayland
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = WLR_NO_HARDWARE_CURSORS,1
env = XCURSOR_SIZE,24
'';
};
programs.waybar.settings.bar = {
"group/disks".modules = [
"disk#home"
];
"disk#home" = {
interval = 1;
format = "󰋊 {free}";
path = "/home/${config.home.username}";
"on-click" = "$TERMINAL -c floating -e ${pkgs.ncdu}/bin/ncdu -x /home/${config.home.username}";
};
};
home.file = {
".bin/shutdown".source = pkgs.writeShellScript "usr_sbin_shutdown" "/usr/sbin/shutdown $@";
".bin/reboot".source = pkgs.writeShellScript "usr_sbin_reboot" "/usr/sbin/reboot $@";
};
home.packages = with pkgs; [
aria2
pipewire
];
home.sessionVariables = {
TMPDIR = "/home/${config.home.username}/tmp";
GSETTINGS_SCHEMA_DIR = "${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/gsettings-desktop-schemas-47.1/glib-2.0/schemas";
};
swaylock-bin = "/usr/bin/swaylock";
}