blob: 87d490576ac603da0cfd6509dee1d342173d5a43 (
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
|
{ user }:
{ pkgs, ... }@args:
let
home-manager = builtins.fetchTarball https://github.com/rycee/home-manager/archive/master.tar.gz;
in
{
imports = [
"${home-manager}/nixos"
];
nixpkgs.overlays = [ (import ../.) ];
# When this is enabled, the QEMU VM goes blank after boot
#networking.networkmanager.enable = true;
fonts.fonts = with pkgs; [
dejavu_fonts # just a basic good fond
font-awesome_5 # needed by i3status-rust
];
# add sound support
hardware.pulseaudio.enable = true;
# to allow control of the screen brightness
hardware.brightnessctl.enable = true;
# setup the user's home
home-manager.users."${user}" = (import ./home/profile.nix) args;
# Sway
programs.sway-beta.enable = true;
programs.sway-beta.extraSessionCommands = ''
# Tell toolkits to use wayland
export CLUTTER_BACKEND=wayland
#export QT_QPA_PLATFORM=wayland-egl
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export SDL_VIDEODRIVER=wayland
# Fix krita and other Egl-using apps
export LD_LIBRARY_PATH=/run/opengl-driver/lib
# Disable HiDPI scaling for X apps
# https://wiki.archlinux.org/index.php/HiDPI#GUI_toolkits
export GDK_SCALE=1
export QT_AUTO_SCREEN_SCALE_FACTOR=0
'';
# manage those with home-manager
programs.sway-beta.extraPackages = [];
# Add the required groups for the user to get access
users.extraUsers."${user}" = {
extraGroups = [
# allow sudo
"wheel"
"input"
"tty"
"audio"
"video"
# allow sway's setuid executable
"sway"
"networkmanager"
];
};
}
|