111 lines
3 KiB
Nix
111 lines
3 KiB
Nix
{inputs, pkgs, gpu, ...}: {
|
|
|
|
nixpkgs = {
|
|
overlays = [
|
|
# https://github.com/nix-community/nixpkgs-wayland
|
|
inputs.nixpkgs-wayland.overlay
|
|
];
|
|
};
|
|
|
|
services.xserver.videoDrivers = [ gpu ];
|
|
|
|
# tuigreet
|
|
services.greetd = {
|
|
enable = true;
|
|
settings = {
|
|
default_session = {
|
|
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland -g 'Authorized Personnel Only'";
|
|
user = "greeter";
|
|
};
|
|
};
|
|
};
|
|
|
|
services.tlp = {
|
|
enable = true;
|
|
};
|
|
|
|
# Brightness and volume control
|
|
# https://haikarainen.github.io/light/
|
|
programs.light.enable = true;
|
|
# PolKit for the fingerprint reader
|
|
security.polkit.enable = true;
|
|
# https://github.com/NixOS/nixpkgs/issues/143365
|
|
security.pam.services.swaylock = {};
|
|
|
|
# Enabling hyprlnd on NixOS
|
|
programs.hyprland = {
|
|
enable = true;
|
|
enableNvidiaPatches = true;
|
|
xwayland.enable = true;
|
|
};
|
|
|
|
environment.sessionVariables = {
|
|
# If your cursor becomes invisible
|
|
WLR_NO_HARDWARE_CURSORS = "0";
|
|
# Hint electron apps to use wayland
|
|
NIXOS_OZONE_WL = "1";
|
|
};
|
|
|
|
services.logind.extraConfig = ''
|
|
IdleActionSec=900
|
|
IdleAction=suspend-then-hibernate
|
|
'';
|
|
|
|
systemd.sleep.extraConfig = ''
|
|
AllowSuspend = yes
|
|
AllowHibernate = yes
|
|
AllowSuspendThenhibernate = yes
|
|
AllowHybridSleep = yes
|
|
|
|
HibernateDelaySec = 600
|
|
'';
|
|
|
|
# XDG portal
|
|
xdg.portal.enable = true;
|
|
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
|
|
|
# system packages
|
|
environment.systemPackages = with pkgs; [
|
|
# waybar
|
|
(waybar.overrideAttrs (oldAttrs: {
|
|
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
|
|
})
|
|
)
|
|
libnotify # Notification libraries
|
|
mako # Notification daemon
|
|
swww # Wallpaper daemon
|
|
kitty # Terminal emulator
|
|
rofi-wayland # App Launcher
|
|
networkmanagerapplet # NetworkManager control applet
|
|
grim # Screenshots
|
|
scrot # screenshots
|
|
slurp # Screenshots
|
|
wl-clipboard # Clipboard
|
|
font-awesome # Fonts
|
|
gruvbox-gtk-theme # Gruvbox Theme
|
|
papirus-icon-theme # Papirus Icons
|
|
libinput-gestures # Gesture Control
|
|
playerctl # Control sublime-music from waybar?
|
|
pavucontrol # Pulse Audio Volume CONTROL
|
|
glib # Set GTK theme settings
|
|
greetd.tuigreet # Greeter
|
|
swayidle # Idle management daemon - Automatic lock screen
|
|
swayosd # used for on-screen notifications for things like adjusting backlight, volume, etc
|
|
nwg-bar
|
|
wlogout
|
|
ranger # TUI file manager
|
|
xdg-utils # Utilities for better X/Wayland integration
|
|
wayprompt
|
|
];
|
|
|
|
# Enable sound with pipewire.
|
|
sound.enable = true;
|
|
security.rtkit.enable = true;
|
|
services.pipewire = {
|
|
enable = true;
|
|
alsa.enable = true;
|
|
alsa.support32Bit = true;
|
|
pulse.enable = true;
|
|
jack.enable = true;
|
|
};
|
|
}
|