2023-08-27 13:12:19 +02:00
|
|
|
{inputs, pkgs, gpu, platform, ...}: {
|
2023-08-14 15:02:45 +02:00
|
|
|
|
2023-08-27 13:06:16 +02:00
|
|
|
# nixpkgs = {
|
|
|
|
# overlays = [
|
|
|
|
# # https://github.com/nix-community/nixpkgs-wayland
|
|
|
|
# inputs.nixpkgs-wayland.overlay
|
|
|
|
# ];
|
|
|
|
# };
|
2023-08-27 12:35:58 +02:00
|
|
|
|
|
|
|
services.xserver.videoDrivers = [ gpu ];
|
|
|
|
|
2023-08-17 08:40:32 +02:00
|
|
|
# tuigreet
|
2023-08-17 08:40:02 +02:00
|
|
|
services.greetd = {
|
2023-08-15 12:41:49 +02:00
|
|
|
enable = true;
|
2023-08-17 08:40:02 +02:00
|
|
|
settings = {
|
|
|
|
default_session = {
|
2023-08-18 14:12:21 +02:00
|
|
|
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland -g 'Authorized Personnel Only'";
|
2023-08-17 08:40:02 +02:00
|
|
|
user = "greeter";
|
2023-08-15 15:09:48 +02:00
|
|
|
};
|
2023-08-15 13:49:57 +02:00
|
|
|
};
|
2023-08-15 12:41:49 +02:00
|
|
|
};
|
|
|
|
|
2023-08-25 01:02:10 +02:00
|
|
|
services.tlp = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
2023-08-15 12:21:32 +02:00
|
|
|
# Brightness and volume control
|
2023-08-16 05:57:53 +02:00
|
|
|
# https://haikarainen.github.io/light/
|
2023-08-15 12:21:32 +02:00
|
|
|
programs.light.enable = true;
|
2023-08-17 09:19:29 +02:00
|
|
|
# PolKit for the fingerprint reader
|
|
|
|
security.polkit.enable = true;
|
2023-08-17 12:26:20 +02:00
|
|
|
# https://github.com/NixOS/nixpkgs/issues/143365
|
|
|
|
security.pam.services.swaylock = {};
|
2023-08-15 12:21:32 +02:00
|
|
|
|
2023-08-14 07:55:14 +02:00
|
|
|
# Enabling hyprlnd on NixOS
|
|
|
|
programs.hyprland = {
|
|
|
|
enable = true;
|
2023-08-18 15:28:33 +02:00
|
|
|
enableNvidiaPatches = true;
|
2023-08-14 07:55:14 +02:00
|
|
|
xwayland.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.sessionVariables = {
|
|
|
|
# If your cursor becomes invisible
|
2023-08-27 12:35:58 +02:00
|
|
|
WLR_NO_HARDWARE_CURSORS = "0";
|
2023-08-14 07:55:14 +02:00
|
|
|
# Hint electron apps to use wayland
|
|
|
|
NIXOS_OZONE_WL = "1";
|
|
|
|
};
|
|
|
|
|
2023-08-26 14:31:14 +02:00
|
|
|
services.logind.extraConfig = ''
|
|
|
|
IdleActionSec=900
|
|
|
|
IdleAction=suspend-then-hibernate
|
|
|
|
'';
|
|
|
|
|
2023-08-27 08:21:27 +02:00
|
|
|
systemd.sleep.extraConfig = ''
|
|
|
|
AllowSuspend = yes
|
|
|
|
AllowHibernate = yes
|
|
|
|
AllowSuspendThenhibernate = yes
|
|
|
|
AllowHybridSleep = yes
|
|
|
|
|
|
|
|
HibernateDelaySec = 600
|
|
|
|
'';
|
|
|
|
|
2023-08-14 13:01:44 +02:00
|
|
|
# XDG portal
|
|
|
|
xdg.portal.enable = true;
|
|
|
|
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
|
|
|
|
2023-08-14 07:55:14 +02:00
|
|
|
# system packages
|
2023-08-27 13:07:09 +02:00
|
|
|
environment.systemPackages = [
|
2023-08-14 09:49:03 +02:00
|
|
|
# waybar
|
2023-08-27 13:07:09 +02:00
|
|
|
(pkgs.waybar.overrideAttrs (oldAttrs: {
|
2023-08-14 09:49:03 +02:00
|
|
|
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
|
|
|
|
})
|
|
|
|
)
|
2023-08-27 13:07:09 +02:00
|
|
|
pkgs.libnotify # Notification libraries
|
|
|
|
pkgs.mako # Notification daemon
|
|
|
|
pkgs.swww # Wallpaper daemon
|
|
|
|
pkgs.kitty # Terminal emulator
|
|
|
|
pkgs.rofi-wayland # App Launcher
|
|
|
|
pkgs.grim # Screenshots
|
|
|
|
pkgs.slurp # Screenshots
|
|
|
|
pkgs.wl-clipboard # Clipboard
|
|
|
|
pkgs.font-awesome # Fonts
|
|
|
|
pkgs.libinput-gestures # Gesture Control
|
|
|
|
pkgs.playerctl # Control sublime-music from waybar?
|
|
|
|
pkgs.pavucontrol # Pulse Audio Volume CONTROL
|
|
|
|
pkgs.glib # Set GTK theme settings
|
|
|
|
pkgs.greetd.tuigreet # Greeter
|
|
|
|
pkgs.swayidle # Idle management daemon - Automatic lock screen
|
|
|
|
pkgs.swayosd # used for on-screen notifications for things like adjusting backlight, volume, etc
|
|
|
|
pkgs.nwg-bar # Logout/shutdown/hibernate/lock screen modal UI
|
|
|
|
pkgs.ranger # TUI file manager
|
|
|
|
pkgs.xdg-utils # Utilities for better X/Wayland integration
|
2023-08-27 13:12:19 +02:00
|
|
|
inputs.nixpkgs-wayland.packages.${platform}.wayprompt # from nixpkgs-wayland exclusively - pinentry UI
|
|
|
|
|
|
|
|
# Themes
|
|
|
|
pkgs.gruvbox-gtk-theme # Gruvbox Theme
|
|
|
|
pkgs.papirus-icon-theme # Papirus Icons
|
2023-08-27 12:38:34 +02:00
|
|
|
];
|
2023-08-27 12:35:58 +02:00
|
|
|
|
2023-08-14 07:55:14 +02:00
|
|
|
# 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;
|
|
|
|
};
|
2023-08-24 02:56:55 +02:00
|
|
|
}
|