summaryrefslogtreecommitdiff
path: root/modules/nixos/hyprland.nix
blob: 3c95763359c0ecd456f3bd99eaab8734f82ef686 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
{ pkgs, ...}: {
  xdg.portal = {
    enable = true;
    wlr.enable = true;
    extraPortals = [
      pkgs.xdg-desktop-portal-kde
      pkgs.xdg-desktop-portal-gnome
      (pkgs.xdg-desktop-portal-gtk.override {
        # Do not build portals that we already have.
        # buildPortalsInGnome = false;
      })
    ];
  };

  environment.pathsToLink = ["/libexec"]; # links /libexec from derivations to /run/current-system/sw
  services = {
    gvfs.enable = true; # Mount, trash, and other fucntionalities
    tumbler.enable = true; # thumbnail support for images
    displayManager = {
      defaultSession = "hyprland";
      # lightdm.enable = false;
      # gdm = {
      #   enable = true;
      #   wayland = true;
      # };
    };
    xserver = {
      enable = true;

      desktopManager = {
        xterm.enable = false;
      };

    };
  };
  nix.settings = {
    substituters = ["https://hyprland.cachix.org"];
    trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
  };
  programs = {
    hyprland = {
      enable = true;
      # package = inputs.hyprland.packages.${pkgs.system}.hyprland;
      # package = with inputs.nixpkgs-unstable.pkgs; [
      #   hyprland
      # ];

      # enableNvidiaPatches = true;
    };

    # monitor backlight control
    light.enable = true;

    # # thunar file manager(part of xfce) related options
    # thunar.plugins = with pkgs.xfce; [
    #   thunar-archive-plugin
    #   thunar-volman
    # ];
  };

  # List packages installed in system profile. To search, run:
  # $ nix search wget
  environment.systemPackages = with pkgs; [
    waybar # the status bar
    swaybg # the wallpaper
    hyprpaper # hyprland wallpeper
    hypridle
    swayidle # the idle timeout
    swaylock-effects # locking the screen
    brightnessctl # control device brightness
    foot # terminal
    wlogout # logout menu
    wl-clipboard # copying and pasting
    cliphist # clipboard history
    hyprpicker # color picker

    wf-recorder # screen recording
    xwaylandvideobridge # lets xwayland programs see wayland applications for screensharing
    grim # taking screenshots
    slurp # selecting a region to screenshot
    # TODO replace by 'flameshot gui --raw | wl-copy'

    wofi # launch programs
    mako # the notification daemon, the same as dunst

    yad # a fork of zenity, for creating dialogs

    # audio
    alsa-utils # provides amixer/alsamixer/...
    mpd # for playing system sounds
    mpc-cli # command-line pmd client
    ncmpcpp # a mpd client with a UI
    networkmanagerapplet # provide GUI app: nm-connection-editor

    xfce.thunar # sfce4's file manager
    polkit-kde-agent
  ];
  fonts.packages = with pkgs; [
    font-awesome # fixes waybar fonts
  ];

  # fix https://github.com/ryan4yin/nix-config/issues/10
  security.pam.services.swaylock = {};
}