summaryrefslogtreecommitdiff
path: root/modules/niri.nix
blob: e76918961cbf3ce9853d081fa258ba12873ce198 (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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# General Desktop-related config
{ pkgs, inputs, ... }:
{
  nixpkgs.overlays = [ inputs.niri.overlays.niri ];

  programs.niri.enable = true;

  imports = [
    ./desktop-software.nix
    ./fonts.nix
  ];
  environment.systemPackages =
    let
      xwayland-satellite-git = pkgs.xwayland-satellite.overrideAttrs (
        final: _prev: {
          version = "git";
          cargoHash = "sha256-MaF2FyR3HvQAKkZKa8OO/5jbO64/Ncv7+JqHda4jN50=";
          src = pkgs.fetchFromGitHub {
            owner = "Supreeeme";
            repo = "xwayland-satellite";
            rev = "cca74a5f6b23742d77dc5db4312dfc40fd4a0fcc";
            sha256 = "sha256-YZ+axsuNsgIKWfnRkt6Qa9UoKfUOIWf42vNUonXxmxM=";
          };
          cargoDeps = pkgs.rustPlatform.fetchCargoTarball {
            inherit (final) pname src version;
            hash = final.cargoHash;
          };
        }
      );
    in
    with pkgs;
    [
      screen-message
      qbittorrent
      gajim
      imv
      mpv
      evince
      brightnessctl
      pulsemixer
      cmus
      termusic
      gsettings-desktop-schemas
      xdg-utils
      qt5.qtwayland
      bashmount
      audacity
      spotify-player
      zathura
      ncdu
      adwaita-icon-theme
      bluetui
      gammastep
      graphicsmagick
      i3status-rust
      impala
      kanshi
      pamixer
      swayidle
      swaylock
      wl-clipboard
      xfce.thunar
      banana-cursor
      fuzzel
      alacritty
      i3bar-river
      mako
      swww
      oculante
      xwayland-satellite-git
    ];

  # Enable sound.
  security.rtkit.enable = true;

  services.pipewire = {
    enable = true;
    alsa.enable = true;
    pulse.enable = true;
  };

  hardware.bluetooth = {
    enable = true;
    package = pkgs.bluez;
  };

  programs.zsh.vteIntegration = true;
  programs.bash.vteIntegration = true;
  services.upower.enable = true;

  services.acpid.enable = true;
  programs.light.enable = true;

  programs.xwayland.enable = true;

  environment.sessionVariables = {
    GTK_THEME = "Adwaita:dark";
  };
  xdg.portal = {
    enable = true;
    wlr.enable = true;
    extraPortals = [ pkgs.xdg-desktop-portal-gnome ];
  };

  services.udisks2.enable = true;
  environment.shellAliases = {
    # mounting shit
    mnt = "udisksctl mount -b";
    umnt = "udisksctl unmount -b";
    unlock = "udisksctl unlock -b";
    lock = "udisksctl lock -b";
    # easier navigation
    pwc = "pwd|wl-copy";
    cdp = "cd $(wl-paste)";
  };

  qt = {
    enable = true;
    platformTheme = "gnome";
    style = "adwaita-dark";
  };

  services.gnome.gnome-keyring.enable = true;
  security.pam.services.greetd.enableGnomeKeyring = true;

  services.greetd = {
    enable = true;
    settings = {
      default_session = {
        command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --greeting \"$(${pkgs.fortune}/bin/fortune -s)\" --cmd ${pkgs.niri-stable}/bin/niri-session";
      };
    };
  };

  programs.gnupg.agent.pinentryPackage = pkgs.pinentry-curses;
  programs.ssh = {
    startAgent = true;
    enableAskPassword = false;
    extraConfig = ''
      AddKeysToAgent yes
    '';
  };
}