-
Notifications
You must be signed in to change notification settings - Fork 0
/
gui.nix
101 lines (91 loc) · 2.38 KB
/
gui.nix
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
{ config, lib, pkgs, ... }:
let
unstable = import <unstable> { };
# startsway = pkgs.writeTextFile {
# name = "startsway";
# destination = "/bin/startsway";
# executable = true;
# text = ''
# #! ${pkgs.bash}/bin/bash
# # systemctl --user import-environment
# # exec systemctl --user start sway.service
# export MOZ_ENABLE_WAYLAND=1
# sway
# # waitPID=$!
# '';
# };
in {
services.xserver = {
enable = true;
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
libinput.enable = true;
xkbVariant = "dvorak";
};
programs.sway = {
enable = false;
wrapperFeatures.gtk = true;
extraPackages = with pkgs;
let
thunar = unstable.xfce.thunar.overrideAttrs {
thunarPlugins = [ unstable.xfce.thunar-volman unstable.xfce.thunar-archive-plugin ]; };
in [
xwayland
alacritty
bemenu
i3status
mako
sway
swayidle
swaylock
wl-clipboard
unstable.xfce.thunar
gnome3.nautilus
pinentry
pinentry-gnome
xdg-desktop-portal
xdg-desktop-portal-wlr
xdg-desktop-portal-gnome
];
extraSessionCommands = ''
eval $(gnome-keyring-daemon --start --components=pkcs11,secrets,ssh);
export SSH_AUTH_SOCK;
'';
};
/*
xdg.portal.enable = true;
xdg.portal.wlr.enable = true;
xdg.portal.gtkUsePortal = true;
*/
systemd.user.targets.sway-session = {
description = "Sway compositor session";
documentation = [ "man:systemd.special(7)" ];
bindsTo = [ "graphical-session.target" ];
wants = [ "graphical-session-pre.target" ];
after = [ "graphical-session-pre.target" ];
};
systemd.user.services.sway = {
description = "Sway - Wayland window manager";
documentation = [ "man:sway(5)" ];
bindsTo = [ "graphical-session.target" ];
wants = [ "graphical-session-pre.target" ];
after = [ "graphical-session-pre.target" ];
environment.PATH = lib.mkForce null;
serviceConfig = {
Type = "simple";
ExecStart = ''
${pkgs.dbus}/bin/dbus-run-session ${pkgs.sway}/bin/sway --debug
'';
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
fonts = {
enableDefaultFonts = true;
fonts = with pkgs; [
font-awesome
fira-code
];
};
}