blob: 292c5bad01ca6033d842713f5739e6dc11cef2d5 (
plain) (
blame)
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
|
{
config,
options,
lib,
pkgs,
...
}: let
niriConf = config.modules.desktop.niri;
device = config.modules.device;
defaultApps = config.modules.desktop.defaultApplications.apps;
configDir = config.nixosConfig.configDir;
in {
options.modules.desktop.niri = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
};
};
config = lib.mkIf (niriConf.enable) (lib.mkMerge [
{
programs.niri.enable = true;
programs.waybar.enable = true;
#programs.xwayland.enable = true;
services.gnome.gnome-keyring.enable = true;
home.manager.services.polkit-gnome.enable = true;
fonts.packages =
with pkgs; [
adwaita-fonts
];
home.packages = with pkgs; [
libnotify
killall
wdisplays
wofi
mako
jq
awww
swaybg
networkmanagerapplet
xwayland-satellite
adwaita-icon-theme
adwaita-icon-theme-legacy
];
home.manager.xdg.configFile."niri/config.kdl".source = "${configDir}/niri/${config.networking.hostName}.kdl";
home.file.".icons/default".source = "${pkgs.adwaita-icon-theme}/share/icons/Adwaita";
home.manager.gtk.cursorTheme = {
name = "Adwaita";
size = 12;
};
xdg.portal = {
enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
config.common.default = ["gtk" ];
};
programs.regreet = {
enable = true;
theme.name = "Adwaita-dark";
cursorTheme.name = "Adwaita";
};
modules.device.displayProtocol = "wayland";
environment = {
sessionVariables.NIXOS_OZONE_WL = "1";
pathsToLink = [ "/libexec" ];
};
services.dbus = {
enable = true;
implementation = "broker";
};
system.userActivationScripts.linkwaybar.text = ''
if [[ ! -h "$HOME/.config/waybar" ]]; then
ln -s "${configDir}/waybar" "$HOME/.config/waybar"
fi
'';
}
]);
}
|