nix/roles/desktop.nix
2020-10-28 22:49:45 +01:00

144 lines
3 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }:
let
unstable = import <nixos-unstable> { config.allowUnfree = true; };
in {
programs.sway = {
enable = true;
extraPackages = with pkgs; [
bemenu
brightnessctl
grim
i3status-rust
kanshi
mako
slurp
swayidle
swaylock
xwayland
wf-recorder
];
};
services.pipewire.enable = true;
xdg.portal = {
enable = true;
gtkUsePortal = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
xdg-desktop-portal-wlr
];
};
boot.extraModulePackages = with config.boot.kernelPackages; [
v4l2loopback
];
environment = {
etc = {
"sway/config".source = ../dotfiles/sway/config;
"sway/status.toml".source = ../dotfiles/sway/status.toml;
"xdg/alacritty/alacritty.yml".source = ../dotfiles/alacritty.yml;
};
};
sound.enable = true;
hardware.pulseaudio.enable = true;
fonts.enableDefaultFonts = true;
fonts.fontconfig.antialias = true;
fonts.fonts = with pkgs; [
cascadia-code
font-awesome
noto-fonts
noto-fonts-emoji
];
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
# firefox also needs:
#
# gfx.webrenderer.enabled = true
# widget.wayland-dmabuf-vaapi.enabled = true
#
# check in `about:support` that
# * Composing -> Webrenderer
firefox-bin
libva
libva-utils
mesa
librsvg
mypaint
mypaint-brushes
gsettings-desktop-schemas
glib # provides gsettings
arc-theme
capitaine-cursors
elementary-xfce-icon-theme
hicolor-icon-theme
numix-icon-theme
alacritty
imv
inkscape
libqrencode
libreoffice
libsecret
lxappearance
mumble
neofetch
pavucontrol
pcmanfm
pulseaudio
pulsemixer
wl-clipboard
xdg_utils
unstable.keepassxc
(
pkgs.writeTextFile {
name = "startsway";
destination = "/bin/startsway";
executable = true;
text = ''
#! ${pkgs.bash}/bin/bash
export _JAVA_AWT_WM_NOREPARENTING=1
export MOZ_ENABLE_WAYLAND=1 export QT_AUTO_SCREEN_SCALE_FACTOR=0
export QT_WAYLAND_FORCE_DPI=96
export QT_QPA_PLATFORM=wayland-egl
export SDL_VIDEODRIVER=wayland
${pkgs.dbus}/bin/dbus-run-session ${pkgs.sway}/bin/sway
'';
}
)
];
hardware.bluetooth.enable = true;
services.blueman.enable = true;
services.syncthing = {
enable = true;
dataDir = "/home/stefan";
openDefaultPorts = true;
package = unstable.syncthing;
user = "stefan";
group = "users";
};
services.avahi.enable = true;
services.printing.enable = true;
services.printing.drivers = [
pkgs.gutenprint
];
hardware.opengl = {
enable = true;
};
}